diff --git a/.agents/skills/exploring_dependency_sources/SKILL.md b/.agents/skills/exploring_dependency_sources/SKILL.md new file mode 100644 index 00000000..23863d58 --- /dev/null +++ b/.agents/skills/exploring_dependency_sources/SKILL.md @@ -0,0 +1,290 @@ +--- +name: exploring_dependency_sources +description: > + Reads and searches source code across ALL scopes: external library dependencies, plugins (buildscript), and Gradle Build Tool internal source code; + use whenever you need to UNDERSTAND an API — its shape, signature, parameters, overloads, or implementation — before writing any code that calls it; + covers project dependencies (via project/configuration/source set scope), plugins (via `sourceSetPath=":buildscript"`), and Gradle internals (via `gradleSource: true`). + Prefer this over the REPL for all API research; reading source is instantaneous and complete. + Do NOT use for project source code (use grep/tilth), Gradle documentation (use `gradle_docs` via the `gradle` skill), or Maven Central discovery (use `managing_gradle_dependencies`). +license: Apache-2.0 +metadata: + author: https://github.com/rnett/gradle-mcp + version: "2.0" +--- + +# Authoritative Dependency, Plugin & Gradle Internal Source Exploration + +Explores, navigates, and analyzes the internal logic, APIs, and symbol implementations of external libraries, Gradle plugins, and the Gradle Build Tool itself with absolute precision using high-performance, indexed searching. + +## Constitution + +- **ALWAYS** use `search_dependency_sources` as the primary discovery tool for external library, plugin, and Gradle internal code. +- **ALWAYS** prefer reading source code over interactive REPL exploration for understanding unfamiliar library APIs. +- **ALWAYS** provide absolute paths for `projectRoot`. +- **ALWAYS** use the `{group}/{artifact}` prefix for reading specific files (e.g., `path="org.mongodb/mongodb-driver-sync/org/mongodb/client/MongoClient.kt"`). The `dependency` parameter should only be used to filter the search scope for + performance when searching across libraries, not as the primary way to specify a path. +- **ALWAYS** escape Lucene special characters (`:`, `=`, `+`, `-`, `*`, `/`) in `FULL_TEXT` searches using a backslash (e.g., `\:`) or double quotes. +- **ALWAYS** use `read_dependency_sources` once a specific file path has been identified via search. +- **ALWAYS** use `fresh: true` if a search returns a `SearchResponse` with an `error` indicating a missing index. +- **BE AWARE** that indexing and extraction failures (e.g., `ZipException`) are propagated and will cause the tool to fail with a descriptive error. +- **NOTE** that the `dependency` filter targets ONLY the specific library version matched, NOT its transitive dependencies. +- **BE AWARE** that buildscript (plugin) dependencies are excluded from `search_dependency_sources` and `read_dependency_sources` by default to reduce noise. +- **ALWAYS** use `sourceSetPath=":buildscript"` (root project) or `sourceSetPath=":app:buildscript"` (subproject) to search or read plugin source code. This targets the virtual `buildscript` source set which aggregates all classpath + plugins. +- **ALWAYS** use `gradleSource: true` in `search_dependency_sources` to target Gradle's internal engine when probing core Gradle behavior. +- **ALWAYS** scope with a project, configuration, or source set (or use `gradleSource: true`) — unscoped search is no longer supported. +- **ALWAYS** verify against the actual source implementation when researching Gradle internals. +- **NEVER** use generic shell tools like `grep` or `find` to *locate* dependency sources; they reside in remote caches whose paths are not predictable in advance. +- **MAY** use shell tools like `rg` or `ast-grep` to *operate on* a sources root path explicitly returned by `read_dependency_sources` or `search_dependency_sources` in the `Sources root: ` header line. Dependency directories inside + the sources root are symlinks; always pass `--follow` to `rg` (e.g., `rg --follow `). + +## Directives + +### Search Modes + +- **DECLARATION**: Best for classes, methods, or interfaces. Matches against the simple name (tokenized for CamelCase) and the full path (exact literal). All declaration searches are **case-sensitive**. Do NOT include keywords like `class`, + `interface`, or `fun`. Supports exact names, exact FQNs, glob wildcards (e.g., `*`, `**`), and regular expressions. Use `name:` (discovery) or `fqn:` (precision) prefix for field-specific searches. +- **FULL_TEXT**: Best for literal strings, constants, and complex code patterns using Lucene. **Case-insensitive**. +- **GLOB**: Best for finding specific files (XML, properties, etc.) by name or extension. **Case-insensitive**. + +Glob wildcards for FQNs: `*` matches one segment, `**` matches multiple. Example: `fqn:org.gradle.*.Project` or `fqn:org.**.Project`. + +Regex: Wrap query in `/` for a full regular expression on the `fqn` field. Example: `fqn:/.*\.internal\..*/` to find all internal declarations. + +### Scoping + +- **Project Dependencies**: Use `search_dependency_sources` with `projectPath`, `configurationPath`, or `sourceSetPath` to scope to project dependency code. +- **Plugins (Buildscript)**: Use `sourceSetPath=":buildscript"` to target plugin source code. +- **Gradle Internals**: Use `gradleSource: true` to target Gradle Build Tool source code. + +### Performance + +- **Target Libraries Directly**: Use the `dependency` parameter to filter searches to a single library (`group:name:version:variant`, `group:name:version`, `group:name`, or just `group`). This bypasses project-level index merging for + instantaneous results. +- **Troubleshoot Targeted Searches**: If a targeted search fails, use `inspect_dependencies` first to verify the exact coordinates of the dependency as resolved by Gradle. +- **Refresh Indices**: Use `fresh: true` if project dependencies have recently changed. +- **Use Returned Sources Root**: Every response includes a `Sources root: ` header. Use this path with `rg`, `ast-grep`, or other shell tools for operations not covered by the MCP tools. Always pass `--follow` to `rg` for + symlinked dependency directories. + +### Exploration + +- **Explore Packages Authoritatively**: Use `read_dependency_sources` with a dot-separated package path (e.g., `org.gradle.api`) to list its direct symbols and sub-packages. +- **Analyze Implementation**: Use `read_dependency_sources` to retrieve implementation logic. Use `pagination` for large files. +- **Trace Symbols Authoritatively**: When encountering an unknown symbol, use `DECLARATION` search to jump directly to its definition. + +## When to Use + +> **Decision rule**: If the question is *"what does this API look like or how does it work?"* — use this skill. If you need to *run* code to see what it does at runtime — use `interacting_with_project_runtime` (REPL). Read before you run. + +- **API & Symbol Discovery**: Finding implementation, signature, or documentation of a class/interface/method from a dependency, plugin, or Gradle itself. +- **Library Usage Research**: Understanding how to use a library's API by reading its internal implementation. +- **Internal Logic Auditing**: Researching how a dependency or Gradle engine handles specific operations. +- **Resource File Location**: Searching for configuration files (XML, JSON, properties) or metadata packaged within library jars. +- **Constant & Literal Research**: Searching for specific constant values, error strings, or literal keys within external code. +- **Gradle Internal Exploration**: Probing Gradle engine classes (e.g., `org.gradle.api.Project`, `Task`, `DependencyHandler`) to understand internal behavior. +- **Plugin Source Auditing**: Examining plugin implementations to understand how they configure the build at runtime. + +## Workflows + +### 1. Tracing a Symbol from Project Code + +1. Identify the symbol name or fully qualified name from an import. +2. Call `search_dependency_sources(query="", searchType="DECLARATION", projectPath=":")`. +3. Identify the correct file path from the results. +4. Call `read_dependency_sources(path="", projectPath=":")` to analyze the implementation. + +### 2. Discovering API Usage through Source + +1. Search for a known entry point (constructor, main class) using `DECLARATION` or `FULL_TEXT`. +2. Once found, use `read_dependency_sources` to read the source. +3. Look for internal calls, helper methods, or factory patterns to understand preferred usage. + +### 3. Researching Gradle Internal Engine + +1. Search for the class: `search_dependency_sources(query="", searchType="DECLARATION", gradleSource=true)`. +2. Use glob wildcards for subpackage searches: `fqn:org.gradle.*.SomeApi` or `fqn:org.**.SomeApi`. +3. Once identified, read the implementation: `read_dependency_sources(path="org/gradle/...", gradleSource=true)`. +4. Check for breaking changes against specific versions via `gradle_docs` (see `gradle` skill). + +### 4. Researching Plugin Source Code + +1. Search plugins: `search_dependency_sources(query="", searchType="DECLARATION", sourceSetPath=":buildscript")`. +2. Read plugin implementation: `read_dependency_sources(path="//...", sourceSetPath=":buildscript")`. + +### 5. Targeted Search for a Single Library + +1. Identify dependency coordinates from `inspect_dependencies` or project files. +2. Call `search_dependency_sources(query="", dependency="", projectPath=":")`. +3. Results are scoped ONLY to that library for maximum speed and relevance. + +### 6. Searching for Constants or Error Codes + +1. Identify the constant name or error message snippet. +2. Call `search_dependency_sources(query="", projectPath=":")` (defaults to `FULL_TEXT`). +3. Review matches to find where the value is defined or used. + +### 7. Exploring Documentation (Gradle Docs) + +For official Gradle documentation (User Guide, DSL, Release Notes), use the `gradle_docs` tool via the `gradle` skill. See [Internal Source Research](references/internal_source_research.md) for authoritative research patterns combining docs +and source. + +## Examples + +### Search for a specific class definition (project deps) + +Tool: `search_dependency_sources` + +```json +{ + "query": "JsonConfiguration", + "searchType": "DECLARATION", + "projectPath": ":" +} +// Reasoning: DECLARATION search for a class name across both name and FQN fields, scoped to the root project. +``` + +### Search Gradle internal engine source code + +Tool: `search_dependency_sources` + +```json +{ + "query": "Project", + "searchType": "DECLARATION", + "gradleSource": true +} +// Reasoning: Using gradleSource and DECLARATION search to find the ground-truth implementation of the core Project API. +``` + +### Search for a specific class within a targeted library + +Tool: `search_dependency_sources` + +```json +{ + "query": "MongoClient", + "searchType": "DECLARATION", + "dependency": "org.mongodb:mongodb-driver-sync", + "projectPath": ":" +} +// Reasoning: The 'dependency' parameter targets only the 'mongodb-driver-sync' library for a fast, focused search. +``` + +### Search plugin source code + +Tool: `search_dependency_sources` + +```json +{ + "query": "KotlinPlugin", + "searchType": "DECLARATION", + "sourceSetPath": ":buildscript" +} +// Reasoning: Targeting the buildscript source set to find plugin implementation classes. +``` + +### Search with FQN glob wildcards (Gradle internals) + +Tool: `search_dependency_sources` + +```json +{ + "query": "fqn:org.gradle.*.Project", + "searchType": "DECLARATION", + "gradleSource": true +} +// Reasoning: Glob wildcard to find Project declarations in any direct sub-package of org.gradle. +``` + +### Use regular expressions for internal APIs + +Tool: `search_dependency_sources` + +```json +{ + "query": "fqn:/.*\\.internal\\..*/", + "searchType": "DECLARATION", + "gradleSource": true +} +// Reasoning: Regex on the 'fqn' field to find all internal Gradle declarations. +``` + +### Search with name-specific discovery (CamelCase) + +Tool: `search_dependency_sources` + +```json +{ + "query": "name:Configuration", + "searchType": "DECLARATION", + "projectPath": ":" +} +// Reasoning: The 'name:' prefix finds classes like 'JsonConfiguration' via CamelCase tokenization. +``` + +### Search for a constant value assignment + +Tool: `search_dependency_sources` + +```json +{ + "query": "DEFAULT_TIMEOUT_MS \\: 5000", + "projectPath": ":" +} +// Reasoning: FULL_TEXT (default) with escaped colon to find a specific constant assignment. +``` + +### Locate a specific file by its exact name + +Tool: `search_dependency_sources` + +```json +{ + "query": "**/AndroidManifest.xml", + "searchType": "GLOB", + "projectPath": ":" +} +// Reasoning: GLOB search to find a specific file by name across the dependency graph. +``` + +### Read sources from a specific dependency + +Tool: `read_dependency_sources` + +```json +{ + "path": "org.jetbrains.kotlinx/kotlinx-coroutines-core/kotlinx/coroutines/Job.kt", + "projectPath": ":" +} +// Reasoning: Reading 'Job.kt' using the recommended `{group}/{artifact}` syntax. +``` + +### Read a specific Gradle internal class + +Tool: `read_dependency_sources` + +```json +{ + "path": "org/gradle/api/Project.java", + "gradleSource": true +} +// Reasoning: Retrieving the source code for a fundamental Gradle class for high-resolution analysis. +``` + +### Explore a package via its FQN + +Tool: `read_dependency_sources` + +```json +{ + "path": "org.gradle.api", + "projectPath": ":" +} +// Reasoning: Listing the direct symbols and sub-packages of 'org.gradle.api' using index-backed exploration. +``` + +## Resources + +- [Internal Source Research](references/internal_source_research.md) — Combining `gradle_docs` documentation lookup with `gradleSource: true` source searches for authoritative research. +- **Lucene Query Syntax**: Refer to the tool description for `search_dependency_sources` for details on complex queries and escaping. +- **Troubleshooting Targeted Searches**: If `dependency` filter fails, run `inspect_dependencies` to confirm exact coordinates. diff --git a/.agents/skills/exploring_dependency_sources/references/internal_source_research.md b/.agents/skills/exploring_dependency_sources/references/internal_source_research.md new file mode 100644 index 00000000..2bf164e5 --- /dev/null +++ b/.agents/skills/exploring_dependency_sources/references/internal_source_research.md @@ -0,0 +1,126 @@ +# Gradle Internal Source Research + +Guidance for researching Gradle Build Tool's internal implementation and third-party plugin source code using `search_dependency_sources` and `read_dependency_sources`. + +## Searching the Gradle Engine + +Use `gradleSource = true` and select the appropriate `searchType`: + +### DECLARATION: Finding Class/Interface Definitions + +```json +{ + "query": "DefaultProject", + "searchType": "DECLARATION", + "gradleSource": true +} +``` + +Search by simple name, FQN, or partial package paths. All declaration searches are **case-sensitive**. + +### DECLARATION with FQN Glob Wildcards + +```json +{ + "query": "fqn:org.gradle.*.Project", + "searchType": "DECLARATION", + "gradleSource": true +} +``` + +`*` matches one segment, `**` matches multiple. Example: `fqn:org.**.AbstractTask`. + +### Regex on FQN for Internal APIs + +```json +{ + "query": "fqn:/.*\\.internal\\..*/", + "searchType": "DECLARATION", + "gradleSource": true +} +``` + +### FULL_TEXT: Searching Implementation Patterns + +```json +{ + "query": "configurationCache", + "gradleSource": true +} +``` + +**Case-insensitive** text search. Escape Lucene special characters (`:`, `=`, `+`, `-`, `*`, `/`) with backslash. + +### GLOB: Finding Internal Resource Files + +```json +{ + "query": "**/plugin.properties", + "searchType": "GLOB", + "gradleSource": true +} +``` + +**Case-insensitive** file name search. + +## Reading Implementation Details + +Once a class is identified via search, read its source: + +```json +{ + "path": "org/gradle/api/Project.java", + "gradleSource": true +} +``` + +For large files, use `pagination`: + +```json +{ + "path": "org/gradle/api/Project.java", + "gradleSource": true, + "pagination": { + "offset": 0, + "limit": 100 + } +} +``` + +## Researching Plugin Source Code + +Plugin (buildscript) dependencies are excluded by default. Use `sourceSetPath=":buildscript"` to include them: + +### Searching Plugin Classes + +```json +{ + "query": "KotlinPlugin", + "searchType": "DECLARATION", + "sourceSetPath": ":buildscript" +} +``` + +### Reading Plugin Source + +```json +{ + "path": "org.jetbrains.kotlin/kotlin-gradle-plugin/org/jetbrains/kotlin/gradle/plugin/KotlinPlugin.kt", + "sourceSetPath": ":buildscript" +} +``` + +## Tracing Symbols Across Scopes + +When encountering an unknown Gradle API or plugin class: + +1. Search with `gradleSource: true` for engine classes. +2. Search with `sourceSetPath=":buildscript"` for plugin classes. +3. Read the implementation with `read_dependency_sources`. +4. Cross-reference with official documentation via `gradle_docs` (see `gradle` skill). + +## Troubleshooting + +- **Source Not Found**: Some Gradle internal modules may not be fully indexed. Try a broader `FULL_TEXT` search or browse the directory structure via `read_dependency_sources` with `gradleSource: true`. +- **Plugin Not Found**: Ensure the plugin is resolved in the buildscript classpath. Use `inspect_dependencies(sourceSetPath=":buildscript")` to verify. +- **Index Error**: Use `fresh: true` if searching after dependency changes. diff --git a/.agents/skills/gradle/SKILL.md b/.agents/skills/gradle/SKILL.md new file mode 100644 index 00000000..8ed6ed0c --- /dev/null +++ b/.agents/skills/gradle/SKILL.md @@ -0,0 +1,345 @@ +--- +name: gradle +description: > + Provides authoritative guidance for ALL Gradle operations: executing builds, running tests with surgical filtering, introspecting project structure, creating modules, and diagnosing failures; + ALWAYS use instead of raw shell `./gradlew` for build execution, test runs, task introspection, module creation, performance audits, and documentation research. + Do NOT use for dependency graph auditing/updates (use `managing_gradle_dependencies`) or dependency/plugin/Gradle source exploration (use `exploring_dependency_sources`). +license: Apache-2.0 +metadata: + author: https://github.com/rnett/gradle-mcp + version: "4.0" +--- + +# Authoritative Gradle Build Execution, Testing & Project Introspection + +Executes builds, runs tests with high-precision filtering, introspects project structure, and diagnoses failures using managed orchestration and structured diagnostics. + +## Constitution + +- **ALWAYS** use the `gradle` tool instead of `./gradlew` via shell. +- **ALWAYS** provide absolute paths for `projectRoot`. +- **ALWAYS** prefer foreground execution (default) unless the task is persistent (e.g., servers) or extremely long-running (>2 minutes), or you explicitly intend to perform independent research while it proceeds. +- **ALWAYS** use `captureTaskOutput` when you need the isolated output of a specific task (e.g., `help`, `projects`, `tasks`, `properties`, `dependencies`). +- **STRONGLY PREFERRED**: Use `query_build` for all diagnostics. It is more token-efficient than reading raw console logs and provides structured access to failures, problems, and per-test output. +- **ALWAYS** use `query_build` with `kind="TESTS"` and `query="FullTestName"` to access full test output and stack traces. +- **NEVER** use `taskPath` or `captureTaskOutput` to investigate specific test failures; these provide the overall task log which is often truncated and lacks per-test isolation. Per-test output (via `query`) is authoritative and includes + full stack traces. +- **NEVER** use `--rerun-tasks` unless investigating project-wide cache-specific corruption; prefer `--rerun` for individual tasks. +- **NEVER** guess task names or options; use the `help --task ` command for authoritative documentation. +- **NEVER** leave background builds running; use `stopBuildId` to release resources when finished. +- **ALWAYS** prefer Kotlin DSL (`.kts`) unless the project explicitly uses Groovy. +- **ALWAYS** use lazy APIs (e.g., `tasks.register("myTask")`) instead of eager APIs (e.g., `tasks.create("myTask")`) to maintain configuration performance. +- **ALWAYS** use version catalogs (`libs.versions.toml`) for dependency management when present. +- **ALWAYS** use `gradle_docs` for authoritative documentation lookup instead of generic web searches. +- **ALWAYS** check for existing conventions in the current project before proposing changes. +- **ALWAYS** use safe navigation (`?.url?.toString()`) and provide fallback values when accessing `ArtifactRepository` URLs in Gradle init scripts or plugins to prevent `NullPointerException`. +- **ALWAYS** use `:properties --property ` for surgical property extraction. + +## Directives + +### Authoritative Task Path Syntax + +Gradle uses two ways to identify tasks from the command line. Precision prevents running redundant tasks in multi-project builds. + +#### Task Selectors (Recursive Execution) + +Providing a task name **without a leading colon** (e.g., `test`, `build`) acts as a selector. Gradle executes that task in **every project** (root and all subprojects) that contains a task with that name. + +- **Example**: `gradle(commandLine=["test"])` -> Executes `test` in **all** projects. + +#### Absolute Task Paths (Targeted Execution) + +Providing a task path **with a leading colon** (e.g., `:test`, `:app:test`) targets a **single specific project**. + +- **Root Project Only**: Use a single leading colon. `gradle(commandLine=[":test"])` -> Root project ONLY. +- **Subproject Only**: Use the subproject name(s) separated by colons. `gradle(commandLine=[":app:test"])` -> ':app' subproject ONLY. + +### Authoritative Test Selection (`--tests`) + +The `--tests` flag supports powerful, high-precision filtering: + +- **Exact Class**: `--tests com.example.MyTest` +- **Exact Method**: `--tests com.example.MyTest.myTestMethod` +- **Wildcard Method**: `--tests com.example.MyTest.test*` (All methods starting with 'test') +- **Package Filter**: `--tests com.example.service.*` (All tests in the 'service' package) +- **Class Prefix**: `--tests *IntegrationTest` (All classes ending in 'IntegrationTest') +- **Character Wildcard**: `--tests com.example.Test?` (Matches Test1, TestA, etc.) +- **Multi-Filter**: `gradle(commandLine=["test", "--tests", "ClassA", "--tests", "ClassB"])` + +Patterns match against the **fully qualified name** of the test class or method. + +### Foreground vs. Background Execution + +- **ALWAYS use foreground for authoritative runs**: If you intend to wait for a result, ALWAYS use foreground execution. It provides superior progressive disclosure and simpler control flow. +- **Background ONLY for persistent tasks**: Use `background: true` ONLY for tasks that must remain active (e.g., `bootRun`, continuous builds) or when you intentionally intend to perform independent research while the build proceeds. +- **Foreground is safe**: Do not fear running high-output suites in the foreground. The `gradle` tool uses progressive disclosure to provide concise summaries and structured results, keeping session history clean. + +### `captureTaskOutput` Usage + +Use `captureTaskOutput` when you need clean, isolated output from a specific task without Gradle's general console noise. This is ideal for introspection tasks: + +- `captureTaskOutput: ":projects"` - Clean project list +- `captureTaskOutput: ":app:tasks"` - Task list for a specific project +- `captureTaskOutput: ":help"` - Documentation for a specific task +- `captureTaskOutput: ":properties"` - Single property extraction +- `captureTaskOutput: ":app:dependencyInsight"` - Dependency resolution path + +### `gradle_docs` Tag Syntax + +Use `gradle_docs` for authoritative documentation. Always scope with tags: + +| Tag | Section | +|----------------------|----------------------------------------------------| +| `tag:userguide` | Official Gradle User Guide | +| `tag:dsl` | Gradle DSL Reference (Groovy and Kotlin DSL) | +| `tag:javadoc` | Gradle Java API Reference | +| `tag:samples` | Official Gradle samples and examples | +| `tag:release-notes` | Version-specific release insights | +| `tag:best-practices` | Official best practices and performance guidelines | + +Explore sections with `path="."`. Search scoped with `tag:
`. + +### Idiomatic DSL Patterns + +- **Prefer `register` over `create` (Lazy APIs)**: Use `tasks.register("myTask")` to avoid eager task configuration. +- **Use Type-Safe Accessors**: Prefer `tasks.test { ... }` or `tasks.named("test") { ... }` over `tasks.getByName("test")`. +- **Use Lazy Properties**: Employ `Property` and `Provider` APIs for late binding and configuration cache compatibility. +- **Use Version Catalogs**: Centralize dependencies in `gradle/libs.versions.toml`. +- **Avoid `allprojects`/`subprojects`**: These blocks create tight coupling; use convention plugins and apply them selectively. +- **Enable Configuration Cache**: Ensure build logic avoids accessing the `Project` object inside task actions. +- **Use Specific Annotations**: Properly label task properties with `@Input`, `@OutputFiles`, `@Internal`, etc. +- **Minimize Logic in Build Scripts**: Move complex logic into convention plugins or `build-logic`. + +### Resource Management + +- Use `query_build()` without arguments to view the build dashboard and ensure no orphaned background builds are consuming system resources. +- Set `invocationArguments: { envSource: "SHELL" }` if Gradle cannot find expected env vars (e.g., `JAVA_HOME`). + +### Diagnostic Inspection (See References) + +For comprehensive guidance on using `query_build` and `wait_build` for diagnostics, including JSON examples for every inspection mode (DASHBOARD, SUMMARY, FAILURES, PROBLEMS, TASKS, TESTS, CONSOLE, PROGRESS), refer +to: [query_build Diagnostics Reference](references/query_build_diagnostics.md). + +## Workflows + +### Running a Foreground Build + +1. Identify the task(s) to run (e.g., `["clean", "build"]`). +2. Call `gradle(commandLine=["...", "..."])`. +3. If the build fails, the tool returns a high-signal failure summary. Use `query_build` with the `buildId` for deeper diagnostics via [query_build Diagnostics Reference](references/query_build_diagnostics.md). + +### Running Specific Tests + +1. Identify the project path (e.g., `:app`) and the test filter (e.g., `com.example.MyTestClass*`). +2. Call `gradle(commandLine=[":app:test", "--tests", "com.example.MyTest"])`. +3. If failures are reported, use `query_build` to get detailed test output. + +### Orchestrating Background Jobs + +1. Start the build with `background: true` to receive a `BuildId`. +2. Use `wait_build(buildId=ID, timeout=..., waitFor=...)` to block until a specific state or log pattern is reached. +3. Use `query_build()` (no arguments) to manage active jobs in the dashboard. +4. Stop the job using `gradle(stopBuildId=ID)` when finished. + +### Introspecting Project Structure + +1. Run `gradle(commandLine=[":projects"], captureTaskOutput=":projects")` to map the multi-project hierarchy. +2. Run `gradle(commandLine=[":app:tasks", "--all"], captureTaskOutput=":app:tasks")` to discover runnable tasks. +3. Run `gradle(commandLine=[":help", "--task", "test"], captureTaskOutput=":help")` for task-specific documentation. +4. Run `gradle(commandLine=[":properties", "--property", "version"], captureTaskOutput=":properties")` for surgical property extraction. +5. For detailed dependency resolution paths: `gradle(commandLine=[":app:dependencyInsight", "--dependency", "slf4j-api", "--configuration", "compileClasspath"], captureTaskOutput=":app:dependencyInsight")`. + +### Creating a New Module + +1. Map the project structure: `gradle(commandLine=[":projects"], captureTaskOutput=":projects")` to find the correct parent path. +2. Create directory structure: `New-Item -ItemType Directory -Force -Path "/src/main/kotlin"`. +3. Add to `settings.gradle.kts`: Append `include(":")`. +4. Create `build.gradle.kts` with idiomatic patterns (apply convention plugins, set up standard configuration). +5. Verify: `gradle(commandLine=["::tasks"], captureTaskOutput="::tasks")`. + +### Performance Audit + +1. Check configuration cache status: `gradle(commandLine=[":help", "--configuration-cache"])`. +2. Analyze task compatibility and identify violations. +3. Propose fixes: migrate to lazy APIs (`Property`, `Provider`) or use `@Internal`/`@Input` annotations correctly. +4. Verify against latest guidance: `gradle_docs(query="tag:best-practices", projectRoot="/path/to/project")`. + +### Documentation Research + +1. Search the user guide: `gradle_docs(query="tag:userguide ", projectRoot="/path/to/project")`. +2. Navigate the DSL reference: `gradle_docs(path="dsl/org.gradle.api.Project.html", projectRoot="/path/to/project")`. +3. Check for breaking changes: `gradle_docs(query="tag:release-notes", version="8.6")`. +4. Find best practices: `gradle_docs(query="tag:best-practices dependency management", projectRoot="/path/to/project")`. +5. Search for samples: `gradle_docs(query="tag:samples toolchains", projectRoot="/path/to/project")`. +6. Search javadocs: `gradle_docs(query="tag:javadoc Project", projectRoot="/path/to/project")`. + +### Investigating Test Failures + +1. Identify the `BuildId` from the build result. +2. Use `query_build(buildId=ID, kind="TESTS", outcome="FAILED")` to list all failed tests. +3. Use `query_build(buildId=ID, kind="TESTS", query=TNAME)` to see the full output and stack trace for a specific test. +4. **DO NOT** use `taskPath` or `captureTaskOutput` for test failure investigation. + +## When to Use + +- **Core Lifecycle Execution**: When you need to execute standard Gradle tasks (`build`, `assemble`, `clean`) with reliable, parseable output. +- **Test Execution & Diagnostics**: When running tests with `--tests` filtering, isolating failures, or retrieving full stack traces. +- **Introspection & Mapping**: When mapping multi-module project hierarchies, discovering runnable tasks, or auditing build configuration. +- **Surgical Property Inspection**: When extracting a specific property value (artifact version, build directory) for use in a subsequent task. +- **Persistent Development Processes**: When starting dev servers (`bootRun`) or continuous builds where background management is required. +- **Task-Specific Information Retrieval**: When you need isolated output from a single task (`help`, `projects`, `tasks`) without build noise. +- **Build Failure Diagnostics**: When performing deep-dive analysis of task failures, problems, or compilation errors. +- **New Module Creation**: When adding a new project or module to a multi-project build. +- **Build Logic Refactoring**: When cleaning up complex build scripts or creating convention plugins. +- **Performance Troubleshooting**: When builds are slow or failing during the configuration phase. +- **Documentation & DSL Research**: When looking up official Gradle syntax, user guide topics, or release notes. + +## Examples + +### Run build in all projects + +Tool: `gradle` + +```json +{ + "commandLine": ["build"] +} +// Reasoning: Task selector (no colon) verifies build health across the entire multi-project structure. +``` + +### Run a single test class in a specific subproject + +Tool: `gradle` + +```json +{ + "commandLine": [":app:test", "--tests", "com.example.service.MyServiceTest"] +} +// Reasoning: Absolute task path with exact class filter for the fastest possible feedback loop. +``` + +### Inspect help output for a specific task + +Tool: `gradle` + +```json +{ + "commandLine": [":app:help", "--task", "test"], + "captureTaskOutput": ":app:help" +} +// Reasoning: Using captureTaskOutput to retrieve clean, isolated documentation. +``` + +### List all sub-projects in the build + +Tool: `gradle` + +```json +{ + "commandLine": [":projects"], + "captureTaskOutput": ":projects" +} +// Reasoning: Using captureTaskOutput to retrieve the project hierarchy list without startup noise. +``` + +### Surgically inspect the 'version' property + +Tool: `gradle` + +```json +{ + "commandLine": [":properties", "--property", "version"], + "captureTaskOutput": ":properties" +} +// Reasoning: Using --property to isolate a single value and avoid retrieving thousands of unrelated properties. +``` + +### Analyze a specific dependency conflict + +Tool: `gradle` + +```json +{ + "commandLine": [ + ":app:dependencyInsight", + "--dependency", + "com.google.guava:guava", + "--configuration", + "runtimeClasspath" + ], + "captureTaskOutput": ":app:dependencyInsight" +} +// Reasoning: Using dependencyInsight to isolate the resolution path for a specific artifact. +``` + +### Start a dev server and wait for readiness + +Tool: `gradle` + +```json +// Step 1: Start the server in the background +{ + "commandLine": [":app:bootRun"], + "background": true +} +// Response: { "buildId": "build_123" } + +// Step 2: Wait for readiness signal +{ + "buildId": "build_123", + "timeout": 60, + "waitFor": "Started Application" +} +// Reasoning: Background orchestration allows the server to remain active while waiting for readiness. +``` + +### Search official Gradle documentation + +Tool: `gradle_docs` + +```json +{ + "query": "tag:dsl signing plugin", + "projectRoot": "/absolute/path/to/project" +} +// Reasoning: Using the DSL tag to find authoritative syntax for the signing plugin configuration. +``` + +### Create a new sub-project module + +Tool: `run_shell_command` + +```json +{ + "command": "New-Item -ItemType Directory -Force -Path subproject/src/main/kotlin" +} +// Reasoning: Creating the standard directory structure for a Kotlin JVM project using correct PowerShell syntax. +``` + +### List all failed tests in a build + +Tool: `query_build` + +```json +{ + "buildId": "build_abc123", + "kind": "TESTS", + "outcome": "FAILED" +} +// Reasoning: Isolating only the failures from a large test suite for efficient triage. +``` + +## Troubleshooting + +- **Build Not Found**: If a `BuildId` is not recognized, it may have expired from the recent history cache. Check the dashboard (`query_build()`) for valid active and historical IDs. +- **Task Output Not Captured**: Ensure the path provided to `captureTaskOutput` matches exactly one of the tasks in the `commandLine`. +- **Missing environment variables**: Set `invocationArguments: { envSource: "SHELL" }` if Gradle cannot find expected env vars (e.g., `JAVA_HOME`). + +## Resources + +- [query_build Diagnostics Reference](references/query_build_diagnostics.md) — Complete diagnostic patterns for DASHBOARD, SUMMARY, FAILURES, PROBLEMS, TASKS, TESTS, CONSOLE, and PROGRESS. +- [Background Monitoring Patterns](references/background_monitoring.md) +- [Authoritative Diagnostic Tasks](references/diagnostic_tasks.md) — Built-in introspection tasks. +- [Best Practices Snapshot](references/best_practices.md) — High-level best practices; always verify with `gradle_docs`. +- [Common Build Patterns](references/common_build_patterns.md) — Idiomatic patterns for multi-project builds, convention plugins, and task registration. +- [Official Gradle Documentation Research](references/gradle_docs_research.md) — Guidance on using `gradle_docs` for authoritative documentation. diff --git a/.agents/skills/gradle/references/background_monitoring.md b/.agents/skills/gradle/references/background_monitoring.md new file mode 100644 index 00000000..f4b0b647 --- /dev/null +++ b/.agents/skills/gradle/references/background_monitoring.md @@ -0,0 +1,105 @@ +# Background Monitoring Patterns + +This guide provides advanced patterns for monitoring and managing long-running background builds using `gradle`, `query_build`, and `wait_build`. + +## Common Monitoring Patterns + +### 1. Waiting for a Log Message + +The most common pattern for background builds (like dev servers) is to wait for a specific log message that indicates the build is ready using `wait_build`. + +```json +{ + "buildId": "BUILD_ID", + "timeout": 60, + "waitFor": "Started Application" +} +``` + +- **`timeout`**: Max seconds to wait for the message. +- **`waitFor`**: A regex pattern to match in the build logs. + +### 2. Waiting for Task Completion + +If you want to wait for a specific task to finish in a background build. + +```json +{ + "buildId": "BUILD_ID", + "timeout": 120, + "waitForTask": ":app:assemble" +} +``` + +- **`waitForTask`**: The path of the task to wait for. + +### 3. Monitoring Progress Without Waiting + +To check the current status of a background build without waiting for a specific event using `query_build`. + +```json +{ + "buildId": "BUILD_ID" +} +``` + +- This returns a summary of the current build state (e.g., `BUILD IN PROGRESS`, `SUCCESS`, `FAILURE`), failures, and problems. +- **Example**: `query_build(buildId="ID")` + +### 4. Inspecting Active Builds (Build Dashboard) + +To see all currently running background builds and recent history. + +```json +{} +``` + +- Call `query_build()` with **no arguments** to see the dashboard. +- This is the easiest way to find `BuildId`s for active or recently finished builds. + +## Advanced Management + +### 1. Stopping a Background Build + +Always stop background builds when they are no longer needed to free up resources. + +```json +{ + "stopBuildId": "BUILD_ID" +} +``` + +### 2. Continuous Builds + +For continuous builds (e.g., `gradle build --continuous`), use the background pattern and wait for the "Waiting for changes" message. + +```json +// Start the build +{ + "commandLine": ["build", "--continuous"], + "background": true +} + +// Wait for the first build to finish +{ + "buildId": "BUILD_ID", + "timeout": 120, + "waitFor": "Waiting for changes" +} +``` + +### 3. Handling Timeouts + +If a build takes longer than the `timeout` time, `wait_build` will return the current status. You can then call it again with a new `timeout` time if needed. + +## Troubleshooting Background Builds + +- **Build Fails Immediately**: If a background build fails quickly, check the `failures` and `console` output using `query_build`. +- **Log Message Not Found**: Ensure the `waitFor` regex is correct and that the message is actually being printed to the console. +- **Resource Exhaustion**: If you have too many background builds running, stop the ones you don't need using `stopBuildId`. + +## Functional Identity with Foreground Execution + +Monitoring a background build using `query_build` or `wait_build` provides exactly the same rich diagnostic data as a foreground build. The primary difference is control flow: background execution allows you to yield control and perform +other tasks, +whereas foreground execution blocks until completion. Both methods utilize progressive disclosure to ensure session history remains clean and focused. diff --git a/.agents/skills/gradle/references/best_practices.md b/.agents/skills/gradle/references/best_practices.md new file mode 100644 index 00000000..837ba1f8 --- /dev/null +++ b/.agents/skills/gradle/references/best_practices.md @@ -0,0 +1,109 @@ +# Gradle Build Logic Best Practices + +**IMPORTANT**: This document provides a high-level snapshot of common best practices. However, Gradle is a rapidly evolving tool. **You MUST use the `gradle_docs` tool to retrieve the most up-to-date and comprehensive best practices +directly from the official documentation.** + +## 1. Authoritative Research Workflow + +Before implementing significant build logic, always perform a search for the latest recommendations using scoped queries and project context. + +### Example: Getting an Index of Best Practices + +To find the authoritative index of best practices within the User Guide, first explore the `userguide/` directory to identify the correct files. + +Tool: `gradle_docs` + +```json +{ + "path": "userguide/", + "projectRoot": "/absolute/path/to/project" +} +``` + +**Reasoning**: This call lists the contents of the `userguide` directory. Look for files starting with `best_practices` (e.g., `best_practices.md`, `best_practices_dependency_management.md`). Once identified, read the main index: + +Tool: `gradle_docs` + +```json +{ + "path": "userguide/best_practices.md", + "projectRoot": "/absolute/path/to/project" +} +``` + +### Example: Searching for Best Practices + +Tool: `gradle_docs` + +```json +{ + "query": "tag:best-practices dependency management", + "projectRoot": "/absolute/path/to/project" +} +``` + +**Reasoning**: Using the authoritative `best-practices` tag ensures the returned content is filtered for high-signal architectural recommendations. + +### Example: Searching for Specific Guidance + +Tool: `gradle_docs` + +```json +{ + "query": "tag:userguide performance best practices", + "projectRoot": "/absolute/path/to/project" +} +``` + +--- + +## 2. Engine-Level Discovery (The "Source of Truth") + +To understand the core architectural principles behind best practices, you can explore Gradle's own source documentation. + +### Example: Listing Core Concepts and Documentation + +Use `gradle_docs` with `path="."` to explore the root documentation tree. + +Tool: `gradle_docs` + +```json +{ + "path": ".", + "projectRoot": "/absolute/path/to/project" +} +``` + +--- + +## 3. High-Level Snapshot (Current Guidelines) + +The following sections summarize established idiomatic patterns. Use these as a starting point, but verify against the official docs. + +### Kotlin DSL Idiomatic Patterns + +- **Use Type-Safe Accessors**: Prefer `tasks.test { ... }` or `tasks.named("test") { ... }` over `tasks.getByName("test")`. +- **Prefer `register` over `create` (Lazy APIs)**: Use `tasks.register("myTask")` to avoid eager task configuration. +- **Use Lazy Properties**: Employ the `Property` and `Provider` APIs for late binding and better configuration cache compatibility. + +### Performance & Configuration Cache + +- **Enable Configuration Cache**: Ensure build logic avoids accessing the `Project` object inside task actions. +- **Use Specific Annotations**: Properly label task properties with `@Input`, `@OutputFiles`, `@Internal`, etc. +- **Minimize Logic in Build Scripts**: Move complex logic into convention plugins or `buildSrc`. + +### Dependency Management + +- **Use Version Catalogs**: Centralize dependencies in `gradle/libs.versions.toml`. +- **Avoid `allprojects` and `subprojects`**: These blocks create tight coupling; use convention plugins and apply them selectively instead. + +### Project Integrity + +- **Reproducible Builds**: Use fixed versions and commit the Gradle wrapper. +- **Surgical Updates**: Only update what is necessary and verify with `check`. + +## Resources (Official Source of Truth) + +- [Official Gradle Best Practices](https://docs.gradle.org/current/userguide/best_practices.html) +- [Gradle Performance Guide](https://docs.gradle.org/current/userguide/performance.html) +- [Kotlin DSL Primer](https://docs.gradle.org/current/userguide/kotlin_dsl.html) diff --git a/.agents/skills/gradle/references/common_build_patterns.md b/.agents/skills/gradle/references/common_build_patterns.md new file mode 100644 index 00000000..e265c232 --- /dev/null +++ b/.agents/skills/gradle/references/common_build_patterns.md @@ -0,0 +1,142 @@ +# Common Gradle Build Patterns & Conventions + +A collection of idiomatic patterns for common Gradle build scenarios, including multi-project setups, convention plugins, and task registration. + +## 1. Multi-Project Build Structure + +Standard project structure with a root project and multiple subprojects. + +### Directory Structure + +``` +root/ +├── build.gradle.kts +├── settings.gradle.kts +├── libs.versions.toml +├── app/ +│ └── build.gradle.kts +├── core/ +│ └── build.gradle.kts +└── build-logic/ + ├── build.gradle.kts + └── settings.gradle.kts +``` + +### `settings.gradle.kts` + +```kotlin +pluginManagement { + includeBuild("build-logic") +} + +rootProject.name = "my-project" +include(":app", ":core") + +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("gradle/libs.versions.toml")) + } + } + repositories { + mavenCentral() + } +} +``` + +## 2. Convention Plugins (The `build-logic` Pattern) + +Move common project configuration logic into separate plugins to reduce duplication in `build.gradle.kts` files. + +### `build-logic/build.gradle.kts` + +```kotlin +plugins { + `kotlin-dsl` +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0") +} +``` + +### `build-logic/src/main/kotlin/my-convention.gradle.kts` + +```kotlin +plugins { + kotlin("jvm") +} + +repositories { + mavenCentral() +} + +tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) + } +} +``` + +### Usage in Subprojects + +```kotlin +plugins { + id("my-convention") +} +``` + +## 3. Registering Custom Tasks + +Use lazy task registration and configure properties with the `Property` and `Provider` APIs. + +```kotlin +abstract class MyCustomTask : DefaultTask() { + @get:Input + abstract val message: Property + + @TaskAction + fun action() { + println("Message: ${message.get()}") + } +} + +tasks.register("myTask") { + message.set("Hello from custom task!") +} +``` + +## 4. Configuring Standard Plugins + +### Java/Kotlin Library + +```kotlin +plugins { + `java-library` + kotlin("jvm") +} + +dependencies { + api("com.example:some-api:1.0") + implementation("com.example:some-impl:1.0") + testImplementation(kotlin("test")) +} +``` + +### Application Plugin + +```kotlin +plugins { + application +} + +application { + mainClass.set("com.example.Main") +} +``` + +## Resources + +- [Multi-project builds](https://docs.gradle.org/current/userguide/multi_project_builds.html) +- [Developing Custom Gradle Plugins](https://docs.gradle.org/current/userguide/custom_plugins.html) +- [Authoring maintainable builds](https://docs.gradle.org/current/userguide/authoring_maintainable_builds.html) diff --git a/.agents/skills/gradle/references/diagnostic_tasks.md b/.agents/skills/gradle/references/diagnostic_tasks.md new file mode 100644 index 00000000..e10ada27 --- /dev/null +++ b/.agents/skills/gradle/references/diagnostic_tasks.md @@ -0,0 +1,27 @@ +# Authoritative Diagnostic Tasks + +Gradle provides built-in tasks for deep introspection. Always use `captureTaskOutput` with these for the best experience. + +### 1. Project & Task Discovery + +- **`projects`**: Lists the sub-projects in the build. + - `gradle(commandLine=[":projects"], captureTaskOutput=":projects")` +- **`tasks`**: Lists runnable tasks. Use `--all` for a full list (including ungrouped tasks). + - `gradle(commandLine=[":app:tasks", "--all"], captureTaskOutput=":app:tasks")` +- **`help`**: Displays global or task-specific help. + - `gradle(commandLine=[":help", "--task", "test"], captureTaskOutput=":help")` + +### 2. Property & Environment Auditing + +- **`properties`**: Lists all project properties. Use `--property ` for surgical extraction. + - `gradle(commandLine=[":properties", "--property", "version"], captureTaskOutput=":properties")` +- **`javaToolchains`**: Displays detected JVM toolchains and their properties. + - `gradle(commandLine=[":javaToolchains"], captureTaskOutput=":javaToolchains")` + +### 3. Low-Level Dependency & Variant Analysis + +- **`dependencyInsight`**: Investigates why a specific dependency version was chosen. + - `gradle(commandLine=[":app:dependencyInsight", "--dependency", "slf4j-api", "--configuration", "compileClasspath"], captureTaskOutput=":app:dependencyInsight")` +- **`outgoingVariants`**: Displays the variants the project provides to consumers. + - `gradle(commandLine=[":app:outgoingVariants"], captureTaskOutput=":app:outgoingVariants")` +- **`resolvableConfigurations`**: Displays the configurations available for resolution. diff --git a/.agents/skills/gradle/references/gradle_docs_research.md b/.agents/skills/gradle/references/gradle_docs_research.md new file mode 100644 index 00000000..25d62b38 --- /dev/null +++ b/.agents/skills/gradle/references/gradle_docs_research.md @@ -0,0 +1,100 @@ +# Official Gradle Documentation Research + +Guidance on using the `gradle_docs` tool for authoritative documentation lookup, including the User Guide, DSL Reference, Release Notes, samples, and API reference. + +## Searching the User Guide + +```json +{ + "query": "tag:userguide working with files", + "projectRoot": "/absolute/path/to/project" +} +``` + +## Navigating the DSL Reference + +```json +{ + "path": "dsl/org.gradle.api.Project.html", + "projectRoot": "/absolute/path/to/project" +} +``` + +## Searching for Samples + +Official code samples are indexed with the `tag:samples` metadata: + +```json +{ + "query": "tag:samples toolchains", + "projectRoot": "/absolute/path/to/project" +} +``` + +## Searching Javadocs + +Technical API documentation is indexed with the `tag:javadoc` metadata: + +```json +{ + "query": "tag:javadoc Project", + "projectRoot": "/absolute/path/to/project" +} +``` + +## Best Practices + +### Getting an Index of Best Practices + +First, explore the `userguide/` directory to identify the correct files: + +```json +{ + "path": "userguide/", + "projectRoot": "/absolute/path/to/project" +} +``` + +This lists the contents of the `userguide` directory. Look for files starting with `best_practices` (e.g., `best_practices.md`, `best_practices_dependency_management.md`). Once identified, read the main index: + +```json +{ + "path": "userguide/best_practices.md", + "projectRoot": "/absolute/path/to/project" +} +``` + +### Searching for Best Practices + +```json +{ + "query": "tag:best-practices dependency management", + "projectRoot": "/absolute/path/to/project" +} +``` + +### Searching for Specific Guidance + +```json +{ + "query": "tag:userguide performance best practices", + "projectRoot": "/absolute/path/to/project" +} +``` + +## Exploring the Documentation Tree + +Use `gradle_docs` with `path="."` to explore the root documentation tree: + +```json +{ + "path": ".", + "projectRoot": "/absolute/path/to/project" +} +``` + +## External Resources + +- [Official Gradle Best Practices](https://docs.gradle.org/current/userguide/best_practices.html) +- [Gradle Performance Guide](https://docs.gradle.org/current/userguide/performance.html) +- [Kotlin DSL Primer](https://docs.gradle.org/current/userguide/kotlin_dsl.html) diff --git a/.agents/skills/gradle/references/query_build_diagnostics.md b/.agents/skills/gradle/references/query_build_diagnostics.md new file mode 100644 index 00000000..7c44075d --- /dev/null +++ b/.agents/skills/gradle/references/query_build_diagnostics.md @@ -0,0 +1,380 @@ +# query_build Diagnostics Reference + +Comprehensive guide to inspecting build results, diagnosing failures, and monitoring progress with `query_build` and `wait_build`. + +## Quick Reference + +| Goal | Tool Call | +|--------------------------|--------------------------------------------------------------------------------| +| See recent/active builds | `query_build()` | +| Build-level summary | `query_build(buildId="ID")` | +| Specific failure | `query_build(buildId="ID", kind="FAILURES", query="F0")` | +| Specific problem | `query_build(buildId="ID", kind="PROBLEMS", query="P1")` | +| Task output | `query_build(buildId="ID", kind="TASKS", query=":app:compileJava")` | +| List failed tests | `query_build(buildId="ID", kind="TESTS", outcome="FAILED")` | +| Per-test stack trace | `query_build(buildId="ID", kind="TESTS", query="com.example.MyTest.myMethod")` | +| Console logs (regex) | `query_build(buildId="ID", kind="CONSOLE", query="ERROR")` | +| Full export to file | `query_build(buildId="ID", kind="CONSOLE", outputFile="path/to/logs.txt")` | +| Wait for log pattern | `wait_build(buildId="ID", timeout=60, waitFor="Started")` | +| Wait for task | `wait_build(buildId="ID", timeout=120, waitForTask=":app:assemble")` | +| Wait for finish | `wait_build(buildId="ID", timeout=600)` | + +--- + +## 1. Build Dashboard (`query_build()`) + +Call `query_build()` with no arguments to see the **Build Dashboard** — a list of active background builds and recently completed builds with `BuildId`, status, and failure counts. Use this to discover valid `BuildId`s and ensure no +orphaned background builds are consuming resources. + +```json +{} +``` + +--- + +## 2. Build Summary (`query_build(buildId="ID")`) + +Provide a `buildId` to get a structured summary of that specific build, including: + +- Overall build status (SUCCESS, FAILED, etc.) +- Failure IDs and descriptions +- Problem IDs and descriptions +- Test result counts (passed, failed, skipped, etc.) + +The summary includes a guide on how to inspect specific details using the appropriate `kind`. + +```json +{ + "buildId": "BUILD_ID" +} +``` + +--- + +## 3. Failure Inspection (`kind="FAILURES"`) + +Inspect a specific build failure to see the full error message and stack trace. Find failure IDs (`F0`, `F1`, etc.) in the build summary. If you provide a unique prefix instead of the exact ID, the tool auto-resolves it. + +```json +{ + "buildId": "BUILD_ID", + "kind": "FAILURES", + "query": "F0" +} +``` + +--- + +## 4. Problem Inspection (`kind="PROBLEMS"`) + +Inspect a specific compilation or configuration problem. Find problem IDs (`P0`, `P1`, etc.) in the build summary. Provides file locations, error messages, and suggestions where available. + +```json +{ + "buildId": "BUILD_ID", + "kind": "PROBLEMS", + "query": "P1" +} +``` + +--- + +## 5. Task Output Inspection (`kind="TASKS"`) + +If the failure is task-related, check the isolated output of a specific task. Supports prefix matching on the task path. + +```json +{ + "buildId": "BUILD_ID", + "kind": "TASKS", + "query": ":app:compileJava" +} +``` + +--- + +## 6. Test Inspection (`kind="TESTS"`) + +### Listing Failed Tests (Summary Mode) + +Quickly see which tests failed without being overwhelmed by logs: + +```json +{ + "buildId": "BUILD_ID", + "kind": "TESTS", + "outcome": "FAILED" +} +``` + +### Getting Detailed Test Output (Details Mode) + +**CRITICAL**: Always use `kind="TESTS"` and `query` to see the complete stdout, stderr, and stack trace for a specific test. Supports unique prefix matching on the test name. + +```json +{ + "buildId": "BUILD_ID", + "kind": "TESTS", + "query": "com.example.MyTest.testMethod" +} +``` + +### Individual Test Case vs. Task Output + +**DO NOT** use `taskPath` or `captureTaskOutput` for investigating specific test failures: + +- **Task output** is the aggregated log of the entire test process. It is often truncated, interleaved, and lacks the full stack traces and per-test isolation needed for debugging. +- **Individual test output** (retrieved via `query`) is authoritative, includes full stdout/stderr for just that test case, and provides the complete stack trace for any failure. + +### Filtering by Name + +Use `query` with summary mode to see all executions of a test across different projects or iterations: + +```json +{ + "buildId": "BUILD_ID", + "kind": "TESTS", + "query": "MyTest" +} +``` + +### Monitoring Test Progress + +While a build is running, progress notifications provide real-time counts of passed, failed, and skipped tests. Call `query_build(buildId="ID")` repeatedly to see updated test counts: `(5 passed, 1 failed)`. + +### Pagination for Large Test Suites + +```json +{ + "buildId": "BUILD_ID", + "kind": "TESTS", + "pagination": { + "limit": 50, + "offset": 0 + }, + "query": "com.example.service" +} +``` + +--- + +## 7. Console Log Inspection (`kind="CONSOLE"`) + +If structured reports are insufficient, examine the raw console output. Use `query` as a regex filter. + +### Head (first N lines) + +```json +{ + "buildId": "BUILD_ID", + "kind": "CONSOLE", + "pagination": { + "limit": 100, + "offset": 0 + } +} +``` + +### Tail (last N lines) + +```json +{ + "buildId": "BUILD_ID", + "kind": "CONSOLE", + "pagination": { + "limit": 100 + } +} +``` + +### Filtered by Regex + +```json +{ + "buildId": "BUILD_ID", + "kind": "CONSOLE", + "query": "ERROR|FAILURE" +} +``` + +--- + +## 8. Progress Monitoring (`wait_build`) + +Use `wait_build` with `timeout`, `waitFor`, or `waitForTask` to block until a condition is met in a background build. + +### Waiting for a Log Message + +The most common pattern for background builds (dev servers) is waiting for a specific readiness message: + +```json +{ + "buildId": "BUILD_ID", + "timeout": 60, + "waitFor": "Started Application" +} +``` + +### Waiting for Task Completion + +```json +{ + "buildId": "BUILD_ID", + "timeout": 120, + "waitForTask": ":app:assemble" +} +``` + +### Waiting for Build Completion + +If `timeout` is set without a wait condition, the tool waits for the build to finish: + +```json +{ + "buildId": "BUILD_ID", + "timeout": 600 +} +``` + +### Handling Timeouts + +If a build takes longer than the `timeout` value, `wait_build` returns the current status. You can call it again with a new timeout. + +### Continuous Builds + +For continuous builds, wait for the "Waiting for changes" message after the first build completes: + +```json +// Start +{ "commandLine": ["build", "--continuous"], "background": true } + +// Wait +{ "buildId": "BUILD_ID", "timeout": 120, "waitFor": "Waiting for changes" } +``` + +--- + +## 9. Full Export (`outputFile`) + +Use `outputFile="path/to/file.txt"` to write the entire result to a file. This bypasses pagination limits and reduces token usage. Works with all `kind` values. + +```json +{ + "buildId": "BUILD_ID", + "kind": "CONSOLE", + "outputFile": "C:/temp/build_output.txt" +} +``` + +--- + +## 10. Diagnostic Workflow + +When a build fails, follow this structured approach: + +### Step 1: Get the Build Summary + +```json +{ "buildId": "BUILD_ID" } +``` + +Provides the high-level overview: failures, problems, and failed tests. + +### Step 2: Inspect Failures + +```json +{ "buildId": "BUILD_ID", "kind": "FAILURES", "query": "F0" } +``` + +### Step 3: Inspect Problems + +```json +{ "buildId": "BUILD_ID", "kind": "PROBLEMS", "query": "P1" } +``` + +### Step 4: Check Task Outputs + +```json +{ "buildId": "BUILD_ID", "kind": "TASKS", "query": ":app:compileJava" } +``` + +### Step 5: Check Test Failures + +```json +{ "buildId": "BUILD_ID", "kind": "TESTS", "outcome": "FAILED" } +``` + +Then drill into each failed test: + +```json +{ "buildId": "BUILD_ID", "kind": "TESTS", "query": "com.example.MyTest.shouldWork" } +``` + +### Step 6: Fall Back to Console Logs + +```json +{ "buildId": "BUILD_ID", "kind": "CONSOLE", "pagination": { "limit": 100 } } +``` + +--- + +## 11. Build Failures vs. Test Failures + +Sometimes a test run fails because the build itself failed (compilation error, configuration error, task dependency failure), not because a test failed. + +1. Check the build summary: `query_build(buildId="ID")`. +2. If failures or problems are listed, inspect them directly via `kind="FAILURES"` or `kind="PROBLEMS"`. +3. If the build failed but no tests are reported, focus on build-level failures and problems. + +--- + +## 12. Common Failure Scenarios + +### Compilation Errors + +- Look for problems with the specific `severity: ERROR` in the build summary. +- Check `kind="PROBLEMS"` for file location and error details. + +### Dependency Resolution Issues + +- Check `kind="FAILURES"` for messages like "Could not resolve all dependencies". +- Use `inspect_dependencies` to investigate the dependency graph. + +### Task Execution Failures + +- Check `kind="TASKS"` to see which task failed and its output. + +### Build Script Errors + +- Usually appear in the `kind="FAILURES"` section with a stack trace and line reference. + +### Assertion Failures + +- Check `kind="TESTS"` with the specific test `query` for expected vs. actual values. + +### Timeouts + +- Tests that time out may be marked as ERROR or FAILED. Check console output for "Timeout" messages. + +### Infrastructure Issues + +- If many tests fail with similar errors (`NoClassDefFoundError`, `DatabaseConnectionException`), check build-level failures and problems. + +--- + +## 13. Stopping Background Builds + +Always stop background builds when they are no longer needed: + +```json +{ + "stopBuildId": "BUILD_ID" +} +``` + +--- + +## 14. Foreground vs. Background Identity + +Monitoring a background build using `query_build` or `wait_build` provides exactly the same rich diagnostic data as a foreground build, including progressive disclosure. The difference is control flow: background allows non-blocking work +while the build proceeds; foreground blocks until completion. diff --git a/.agents/skills/interacting_with_project_runtime/SKILL.md b/.agents/skills/interacting_with_project_runtime/SKILL.md new file mode 100644 index 00000000..0d1cbb5c --- /dev/null +++ b/.agents/skills/interacting_with_project_runtime/SKILL.md @@ -0,0 +1,119 @@ +--- +name: interacting_with_project_runtime +description: > + Executes Kotlin code interactively within the project's full JVM classpath. + Use when you need to RUN code: verify runtime behavior, experiment with logic, or render Compose UI previews. + Do NOT use to understand an API's shape or signature — read its source with `exploring_dependency_sources` instead. +license: Apache-2.0 +metadata: + author: https://github.com/rnett/gradle-mcp + version: "2.3" +--- + +# Authoritative Project Runtime Interaction + +Runs Kotlin code interactively within the project's exact JVM classpath — for when you need to execute, not just read. + +## Constitution + +- **The core decision rule**: If the question is *"what does this API look like or how does it work?"* → use `search_dependency_sources` / `read_dependency_sources` (read the source). If the question is *"what happens when I run this?"* → + use `kotlin_repl`. +- **NEVER** start a REPL session to learn about an API. Reading indexed sources is instantaneous, shows the full implementation with all overloads, and requires no JVM process. +- **ALWAYS** use `kotlin_repl` instead of a standalone Kotlin REPL for project-aware interaction. +- **ALWAYS** provide absolute paths for `projectRoot`. +- **ALWAYS** start a REPL session with the correct `projectPath` and `sourceSet` (e.g., `main`, `test`). +- **ALWAYS** restart the REPL (`stop` then `start`) after modifying project source code to pick up changes in the classpath. +- **ALWAYS** use the `responder` API for rich output (images, markdown) to improve diagnostic visibility. +- **NEVER** leave a REPL session running indefinitely; use `stop` when finished. +- **REPL Session Management**: Explicitly terminate previous REPL sessions in `ReplTools` before starting new ones when session IDs are regenerated. This prevents leaking worker processes and ensures stable session management during + concurrent or sequential tool calls. + +## Directives + +- **Read to understand, run to verify**: If you need to understand what an API does — its signature, parameters, overloads, or implementation — read its source via `search_dependency_sources` / `read_dependency_sources`. Only reach for the + REPL once you know what you want to call and need to observe actual runtime output. +- **ALWAYS use project-aware REPL**: Only the `kotlin_repl` tool provides full access to the project's exact classpath, dependencies, and source sets. NEVER attempt to use standalone runners for project-internal logic. +- **Identify the environment**: When starting a session, ALWAYS ensure you select the appropriate `projectPath` (e.g., `:app`) and `sourceSet` (e.g., `main` for application code, `test` for test utility access). +- **Pick up source changes**: The REPL uses a static snapshot of the classpath. If you change project code, you MUST `stop` and then `start` the session again to pick up the updated classes. +- **Utilize the `responder`**: ALWAYS use `responder.render()` or specialized methods (`markdown`, `image`, `html`) to return rich content. +- **Import necessary classes**: ALWAYS provide explicit imports for project-specific and library classes. +- **Use `envSource: SHELL` if environment variables are missing**: If the REPL fails to find expected environment variables (e.g., `JAVA_HOME` or specific JDKs), it may be because the host process started before the shell environment was + fully loaded. Set `env: { envSource: "SHELL" }` when calling `start` to force a new shell process to query the environment. +- **Resolve `{baseDir}` manually**: If your environment does not automatically resolve the `{baseDir}` placeholder in reference links, treat it as the absolute path to the directory containing this `SKILL.md` file. + +## When to Use (you need to RUN code) + +- **Behavior Verification**: You know the API, you've written the call, and you need to observe the actual runtime output or side-effects. +- **Logic Prototyping**: Experimenting with an algorithm or snippet of your own code before committing it to source. +- **Visual Component Auditing**: Rendering Compose UI components to images for visual review. +- **Dynamic Data Probing**: One-off data transformations using your project's existing utilities where the output depends on runtime state. + +## When NOT to Use (you need to READ source instead) + +Ask yourself: *"Am I trying to understand this API, or run it?"* + +If you're trying to understand it — what methods it has, what its parameters are, how it's implemented — **stop and use `exploring_dependency_sources` first**. The REPL cannot tell you what you don't already know to ask; source reading can. +Examples of what belongs in source reading, not the REPL: + +- "What methods does `SomeClass` have?" → `search_dependency_sources` DECLARATION search +- "What does this function do internally?" → `read_dependency_sources` +- "What are the parameters / overloads of this function?" → `read_dependency_sources` +- "Does this library have a class for X?" → `search_dependency_sources` FULL_TEXT or DECLARATION search + +## Workflows + +### Starting an Authoritative Session + +1. Identify the project module (e.g., `:app`) and source set (e.g., `main`). +2. Call `kotlin_repl(command="start")`. +3. Optionally provide `env` for environment variables or `additionalDependencies` if you need external libraries not currently in the project. + +### Probing Code & State + +1. Use `kotlin_repl(command="run")` with your Kotlin code. +2. Use `responder.render()` for rich diagnostics. +3. Review the returned text or image content. + +### Lifecycle Management + +1. Use `kotlin_repl(command="stop")` once your investigation is complete to release system resources. + +## Examples + +### Probing a project utility function + +```json +// Start the session +{ + "command": "start", + "projectPath": ":my-project", + "sourceSet": "main" +} + +// Execute the probe +{ + "command": "run", + "code": "import com.example.utils.MyHelper\nMyHelper.calculateSum(1, 2)" +} +// Reasoning: Using kotlin_repl to verify a utility function in the context of the main source set. +``` + +### Visualizing a UI Component + +```kotlin +import androidx.compose.ui.test.* +import com.example.ui.MyComposable + +runComposeUiTest { + setContent { MyComposable() } + val bitmap = onRoot().captureToImage() + responder.render(bitmap) +} +// Reasoning: Using the responder API to retrieve a high-resolution image of a Compose component. +``` + +## Troubleshooting + +- **REPL Not Started**: You must call `start` successfully before calling `run`. +- **ClassNotFoundException**: Ensure the project has been built at least once and that you have selected the correct `sourceSet` (e.g., `test` if the class is in `src/test/kotlin`). +- **Changes Not Reflected**: If your code changes aren't appearing, `stop` and `start` the REPL to refresh the classpath. diff --git a/.agents/skills/managing_gradle_dependencies/SKILL.md b/.agents/skills/managing_gradle_dependencies/SKILL.md new file mode 100644 index 00000000..0adc95d2 --- /dev/null +++ b/.agents/skills/managing_gradle_dependencies/SKILL.md @@ -0,0 +1,166 @@ +--- +name: managing_gradle_dependencies +description: > + Audits and manages Gradle dependency graphs with high-resolution update checks, transitive tree analysis, and Maven Central discovery; + use for dependency auditing, finding stable updates, and resolving GAV coordinates. + Do NOT use for exploring dependency source code (use `exploring_dependency_sources`) or running builds/tests (use `gradle`). +license: Apache-2.0 +metadata: + author: https://github.com/rnett/gradle-mcp + version: "3.4" +--- + +# Authoritative Dependency Intelligence & Maven Central Search + +Audits project dependencies, performs high-resolution update checks, and discovers new libraries on Maven Central with powerful, integrated search tools. + +## Constitution + +- **ALWAYS** use `inspect_dependencies` for querying project dependency information instead of raw Gradle tasks. +- **ALWAYS** provide absolute paths for `projectRoot`. +- **ALWAYS** use `updatesOnly: true` to quickly identify available library updates. +- **ALWAYS** use `lookup_maven_versions` to find exact GAV coordinates for new libraries. +- **NEVER** add a dependency to a project without verifying its authoritative version and existence on Maven Central. +- **ALWAYS** use the `projectPath` argument to target specific modules in multi-project builds. + +## Directives + +- **Identify authoritative paths**: ALWAYS use the Gradle project path (e.g., `:app`) when querying dependencies. +- **Inspect plugins and build scripts**: Build script dependencies (like plugins) are automatically included in `inspect_dependencies` output under configurations prefixed with `buildscript:` (e.g. `buildscript:classpath`). +- **Monitor for updates**: ALWAYS use `updatesOnly: true` in `inspect_dependencies` to retrieve a flat, high-signal report of available library updates: `group:artifact: current → latest` with the project paths where each dep is used. + Configuration and source-set detail is intentionally omitted; use `inspect_dependencies` with a specific `dependency` filter if that detail is needed. +- **Target dependencies surgically**: Use the `dependency` parameter in `inspect_dependencies` to target a single library with a full-string Kotlin regex over `group:name:version[:variant]` coordinates. +- **Efficient Transitive Isolation**: When isolating a single library, filter the flattened list of resolved components using the dependency filter rather than traversing the dependency graph. This naturally and efficiently excludes + transitive dependencies that do not match the targeted filter. +- **Discover libraries surgically**: ALWAYS use `lookup_maven_versions` to check the version history of an existing artifact. +- **Use `gradle` for diagnostics**: For built-in tasks like `dependencyInsight`, ALWAYS use the `gradle` tool with `captureTaskOutput`. +- **Audit full trees**: ALWAYS use `onlyDirect: false` in `inspect_dependencies` when you need to visualize the complete transitive dependency graph. + +## When to Use + +- **Dependency Tree Auditing**: When you need to visualize the full dependency graph for a specific project, configuration, or source set. +- **Automated Update Detection**: When performing maintenance and you want a concise report on available stable or pre-release updates. +- **Precision Artifact Discovery**: When looking for new libraries on Maven Central and you need to find exact GAV coordinates or explore an artifact's full version history. +- **Version Conflict Resolution**: When you need to identify why a specific version of a library is being resolved and look for compatible alternatives. +- **Targeted Audit**: When you only care about a specific library and want to bypass the cost of a full project resolution. + +## Workflows + +### 1. Auditing Dependencies + +1. Identify the project module (e.g., `:app`). +2. Call `inspect_dependencies(projectPath=":app")`. +3. Optionally filter by `configuration` (e.g., `runtimeClasspath`) or `sourceSet` (e.g., `test`). + +### 2. Checking for Stable Updates + +1. Call `inspect_dependencies(updatesOnly=true, stableOnly=true)`. +2. Review the flat list of upgradeable dependencies. Each entry shows `group:artifact: current → latest` and the project paths where it is used. + +### 3. Discovering New Libraries + +1. Use `lookup_maven_versions(coordinates="group:artifact")` to see all available versions for a specific library. + +### 4. Targeted Dependency Inspection + +1. Identify the dependency you want to check (e.g., `org.mongodb:mongodb-driver-sync`). +2. Call `inspect_dependencies(dependency="^org\\.mongodb:mongodb-driver-sync(:.*)?$")`. +3. The report will be focused ONLY on that library across all matched configurations. + +### 5. Adding a New Dependency + +1. **Search Maven Central**: Use `lookup_maven_versions(coordinates="group:artifact")` to find the artifact and its latest version. +2. **Update Version Catalog**: Add the dependency coordinates to `gradle/libs.versions.toml`: + ```toml + [versions] + my-lib = "X.Y.Z" + + [libraries] + my-lib = { group = "com.example", name = "my-lib", version.ref = "my-lib" } + ``` +3. **Apply to `build.gradle.kts`**: Use the type-safe catalog accessor (e.g., `implementation(libs.my.lib)`) in the appropriate dependency configuration. +4. **Verify Resolution**: Run `inspect_dependencies(fresh: true)` to confirm the dependency resolves correctly. + +#### Example: Adding a dependency to a subproject + +```json +// Step 1: Discover the library +{ + "coordinates": "com.squareup.retrofit2:retrofit" +} +// Step 2: Update libs.versions.toml with the version and library entry +// Step 3: Add `implementation(libs.retrofit)` to the subproject's build.gradle.kts +// Step 4: Verify +{ + "projectPath": ":app", + "dependency": "^com\\.squareup\\.retrofit2:retrofit(:.*)?$" +} +// Reasoning: Adding the Retrofit library to the 'app' module with full resolution verification. +``` + +### 6. Verifying Plugin Dependencies + +Build script dependencies (plugins) are automatically reported under `buildscript:` configurations. To specifically verify plugin resolution: + +1. Call `inspect_dependencies(sourceSetPath=":buildscript")` for the root project, or `sourceSetPath=":app:buildscript"` for a subproject. +2. Review the `buildscript:classpath` configuration for plugin dependencies. +3. Use `fresh: true` if plugins were recently added or updated. + +#### Example: Verifying a specific plugin + +```json +{ + "sourceSetPath": ":buildscript", + "dependency": "^org\\.jetbrains\\.kotlin:kotlin-gradle-plugin(:.*)?$" +} +// Reasoning: Verifying the Kotlin plugin is properly resolved in the buildscript classpath. +``` + +## Examples + +### List dependencies for a specific module + +```json +{ + "projectPath": ":app" +} +// Reasoning: Auditing the direct and transitive dependencies of the 'app' module to understand its runtime footprint. +``` + +### Check for updates for a specific library + +```json +{ + "dependency": "^org\\.jetbrains\\.kotlinx:kotlinx-coroutines-core(:.*)?$", + "updatesOnly": true +} +// Reasoning: Surgically checking if a specific library has available updates. +``` + +### Check for stable updates across the project + +```json +{ + "updatesOnly": true, + "stableOnly": true +} +// Reasoning: Performing a high-signal update audit that ignores unstable pre-release versions. +``` + +### List all versions of a specific library + +```json +{ + "coordinates": "org.jetbrains.kotlinx:kotlinx-serialization-json" +} +// Reasoning: Retrieving the full version history of an artifact to identify the latest stable or specific version required. +``` + +## Troubleshooting + +- **Dependency Not Found**: Verify the `projectPath` using the `projects` task in the `gradle` skill. +- **Update Not Showing**: If a known update is missing, ensure `stableOnly` is set correctly and check if a `versionFilter` is active. +- **[UPDATE CHECK SKIPPED]**: This annotation means the dep was in scope for update checking but its resolution genuinely failed — it does NOT appear for dependencies intentionally excluded from the update-check scope (e.g., transitive deps + when `onlyDirect=true`, or deps excluded by a `dependency` filter). +- **Maven Search No Results**: Use broader search terms or verify the `group:artifact` format for version searches. +- **Missing environment variables**: Set `invocationArguments: { envSource: "SHELL" }` if Gradle cannot find expected env vars (e.g., `JAVA_HOME`). diff --git a/.agents/skills/verifying_compose_ui/SKILL.md b/.agents/skills/verifying_compose_ui/SKILL.md new file mode 100644 index 00000000..829ba045 --- /dev/null +++ b/.agents/skills/verifying_compose_ui/SKILL.md @@ -0,0 +1,165 @@ +--- +name: verifying_compose_ui +description: > + Visually verifies Compose UI components by rendering @Composable/@Preview functions to images from the project's JVM runtime; + STRONGLY PREFERRED for rapid UI iteration and visual feedback on any composable. + Do NOT use for build lifecycle tasks or dependency auditing. +license: Apache-2.0 +metadata: + author: https://github.com/rnett/gradle-mcp + version: "2.2" +--- + +## ⚠️ FUNDAMENTAL ANDROID LIMITATION + +**IMPORTANT: `runComposeUiTest` and image capture methods (`node.captureToImage()`) are NOT supported on Android and CANNOT work.** + +### Why This Cannot Work + +The `runComposeUiTest` function requires a JVM-based test runtime with desktop Compose rendering (via Skiko on JVM/Desktop). Android's ART (Android Runtime) does not support the desktop Compose testing APIs, and image capture via +`captureToImage()` relies on desktop-specific rendering pipelines that are fundamentally incompatible with Android. + +### The Solution: Use a JVM Target + +**For visual verification of Composables, you MUST use a JVM or Desktop target source set.** This is not a workaround—it is the only supported method. + +Recommended approach: + +1. **Put your Composables in a common source set** (`commonMain`) that is shared across all targets +2. **Create or use a JVM target** (e.g., `jvmMain`, `desktopMain`) that depends on `commonMain` +3. **Run the REPL on the JVM target** (`sourceSet: "jvmMain"` or `sourceSet: "jvmTest"`) + +This is the standard KMP pattern and allows you to verify your UI code without needing an Android device or emulator. + +### What WILL NOT Work + +- ❌ Running the REPL with `sourceSet: "androidMain"` +- ❌ Running the REPL with `sourceSet: "androidTest"` +- ❌ Any attempt to use `runComposeUiTest` on Android +- ❌ Any attempt to use `captureToImage()` on Android + +### What WILL Work + +- ✅ Running the REPL with `sourceSet: "jvmMain"` or `sourceSet: "jvmTest"` +- ✅ Running the REPL with `sourceSet: "desktopMain"` or `sourceSet: "desktopTest"` +- ✅ Using `runComposeUiTest` with `captureToImage()` on JVM/Desktop targets + +--- + +# Authoritative Compose UI Preview & Visual Verification + +Visually verifies and renders any @Composable or @Preview directly to high-quality images from the project-aware REPL for instant, authoritative visual feedback. + +## Constitution + +- **ALWAYS** use `kotlin_repl` to render Compose components instead of running the full application for visual checks. +- **ALWAYS** provide absolute paths for `projectRoot`. +- **ALWAYS** use `node.captureToImage()` and `responder.render(bitmap)` to return the visual output. +- **ALWAYS** ensure the correct Compose UI testing dependencies are on the classpath, using `additionalDependencies` if necessary. +- **NEVER** assume a UI component renders correctly without visual verification. +- **ALWAYS** search for existing `@Preview` functions in the project source code before creating new ones. + +## Directives + +- **ALWAYS provide absolute `projectRoot`**: Ensure `projectRoot` is an **absolute file system path** for all `kotlin_repl` calls. +- **Ensure dependencies**: ALWAYS ensure Compose UI testing dependencies (e.g., `androidx.compose.ui:ui-test-junit4`) are on the classpath. +- **Note on versions**: ALWAYS check your project's version catalog and existing tests for the correct imports for `runComposeUiTest`. +- **Render as image**: ALWAYS use `node.captureToImage()` and `responder.render(bitmap)` to return the visual output. +- **Kotlin Multiplatform (KMP) Note**: The `kotlin_repl` currently only supports **JVM-based** source sets. ALWAYS select a JVM or Desktop target source set for visual checks. +- **Use `envSource: SHELL` if environment variables are missing**: Set `env: { envSource: "SHELL" }` (REPL start) or `invocationArguments: { envSource: "SHELL" }` (Gradle tasks) if expected env vars (e.g., `JAVA_HOME`) are not found. + +## When to Use + +- **Rapid UI Prototyping & Iteration**: When you need to see the visual result of a Composable change instantly without the latency of a full application launch. +- **Authoritative @Preview Verification**: When you want to verify the visual correctness of existing `@Preview` functions. +- **Complex UI State & Interaction Testing**: When you need to capture visual state before and after interactions (like clicks or state changes). +- **Multi-Configuration Visual Auditing**: When checking how a component renders across different data states or configurations (e.g., different view models or mock data). + +## Workflows + +### 1. Identifying the Component + +1. Find the fully qualified name of the `@Composable` or `@Preview` function. +2. Search for existing previews in the source code via `grep_search(pattern="@Preview")`. + +### 2. Orchestrating the Session + +1. Start the REPL with the `test` source set (preferred) or `main` with `additionalDependencies`. +2. Use `kotlin_repl(command="start")`. +3. Use `kotlin_repl(command="run")` to execute the rendering script. + +### 3. Rendering & Verifying + +1. Execute a script that uses `runComposeUiTest` to render and capture the component. +2. Inspect the returned image for visual correctness. + +## Examples + +### Viewing a simple Composable + +```kotlin +import androidx.compose.ui.test.* +import com.example.ui.MyButton + +runComposeUiTest { + setContent { + MyButton(text = "Click Me") + } + val node = onRoot() + responder.render(node.captureToImage()) +} +// Reasoning: Using kotlin_repl to render a specific component and retrieve its visual representation via the responder API. +``` + +### Viewing an existing @Preview + +```kotlin +import androidx.compose.ui.test.* +import com.example.ui.MyButtonPreview // Top-level preview function + +runComposeUiTest { + setContent { + MyButtonPreview() + } + val node = onRoot() + responder.render(node.captureToImage()) +} +// Reasoning: Reusing an existing authoritative preview function to verify its visual correctness. +``` + +### Capturing State Transitions + +```kotlin +import androidx.compose.ui.test.* +import com.example.ui.MyCounter +import com.example.viewmodel.MyViewModel + +runComposeUiTest { + val viewModel = MyViewModel() + setContent { + MyCounter(viewModel) + } + + // Capture state before interaction + responder.render("State before: ${viewModel.count}") + responder.render(onRoot().captureToImage()) + + // Perform interaction + onNodeWithText("Increment").performClick() + + // Capture state after interaction + responder.render("State after: ${viewModel.count}") + responder.render(onRoot().captureToImage()) +} +// Reasoning: Capturing visual snapshots before and after an interaction to verify state-dependent UI changes. +``` + +## Troubleshooting + +- **No Image Returned**: Ensure you are calling `responder.render(bitmap)`. +- **ClassNotFoundException**: Check if you have the correct imports and that the required testing dependencies are on the classpath. +- **Empty Image**: If the Composable is empty or has zero size, the image will be empty. Verify your Composable's modifiers. + +## Resources + +- [Troubleshooting]({baseDir}/references/troubleshooting.md) diff --git a/.agents/skills/verifying_compose_ui/references/troubleshooting.md b/.agents/skills/verifying_compose_ui/references/troubleshooting.md new file mode 100644 index 00000000..11158fb2 --- /dev/null +++ b/.agents/skills/verifying_compose_ui/references/troubleshooting.md @@ -0,0 +1,87 @@ +# Troubleshooting Compose in REPL + +Common issues when rendering Compose components in the REPL and how to resolve them. + +## Kotlin Multiplatform (KMP) Issues + +The Gradle REPL only supports JVM-based source sets. + +- **Issue**: Attempting to start the REPL on a common, iOS, or Android source set fails. +- **Solution**: Select a JVM or Desktop target source set. Recommended names: `jvmMain`, `jvmTest`, `desktopMain`, `desktopTest`. +- **Issue**: Dependencies from `commonMain` are not resolving. +- **Solution**: Starting the REPL on a JVM-specific source set that *depends* on `commonMain` (which is standard KMP structure) will include all inherited dependencies. Ensure the project is built before starting. + +## Android Limitation (FUNDAMENTAL) + +**IMPORTANT: `runComposeUiTest` and `captureToImage()` CANNOT work on Android.** + +This is not a bug or limitation that can be fixed—it is a fundamental architectural incompatibility: + +- `runComposeUiTest` requires desktop Compose runtime with Skiko rendering +- Android's ART does not support desktop Compose testing APIs +- `captureToImage()` relies on desktop-specific rendering pipelines + +**Solution**: Put your Composables in `commonMain` and run the REPL on a JVM target (`jvmMain`, `jvmTest`, `desktopMain`, or `desktopTest`). + +## `ClassNotFoundException: androidx.compose.ui.test.junit4.DesktopComposeTestRule` + +This occurs when the Compose UI Test dependencies are not on the REPL's classpath. +The REPL uses the runtime classpath of the selected `sourceSet`. +If you are using `sourceSet: "main"`, but the test dependencies are in `testImplementation`, they won't be included. + +**Solutions:** + +1. **(Preferred)** Start the REPL with `sourceSet: "test"`. This usually includes the required test dependencies. +2. Add the dependency manually using `additionalDependencies` if using `sourceSet: "main"`: + ```json + { + "command": "start", + "projectPath": ":my-app", + "sourceSet": "main", + "additionalDependencies": ["org.jetbrains.compose.ui:ui-test-junit4-desktop:1.7.0"] + } + ``` + +## `java.lang.NoClassDefFoundError: org/jetbrains/skiko/SkiaLayer` + +Skiko is the rendering engine for Compose Desktop. It might be missing if the project is not correctly configured for Compose Desktop or if dependencies are incomplete. + +**Solution:** +Ensure `compose.desktop.currentOs` is in the project's dependencies or add it to `additionalDependencies`. + +## Composable Renders but No Image is Shown + +The `project_repl` tool only returns content that is explicitly rendered via `responder.render(value)` or the result of the last expression in the script. + +**Solution:** +Ensure you call `responder.render(bitmap)` inside your `runComposeUiTest` block. + +```kotlin +runComposeUiTest { + setContent { MyComposable() } + responder.render(onRoot().captureToImage()) // <--- Important! +} +``` + +## `Unresolved reference: runComposeUiTest` + +The `runComposeUiTest` function may be located in different packages depending on your version of Compose or whether you are using JetBrains Compose. + +**Solutions:** + +1. Check the correct import for your project. Common ones: + - `androidx.compose.ui.test.runComposeUiTest` + - `org.jetbrains.compose.ui.test.runComposeUiTest` (for older or specific JetBrains Compose versions) +2. Ensure you are using a compatible version of the `ui-test` library. Some older versions used `runDesktopComposeUiTest` or similar. + +## `Unresolved reference: responder` + +The `responder` property is automatically injected into the REPL session by the worker. +If it is unresolved, check if you have a custom `providedProperties` in your script configuration (usually not an issue for users). +Ensure you are using the `project_repl` tool which uses the custom REPL worker. + +## `java.lang.IllegalStateException: runComposeUiTest { ... } needs to be called from the main thread` + +On some platforms, Compose UI tests might require being run on the main/UI thread. +The REPL evaluates snippets on a background thread. `runComposeUiTest` usually handles its own thread management, but if you encounter this, try wrapping your code in a `SwingUtilities.invokeLater` (for Desktop) if applicable, though +`runComposeUiTest` should be sufficient. diff --git a/.env.example b/.env.example deleted file mode 100644 index bbab9bb8..00000000 --- a/.env.example +++ /dev/null @@ -1,12 +0,0 @@ -# 0 or 1 -# 0 = disable -# 1 = enable -ENABLE_UPDATE_CHECK=$ENABLE_UPDATE_CHECK - -LASTFM_API_KEY=$LASTFM_API_KEY -LASTFM_API_SECRET=$LASTFM_API_SECRET - -# Release channel. Can be: nightly, stable -RELEASE_CHANNEL=$RELEASE_CHANNEL - -HIDE_DONATIONS=$HIDE_DONATIONS \ No newline at end of file diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json deleted file mode 100644 index 58b893ee..00000000 --- a/.fvm/fvm_config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "flutterSdkVersion": "3.35.2" -} \ No newline at end of file diff --git a/.fvmrc b/.fvmrc deleted file mode 100644 index 2bb4682a..00000000 --- a/.fvmrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "flutter": "3.35.2" -} \ No newline at end of file diff --git a/.github/agpl_header.txt b/.github/agpl_header.txt new file mode 100644 index 00000000..0d406077 --- /dev/null +++ b/.github/agpl_header.txt @@ -0,0 +1,14 @@ +Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/.github/apache_header.txt b/.github/apache_header.txt new file mode 100644 index 00000000..5d15d7c7 --- /dev/null +++ b/.github/apache_header.txt @@ -0,0 +1,13 @@ +Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..2db3c43d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,307 @@ +name: Build All Platforms + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + COMPOSE_WEBVIEW_REPO: kdroidFilter/ComposeNativeWebview + COMPOSE_WEBVIEW_COMMIT: 5aeb268a2c37ff4dbfb76924573344a7c4f763ce + GRADLE_PLUGIN_REPO: team-spotube/gradle-plugin + +jobs: + prepare-deps: + name: Prepare Dependencies + runs-on: macos-latest + steps: + - name: Checkout ComposeNativeWebview + uses: actions/checkout@v4 + with: + repository: ${{ env.COMPOSE_WEBVIEW_REPO }} + ref: ${{ env.COMPOSE_WEBVIEW_COMMIT }} + path: compose-webview + + - name: Checkout gradle-plugin + uses: actions/checkout@v4 + with: + repository: ${{ env.GRADLE_PLUGIN_REPO }} + token: ${{ secrets.GH_PAT }} + path: gradle-plugin + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Publish compose-webview to mavenLocal + working-directory: compose-webview + run: | + chmod +x gradlew + ./gradlew publishToMavenLocal + + - name: Publish gradle-plugin to mavenLocal + working-directory: gradle-plugin + run: | + chmod +x gradlew + ./gradlew publishToMavenLocal + + - name: Upload compose-webview artifacts + uses: actions/upload-artifact@v4 + with: + name: maven-local-composewebview + path: ~/.m2/repository/io/github/kdroidfilter/ + + - name: Upload gradle-plugin artifacts + uses: actions/upload-artifact@v4 + with: + name: maven-local-gradle-plugin + path: ~/.m2/repository/dev/krtirtho/spotube/ + + build-android: + name: Android + needs: prepare-deps + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download compose-webview artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-composewebview + path: ~/.m2/repository/io/github/kdroidfilter/ + + - name: Download gradle-plugin artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-gradle-plugin + path: ~/.m2/repository/dev/krtirtho/spotube/ + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Assemble Release + run: ./gradlew :composeApp:assembleRelease + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: android-apk + path: composeApp/build/outputs/apk/release/*.apk + + - name: Upload AAB + uses: actions/upload-artifact@v4 + with: + name: android-aab + path: composeApp/build/outputs/bundle/release/*.aab + + build-linux: + name: Linux Desktop + needs: prepare-deps + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download compose-webview artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-composewebview + path: ~/.m2/repository/io/github/kdroidfilter/ + + - name: Download gradle-plugin artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-gradle-plugin + path: ~/.m2/repository/dev/krtirtho/spotube/ + + - name: Install packaging tools + run: | + sudo apt-get update + sudo apt-get install -y rpm fuse + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Package DEB + run: ./gradlew :composeApp:packageReleaseDeb + + - name: Package RPM + run: ./gradlew :composeApp:packageReleaseRpm + + - name: Package AppImage + run: ./gradlew :composeApp:packageReleaseAppImage + + - name: Upload DEB + uses: actions/upload-artifact@v4 + with: + name: linux-deb + path: composeApp/build/compose/binaries/main-release/**/*.deb + + - name: Upload RPM + uses: actions/upload-artifact@v4 + with: + name: linux-rpm + path: composeApp/build/compose/binaries/main-release/**/*.rpm + + - name: Upload AppImage + uses: actions/upload-artifact@v4 + with: + name: linux-appimage + path: composeApp/build/compose/binaries/main-release/**/*.AppImage + + build-windows: + name: Windows Desktop + needs: prepare-deps + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Download compose-webview artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-composewebview + path: ~/.m2/repository/io/github/kdroidfilter/ + + - name: Download gradle-plugin artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-gradle-plugin + path: ~/.m2/repository/dev/krtirtho/spotube/ + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Package MSI + run: ./gradlew :composeApp:packageReleaseMsi + + - name: Package EXE + run: ./gradlew :composeApp:packageReleaseExe + + - name: Upload MSI + uses: actions/upload-artifact@v4 + with: + name: windows-msi + path: composeApp/build/compose/binaries/main-release/**/*.msi + + - name: Upload EXE + uses: actions/upload-artifact@v4 + with: + name: windows-exe + path: composeApp/build/compose/binaries/main-release/**/*.exe + + build-macos: + name: macOS Desktop + needs: prepare-deps + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Download compose-webview artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-composewebview + path: ~/.m2/repository/io/github/kdroidfilter/ + + - name: Download gradle-plugin artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-gradle-plugin + path: ~/.m2/repository/dev/krtirtho/spotube/ + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Package DMG + run: ./gradlew :composeApp:packageReleaseDmg + + - name: Upload DMG + uses: actions/upload-artifact@v4 + with: + name: macos-dmg + path: composeApp/build/compose/binaries/main-release/**/*.dmg + + build-ios: + name: iOS + needs: prepare-deps + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Download compose-webview artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-composewebview + path: ~/.m2/repository/io/github/kdroidfilter/ + + - name: Download gradle-plugin artifacts + uses: actions/download-artifact@v4 + with: + name: maven-local-gradle-plugin + path: ~/.m2/repository/dev/krtirtho/spotube/ + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build Kotlin framework + run: ./gradlew :composeApp:linkReleaseFrameworkIosArm64 + + - name: Build iOS app + run: | + xcodebuild \ + -project iosApp/iosApp.xcodeproj \ + -scheme iosApp \ + -sdk iphoneos \ + -configuration Release \ + -destination 'generic/platform=iOS' \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO \ + CONFIGURATION_BUILD_DIR="${{ github.workspace }}/build/ios" \ + build + + - name: Upload .app + uses: actions/upload-artifact@v4 + with: + name: ios-app + path: build/ios/*.app diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml deleted file mode 100644 index 77b15e6e..00000000 --- a/.github/workflows/potential-duplicates.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Detect Potential Duplicates Issues -on: - issues: - types: - - opened - - edited -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/potential-duplicates@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Issue title filter work with anymatch https://www.npmjs.com/package/anymatch. - # Any matched issue will stop detection immediately. - # You can specify multi filters in each line. - filter: '' - # Exclude keywords in title before detecting. - exclude: '' - # Label to set, when potential duplicates are detected. - label: potential-duplicate - # Get issues with state to compare. Supported state: 'all', 'closed', 'open'. - state: all - # If similarity is higher than this threshold([0,1]), issue will be marked as duplicate. - threshold: 0.6 - # Reactions to be add to comment when potential duplicates are detected. - # Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes" - reactions: eyes - # Comment to post when potential duplicates are detected. - comment: > - Potential duplicates: {{#issues}} - - [#{{ number }}] {{ title }} ({{ accuracy }}%) - {{/issues}} \ No newline at end of file diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml deleted file mode 100644 index 3e73be4d..00000000 --- a/.github/workflows/pr-lint.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Lint - -on: - pull_request: - -env: - FLUTTER_VERSION: 3.35.2 - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: subosito/flutter-action@v2 - with: - flutter-version: ${{ env.FLUTTER_VERSION }} - - - name: Dummy Envs - run: | - envsubst < .env.example > .env - env: - ENABLE_UPDATE_CHECK: true - LASTFM_API_KEY: xxx - LASTFM_API_SECRET: xxx - RELEASE_CHANNEL: nightly - HIDE_DONATIONS: 0 - - - name: Configure repo - run: | - flutter pub get - dart run build_runner build --delete-conflicting-outputs - - - name: Lint Dart files - run: | - dart analyze --no-fatal-warnings diff --git a/.github/workflows/spotube-publish-binary.yml b/.github/workflows/spotube-publish-binary.yml deleted file mode 100644 index e682dbdd..00000000 --- a/.github/workflows/spotube-publish-binary.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: Spotube Publish Binary -on: - workflow_dispatch: - inputs: - version: - description: Version to publish (x.x.x) - default: 4.0.0 - required: true - dry_run: - description: Dry run - required: true - type: boolean - default: true - jobs: - description: Jobs to run (flathub,aur,winget,chocolatey) - required: true - type: string - default: "flathub,aur,winget,chocolatey" - -jobs: - flathub: - runs-on: ubuntu-22.04 - if: contains(inputs.jobs, 'flathub') - steps: - - uses: actions/checkout@v4 - with: - repository: KRTirtho/com.github.KRTirtho.Spotube - token: ${{ secrets.FLATHUB_TOKEN }} - - - uses: actions/checkout@v4 - with: - path: spotube - - - name: Update flathub version - run: | - python3 spotube/scripts/update_flathub_version.py ${{ inputs.version }} - rm -rf spotube - git config --global user.email "krtirtho@gmail.com" - git config --global user.name "Kingkor Roy Tirtho" - git add . - git commit -m "v${{ inputs.version }} Update" - git branch update-${{ inputs.version }} - git switch update-${{ inputs.version }} - - - name: Push to flathub - if: ${{ !inputs.dry_run }} - run: git push -u origin update-${{ inputs.version }} - - aur: - runs-on: ubuntu-22.04 - if: contains(inputs.jobs, 'aur') - steps: - - uses: actions/checkout@v4 - - - uses: dsaltares/fetch-gh-release-asset@master - with: - version: tags/v${{ inputs.version }} # mind the "v" prefix - file: spotube-linux-${{inputs.version}}-x86_64.tar.xz - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Update PKGBUILD versions - run: | - sed -i "s/%{{SPOTUBE_VERSION}}%/${{ inputs.version }}/" aur-struct/PKGBUILD - sed -i "s/%{{PKGREL}}%/1/" aur-struct/PKGBUILD - sed -i "s/%{{LINUX_MD5}}%/`md5sum spotube-linux-${{inputs.version}}-x86_64.tar.xz | awk '{print $1}'`/" aur-struct/PKGBUILD - - - name: Release to AUR - if: ${{ !inputs.dry_run }} - uses: KSXGitHub/github-actions-deploy-aur@v2.7.2 - with: - pkgname: spotube-bin - pkgbuild: aur-struct/PKGBUILD - commit_username: ${{ secrets.AUR_USERNAME }} - commit_email: ${{ secrets.AUR_EMAIL }} - ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: Updated to v${{ inputs.version }} - - winget: - runs-on: ubuntu-latest - if: contains(inputs.jobs, 'winget') - steps: - - name: Release winget package - if: ${{ !inputs.dry_run }} - uses: vedantmgoyal9/winget-releaser@main - with: - version: ${{ inputs.version }} - release-tag: v${{ inputs.version }} - identifier: KRTirtho.Spotube - token: ${{ secrets.WINGET_TOKEN }} - - chocolatey: - runs-on: windows-latest - if: contains(inputs.jobs, 'chocolatey') - steps: - - uses: dsaltares/fetch-gh-release-asset@master - with: - version: tags/v${{ inputs.version }} # mind the "v" prefix - file: Spotube-windows-x86_64.nupkg - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Chocolatey - run: choco apikey -k ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/ - - - name: Publish to Chocolatey Repository - if: ${{ !inputs.dry_run }} - run: choco push Spotube-windows-x86_64.nupkg --source https://push.chocolatey.org/ - - playstore: - runs-on: ubuntu-latest - if: contains(inputs.jobs, 'playstore') - steps: - - name: Tagname (workflow dispatch) - run: echo 'TAG_NAME=${{inputs.version}}' >> $GITHUB_ENV - - # - uses: robinraju/release-downloader@main - # with: - # repository: KRTirtho/spotube - # tag: v${{ env.TAG_NAME }} - # tarBall: false - # zipBall: false - # out-file-path: dist - # fileName: "Spotube-playstore-all-arch.aab" - - # - name: Create service-account.json - # run: | - # echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > service-account.json - - # - name: Upload Android Release to Play Store - # if: ${{!inputs.dry_run}} - # uses: r0adkll/upload-google-play@v1 - # with: - # serviceAccountJson: ./service-account.json - # releaseFiles: ./dist/Spotube-playstore-all-arch.aab - # packageName: oss.krtirtho.spotube - # track: production - # status: draft - # releaseName: ${{ env.TAG_NAME }} diff --git a/.github/workflows/spotube-release-binary.yml b/.github/workflows/spotube-release-binary.yml deleted file mode 100644 index 5260eb60..00000000 --- a/.github/workflows/spotube-release-binary.yml +++ /dev/null @@ -1,204 +0,0 @@ -name: Spotube Release Binary -on: - workflow_dispatch: - inputs: - channel: - type: choice - options: - - stable - - nightly - default: nightly - description: The release channel - debug: - type: boolean - default: false - description: Debug with SSH toggle - required: false - dry_run: - type: boolean - default: false - description: Dry run without uploading to release - -env: - FLUTTER_VERSION: 3.35.2 - FLUTTER_CHANNEL: master - -permissions: - contents: write - -jobs: - build_platform: - strategy: - matrix: - include: - - os: ubuntu-22.04 - platform: linux - arch: x86 - files: | - dist/Spotube-linux-x86_64.deb - dist/Spotube-linux-x86_64.rpm - dist/Spotube-linux-x86_64.AppImage - dist/spotube-linux-*-x86_64.tar.xz - - os: ubuntu-22.04-arm - platform: linux - arch: arm64 - files: | - dist/Spotube-linux-aarch64.deb - dist/Spotube-linux-aarch64.AppImage - dist/spotube-linux-*-aarch64.tar.xz - - os: ubuntu-22.04 - platform: android - arch: all - files: | - build/Spotube-android-all-arch.apk - - os: windows-latest - platform: windows - arch: x86 - files: | - dist/Spotube-windows-x86_64.nupkg - dist/Spotube-windows-x86_64-setup.exe - - os: macos-14 - platform: ios - arch: all - files: | - Spotube-iOS.ipa - - os: macos-14 - platform: macos - arch: all - files: | - build/Spotube-macos-universal.dmg - build/Spotube-macos-universal.pkg - runs-on: ${{matrix.os}} - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2.18.0 - with: - flutter-version: ${{ env.FLUTTER_VERSION }} - channel: ${{ env.FLUTTER_CHANNEL }} - cache: true - git-source: https://github.com/flutter/flutter.git - - # - name: free disk space - # if: ${{ matrix.platform == 'android' }} - # run: | - # sudo swapoff -a - # sudo rm -f /swapfile - # sudo apt clean - # docker rmi $(docker image ls -aq) - # df -h - - name: Setup Java - if: ${{matrix.platform == 'android'}} - uses: actions/setup-java@v4 - with: - distribution: "zulu" - java-version: "17" - cache: "gradle" - check-latest: true - - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - - - name: Install Xcode - if: ${{matrix.platform == 'ios'}} - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: "16.2" - - - name: Install ${{matrix.platform}} dependencies - run: | - flutter pub get - dart cli/cli.dart install-dependencies --platform=${{matrix.platform}} --arch=${{matrix.arch}} - - - name: Sign Apk - if: ${{matrix.platform == 'android'}} - run: | - echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks - echo '${{ secrets.KEY_PROPERTIES }}' > android/key.properties - - - name: Build ${{matrix.platform}} binaries - run: dart cli/cli.dart build --arch=${{matrix.arch}} ${{matrix.platform}} - env: - CHANNEL: ${{inputs.channel}} - DOTENV: ${{secrets.DOTENV_RELEASE}} - - - uses: actions/upload-artifact@v4 - with: - if-no-files-found: error - name: ${{matrix.platform}}-${{matrix.arch}} - path: ${{matrix.files}} - - - name: Debug With SSH When fails - if: ${{ failure() && inputs.debug && inputs.channel == 'nightly' }} - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - - upload: - runs-on: ubuntu-22.04 - needs: - - build_platform - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - path: ./Spotube-Release-Binaries - - - name: Install dependencies - run: sudo apt-get install tree -y - - - name: Generate Checksums - run: | - tree . - find Spotube-Release-Binaries -type f -exec md5sum {} \; >> RELEASE.md5sum - find Spotube-Release-Binaries -type f -exec sha256sum {} \; >> RELEASE.sha256sum - sed -i 's|Spotube-Release-Binaries/.*/\([^/]*\)$|\1|' RELEASE.sha256sum RELEASE.md5sum - sed -i 's|Spotube-Release-Binaries/||' RELEASE.sha256sum RELEASE.md5sum - - - name: Extract pubspec version - run: | - echo "PUBSPEC_VERSION=$(grep -oP 'version:\s*\K[^+]+(?=\+)' pubspec.yaml)" >> $GITHUB_ENV - - - uses: actions/upload-artifact@v4 - with: - if-no-files-found: error - name: sums - path: | - RELEASE.md5sum - RELEASE.sha256sum - - - name: Upload Release Binaries (stable) - if: ${{ !inputs.dry_run && inputs.channel == 'stable' }} - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: v${{ env.PUBSPEC_VERSION }} # mind the "v" prefix - omitBodyDuringUpdate: true - omitNameDuringUpdate: true - omitPrereleaseDuringUpdate: true - allowUpdates: true - artifacts: Spotube-Release-Binaries/**/*,RELEASE.sha256sum,RELEASE.md5sum - - - name: Upload Release Binaries (nightly) - if: ${{ !inputs.dry_run && inputs.channel == 'nightly' }} - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: nightly - omitBodyDuringUpdate: true - omitNameDuringUpdate: true - omitPrereleaseDuringUpdate: true - allowUpdates: true - artifacts: Spotube-Release-Binaries/**/*,RELEASE.sha256sum,RELEASE.md5sum - body: | - Build Number: ${{github.run_number}} - - Nightly release includes newest features but may contain bugs - It is preferred to use the stable version unless you know what you're doing - - - name: Debug With SSH When fails - if: ${{ failure() && inputs.debug && inputs.channel == 'nightly' }} - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true diff --git a/.gitignore b/.gitignore index 544dbba8..7a3faf1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,34 @@ +*.iml +.kotlin +.gradle +**/build/ +xcuserdata +!src/**/build/ +local.properties +.idea +.DS_Store +captures +.externalNativeBuild +.cxx +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcodeproj/project.xcworkspace/ +!*.xcworkspace/contents.xcworkspacedata +**/xcshareddata/WorkspaceSettings.xcsettings +node_modules/ +composeApp/release/ + +**/*.log + +/composeApp/vlc-natives/ + + # Miscellaneous *.class *.log *.pyc *.swp -.DS_Store .atom/ .buildlog/ .history @@ -11,7 +36,6 @@ # IntelliJ related -*.iml *.ipr *.iws .idea/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e69de29b diff --git a/.metadata b/.metadata deleted file mode 100644 index e8b36fde..00000000 --- a/.metadata +++ /dev/null @@ -1,30 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "d7b523b356d15fb81e7d340bbe52b47f93937323" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: d7b523b356d15fb81e7d340bbe52b47f93937323 - base_revision: d7b523b356d15fb81e7d340bbe52b47f93937323 - - platform: windows - create_revision: d7b523b356d15fb81e7d340bbe52b47f93937323 - base_revision: d7b523b356d15fb81e7d340bbe52b47f93937323 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/.opencode/opencode.jsonc b/.opencode/opencode.jsonc new file mode 100644 index 00000000..6ed31c91 --- /dev/null +++ b/.opencode/opencode.jsonc @@ -0,0 +1,17 @@ +{ + "$schema": "https://opencode.ai/config.json", + "mcp": { + "gradle": { + "type": "local", + "command": [ + "jbang", + "run", + "--java", + "25", + "--quiet", + "--fresh", + "gradle-mcp@rnett" + ] + } + } +} \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 6d27ad30..00000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "configurations": [ - { - "name": "Win32", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [ - "_DEBUG", - "UNICODE", - "_UNICODE" - ], - "windowsSdkVersion": "10.0.19041.0", - "compilerPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\cl.exe", - "cStandard": "c17", - "cppStandard": "c++17", - "intelliSenseMode": "windows-msvc-x64", - "configurationProvider": "ms-vscode.makefile-tools" - } - ], - "version": 4 -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index b81e2eee..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "spotube", - "type": "dart", - "request": "launch", - "program": "lib/main.dart", - }, - { - "name": "spotube (mobile)", - "type": "dart", - "request": "launch", - "program": "lib/main.dart", - "args": [ - "--flavor", - "dev" - ] - }, - { - "name": "spotube (mobile-skia)", - "type": "dart", - "request": "launch", - "program": "lib/main.dart", - "args": [ - "--flavor", - "dev", - "--no-enable-impeller" - ] - }, - { - "name": "spotube (profile)", - "type": "dart", - "request": "launch", - "program": "lib/main.dart", - "flutterMode": "profile" - }, - { - "name": "spotube (release)", - "type": "dart", - "request": "launch", - "program": "lib/main.dart", - "flutterMode": "release" - }, - { - "name": "spotube (mobile) (release)", - "type": "dart", - "request": "launch", - "program": "lib/main.dart", - "flutterMode": "release", - "args": [ - "--flavor", - "dev" - ] - } - ], - "compounds": [] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6cfcec03..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "cmake.configureOnOpen": false, - "cSpell.words": [ - "acousticness", - "ambiguate", - "Amoled", - "Buildless", - "configurators", - "danceability", - "fuzzywuzzy", - "gapless", - "instrumentalness", - "isrc", - "Mpris", - "RGBO", - "riverpod", - "Scrobblenaut", - "shadcn", - "skeletonizer", - "songlink", - "speechiness", - "Spotube", - "titlebar", - "winget" - ], - "editor.formatOnSave": true, - "explorer.fileNesting.enabled": true, - "explorer.fileNesting.patterns": { - "pubspec.yaml": "pubspec.lock,analysis_options.yaml,.packages,.flutter-plugins,.flutter-plugins-dependencies,flutter_launcher_icons*.yaml,flutter_native_splash*.yaml", - "README.md": "LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md,CONTRIBUTION.md,CHANGELOG.md,PRIVACY_POLICY.md", - "*.dart": "${capture}.g.dart,${capture}.freezed.dart" - }, - "dart.flutterSdkPath": ".fvm/versions/3.35.2", - "makefile.configureOnOpen": false -} \ No newline at end of file diff --git a/.vscode/snippets.code-snippets b/.vscode/snippets.code-snippets deleted file mode 100644 index 9a18929b..00000000 --- a/.vscode/snippets.code-snippets +++ /dev/null @@ -1,170 +0,0 @@ -{ - "PaginatedState": { - "scope": "dart", - "prefix": "paginatedState", - "description": "Generate a PaginatedState", - "body": [ - "class ${1:Model}State extends PaginatedState<${2:Model}> {", - " ${1:Model}State({", - " required super.items,", - " required super.offset,", - " required super.limit,", - " required super.hasMore,", - " });", - " ", - " @override", - " ${1:Model}State copyWith({", - " List<${2:Model}>? items,", - " int? offset,", - " int? limit,", - " bool? hasMore,", - " }) {", - " return ${1:Model}State(", - " items: items ?? this.items,", - " offset: offset ?? this.offset,", - " limit: limit ?? this.limit,", - " hasMore: hasMore ?? this.hasMore,", - " );", - " }", - "}" - ] - }, - "PaginatedAsyncNotifier": { - "scope": "dart", - "prefix": "paginatedAsyncNotifier", - "description": "Generate a PaginatedAsyncNotifier", - "body": [ - "class ${1:NotifierName}Notifier extends PaginatedAsyncNotifier<${3:Item}, ${2:Model}State> {", - " ${1:NotifierName}Notifier() : super();", - " ", - " @override", - " fetch(int offset, int limit) async {", - " throw UnimplementedError();", - " }", - " ", - " @override", - " build() async {", - " throw UnimplementedError();", - " }", - "}" - ] - }, - "PaginaitedNotifierWithState": { - "scope": "dart", - "prefix": "paginatedNotifierWithState", - "description": "Generate a PaginatedNotifier with PaginatedState", - "body": [ - "class $1State extends PaginatedState<$2> {", - " $1State({", - " required super.items,", - " required super.offset,", - " required super.limit,", - " required super.hasMore,", - " });", - " ", - " @override", - " $1State copyWith({", - " List<$2>? items,", - " int? offset,", - " int? limit,", - " bool? hasMore,", - " }) {", - " return $1State(", - " items: items ?? this.items,", - " offset: offset ?? this.offset,", - " limit: limit ?? this.limit,", - " hasMore: hasMore ?? this.hasMore,", - " );", - " }", - "}", - " ", - "class $1Notifier", - " extends PaginatedAsyncNotifier<$2, $1State> {", - " $1Notifier() : super();", - " ", - " @override", - " fetch(int offset, int limit) async {", - " throw UnimplementedError();", - " }", - " ", - " @override", - " build() async {", - " throw UnimplementedError();", - " }", - "}", - " ", - "final ${1/(.*)/${1:/camelcase}/}Provider = AsyncNotifierProvider<$1Notifier, $1State>(", - " ()=> $1Notifier(),", - ");" - ] - }, - "FamilyPaginatedAsyncNotifier": { - "scope": "dart", - "prefix": "familyPaginatedAsyncNotifier", - "description": "Generate a FamilyPaginatedAsyncNotifier", - "body": [ - "class ${1:NotifierName}Notifier extends FamilyPaginatedAsyncNotifier<${3:Item}, ${2:Model}State, {$4:Arg}> {", - " ${1:NotifierName}Notifier() : super();", - " ", - " @override", - " fetch(arg, offset, limit) async {", - " throw UnimplementedError();", - " }", - " ", - " @override", - " build(arg) async {", - " throw UnimplementedError();", - " }", - "}" - ] - }, - "FamilyPaginaitedNotifierWithState": { - "scope": "dart", - "prefix": "familyPaginatedNotifierWithState", - "description": "Generate a FamilyPaginatedAsyncNotifier with PaginatedState", - "body": [ - "class $1State extends PaginatedState<$2> {", - " $1State({", - " required super.items,", - " required super.offset,", - " required super.limit,", - " required super.hasMore,", - " });", - " ", - " @override", - " $1State copyWith({", - " List<$2>? items,", - " int? offset,", - " int? limit,", - " bool? hasMore,", - " }) {", - " return $1State(", - " items: items ?? this.items,", - " offset: offset ?? this.offset,", - " limit: limit ?? this.limit,", - " hasMore: hasMore ?? this.hasMore,", - " );", - " }", - "}", - " ", - "class $1Notifier", - " extends FamilyPaginatedAsyncNotifier<$2, $1State, $3> {", - " $1Notifier() : super();", - " ", - " @override", - " fetch(arg, offset, limit) async {", - " throw UnimplementedError();", - " }", - " ", - " @override", - " build(arg) async {", - " throw UnimplementedError();", - " }", - "}", - " ", - "final ${1/(.*)/${1:/camelcase}/}Provider = AsyncNotifierProviderFamily<$1Notifier, $1State, $3>(", - " ()=> $1Notifier(),", - ");" - ] - }, -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index f67eb4c6..00000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [] -} \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..eb2c74fc --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,44 @@ +# AGENTS + +## Repo shape (KMP + modules) +- Gradle multi-module: `:composeApp` (main app), `:plugin_interfaces` (plugin API contracts), `:js_plugin_example` (Zipline JS plugin template). +- `:composeApp` uses custom KMP source sets (`mobileMain`, `androidJvmMain`) with explicit `dependsOn`; Gradle prints "Default Kotlin Hierarchy Template Not Applied Correctly" warning. Treat as known/expected. + +## Real app entrypoints +- Desktop/JVM: `composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/main.kt` (`mainClass = dev.krtirtho.spotube.MainKt`). +- Android: `composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MainActivity.kt`. +- iOS bridge: `composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/MainViewController.kt` and `iosApp/iosApp/ContentView.swift`. + +## High-value commands +- Use Gradle wrapper (`./gradlew` or `./gradlew.bat`) only. +- Run desktop: `:composeApp:run` +- Build Android debug: `:composeApp:assembleDebug` +- Module checks: `:composeApp:check`, `:plugin_interfaces:check`, `:js_plugin_example:check` +- Focused tests: `:composeApp:jvmTest`, `:composeApp:iosSimulatorArm64Test`, `:plugin_interfaces:jvmTest`, `:plugin_interfaces:jsTest`, `:js_plugin_example:jsTest` +- No lint/typecheck/formatter tasks are configured; `:composeApp:check` is the only aggregated check. + +## Dependencies +- `gradle/libs.versions.toml` is the single source of truth for all version pins and library declarations. +- Kotlin: `2.3.0`, JVM target: `11` (compile/target compatibility in both `composeApp/build.gradle.kts` and `plugin_interfaces/build.gradle.kts`). + +## Codegen and plugin packaging +- OpenAPI client generated from `composeApp/specs/listenbrainz-openapi.yaml` via KMPGen tasks (`kmpgenPrepare`, `kmpgenGenerateAll`) in `:composeApp`. +- JS plugin bundles: `:js_plugin_example:packageDevelopmentPlugin` and `:js_plugin_example:packageProductionPlugin`. Output is `.smplug` files in `js_plugin_example/build/distributions/`. +- Zipline plugin entrypoint: `mainFunction = "dev.krtirtho.js_plugin_example.main"` in `js_plugin_example/build.gradle.kts`. Plugin metadata from `js_plugin_example/plugin.json`. + +## Plugin architecture +- `plugin_interfaces` exports `zipline.core` and `semver` as API. `composeApp` depends on it for the plugin system. +- `plugin_interfaces` also has a JS target (`browser()`), used by the plugin system. + +## Desktop JVM specifics +- JavaFX is required; `--add-opens` flags in `compose.desktop.application.jvmArgs` must be preserved: `javafx.graphics/javafx.scene`, `javafx.graphics/com.sun.javafx.sg.prism`, `javafx.graphics/com.sun.javafx.scene`, `javafx.web/com.sun.webkit`, `javafx.media/com.sun.media.jfxmedia`, `javafx.media/com.sun.media.jfxmedia.events`. +- JavaFX dependencies are loaded from OpenJFX with platform classifiers (win/mac/linux) resolved at configuration time via `System.getProperty("os.name")`. + +## Tooling +- Gradle config cache enabled (`gradle.properties`); prefer module-scoped tasks. +- Gradle daemon JVM pinned to JetBrains JDK 21 via `gradle/gradle-daemon-jvm.properties`. +- Gradle 8.14.3 (from `gradle/wrapper/gradle-wrapper.properties`). +- Foojay toolchain resolver in use (`plugins { id("org.gradle.toolchains.foojay-resolver-convention") }`). + +## Current testing reality +- No committed `*Test*.kt` files; test tasks may run zero tests unless new tests are added. \ No newline at end of file diff --git a/LICENSE b/LICENSE index 11aea461..0ad25db4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,12 +1,661 @@ -BSD-4-Clause License + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 -Copyright (c) 2025 Kingkor Roy Tirtho. All rights reserved. + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Preamble -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software must display the following acknowledgement: - This product includes software developed by Kingkor Roy Tirtho. -4. Neither the name of the Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY KINGKOR ROY TIRTHO AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KINGKOR ROY TIRTHO AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/Makefile b/Makefile deleted file mode 100644 index 49ae034a..00000000 --- a/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -INNO_VERSION=6.2.0 -TEMP_DIR=/tmp/spotube-tar -USR_SHARE=deb-struct/usr/share -BUNDLE_DIR=build/linux/${ARCH}/release/bundle -MIRRORLIST=${PWD}/build/mirrorlist - -tar: - mkdir -p $(TEMP_DIR)\ - && cp -r $(BUNDLE_DIR)/* $(TEMP_DIR)\ - && cp linux/spotube.desktop $(TEMP_DIR)\ - && cp assets/branding/spotube-logo.png $(TEMP_DIR)\ - && cp linux/com.github.KRTirtho.Spotube.appdata.xml $(TEMP_DIR)\ - && tar -cJf build/spotube-linux-${VERSION}-${PKG_ARCH}.tar.xz -C $(TEMP_DIR) .\ - && rm -rf $(TEMP_DIR) - -aursrcinfo: - docker run -e EXPORT_SRC=1 -v ${PWD}/aur-struct:/pkg -v ${MIRRORLIST}:/etc/pacman.d/mirrorlist:ro whynothugo/makepkg - -publishaur: - echo '[Warning!]: you need SSH paired with AUR'\ - && rm -rf build/spotube\ - && git clone ssh://aur@aur.archlinux.org/spotube-bin.git build/spotube\ - && cp aur-struct/PKGBUILD aur-struct/.SRCINFO build/spotube\ - && cd build/spotube\ - && git add .\ - && git commit -m "${MSG}"\ - && git push - -innoinstall: - powershell curl -o build\installer.exe http://files.jrsoftware.org/is/6/innosetup-${INNO_VERSION}.exe - powershell git clone https://github.com/DomGries/InnoDependencyInstaller.git build\inno-depend - powershell build\installer.exe /verysilent /allusers /dir=build\iscc - -inno: - powershell .\build\iscc\iscc.exe scripts\windows-setup-creator.iss - -choco: - powershell cp dist\Spotube-windows-x86_64-setup.exe choco-struct\tools - powershell choco pack .\choco-struct\spotube.nuspec --outputdirectory dist - -apk: - mv build/app/outputs/apk/release/app-release.apk build/Spotube-android-all-arch.apk - -gensums: - sh -c scripts/gensums.sh - -migrate: - dart run drift_dev make-migrations - -dmg: - flutter build macos &&\ - if [ -f dist/Spotube-macos-universal.dmg ];\ - then rm dist/Spotube-macos-universal.dmg;\ - fi &&\ - appdmg appdmg.json dist/Spotube-macos-universal.dmg - -changelog: - git-cliff --unreleased \ No newline at end of file diff --git a/README.md b/README.md index 1043fabc..3cc70ff2 100644 --- a/README.md +++ b/README.md @@ -1,334 +1,48 @@ -
- Spotube Logo +This is a Kotlin Multiplatform project targeting Android, iOS, Desktop (JVM). -A cross-platform extensible open-source music streaming platform.
-Bring your own music metadata/playlist/audio-source with plugins created by community or by yourself. A small step towards the decentralized music streaming era! +* [/composeApp](./composeApp/src) is for code that will be shared across your Compose Multiplatform applications. + It contains several subfolders: + - [commonMain](./composeApp/src/commonMain/kotlin) is for code that’s common for all targets. + - Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. + For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, + the [iosMain](./composeApp/src/iosMain/kotlin) folder would be the right place for such calls. + Similarly, if you want to edit the Desktop (JVM) specific part, the [jvmMain](./composeApp/src/jvmMain/kotlin) + folder is the appropriate location. -Btw it's not just another Electron app 😉 +* [/iosApp](./iosApp/iosApp) contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, + you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project. -Visit the website -Discord Server +### Build and Run Android Application -Support me on Patron -Buy me a Coffee +To build and run the development version of the Android app, use the run configuration from the run widget +in your IDE’s toolbar or build it directly from the terminal: +- on macOS/Linux + ```shell + ./gradlew :composeApp:assembleDebug + ``` +- on Windows + ```shell + .\gradlew.bat :composeApp:assembleDebug + ``` -[![HackerNews](https://hackerbadge.vercel.app/api?id=39066136&type=dark)](https://news.ycombinator.com/item?id=39066136) +### Build and Run Desktop (JVM) Application -Donate to our Open Collective +To build and run the development version of the desktop app, use the run configuration from the run widget +in your IDE’s toolbar or run it directly from the terminal: +- on macOS/Linux + ```shell + ./gradlew :composeApp:run + ``` +- on Windows + ```shell + .\gradlew.bat :composeApp:run + ``` + +### Build and Run iOS Application + +To build and run the development version of the iOS app, use the run configuration from the run widget +in your IDE’s toolbar or open the [/iosApp](./iosApp) directory in Xcode and run it from there. --- -![Spotube Desktop](assets/branding/spotube-screenshot.png) - -![Spotube Mobile](assets/branding/mobile-screenshots/combined.jpg) - -
- -## 🌃 Features - -- 🧩 Plugin powered, supports any platform or custom music service through plugins. -- 🗺️ Community driven plugins for popular platforms or create your own. -- ⬇️ Freely downloadable tracks with tagged metadata. -- 🖥️ 📱 Cross-platform support. -- 🪶 Small size & less data usage. -- 🕒 Time synced lyrics regardless of the plugin support. -- ✋ No telemetry, diagnostics or user data collection. -- 🚀 Native performance. -- 📖 Open source/libre software. -- 🔉 Playback control is done locally, not on the server. - -## 📜 ⬇️ Installation guide - -New versions usually release every 3-4 months.
-This handy table lists all the methods you can use to install Spotube: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PlatformPackage/Installation Method
Windows - - Windows Download - -
MacOS - - MacOS Download - -
Android - - APK download - -
- - Download from F-Droid - -
iOS - - Download iOS IPA - -
-
- *iPA file only. Requires sideloading with AltStore or similar tools. -
-
Flatpak -

flatpak install com.github.KRTirtho.Spotube

- - Download on Flathub - -
AppImageAppImage's lacking stability led to it's temporary removal. More information at https://github.com/KRTirtho/spotube/issues/1082
Debian/Ubuntu - - Debian/Ubuntu Download - -

Then run: sudo apt install ./Spotube-linux-x86_64.deb

-
Arch/Manjaro -

With pamac: sudo pamac install spotube-bin

-

With yay: yay -Sy spotube-bin

-
Fedora/OpenSuse - - Fedora/OpenSuse Download - -

For Fedora: sudo dnf install ./Spotube-linux-x86_64.rpm

-

For OpenSuse: sudo zypper in ./Spotube-linux-x86_64.rpm

-
Linux (tarball) - - Tarball Download - -
Macos - Homebrew -
-brew tap krtirtho/apps
-brew install --cask spotube
-
-
Windows - Chocolatey -

choco install spotube

-
Windows - Scoop -

scoop bucket add extras

-

scoop install spotube

-
Windows - WinGet -

winget install --id KRTirtho.Spotube

-
- -### 🔄 Nightly Builds - -Grab the latest nightly builds of Spotube [from the GitHub Releases](https://github.com/KRTirtho/spotube/releases/tag/nightly). - -## 🕳️ Building from source - -GitHub Workflow Status - -You can compile Spotube's source code by [following these instructions](CONTRIBUTION.md#your-first-code-contribution). - -## 👥 The Spotube team - -- [Kingkor Roy Tirtho](https://github.com/KRTirtho) - The Founder, Maintainer and Lead Developer -- [Owen Connor](https://github.com/owencz1998) - The Cool Discord Moderator -- [Piotr Rogowski](https://github.com/karniv00l) - The MacOS Developer -- [Rusty Apple](https://github.com/RustyApple) - The Mysterious Unknown Guy - -## 💼 License - -Spotube is open source and licensed under the [BSD-4-Clause](/LICENSE) License. - -If you are curious, you can [read the reason of choosing this license](https://dev.to/krtirtho/choosing-open-source-license-wisely-1m3p). - -
- -

[Click to show] 🙏 Services/Package/Plugin Credits

-
- -### Services - -1. [Flutter](https://flutter.dev) - Flutter transforms the app development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase -1. [MPV](https://mpv.io) - mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types. -1. [Musicbrainz](https://musicbrainz.org) - MusicBrainz is a MetaBrainz project that aims to create a collaborative music database that is similar to the freedb project. -1. [Listenbrainz](https://listenbrainz.org) - ListenBrainz is a open-source project by the MetaBrainz Foundation that allows users to crowdsource and publicly store their digital music listening data. -1. [Piped](https://piped-docs.kavin.rocks/) - Piped is a privacy friendly alternative YouTube frontend, which is efficient and scalable by design. -1. [Invidious](https://invidious.io/) - Invidious is an open source alternative front-end to YouTube. -1. [yt-dlp](https://github.com/yt-dlp/yt-dlp) - A feature-rich command-line audio/video downloader. -1. [NewPipeExtractor](https://github.com/TeamNewPipe/NewPipeExtractor) - NewPipe's core library for extracting data from streaming sites. -1. [YouTubeExplodeDart](https://github.com/Hexer10/youtube_explode_dart) - A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key. -1. [LRCLib](https://lrclib.net/) - A public synced lyric API. -1. [Linux](https://www.linux.org) - Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged in a Linux distribution -1. [AUR](https://aur.archlinux.org) - AUR stands for Arch User Repository. It is a community-driven repository for Arch-based Linux distributions users -1. [Flatpak](https://flatpak.org) - Flatpak is a utility for software deployment and package management for Linux -1. [SponsorBlock](https://sponsor.ajay.app) - SponsorBlock is an open-source crowdsourced browser extension and open API for skipping sponsor segments in YouTube videos. -1. [Inno Setup](https://jrsoftware.org/isinfo.php) - Inno Setup is a free installer for Windows programs by Jordan Russell and Martijn Laan -1. [F-Droid](https://f-droid.org) - F-Droid is an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. The client makes it easy to browse, install, and keep track of updates on your device -1. [LastFM](https://last.fm) - Last.fm is a music streaming and discovery platform that helps users discover and share new music. It tracks users' music listening habits across many devices and platforms. - -### Dependencies - -1. [app_links](https://github.com/llfbandit/app_links) - Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter (desktop included). -1. [args](https://pub.dev/packages/args) - Library for defining parsers for parsing raw command-line arguments into a set of options and values using GNU and POSIX style options. -1. [audio_service](https://pub.dev/packages/audio_service) - Flutter plugin to play audio in the background while the screen is off. -1. [audio_service_mpris](https://github.com/bdrazhzhov/audio-service-mpris) - audio_service platform interface supporting Media Player Remote Interfacing Specification. -1. [audio_session](https://github.com/ryanheise/audio_session) - Sets the iOS audio session category and Android audio attributes for your app, and manages your app's audio focus, mixing and ducking behaviour. -1. [auto_route](https://github.com/Milad-Akarie/auto_route_library) - AutoRoute is a declarative routing solution, where everything needed for navigation is automatically generated for you. -1. [auto_size_text](https://github.com/leisim/auto_size_text) - Flutter widget that automatically resizes text to fit perfectly within its bounds. -1. [bonsoir](https://bonsoir.skyost.eu) - A Zeroconf library that allows you to discover network services and to broadcast your own. Based on Apple Bonjour and Android NSD. -1. [cached_network_image](https://github.com/Baseflow/flutter_cached_network_image) - Flutter library to load and cache network images. Can also be used with placeholder and error widgets. -1. [connectivity_plus](https://github.com/fluttercommunity/plus_plugins) - Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS. -1. [device_info_plus](https://github.com/fluttercommunity/plus_plugins) - Flutter plugin providing detailed information about the device (make, model, etc.), and Android or iOS version the app is running on. -1. [dio](https://github.com/cfug/dio) - A powerful HTTP networking package,supports Interceptors,Aborting and canceling a request,Custom adapters, Transformers, etc. -1. [drift](https://drift.simonbinder.eu/) - Drift is a reactive library to store relational data in Dart and Flutter applications. -1. [duration](https://github.com/desktop-dart/duration) - Utilities to make working with 'Duration's easier. Formats duration in human readable form and also parses duration in human readable form to Dart's Duration. -1. [encrypt](https://pub.dev/packages/encrypt) - A set of high-level APIs over PointyCastle for two-way cryptography. -1. [envied](https://github.com/petercinibulk/envied) - Explicitly reads environment variables into a dart file from a .env file for more security and faster start up times. -1. [file_picker](https://github.com/miguelpruivo/plugins_flutter_file_picker) - A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extension filtering support. -1. [file_selector](https://pub.dev/packages/file_selector) - Flutter plugin for opening and saving files, or selecting directories, using native file selection UI. -1. [fluentui_system_icons](https://github.com/microsoft/fluentui-system-icons/tree/main) - Fluent UI System Icons are a collection of familiar, friendly and modern icons from Microsoft. -1. [flutter_cache_manager](https://github.com/Baseflow/flutter_cache_manager/tree/develop/flutter_cache_manager) - Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite. -1. [flutter_discord_rpc](https://pub.dev/packages/flutter_discord_rpc) - Discord RPC support for Flutter desktop platforms -1. [flutter_displaymode](https://github.com/ajinasokan/flutter_displaymode) - A Flutter plugin to set display mode (resolution, refresh rate) on Android platform. Allows to enable high refresh rate on supported devices. -1. [flutter_feather_icons](https://github.com/muj-programmer/flutter_feather_icons) - Feather is a collection of simply beautiful open source icons. Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency and usability. -1. [flutter_form_builder](https://github.com/flutter-form-builder-ecosystem) - This package helps in creation of forms in Flutter by removing the boilerplate code, reusing validation, react to changes, and collect final user input. -1. [flutter_hooks](https://github.com/rrousselGit/flutter_hooks) - A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse. -1. [flutter_inappwebview](https://inappwebview.dev/) - A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window. -1. [flutter_native_splash](https://pub.dev/packages/flutter_native_splash) - Customize Flutter's default white native splash screen with background color and splash image. Supports dark mode, full screen, and more. -1. [flutter_riverpod](https://riverpod.dev) - A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze. -1. [flutter_sharing_intent](https://github.com/bhagat-techind/flutter_sharing_intent.git) - A flutter plugin that allow flutter apps to receive photos, videos, text, urls or any other file types from another app. -1. [flutter_undraw](https://github.com/KRTirtho/flutter_undraw) - Undraw.co Illustrations for Flutter with customization options -1. [form_builder_validators](https://github.com/flutter-form-builder-ecosystem) - Form Builder Validators set of validators for FlutterFormBuilder. Provides common validators and a way to make your own. -1. [freezed_annotation](https://pub.dev/packages/freezed_annotation) - Annotations for the freezed code-generator. This package does nothing without freezed too. -1. [fuzzywuzzy](https://github.com/sphericalkat/dart-fuzzywuzzy) - An implementation of the popular fuzzywuzzy package in Dart, to suit all your fuzzy string matching/searching needs! -1. [home_widget](https://pub.dev/packages/home_widget) - A plugin to provide a common interface for creating HomeScreen Widgets for Android and iOS. -1. [hooks_riverpod](https://riverpod.dev) - A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze. -1. [html](https://pub.dev/packages/html) - APIs for parsing and manipulating HTML content outside the browser. -1. [html_unescape](https://github.com/filiph/html_unescape) - A small library for un-escaping HTML. Supports all Named Character References, Decimal Character References and Hexadecimal Character References. -1. [http](https://pub.dev/packages/http) - A composable, multi-platform, Future-based API for HTTP requests. -1. [image_picker](https://pub.dev/packages/image_picker) - Flutter plugin for selecting images from the Android and iOS image library, and taking new pictures with the camera. -1. [intl](https://pub.dev/packages/intl) - Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues. -1. [local_notifier](https://github.com/leanflutter/local_notifier) - This plugin allows Flutter desktop apps to displaying local notifications. -1. [logger](https://pub.dev/packages/logger) - Small, easy to use and extensible logger which prints beautiful logs. -1. [logging](https://pub.dev/packages/logging) - Provides APIs for debugging and error logging, similar to loggers in other languages, such as the Closure JS Logger and java.util.logging.Logger. -1. [lrc](https://pub.dev/packages/lrc) - A Dart-only package that creates, parses, and handles LRC, which is a format that stores song lyrics. -1. [metadata_god](https://pub.dev/packages/metadata_god) - Plugin for retrieving and writing audio tags/metadata from audio files -1. [mime](https://pub.dev/packages/mime) - Utilities for handling media (MIME) types, including determining a type from a file extension and file contents. -1. [open_file](https://pub.dev/packages/open_file) - A plug-in that can call native APP to open files with string result in flutter, support iOS(UTI) / android(intent) / PC(ffi) / web(dart:html) -1. [package_info_plus](https://github.com/fluttercommunity/plus_plugins) - Flutter plugin for querying information about the application package, such as CFBundleVersion on iOS or versionCode on Android. -1. [palette_generator](https://pub.dev/packages/palette_generator) - Flutter package for generating palette colors from a source image. -1. [path](https://pub.dev/packages/path) - A string-based path manipulation library. All of the path operations you know and love, with solid support for Windows, POSIX (Linux and Mac OS X), and the web. -1. [path_provider](https://pub.dev/packages/path_provider) - Flutter plugin for getting commonly used locations on host platform file systems, such as the temp and app data directories. -1. [permission_handler](https://pub.dev/packages/permission_handler) - Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. -1. [riverpod](https://riverpod.dev) - A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze. -1. [scroll_to_index](https://github.com/quire-io/scroll-to-index) - Scroll to a specific child of any scrollable widget in Flutter -1. [shadcn_flutter](https://github.com/sunarya-thito/shadcn_flutter) - Beautifully designed components from Shadcn/UI is now available for Flutter -1. [shared_preferences](https://pub.dev/packages/shared_preferences) - Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android. -1. [shelf](https://pub.dev/packages/shelf) - A model for web server middleware that encourages composition and easy reuse. -1. [shelf_router](https://pub.dev/packages/shelf_router) - A convenient request router for the shelf web-framework, with support for URL-parameters, nested routers and routers generated from source annotations. -1. [shelf_web_socket](https://pub.dev/packages/shelf_web_socket) - A shelf handler that wires up a listener for every connection. -1. [simple_icons](https://teavelopment.com/) - The Simple Icon pack available as Flutter Icons. Provides over 1500 Free SVG icons for popular brands. -1. [skeletonizer](https://github.com/Milad-Akarie/skeletonizer) - Converts already built widgets into skeleton loaders with no extra effort. -1. [sliding_up_panel](https://github.com/akshathjain/sliding_up_panel) - A draggable Flutter widget that makes implementing a SlidingUpPanel much easier! -1. [sliver_tools](https://github.com/Kavantix) - A set of useful sliver tools that are missing from the flutter framework -1. [smtc_windows](https://pub.dev/packages/smtc_windows) - Windows `SystemMediaTransportControls` implementation for Flutter giving access to Windows OS Media Control applet. -1. [sqlite3](https://github.com/simolus3/sqlite3.dart/tree/main/sqlite3) - Provides lightweight yet convenient bindings to SQLite by using dart:ffi -1. [sqlite3_flutter_libs](https://github.com/simolus3/sqlite3.dart/tree/main/sqlite3_flutter_libs) - Flutter plugin to include native sqlite3 libraries with your app -1. [timezone](https://pub.dev/packages/timezone) - Time zone database and time zone aware DateTime. -1. [titlebar_buttons](https://github.com/gtk-flutter/titlebar_buttons) - A package which provides most of the titlebar buttons from windows, linux and macos. -1. [tray_manager](https://github.com/leanflutter/tray_manager) - This plugin allows Flutter desktop apps to defines system tray. -1. [url_launcher](https://pub.dev/packages/url_launcher) - Flutter plugin for launching a URL. Supports web, phone, SMS, and email schemes. -1. [uuid](https://pub.dev/packages/uuid) - RFC4122 (v1, v4, v5, v6, v7, v8) UUID Generator and Parser for Dart -1. [version](https://github.com/dartninja/version) - Provides a simple class for parsing and comparing semantic versions as defined by http://semver.org/ -1. [very_good_infinite_list](https://github.com/VeryGoodOpenSource/very_good_infinite_list) - A library for easily displaying paginated data, created by Very Good Ventures. Great for activity feeds, news feeds, and more. -1. [visibility_detector](https://pub.dev/packages/visibility_detector) - A widget that detects the visibility of its child and notifies a callback. -1. [web_socket_channel](https://pub.dev/packages/web_socket_channel) - StreamChannel wrappers for WebSockets. Provides a cross-platform WebSocketChannel API, a cross-platform implementation of that API that communicates over an underlying StreamChannel. -1. [wikipedia_api](https://github.com/KRTirtho/wikipedia_api) - Wikipedia API for dart and flutter -1. [win32_registry](https://pub.dev/packages/win32_registry) - A package that provides a friendly Dart API for accessing the Windows Registry. -1. [window_manager](https://leanflutter.dev) - This plugin allows Flutter desktop apps to resizing and repositioning the window. -1. [youtube_explode_dart](https://github.com/Hexer10/youtube_explode_dart) - A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key. -1. [http_parser](https://pub.dev/packages/http_parser) - A platform-independent package for parsing and serializing HTTP formats. -1. [collection](https://pub.dev/packages/collection) - Collections and utilities functions and classes related to collections. -1. [archive](https://pub.dev/packages/archive) - Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, and zlib. -1. [hetu_script](https://github.com/hetu-script/hetu-script) - Hetu is a lightweight scripting language for embedding in Flutter apps. -1. [get_it](https://github.com/flutter-it/get_it) - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App" -1. [flutter_markdown_plus](https://pub.dev/packages/flutter_markdown_plus) - A Markdown renderer for Flutter. Create rich text output, including text styles, tables, links, and more, from plain text data formatted with simple Markdown tags. -1. [pub_semver](https://pub.dev/packages/pub_semver) - Versions and version constraints implementing pub's versioning policy. This is very similar to vanilla semver, with a few corner cases. -1. [change_case](https://github.com/mrgnhnt96/change_case) - An extension on String for the missing methods for camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others. -1. [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) - Flutter Secure Storage provides API to store data in secure storage. Keychain is used in iOS, KeyStore based solution is used in Android. -1. [build_runner](https://pub.dev/packages/build_runner) - A build system for Dart code generation and modular compilation. -1. [envied_generator](https://github.com/petercinibulk/envied) - Generator for the Envied package. See https://pub.dev/packages/envied. -1. [flutter_gen_runner](https://github.com/FlutterGen/flutter_gen) - The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs. -1. [flutter_launcher_icons](https://github.com/fluttercommunity/flutter_launcher_icons) - A package which simplifies the task of updating your Flutter app's launcher icon. -1. [flutter_lints](https://pub.dev/packages/flutter_lints) - Recommended lints for Flutter apps, packages, and plugins to encourage good coding practices. -1. [json_serializable](https://pub.dev/packages/json_serializable) - Automatically generate code for converting to and from JSON by annotating Dart classes. -1. [freezed](https://pub.dev/packages/freezed) - Code generation for immutable classes that has a simple syntax/API without compromising on the features. -1. [process_run](https://github.com/tekartik/process_run.dart/blob/master/packages/process_run) - Process run helpers for Linux/Win/Mac and which like feature for finding executables. -1. [pubspec_parse](https://pub.dev/packages/pubspec_parse) - Simple package for parsing pubspec.yaml files with a type-safe API and rich error reporting. -1. [pub_api_client](https://github.com/leoafarias/pub_api_client) - An API Client for Pub to interact with public package information. -1. [io](https://pub.dev/packages/io) - Utilities for the Dart VM Runtime including support for ANSI colors, file copying, and standard exit code values. -1. [drift_dev](https://drift.simonbinder.eu/) - Dev-dependency for users of drift. Contains the generator and development tools. -1. [test](https://pub.dev/packages/test) - A full featured library for writing and running Dart tests across platforms. -1. [auto_route_generator](https://github.com/Milad-Akarie/auto_route_library) - AutoRoute is a declarative routing solution, where everything needed for navigation is automatically generated for you. -1. [desktop_webview_window](https://github.com/MixinNetwork/flutter-plugins/tree/main/packages/desktop_webview_window) - Show a webview window on your flutter desktop application. -1. [disable_battery_optimization](https://github.com/pvsvamsi/Disable-Battery-Optimizations) - Flutter plugin to check and disable battery optimizations. Also shows custom steps to disable the optimizations in devices like mi, xiaomi, samsung, oppo, huawei, oneplus etc -1. [draggable_scrollbar](https://github.com/fluttercommunity/flutter-draggable-scrollbar) - A scrollbar that can be dragged for quickly navigation through a vertical list. Additional option is showing label next to scrollthumb with information about current item. -1. [flutter_broadcasts](https://github.com/KRTirtho/flutter_broadcasts.git) - A plugin for sending and receiving broadcasts with Android intents and iOS notifications. -1. [scrobblenaut](https://github.com/Nebulino/Scrobblenaut) - A deadly simple LastFM API Wrapper for Dart. So deadly simple that it's gonna hit the mark. -1. [yt_dlp_dart](https://github.com/KRTirtho/yt_dlp_dart.git) - A starting point for Dart libraries or applications. -1. [flutter_new_pipe_extractor](https://github.com/KRTirtho/flutter_new_pipe_extractor) - NewPipeExtractor binding for Flutter (Android only) -1. [hetu_std](https://github.com/hetu-community/hetu_std.git) - A sample command-line application. -1. [hetu_otp_util](https://github.com/hetu-community/hetu_otp_util.git) - A sample command-line application. -1. [hetu_spotube_plugin](https://github.com/KRTirtho/hetu_spotube_plugin) - A new Flutter package project. -1. [media_kit](https://github.com/media-kit/media-kit) - A cross-platform video player & audio player for Flutter & Dart. Performant, stable, feature-proof & modular. -1. [media_kit_libs_audio](https://github.com/media-kit/media-kit.git) - package:media_kit audio (only) playback native libraries for all platforms. - -
- -

© Copyright Spotube 2025

+Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html)… \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index af222653..00000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - file_names: false - avoid_renaming_method_parameters: false - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options -analyzer: - errors: - invalid_annotation_target: ignore - exclude: - - "**.freezed.dart" - - "**.g.dart" - - "**.gr.dart" - - "**/generated_plugin_registrant.dart" - - test/**/*.dart diff --git a/android/.gitignore b/android/.gitignore deleted file mode 100644 index 2391a77e..00000000 --- a/android/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties -**/*.keystore -**/*.jks -.kotlin \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle deleted file mode 100644 index 7319c6a8..00000000 --- a/android/app/build.gradle +++ /dev/null @@ -1,140 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" - id "org.jetbrains.kotlin.plugin.compose" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -def keystoreProperties = new Properties() -def keystorePropertiesFile = rootProject.file('key.properties') -if (keystorePropertiesFile.exists()) { - keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) -} - -def composeVersion = "1.4.8" - -android { - namespace "oss.krtirtho.spotube" - - compileSdkVersion 36 - - ndkVersion = "29.0.14206865" - - compileOptions { - coreLibraryDesugaringEnabled true - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - buildFeatures { - compose true - } - - composeOptions { - kotlinCompilerExtensionVersion "$composeVersion" // Correlates with org.jetbrains.kotlin.android plugin in settings.gradle - } - - defaultConfig { - applicationId "oss.krtirtho.spotube" - minSdkVersion 24 - targetSdkVersion 35 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - multiDexEnabled true - } - - signingConfigs { - release { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword keystoreProperties['storePassword'] - } - } - - buildTypes { - release { - signingConfig signingConfigs.release - } - debug { - signingConfig signingConfigs.release - } - } - - flavorDimensions "default" - - productFlavors { - nightly { - dimension "default" - resValue "string", "app_name_en", "Spotube Nightly" - applicationIdSuffix ".nightly" - versionNameSuffix "-nightly" - signingConfig signingConfigs.release - } - dev { - dimension "default" - resValue "string", "app_name_en", "Spotube Dev" - applicationIdSuffix ".dev" - versionNameSuffix "-dev" - signingConfig signingConfigs.release - } - stable { - dimension "default" - resValue "string", "app_name_en", "Spotube" - signingConfig signingConfigs.release - } - } - - packagingOptions { - resources.excludes += "DebugProbesKt.bin" - } -} - -flutter { - source '../..' -} - -def glanceVersion = "1.1.1" -dependencies { - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4' - - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' - // other deps so just ignore - implementation 'com.android.support:multidex:2.0.1' - - implementation "androidx.glance:glance-appwidget:$glanceVersion" - implementation "androidx.glance:glance-appwidget-preview:$glanceVersion" - implementation "androidx.glance:glance-preview:$glanceVersion" - implementation "androidx.glance:glance-material3:$glanceVersion" - implementation "androidx.glance:glance-material:$glanceVersion" - implementation "androidx.work:work-runtime-ktx:2.8.1" - - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3" - implementation 'com.google.code.gson:gson:2.11.0' -} \ No newline at end of file diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro deleted file mode 100644 index bc4b8b8b..00000000 --- a/android/app/proguard-rules.pro +++ /dev/null @@ -1,60 +0,0 @@ -#Flutter Wrapper -# -keep class io.flutter.app.** { *; } --keep class io.flutter.plugin.** { *; } --keep class io.flutter.util.** { *; } --keep class io.flutter.view.** { *; } -# -keep class io.flutter.** { *; } --keep class io.flutter.plugins.** { *; } --keep class de.prosiebensat1digital.** { *; } - --keep class androidx.lifecycle.DefaultLifecycleObserver - --keepnames class kotlinx.serialization.** { *; } --keepnames class oss.krtirtho.spotube.glance.models.** { *; } --keep @kotlinx.serialization.Serializable class * --keepclassmembers class ** { - @kotlinx.serialization.* ; -} - -## We don't need beans --dontwarn java.beans.BeanDescriptor --dontwarn java.beans.BeanInfo --dontwarn java.beans.IntrospectionException --dontwarn java.beans.Introspector --dontwarn java.beans.PropertyDescriptor - -## Rules for NewPipeExtractor --keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; } --keep class org.mozilla.javascript.** { *; } --keep class org.mozilla.classfile.ClassFileWriter --dontwarn com.google.re2j.** --dontwarn org.mozilla.javascript.tools.** - --dontwarn javax.script.AbstractScriptEngine --dontwarn javax.script.Bindings --dontwarn javax.script.Compilable --dontwarn javax.script.CompiledScript --dontwarn javax.script.Invocable --dontwarn javax.script.ScriptContext --dontwarn javax.script.ScriptEngine --dontwarn javax.script.ScriptEngineFactory --dontwarn javax.script.ScriptException --dontwarn javax.script.SimpleBindings --dontwarn jdk.dynalink.CallSiteDescriptor --dontwarn jdk.dynalink.DynamicLinker --dontwarn jdk.dynalink.DynamicLinkerFactory --dontwarn jdk.dynalink.NamedOperation --dontwarn jdk.dynalink.Namespace --dontwarn jdk.dynalink.NamespaceOperation --dontwarn jdk.dynalink.Operation --dontwarn jdk.dynalink.RelinkableCallSite --dontwarn jdk.dynalink.StandardNamespace --dontwarn jdk.dynalink.StandardOperation --dontwarn jdk.dynalink.linker.GuardedInvocation --dontwarn jdk.dynalink.linker.GuardingDynamicLinker --dontwarn jdk.dynalink.linker.LinkRequest --dontwarn jdk.dynalink.linker.LinkerServices --dontwarn jdk.dynalink.linker.TypeBasedGuardingDynamicLinker --dontwarn jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker --dontwarn jdk.dynalink.linker.support.Guards --dontwarn jdk.dynalink.support.ChainedCallSite \ No newline at end of file diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 400c91e8..00000000 --- a/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index a005257e..00000000 --- a/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java deleted file mode 100644 index 752fc185..00000000 --- a/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated file. -// -// If you wish to remove Flutter's multidex support, delete this entire file. -// -// Modifications to this file should be done in a copy under a different name -// as this file may be regenerated. - -package io.flutter.app; - -import android.app.Application; -import android.content.Context; -import androidx.annotation.CallSuper; -import androidx.multidex.MultiDex; - -/** - * Extension of {@link android.app.Application}, adding multidex support. - */ -public class FlutterMultiDexApplication extends Application { - @Override - @CallSuper - protected void attachBaseContext(Context base) { - super.attachBaseContext(base); - MultiDex.install(this); - } -} diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt deleted file mode 100644 index 90debb71..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package oss.krtirtho.spotube - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt deleted file mode 100644 index a20af959..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt +++ /dev/null @@ -1,207 +0,0 @@ -package oss.krtirtho.spotube.glance - -import HomeWidgetGlanceState -import HomeWidgetGlanceStateDefinition -import android.R -import android.content.Context -import android.graphics.drawable.Icon -import android.net.Uri -import android.util.Log -import androidx.compose.runtime.Composable -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import androidx.glance.GlanceId -import androidx.glance.GlanceModifier -import androidx.glance.GlanceTheme -import androidx.glance.Image -import androidx.glance.ImageProvider -import androidx.glance.LocalSize -import androidx.glance.action.ActionParameters -import androidx.glance.action.actionParametersOf -import androidx.glance.action.clickable -import androidx.glance.background -import androidx.glance.appwidget.GlanceAppWidget -import androidx.glance.appwidget.SizeMode -import androidx.glance.appwidget.action.ActionCallback -import androidx.glance.appwidget.action.actionRunCallback -import androidx.glance.appwidget.background -import androidx.glance.appwidget.components.CircleIconButton -import androidx.glance.appwidget.components.Scaffold -import androidx.glance.appwidget.cornerRadius -import androidx.glance.appwidget.provideContent -import androidx.glance.background -import androidx.glance.currentState -import androidx.glance.layout.Alignment -import androidx.glance.layout.Box -import androidx.glance.layout.Column -import androidx.glance.layout.ContentScale -import androidx.glance.layout.Row -import androidx.glance.layout.Spacer -import androidx.glance.layout.fillMaxSize -import androidx.glance.layout.fillMaxWidth -import androidx.glance.layout.padding -import androidx.glance.layout.size -import androidx.glance.preview.ExperimentalGlancePreviewApi -import androidx.glance.preview.Preview -import androidx.glance.state.GlanceStateDefinition -import com.google.gson.Gson -import es.antonborri.home_widget.HomeWidgetBackgroundIntent -import es.antonborri.home_widget.actionStartActivity -import oss.krtirtho.spotube.MainActivity -import oss.krtirtho.spotube.glance.models.Track -import oss.krtirtho.spotube.glance.widgets.FlutterAssetImageProvider -import oss.krtirtho.spotube.glance.widgets.TrackDetailsView -import oss.krtirtho.spotube.glance.widgets.TrackProgress - -val gson = Gson() -val serverAddressKey = ActionParameters.Key("serverAddress") - -class Breakpoints { - companion object { - val SMALL_SQUARE = DpSize(100.dp, 100.dp) - val HORIZONTAL_RECTANGLE = DpSize(250.dp, 100.dp) - val BIG_SQUARE = DpSize(250.dp, 250.dp) - } -} - -class HomePlayerWidget : GlanceAppWidget() { - - override val sizeMode = SizeMode.Responsive( - setOf( - Breakpoints.SMALL_SQUARE, - Breakpoints.HORIZONTAL_RECTANGLE, - Breakpoints.BIG_SQUARE - ) - ) - - override val stateDefinition: GlanceStateDefinition<*>? - get() = HomeWidgetGlanceStateDefinition() - - override suspend fun provideGlance(context: Context, id: GlanceId) { - provideContent { - GlanceContent(context, currentState()) - } - } - - - @OptIn(ExperimentalGlancePreviewApi::class) - @Preview(widthDp = 100, heightDp = 100) - @Composable - private fun GlanceContent(context: Context, currentState: HomeWidgetGlanceState) { - val prefs = currentState.preferences - val size = LocalSize.current - - val activeTrackStr = prefs.getString("activeTrack", null) - - val isPlaying = prefs.getBoolean("isPlaying", false) - val playbackServerAddress = prefs.getString("playbackServerAddress", null) ?: "" - - var activeTrack: Track? = null - if (activeTrackStr != null) { - activeTrack = gson.fromJson(activeTrackStr, Track::class.java) - } - - - val playIcon = Icon.createWithResource(context, R.drawable.ic_media_play); - val pauseIcon = Icon.createWithResource(context, R.drawable.ic_media_pause); - val previousIcon = Icon.createWithResource(context, R.drawable.ic_media_previous); - val nextIcon = Icon.createWithResource(context, R.drawable.ic_media_next); - - GlanceTheme { - Box( - modifier = GlanceModifier - .fillMaxSize() - .cornerRadius(8.dp) - .background( - color = GlanceTheme.colors.surface.getColor(context) - ) - .clickable { - actionStartActivity(context) - } - , - ) { - Box( - modifier = GlanceModifier - .background( - color = - GlanceTheme.colors.surface.getColor(context) - .copy(alpha = 0.5f), - ) - .fillMaxSize(), - ) {} - Column( - modifier = GlanceModifier.padding(top = 10.dp, start = 10.dp, end = 10.dp) - ) { - Row(verticalAlignment = Alignment.Vertical.CenterVertically) { - TrackDetailsView(activeTrack) - } - Spacer(modifier = GlanceModifier.size(6.dp)) - if (size != Breakpoints.SMALL_SQUARE) { - TrackProgress(prefs) - } - Spacer(modifier = GlanceModifier.size(6.dp)) - Row( - modifier = GlanceModifier.fillMaxWidth(), - horizontalAlignment = Alignment.Horizontal.CenterHorizontally - ) { - CircleIconButton( - imageProvider = ImageProvider(previousIcon), - contentDescription = "Previous", - onClick = actionRunCallback( - parameters = actionParametersOf(serverAddressKey to playbackServerAddress) - ) - ) - Spacer(modifier = GlanceModifier.size(6.dp)) - CircleIconButton( - imageProvider = - if (isPlaying) ImageProvider(pauseIcon) - else ImageProvider(playIcon), - contentDescription = "Play/Pause", - onClick = actionRunCallback( - parameters = actionParametersOf(serverAddressKey to playbackServerAddress) - ) - ) - Spacer(modifier = GlanceModifier.size(6.dp)) - CircleIconButton( - imageProvider = ImageProvider(nextIcon), - contentDescription = "Previous", - onClick = actionRunCallback( - parameters = actionParametersOf( - serverAddressKey to playbackServerAddress - ) - ) - ) - } - } - } - } - } -} - -class PlayPauseAction : InteractiveAction("toggle-playback") -class NextAction : InteractiveAction("next") -class PreviousAction : InteractiveAction("previous") - - -abstract class InteractiveAction(val command: String) : ActionCallback { - override suspend fun onAction( - context: Context, - glanceId: GlanceId, - parameters: ActionParameters - ) { - val serverAddress = parameters[serverAddressKey] ?: "" - - Log.d("HomePlayerWidget", "Sending command $command to $serverAddress") - - if (serverAddress == null || serverAddress.isEmpty()) { - return - } - - - val backgroundIntent = HomeWidgetBackgroundIntent.getBroadcast( - context, - Uri.parse("spotube://playback/$command?serverAddress=$serverAddress") - ) - backgroundIntent.send() - } -} diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidgetReceiver.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidgetReceiver.kt deleted file mode 100644 index 2d23c64f..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidgetReceiver.kt +++ /dev/null @@ -1,7 +0,0 @@ -package oss.krtirtho.spotube.glance - -import HomeWidgetGlanceWidgetReceiver - -class HomePlayerWidgetReceiver : HomeWidgetGlanceWidgetReceiver() { - override val glanceAppWidget = HomePlayerWidget() -} diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/AlbumSimple.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/AlbumSimple.kt deleted file mode 100644 index 4edd69f6..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/AlbumSimple.kt +++ /dev/null @@ -1,40 +0,0 @@ -package oss.krtirtho.spotube.glance.models - -import com.google.gson.annotations.SerializedName -import kotlinx.serialization.Serializable - -@Serializable -data class AlbumSimple( - @SerializedName("album_type") - val albumType: AlbumType?, - - @SerializedName("available_markets") - val availableMarkets: List?, - - val href: String?, - val id: String?, - val images: List?, - val name: String?, - - @SerializedName("release_date") - val releaseDate: String?, - - @SerializedName("release_date_precision") - val releaseDatePrecision: DatePrecision?, - - val type: String?, - val uri: String?, -) - -@Serializable -enum class AlbumType { - album, - single, - compilation -} - -enum class DatePrecision { - year, - month, - day -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Artist.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Artist.kt deleted file mode 100644 index ef43ecc8..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Artist.kt +++ /dev/null @@ -1,25 +0,0 @@ -package oss.krtirtho.spotube.glance.models - -import com.google.gson.annotations.SerializedName -import kotlinx.serialization.Serializable - -@Serializable -data class Artist( - val href: String?, - val id: String?, - val name: String?, - val type: String?, - val uri: String?, - - val followers: Followers?, - val genres: List?, - val images: List?, - - @SerializedName("popularity") - val popularity: Int? -) - -@Serializable -data class Followers( - val total: Int? -) diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Image.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Image.kt deleted file mode 100644 index de7d5521..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Image.kt +++ /dev/null @@ -1,10 +0,0 @@ -package oss.krtirtho.spotube.glance.models - -import kotlinx.serialization.Serializable - -@Serializable -data class Image( - val height: Int?, - val width: Int?, - val path: String, -) \ No newline at end of file diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Track.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Track.kt deleted file mode 100644 index 717b790f..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Track.kt +++ /dev/null @@ -1,37 +0,0 @@ -package oss.krtirtho.spotube.glance.models - -import com.google.gson.annotations.SerializedName -import kotlinx.serialization.Serializable -import kotlin.time.Duration.Companion.milliseconds - -@Serializable -data class Track( - val album: AlbumSimple?, val artists: List?, - - @SerializedName("available_markets") val availableMarkets: List?, - - @SerializedName("disc_number") val discNumber: Int?, - - @SerializedName("duration_ms") val durationMs: Int, - - val explicit: Boolean?, val href: String?, val id: String?, - - @SerializedName("is_playable") val isPlayable: Boolean?, - - val name: String?, - - @SerializedName("popularity") val popularity: Int?, - - @SerializedName("preview_url") val previewUrl: String?, - - @SerializedName("track_number") val trackNumber: Int?, - - val type: String?, val uri: String? -) { - val duration: kotlin.time.Duration - get() = durationMs.toLong().milliseconds -} - -enum class Market { - AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW, -} diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/Base64ImageProvider.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/Base64ImageProvider.kt deleted file mode 100644 index 79339cea..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/Base64ImageProvider.kt +++ /dev/null @@ -1,14 +0,0 @@ -package oss.krtirtho.spotube.glance.widgets - -import android.graphics.BitmapFactory -import android.util.Base64 -import androidx.glance.ImageProvider - -@Suppress("FunctionName") -fun Base64ImageProvider(base64: String): ImageProvider { - var bytes = Base64.decode(base64, Base64.DEFAULT); - - var bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.size); - - return ImageProvider(bitmap) -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/FlutterAssetImageProvider.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/FlutterAssetImageProvider.kt deleted file mode 100644 index ad51ca3c..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/FlutterAssetImageProvider.kt +++ /dev/null @@ -1,14 +0,0 @@ -package oss.krtirtho.spotube.glance.widgets - -import android.content.Context -import android.graphics.BitmapFactory -import androidx.glance.ImageProvider - -@Suppress("FunctionName") -fun FlutterAssetImageProvider(context: Context, path: String): ImageProvider { - var inputStream = context.assets.open("flutter_assets/$path") - - return ImageProvider( - BitmapFactory.decodeStream(inputStream) - ) -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackDetailsView.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackDetailsView.kt deleted file mode 100644 index fdfe8e4b..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackDetailsView.kt +++ /dev/null @@ -1,78 +0,0 @@ -package oss.krtirtho.spotube.glance.widgets - -import android.graphics.BitmapFactory -import android.net.Uri -import android.util.Log -import androidx.compose.runtime.Composable -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import androidx.glance.GlanceModifier -import androidx.glance.GlanceTheme -import androidx.glance.Image -import androidx.glance.ImageProvider -import androidx.glance.LocalContext -import androidx.glance.LocalSize -import androidx.glance.appwidget.cornerRadius -import androidx.glance.layout.Alignment -import androidx.glance.layout.Row -import androidx.glance.layout.Column -import androidx.glance.layout.ContentScale -import androidx.glance.layout.Spacer -import androidx.glance.layout.size -import androidx.glance.text.FontWeight -import androidx.glance.text.Text -import androidx.glance.text.TextStyle -import oss.krtirtho.spotube.glance.Breakpoints -import oss.krtirtho.spotube.glance.models.Track - -@Composable -fun TrackDetailsView(activeTrack: Track?) { - val context = LocalContext.current - - val size = LocalSize.current - - val artistStr = activeTrack?.artists?.map { it.name }?.joinToString(", ") ?: "" - val imgLocalPath = activeTrack?.album?.images?.get(0)?.path; - val title = activeTrack?.name ?: "" - - - Image( - provider = - if (imgLocalPath == null) - ImageProvider( - BitmapFactory.decodeResource( - context.resources, - android.R.drawable.ic_delete - ) - ) - else ImageProvider(BitmapFactory.decodeFile(imgLocalPath)), - contentDescription = "Album Art", - modifier = GlanceModifier.cornerRadius(8.dp) - .size( - if (size.height < 200.dp) 50.dp - else 100.dp - ), - contentScale = ContentScale.Fit - ) - Spacer(modifier = GlanceModifier.size(6.dp)) - Column { - Text( - text = title, - style = TextStyle( - fontSize = 16.sp, - fontWeight = FontWeight.Bold, - color = GlanceTheme.colors.onBackground - ), - ) - if (size != Breakpoints.SMALL_SQUARE) { - Spacer(modifier = GlanceModifier.size(6.dp)) - Text( - text = artistStr, - style = TextStyle( - fontSize = 14.sp, - color = GlanceTheme.colors.onBackground - ), - ) - } - } -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackProgress.kt b/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackProgress.kt deleted file mode 100644 index b54059b1..00000000 --- a/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackProgress.kt +++ /dev/null @@ -1,77 +0,0 @@ -package oss.krtirtho.spotube.glance.widgets - -import android.content.SharedPreferences -import androidx.compose.runtime.Composable -import androidx.compose.ui.unit.dp -import androidx.glance.GlanceModifier -import androidx.glance.GlanceTheme -import androidx.glance.LocalSize -import androidx.glance.appwidget.LinearProgressIndicator -import androidx.glance.layout.Column -import androidx.glance.layout.Row -import androidx.glance.layout.Spacer -import androidx.glance.layout.fillMaxWidth -import androidx.glance.layout.size -import androidx.glance.text.Text -import androidx.glance.text.TextStyle -import kotlin.math.max -import kotlin.time.Duration -import kotlin.time.Duration.Companion.seconds -import oss.krtirtho.spotube.glance.Breakpoints - -fun Duration.format(): String { - return this.toComponents { hour, minutes, seconds, nanoseconds -> - var paddedSeconds = seconds.toString().padStart(2, '0') - var paddedMinutes = minutes.toString().padStart(2, '0') - var paddedHour = hour.toString().padStart(2, '0') - if (hour == 0L) { - "$paddedMinutes:$paddedSeconds" - } else { - "$paddedHour:$paddedMinutes:$paddedSeconds" - } - } -} - -@Composable -fun TrackProgress(prefs: SharedPreferences) { - val size = LocalSize.current - val position = prefs.getInt("position", 0).seconds - var duration = prefs.getInt("duration", 0).seconds - - var progress = position.inWholeSeconds.toFloat() / max(duration.inWholeSeconds.toFloat(), 1.0f) - - var textStyle = - TextStyle( - color = GlanceTheme.colors.onBackground, - ) - - if (size == Breakpoints.HORIZONTAL_RECTANGLE) { - Row(modifier = GlanceModifier.fillMaxWidth()) { - Text(text = position.format(), style = textStyle) - Spacer(modifier = GlanceModifier.size(6.dp)) - LinearProgressIndicator( - progress = progress, - modifier = GlanceModifier.defaultWeight(), - color = GlanceTheme.colors.primary, - backgroundColor = GlanceTheme.colors.primaryContainer, - ) - Spacer(modifier = GlanceModifier.size(6.dp)) - Text(text = duration.format(), style = textStyle) - } - } else { - Column(modifier = GlanceModifier.fillMaxWidth()) { - LinearProgressIndicator( - progress = progress, - modifier = GlanceModifier.fillMaxWidth(), - color = GlanceTheme.colors.primary, - backgroundColor = GlanceTheme.colors.primaryContainer, - ) - Spacer(modifier = GlanceModifier.size(6.dp)) - Row(modifier = GlanceModifier.fillMaxWidth()) { - Text(text = position.format(), style = textStyle) - Spacer(modifier = GlanceModifier.defaultWeight()) - Text(text = duration.format(), style = textStyle) - } - } - } -} diff --git a/android/app/src/main/res/drawable-hdpi-v31/android12branding.png b/android/app/src/main/res/drawable-hdpi-v31/android12branding.png deleted file mode 100644 index 22a9b8d3..00000000 Binary files a/android/app/src/main/res/drawable-hdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/android12splash.png b/android/app/src/main/res/drawable-hdpi/android12splash.png deleted file mode 100644 index adeebcd1..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/branding.png b/android/app/src/main/res/drawable-hdpi/branding.png deleted file mode 100644 index 22a9b8d3..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png deleted file mode 100644 index 696717ef..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 204ffe94..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/splash.png b/android/app/src/main/res/drawable-hdpi/splash.png deleted file mode 100644 index 87eebe5c..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi-v31/android12branding.png b/android/app/src/main/res/drawable-mdpi-v31/android12branding.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/android/app/src/main/res/drawable-mdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/android12splash.png b/android/app/src/main/res/drawable-mdpi/android12splash.png deleted file mode 100644 index 72c22614..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/branding.png b/android/app/src/main/res/drawable-mdpi/branding.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png deleted file mode 100644 index d2bb407f..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png deleted file mode 100644 index e7a75c9a..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/splash.png b/android/app/src/main/res/drawable-mdpi/splash.png deleted file mode 100644 index 6e04efdc..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-hdpi-v31/android12branding.png b/android/app/src/main/res/drawable-night-hdpi-v31/android12branding.png deleted file mode 100644 index 22a9b8d3..00000000 Binary files a/android/app/src/main/res/drawable-night-hdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-hdpi/android12splash.png b/android/app/src/main/res/drawable-night-hdpi/android12splash.png deleted file mode 100644 index adeebcd1..00000000 Binary files a/android/app/src/main/res/drawable-night-hdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-mdpi-v31/android12branding.png b/android/app/src/main/res/drawable-night-mdpi-v31/android12branding.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/android/app/src/main/res/drawable-night-mdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-mdpi/android12splash.png b/android/app/src/main/res/drawable-night-mdpi/android12splash.png deleted file mode 100644 index 72c22614..00000000 Binary files a/android/app/src/main/res/drawable-night-mdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-xhdpi-v31/android12branding.png b/android/app/src/main/res/drawable-night-xhdpi-v31/android12branding.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/android/app/src/main/res/drawable-night-xhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-xhdpi/android12splash.png b/android/app/src/main/res/drawable-night-xhdpi/android12splash.png deleted file mode 100644 index 5adba278..00000000 Binary files a/android/app/src/main/res/drawable-night-xhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-xxhdpi-v31/android12branding.png b/android/app/src/main/res/drawable-night-xxhdpi-v31/android12branding.png deleted file mode 100644 index d301093a..00000000 Binary files a/android/app/src/main/res/drawable-night-xxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png b/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png deleted file mode 100644 index 4e294a2d..00000000 Binary files a/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-xxxhdpi-v31/android12branding.png b/android/app/src/main/res/drawable-night-xxxhdpi-v31/android12branding.png deleted file mode 100644 index 42b0bdc2..00000000 Binary files a/android/app/src/main/res/drawable-night-xxxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png b/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png deleted file mode 100644 index dcc70377..00000000 Binary files a/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-v21/background.png b/android/app/src/main/res/drawable-v21/background.png deleted file mode 100644 index 4bebb9de..00000000 Binary files a/android/app/src/main/res/drawable-v21/background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index 5367a886..00000000 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/android/app/src/main/res/drawable-xhdpi-v31/android12branding.png b/android/app/src/main/res/drawable-xhdpi-v31/android12branding.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/android12splash.png b/android/app/src/main/res/drawable-xhdpi/android12splash.png deleted file mode 100644 index 5adba278..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/branding.png b/android/app/src/main/res/drawable-xhdpi/branding.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png deleted file mode 100644 index 534e957f..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index b608dca7..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/splash.png b/android/app/src/main/res/drawable-xhdpi/splash.png deleted file mode 100644 index 51a669aa..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi-v31/android12branding.png b/android/app/src/main/res/drawable-xxhdpi-v31/android12branding.png deleted file mode 100644 index d301093a..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/android12splash.png b/android/app/src/main/res/drawable-xxhdpi/android12splash.png deleted file mode 100644 index 4e294a2d..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/branding.png b/android/app/src/main/res/drawable-xxhdpi/branding.png deleted file mode 100644 index d301093a..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png deleted file mode 100644 index c1eaa966..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index b1e93458..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/splash.png b/android/app/src/main/res/drawable-xxhdpi/splash.png deleted file mode 100644 index cc79cb85..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi-v31/android12branding.png b/android/app/src/main/res/drawable-xxxhdpi-v31/android12branding.png deleted file mode 100644 index 42b0bdc2..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/android12splash.png b/android/app/src/main/res/drawable-xxxhdpi/android12splash.png deleted file mode 100644 index dcc70377..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/branding.png b/android/app/src/main/res/drawable-xxxhdpi/branding.png deleted file mode 100644 index 42b0bdc2..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/branding.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png deleted file mode 100644 index 6c7c4636..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index d178ba12..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/splash.png b/android/app/src/main/res/drawable-xxxhdpi/splash.png deleted file mode 100644 index f526b26d..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/background.png b/android/app/src/main/res/drawable/background.png deleted file mode 100644 index 4bebb9de..00000000 Binary files a/android/app/src/main/res/drawable/background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/ic_launcher_monochrome.xml b/android/app/src/main/res/drawable/ic_launcher_monochrome.xml deleted file mode 100644 index 8aae0e6c..00000000 --- a/android/app/src/main/res/drawable/ic_launcher_monochrome.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 5367a886..00000000 --- a/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index c79c58a3..00000000 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index c9e5cfad..00000000 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 159b302f..00000000 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 9c81fb60..00000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 3450fb00..00000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index f94fd407..00000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/values-night-v31/styles.xml b/android/app/src/main/res/values-night-v31/styles.xml deleted file mode 100644 index 96980835..00000000 --- a/android/app/src/main/res/values-night-v31/styles.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 5eb2eda1..00000000 --- a/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/values-v31/styles.xml b/android/app/src/main/res/values-v31/styles.xml deleted file mode 100644 index 981a07a9..00000000 --- a/android/app/src/main/res/values-v31/styles.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml deleted file mode 100644 index 88247a21..00000000 --- a/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #242832 - \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 0fdc7036..00000000 --- a/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/xml/automotive_app_desc.xml b/android/app/src/main/res/xml/automotive_app_desc.xml deleted file mode 100644 index 90e6f30e..00000000 --- a/android/app/src/main/res/xml/automotive_app_desc.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/android/app/src/main/res/xml/home_player_widget_config.xml b/android/app/src/main/res/xml/home_player_widget_config.xml deleted file mode 100644 index c8ec7048..00000000 --- a/android/app/src/main/res/xml/home_player_widget_config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/android/app/src/nightly/res/drawable-hdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-hdpi-v31/android12branding.png deleted file mode 100644 index 22a9b8d3..00000000 Binary files a/android/app/src/nightly/res/drawable-hdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-hdpi/android12splash.png b/android/app/src/nightly/res/drawable-hdpi/android12splash.png deleted file mode 100644 index 1d1cb853..00000000 Binary files a/android/app/src/nightly/res/drawable-hdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-hdpi/branding.png b/android/app/src/nightly/res/drawable-hdpi/branding.png deleted file mode 100644 index 22a9b8d3..00000000 Binary files a/android/app/src/nightly/res/drawable-hdpi/branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-hdpi/ic_launcher_foreground.png b/android/app/src/nightly/res/drawable-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 7373eec1..00000000 Binary files a/android/app/src/nightly/res/drawable-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-hdpi/splash.png b/android/app/src/nightly/res/drawable-hdpi/splash.png deleted file mode 100644 index e3869211..00000000 Binary files a/android/app/src/nightly/res/drawable-hdpi/splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-mdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-mdpi-v31/android12branding.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/android/app/src/nightly/res/drawable-mdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-mdpi/android12splash.png b/android/app/src/nightly/res/drawable-mdpi/android12splash.png deleted file mode 100644 index 3f2a1a0a..00000000 Binary files a/android/app/src/nightly/res/drawable-mdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-mdpi/branding.png b/android/app/src/nightly/res/drawable-mdpi/branding.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/android/app/src/nightly/res/drawable-mdpi/branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-mdpi/ic_launcher_foreground.png b/android/app/src/nightly/res/drawable-mdpi/ic_launcher_foreground.png deleted file mode 100644 index 8d5a9656..00000000 Binary files a/android/app/src/nightly/res/drawable-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-mdpi/splash.png b/android/app/src/nightly/res/drawable-mdpi/splash.png deleted file mode 100644 index d8f7cc0e..00000000 Binary files a/android/app/src/nightly/res/drawable-mdpi/splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-hdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-night-hdpi-v31/android12branding.png deleted file mode 100644 index 22a9b8d3..00000000 Binary files a/android/app/src/nightly/res/drawable-night-hdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-hdpi/android12splash.png b/android/app/src/nightly/res/drawable-night-hdpi/android12splash.png deleted file mode 100644 index 1d1cb853..00000000 Binary files a/android/app/src/nightly/res/drawable-night-hdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-mdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-night-mdpi-v31/android12branding.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/android/app/src/nightly/res/drawable-night-mdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-mdpi/android12splash.png b/android/app/src/nightly/res/drawable-night-mdpi/android12splash.png deleted file mode 100644 index 3f2a1a0a..00000000 Binary files a/android/app/src/nightly/res/drawable-night-mdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-xhdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-night-xhdpi-v31/android12branding.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/android/app/src/nightly/res/drawable-night-xhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-xhdpi/android12splash.png b/android/app/src/nightly/res/drawable-night-xhdpi/android12splash.png deleted file mode 100644 index ba73b0e2..00000000 Binary files a/android/app/src/nightly/res/drawable-night-xhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-xxhdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-night-xxhdpi-v31/android12branding.png deleted file mode 100644 index d301093a..00000000 Binary files a/android/app/src/nightly/res/drawable-night-xxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-xxhdpi/android12splash.png b/android/app/src/nightly/res/drawable-night-xxhdpi/android12splash.png deleted file mode 100644 index 5e5cdc45..00000000 Binary files a/android/app/src/nightly/res/drawable-night-xxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-xxxhdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-night-xxxhdpi-v31/android12branding.png deleted file mode 100644 index 42b0bdc2..00000000 Binary files a/android/app/src/nightly/res/drawable-night-xxxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-night-xxxhdpi/android12splash.png b/android/app/src/nightly/res/drawable-night-xxxhdpi/android12splash.png deleted file mode 100644 index adff9bec..00000000 Binary files a/android/app/src/nightly/res/drawable-night-xxxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-v21/background.png b/android/app/src/nightly/res/drawable-v21/background.png deleted file mode 100644 index 4bebb9de..00000000 Binary files a/android/app/src/nightly/res/drawable-v21/background.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-v21/launch_background.xml b/android/app/src/nightly/res/drawable-v21/launch_background.xml deleted file mode 100644 index 5367a886..00000000 --- a/android/app/src/nightly/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/android/app/src/nightly/res/drawable-xhdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-xhdpi-v31/android12branding.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/android/app/src/nightly/res/drawable-xhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xhdpi/android12splash.png b/android/app/src/nightly/res/drawable-xhdpi/android12splash.png deleted file mode 100644 index ba73b0e2..00000000 Binary files a/android/app/src/nightly/res/drawable-xhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xhdpi/branding.png b/android/app/src/nightly/res/drawable-xhdpi/branding.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/android/app/src/nightly/res/drawable-xhdpi/branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xhdpi/ic_launcher_foreground.png b/android/app/src/nightly/res/drawable-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index f4f416f7..00000000 Binary files a/android/app/src/nightly/res/drawable-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xhdpi/splash.png b/android/app/src/nightly/res/drawable-xhdpi/splash.png deleted file mode 100644 index 17a2c373..00000000 Binary files a/android/app/src/nightly/res/drawable-xhdpi/splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxhdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-xxhdpi-v31/android12branding.png deleted file mode 100644 index d301093a..00000000 Binary files a/android/app/src/nightly/res/drawable-xxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxhdpi/android12splash.png b/android/app/src/nightly/res/drawable-xxhdpi/android12splash.png deleted file mode 100644 index 5e5cdc45..00000000 Binary files a/android/app/src/nightly/res/drawable-xxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxhdpi/branding.png b/android/app/src/nightly/res/drawable-xxhdpi/branding.png deleted file mode 100644 index d301093a..00000000 Binary files a/android/app/src/nightly/res/drawable-xxhdpi/branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxhdpi/ic_launcher_foreground.png b/android/app/src/nightly/res/drawable-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 9f88e976..00000000 Binary files a/android/app/src/nightly/res/drawable-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxhdpi/splash.png b/android/app/src/nightly/res/drawable-xxhdpi/splash.png deleted file mode 100644 index db53f016..00000000 Binary files a/android/app/src/nightly/res/drawable-xxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxxhdpi-v31/android12branding.png b/android/app/src/nightly/res/drawable-xxxhdpi-v31/android12branding.png deleted file mode 100644 index 42b0bdc2..00000000 Binary files a/android/app/src/nightly/res/drawable-xxxhdpi-v31/android12branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxxhdpi/android12splash.png b/android/app/src/nightly/res/drawable-xxxhdpi/android12splash.png deleted file mode 100644 index adff9bec..00000000 Binary files a/android/app/src/nightly/res/drawable-xxxhdpi/android12splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxxhdpi/branding.png b/android/app/src/nightly/res/drawable-xxxhdpi/branding.png deleted file mode 100644 index 42b0bdc2..00000000 Binary files a/android/app/src/nightly/res/drawable-xxxhdpi/branding.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxxhdpi/ic_launcher_foreground.png b/android/app/src/nightly/res/drawable-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 7e2bb4c3..00000000 Binary files a/android/app/src/nightly/res/drawable-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable-xxxhdpi/splash.png b/android/app/src/nightly/res/drawable-xxxhdpi/splash.png deleted file mode 100644 index a74c95a4..00000000 Binary files a/android/app/src/nightly/res/drawable-xxxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable/background.png b/android/app/src/nightly/res/drawable/background.png deleted file mode 100644 index 4bebb9de..00000000 Binary files a/android/app/src/nightly/res/drawable/background.png and /dev/null differ diff --git a/android/app/src/nightly/res/drawable/ic_launcher_monochrome.xml b/android/app/src/nightly/res/drawable/ic_launcher_monochrome.xml deleted file mode 100644 index 8aae0e6c..00000000 --- a/android/app/src/nightly/res/drawable/ic_launcher_monochrome.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - diff --git a/android/app/src/nightly/res/drawable/launch_background.xml b/android/app/src/nightly/res/drawable/launch_background.xml deleted file mode 100644 index 5367a886..00000000 --- a/android/app/src/nightly/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/android/app/src/nightly/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/nightly/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index c79c58a3..00000000 --- a/android/app/src/nightly/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/android/app/src/nightly/res/mipmap-hdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 8164cc67..00000000 Binary files a/android/app/src/nightly/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/nightly/res/mipmap-mdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index bff95e97..00000000 Binary files a/android/app/src/nightly/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index df515ed1..00000000 Binary files a/android/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/nightly/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index e58ef25f..00000000 Binary files a/android/app/src/nightly/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index d39a5e64..00000000 Binary files a/android/app/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/nightly/res/values-night-v31/styles.xml b/android/app/src/nightly/res/values-night-v31/styles.xml deleted file mode 100644 index 96980835..00000000 --- a/android/app/src/nightly/res/values-night-v31/styles.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/android/app/src/nightly/res/values-night/styles.xml b/android/app/src/nightly/res/values-night/styles.xml deleted file mode 100644 index dbc9ea9f..00000000 --- a/android/app/src/nightly/res/values-night/styles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/android/app/src/nightly/res/values-v31/styles.xml b/android/app/src/nightly/res/values-v31/styles.xml deleted file mode 100644 index 981a07a9..00000000 --- a/android/app/src/nightly/res/values-v31/styles.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/android/app/src/nightly/res/values/colors.xml b/android/app/src/nightly/res/values/colors.xml deleted file mode 100644 index 88247a21..00000000 --- a/android/app/src/nightly/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #242832 - \ No newline at end of file diff --git a/android/app/src/nightly/res/values/styles.xml b/android/app/src/nightly/res/values/styles.xml deleted file mode 100644 index 0d1fa8fc..00000000 --- a/android/app/src/nightly/res/values/styles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index a32d12af..00000000 --- a/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index 8f31e8ca..00000000 --- a/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index ed508580..00000000 --- a/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx4608m -android.useAndroidX=true -android.enableJetifier=true diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index 53d34a77..00000000 --- a/android/settings.gradle +++ /dev/null @@ -1,26 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version '8.7.0' apply false - id "org.jetbrains.kotlin.android" version "2.1.0" apply false - id "org.jetbrains.kotlin.plugin.compose" version "2.1.0" apply false -} - -include ':app' \ No newline at end of file diff --git a/appdmg.json b/appdmg.json deleted file mode 100644 index 6e365f23..00000000 --- a/appdmg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "Spotube", - "icon": "assets/branding/spotube-logo-macos.png", - "contents": [ - { - "x": 448, - "y": 344, - "type": "link", - "path": "/Applications" - }, - { - "x": 192, - "y": 344, - "type": "file", - "path": "build/macos/Build/Products/Release/Spotube.app" - } - ] -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..c2b11201 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +plugins { + // this is necessary to avoid the plugins to be loaded multiple times + // in each subproject's classloader + alias(libs.plugins.androidApplication) apply false + alias(libs.plugins.androidLibrary) apply false + alias(libs.plugins.composeHotReload) apply false + alias(libs.plugins.composeMultiplatform) apply false + alias(libs.plugins.composeCompiler) apply false + alias(libs.plugins.kotlinMultiplatform) apply false + alias(libs.plugins.kotlinSerialization) apply false + alias(libs.plugins.jetbrainsKotlinJvm) apply false + alias(libs.plugins.androidKotlinMultiplatformLibrary) apply false + alias(libs.plugins.zipline.gradle.plugin) apply false + alias(libs.plugins.spotubeGradle) apply false + alias(libs.plugins.kmpgen) apply false + alias(libs.plugins.vlcjBundler) apply false +} \ No newline at end of file diff --git a/build.yaml b/build.yaml deleted file mode 100644 index 76771f22..00000000 --- a/build.yaml +++ /dev/null @@ -1,29 +0,0 @@ -targets: - $default: - sources: - exclude: - - bin/*.dart - builders: - auto_route_generator:auto_route_generator: # this for @RoutePage - options: - enable_cached_builds: true - generate_for: - - lib/pages/**/*.dart - auto_route_generator:auto_router_generator: # this for @AutoRouterConfig - options: - enable_cached_builds: true - generate_for: - - lib/collections/routes.dart - json_serializable: - options: - any_map: true - explicit_to_json: true - drift_dev: - options: - databases: - app_db: lib/models/database/database.dart - sql: - dialect: sqlite - options: - modules: - - json1 diff --git a/cli/README.md b/cli/README.md deleted file mode 100644 index b2ba8ebd..00000000 --- a/cli/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Spotube Configuration CLI - -This is used for building the project for multiple platforms and having utilities specific for the project. -Written in Dart diff --git a/cli/cli.dart b/cli/cli.dart deleted file mode 100644 index 26190d4c..00000000 --- a/cli/cli.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:args/command_runner.dart'; - -import 'commands/build.dart'; -import 'commands/credits.dart'; -import 'commands/install-dependencies.dart'; -import 'commands/translated.dart'; -import 'commands/untranslated.dart'; - -void main(List args) { - final commandRunner = CommandRunner( - "cli", - "Configuration CLI for Spotube", - ); - - commandRunner.addCommand(InstallDependenciesCommand()); - commandRunner.addCommand(BuildCommand()); - commandRunner.addCommand(CreditsCommand()); - commandRunner.addCommand(TranslatedCommand()); - commandRunner.addCommand(UntranslatedCommand()); - - commandRunner.run(args); -} diff --git a/cli/commands/build.dart b/cli/commands/build.dart deleted file mode 100644 index e0c254ff..00000000 --- a/cli/commands/build.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:args/command_runner.dart'; - -import 'build/android.dart'; -import 'build/ios.dart'; -import 'build/linux.dart'; -import 'build/macos.dart'; -import 'build/windows.dart'; - -class BuildCommand extends Command { - @override - String get description => "Build for different platforms"; - - @override - String get name => "build"; - - BuildCommand() { - addSubcommand(AndroidBuildCommand()); - addSubcommand(IosBuildCommand()); - addSubcommand(LinuxBuildCommand()); - addSubcommand(MacosBuildCommand()); - addSubcommand(WindowsBuildCommand()); - argParser.addOption( - "arch", - abbr: "a", - defaultsTo: "x86", - allowed: ["x86", "arm64", "all"], - ); - } -} diff --git a/cli/commands/build/android.dart b/cli/commands/build/android.dart deleted file mode 100644 index b9edeb84..00000000 --- a/cli/commands/build/android.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:path/path.dart'; - -import '../../core/env.dart'; -import 'common.dart'; - -class AndroidBuildCommand extends Command with BuildCommandCommonSteps { - @override - String get description => "Build for android"; - - @override - String get name => "android"; - - @override - FutureOr? run() async { - await bootstrap(); - - await shell.run( - "flutter build apk --flavor ${CliEnv.channel.name}", - ); - - final ogApkFile = File( - join( - "build", - "app", - "outputs", - "flutter-apk", - "app-${CliEnv.channel.name}-release.apk", - ), - ); - - await ogApkFile.copy( - join(cwd.path, "build", "Spotube-android-all-arch.apk"), - ); - - stdout.writeln("✅ Built Android Apk and Appbundle"); - } -} diff --git a/cli/commands/build/common.dart b/cli/commands/build/common.dart deleted file mode 100644 index c30197f5..00000000 --- a/cli/commands/build/common.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:path/path.dart'; -import 'package:process_run/shell_run.dart'; -import 'package:pubspec_parse/pubspec_parse.dart'; - -import '../../core/env.dart'; - -mixin BuildCommandCommonSteps on Command { - final shell = Shell(); - Directory get cwd => Directory.current; - - Pubspec? _pubspec; - - Pubspec get pubspec { - if (_pubspec != null) { - return _pubspec!; - } - - final pubspecFile = File(join(cwd.path, "pubspec.yaml")); - _pubspec = Pubspec.parse(pubspecFile.readAsStringSync()); - - return _pubspec!; - } - - String get versionWithoutBuildNumber { - return "${pubspec.version!.major}.${pubspec.version!.minor}.${pubspec.version!.patch}"; - } - - RegExp get versionVarRegExp => - RegExp(r"\%\{\{SPOTUBE_VERSION\}\}\%", multiLine: true); - - File get dotEnvFile => File(join(cwd.path, ".env")); - - Future bootstrap() async { - await dotEnvFile.create(recursive: true); - - await dotEnvFile.writeAsString( - "${CliEnv.dotenv}\n" - "RELEASE_CHANNEL=${CliEnv.channel.name}\n", - ); - - if (CliEnv.channel == BuildChannel.nightly) { - final pubspecFile = File(join(cwd.path, "pubspec.yaml")); - - pubspecFile.writeAsStringSync( - pubspecFile.readAsStringSync().replaceAll( - "version: ${pubspec.version!.canonicalizedVersion}", - "version: $versionWithoutBuildNumber+${CliEnv.ghRunNumber}", - ), - ); - - _pubspec = null; - pubspec; - } - - await shell.run( - """ - flutter pub get - dart run build_runner build --delete-conflicting-outputs - dart pub global activate fastforge - """, - ); - } - - String get architecture => parent?.argResults?.option("arch") as String; -} diff --git a/cli/commands/build/ios.dart b/cli/commands/build/ios.dart deleted file mode 100644 index 6460f9ed..00000000 --- a/cli/commands/build/ios.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'dart:async'; - -import 'package:args/command_runner.dart'; -import 'package:path/path.dart'; - -import '../../core/env.dart'; -import 'common.dart'; - -class IosBuildCommand extends Command with BuildCommandCommonSteps { - @override - String get description => "iOS build command"; - - @override - String get name => "ios"; - - @override - FutureOr? run() async { - await bootstrap(); - - final buildDirPath = join(cwd.path, "build", "ios", "iphoneos"); - await shell.run( - """ - flutter build ios --release --no-codesign --flavor ${CliEnv.channel.name} - ln -sf $buildDirPath Payload - zip -r9 Spotube-iOS.ipa ${join("Payload", "${CliEnv.channel.name}.app")} - """, - ); - } -} diff --git a/cli/commands/build/linux.dart b/cli/commands/build/linux.dart deleted file mode 100644 index 3ca792ea..00000000 --- a/cli/commands/build/linux.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:io/io.dart'; -import 'package:args/command_runner.dart'; -import 'package:intl/intl.dart'; -import 'package:path/path.dart'; - -import '../../core/env.dart'; -import 'common.dart'; - -class LinuxBuildCommand extends Command with BuildCommandCommonSteps { - @override - String get description => "Linux build command"; - - @override - String get name => "linux"; - - @override - FutureOr? run() async { - stdout.writeln("Replacing versions"); - - final appDataFile = File( - join(cwd.path, "linux", "com.github.KRTirtho.Spotube.appdata.xml"), - ); - - appDataFile.writeAsStringSync( - appDataFile.readAsStringSync().replaceAll( - versionVarRegExp, - '', - ), - ); - - await bootstrap(); - - await shell.run( - "fastforge package --platform=linux --targets=deb,appimage", - ); - if (architecture == "x86") { - await shell.run( - "fastforge package --platform=linux --targets=rpm", - ); - } - - final tempDir = join(Directory.systemTemp.path, "spotube-tar"); - final bundleArchName = architecture == "x86" ? "x86_64" : "aarch64"; - final bundleDirPath = join( - cwd.path, - "build", - "linux", - architecture == "x86" ? "x64" : architecture, - "release", - "bundle", - ); - - final tarFile = File(join( - cwd.path, - "dist", - "spotube-linux-" - "${CliEnv.channel == BuildChannel.nightly ? "nightly" : versionWithoutBuildNumber}" - "-$bundleArchName.tar.xz", - )); - - await copyPath(bundleDirPath, tempDir); - await File(join(cwd.path, "linux", "spotube.desktop")).copy( - join(tempDir, "spotube.desktop"), - ); - await File( - join(cwd.path, "linux", "com.github.KRTirtho.Spotube.appdata.xml"), - ).copy( - join(tempDir, "com.github.KRTirtho.Spotube.appdata.xml"), - ); - await File(join(cwd.path, "assets", "branding", "spotube-logo.png")).copy( - join(tempDir, "spotube-logo.png"), - ); - - await shell.run( - "tar -cJf ${tarFile.path} -C $tempDir .", - ); - - final ogDeb = File( - join( - cwd.path, - "dist", - pubspec.version.toString(), - "spotube-${pubspec.version}-linux.deb", - ), - ); - await ogDeb.copy( - join( - cwd.path, - "dist", - "Spotube-linux-$bundleArchName.deb", - ), - ); - await ogDeb.delete(); - - if (architecture == "x86") { - final ogRpm = File( - join( - cwd.path, - "dist", - pubspec.version.toString(), - "spotube-${pubspec.version}-linux.rpm", - ), - ); - - await ogRpm.copy( - join(cwd.path, "dist", "Spotube-linux-$bundleArchName.rpm"), - ); - - await ogRpm.delete(); - } - - final ogAppImage = File( - join( - cwd.path, - "dist", - pubspec.version.toString(), - "spotube-${pubspec.version}-linux.AppImage", - ), - ); - await ogAppImage.copy( - join( - cwd.path, - "dist", - "Spotube-linux-$bundleArchName.AppImage", - ), - ); - await ogAppImage.delete(); - - stdout.writeln("✅ Linux building done"); - } -} diff --git a/cli/commands/build/macos.dart b/cli/commands/build/macos.dart deleted file mode 100644 index 936f1fc8..00000000 --- a/cli/commands/build/macos.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:path/path.dart'; - -import 'common.dart'; - -class MacosBuildCommand extends Command with BuildCommandCommonSteps { - @override - String get description => "Macos Build command"; - - @override - String get name => "macos"; - - @override - FutureOr? run() async { - await bootstrap(); - - await shell.run( - """ - flutter build macos - appdmg appdmg.json ${join(cwd.path, "build", "Spotube-macos-universal.dmg")} - fastforge package --platform=macos --targets pkg --skip-clean - """, - ); - - final ogPkg = File( - join( - cwd.path, - "dist", - pubspec.version.toString(), - "spotube-${pubspec.version}-macos.pkg", - ), - ); - - await ogPkg.copy( - join(cwd.path, "build", "Spotube-macos-universal.pkg"), - ); - await ogPkg.delete(); - } -} diff --git a/cli/commands/build/windows.dart b/cli/commands/build/windows.dart deleted file mode 100644 index 1045c11c..00000000 --- a/cli/commands/build/windows.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:path/path.dart'; -import 'package:crypto/crypto.dart'; -import 'common.dart'; - -class WindowsBuildCommand extends Command with BuildCommandCommonSteps { - @override - String get description => "Build Windows exe"; - - @override - String get name => "windows"; - - Future innoDependInstall() async { - final innoDependencyPath = join(cwd.path, "build", "inno-depend"); - - await shell.run( - "git clone https://github.com/DomGries/InnoDependencyInstaller.git $innoDependencyPath", - ); - } - - @override - void run() async { - stdout.writeln("Replace versions"); - - final chocoFiles = [ - join(cwd.path, "choco-struct", "tools", "VERIFICATION.txt"), - join(cwd.path, "choco-struct", "spotube.nuspec"), - ]; - - for (final filePath in chocoFiles) { - final file = File(filePath); - final content = file.readAsStringSync(); - final newContent = - content.replaceAll(versionVarRegExp, versionWithoutBuildNumber); - - file.writeAsStringSync(newContent); - } - - await bootstrap(); - await innoDependInstall(); - - final runnerRCFile = File( - join(cwd.path, "windows", "runner", "Runner.rc"), - ); - - runnerRCFile.writeAsStringSync( - runnerRCFile - .readAsStringSync() - .replaceAll("%{{SPOTUBE_VERSION}}%", versionWithoutBuildNumber) - .replaceAll( - "%{{SPOTUBE_VERSION_AS_NUMBER}}%", - [ - pubspec.version!.major, - pubspec.version!.minor, - pubspec.version!.patch, - 0 - ].join(","), - ), - ); - - await shell.run( - "fastforge package --platform=windows --targets=exe --skip-clean", - ); - - final ogExe = File( - join( - cwd.path, - "dist", - pubspec.version.toString(), - "spotube-${pubspec.version}-windows-setup.exe", - ), - ); - - final exePath = join(cwd.path, "dist", "Spotube-windows-x86_64-setup.exe"); - - await ogExe.copy(exePath); - await ogExe.delete(); - - stdout.writeln("✅ Windows exe built at $exePath"); - - final exeFile = File(exePath); - - final hash = sha256.convert(await exeFile.readAsBytes()).toString(); - - final chocoVerificationFile = File(chocoFiles.first); - - chocoVerificationFile.writeAsStringSync( - chocoVerificationFile.readAsStringSync().replaceAll( - RegExp(r"\%\{\{WIN_SHA256\}\}\%"), - hash, - ), - ); - - await exeFile.copy( - join(cwd.path, "choco-struct", "tools", basename(exeFile.path)), - ); - - await shell.run( - "choco pack ${chocoFiles[1]} --outputdirectory ${join(cwd.path, "dist")}", - ); - - final chocoNupkg = File( - join(cwd.path, "dist", "spotube.$versionWithoutBuildNumber.nupkg"), - ); - - final distNupkgPath = join( - cwd.path, - "dist", - "Spotube-windows-x86_64.nupkg", - ); - - await chocoNupkg.copy(distNupkgPath); - await chocoNupkg.delete(); - - stdout.writeln("✅ Windows nupkg built at $distNupkgPath"); - } -} diff --git a/cli/commands/credits.dart b/cli/commands/credits.dart deleted file mode 100644 index 6bad7a44..00000000 --- a/cli/commands/credits.dart +++ /dev/null @@ -1,121 +0,0 @@ -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:collection/collection.dart'; -import 'package:dio/dio.dart'; -import 'package:html/parser.dart'; -import 'package:path/path.dart'; -import 'package:pub_api_client/pub_api_client.dart'; -import 'package:pubspec_parse/pubspec_parse.dart'; - -class CreditsCommand extends Command { - final dio = Dio( - BaseOptions( - responseType: ResponseType.plain, - ), - ); - - @override - String get description => "Generate credits for used Library's authors"; - - @override - String get name => "credits"; - - @override - run() async { - final client = PubClient(); - final cwd = Directory.current; - - final pubspec = Pubspec.parse( - File(join(cwd.path, 'pubspec.yaml')).readAsStringSync(), - ); - - final allDeps = [ - ...pubspec.dependencies.entries, - ...pubspec.devDependencies.entries, - ]; - - final dependencies = allDeps - .where((d) => d.value is HostedDependency) - .map((d) => d.key) - .toSet(); - final packageInfo = await Future.wait(dependencies.map(client.packageInfo)); - - final gitDepsList = List.castFrom, - MapEntry>( - allDeps - .where((d) => d.value is GitDependency) - .map((d) => MapEntry(d.key, d.value as GitDependency)) - .toList(), - ); - - final gitDeps = gitDepsList.map( - (d) { - final uri = Uri.parse( - d.value.url.toString().replaceAll('.git', ''), - ); - return MapEntry( - d.key, - uri.replace( - pathSegments: [ - ...uri.pathSegments, - 'raw', - d.value.ref ?? 'main', - d.value.path ?? '', - 'pubspec.yaml', - ], - ).toString(), - ); - }, - ).toList(); - - final gitPubspecs = await Future.wait( - gitDeps.map( - (d) { - Pubspec parser(Response res) { - try { - return Pubspec.parse(res.data); - } catch (e) { - final document = parse(res.data); - final pre = document.querySelector('pre'); - if (pre == null) { - stdout.writeln(d.toString()); - rethrow; - } - return Pubspec.parse(pre.text); - } - } - - return dio.get(d.value).then(parser).catchError( - (_) => dio - .get(d.value.replaceFirst('/main', '/master')) - .then(parser), - ); - }, - ), - ); - - stdout.writeln( - packageInfo - .map( - (package) => - '1. [${package.name}](${package.latestPubspec.homepage ?? package.url}) - ${package.description.replaceAll('\n', '')}', - ) - .join('\n'), - ); - - stdout.writeln( - gitPubspecs.map( - (package) { - final packageUrl = package.homepage ?? - gitDepsList - .firstWhereOrNull((dep) => dep.key == package.name) - ?.value - .url - .toString(); - return '1. [${package.name}]($packageUrl) - ${package.description?.replaceAll('\n', '')}'; - }, - ).join('\n'), - ); - } -} diff --git a/cli/commands/install-dependencies.dart b/cli/commands/install-dependencies.dart deleted file mode 100644 index 56f679f1..00000000 --- a/cli/commands/install-dependencies.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'dart:async'; - -import 'package:args/command_runner.dart'; -import 'package:process_run/shell_run.dart'; - -class InstallDependenciesCommand extends Command { - @override - String get description => "Install platform dependencies"; - - @override - String get name => "install-dependencies"; - - InstallDependenciesCommand() { - argParser.addOption( - "platform", - abbr: "p", - allowed: [ - "windows", - "linux", - "linux_arm", - "macos", - "ios", - "android", - ], - mandatory: true, - ); - - argParser.addOption( - "arch", - abbr: "a", - allowed: ["x86", "arm64", "all"], - defaultsTo: "x86", - ); - } - - @override - FutureOr? run() async { - final shell = Shell(); - - final arch = argResults?.option("arch") == "x86" ? "x86_64" : "aarch64"; - - switch (argResults!.option("platform")) { - case "windows": - await shell.run( - """ - choco install innosetup -y - """, - ); - break; - case "linux": - await shell.run( - """ - sudo apt-get update -y - sudo apt-get install -y wget tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev libwebkit2gtk-4.1-0 libwebkit2gtk-4.1-dev libsoup-3.0-0 libsoup-3.0-dev - wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$arch.AppImage" - chmod +x appimagetool - sudo mv appimagetool /usr/local/bin/ - """, - ); - break; - case "macos": - await shell.run( - """ - brew install python-setuptools - npm install -g appdmg - """, - ); - break; - case "ios": - await shell.run( - """ - rustup target add aarch64-apple-ios - """, - ); - break; - case "android": - await shell.run( - """ - sudo apt-get update -y - sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse - """, - ); - break; - default: - break; - } - } -} diff --git a/cli/commands/translated.dart b/cli/commands/translated.dart deleted file mode 100644 index 43c4ea49..00000000 --- a/cli/commands/translated.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'dart:async'; - -import 'dart:convert'; -import 'dart:io'; -import 'package:args/command_runner.dart'; -import 'package:path/path.dart'; - -class TranslatedCommand extends Command { - @override - String get description => - "Update translation based on generated translated messages"; - - @override - String get name => "translated"; - - @override - FutureOr? run() async { - final cwd = Directory.current; - final translatedFile = jsonDecode( - await File(join(cwd.path, 'tm.json')).readAsString(), - ) as Map; - - for (final MapEntry(:key, :value) in translatedFile.entries) { - stdout.writeln('Updating locale: $key'); - final file = File(join(cwd.path, 'lib', 'l10n', 'app_$key.arb')); - - final fileContent = - jsonDecode(await file.readAsString()) as Map; - - final newContent = {...fileContent, ...value}; - - await file.writeAsString( - const JsonEncoder.withIndent(' ').convert(newContent), - ); - - stdout.writeln('✅ Updated locale: $key'); - } - } -} diff --git a/cli/commands/untranslated.dart b/cli/commands/untranslated.dart deleted file mode 100644 index dadcd8b5..00000000 --- a/cli/commands/untranslated.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:args/command_runner.dart'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:path/path.dart'; - -class UntranslatedCommand extends Command { - @override - get name => "untranslated"; - @override - get description => - "Generate Untranslated Messages for ChatGPT based Translation"; - - @override - run() async { - final cwd = Directory.current; - final file = jsonDecode( - File(join(cwd.path, 'untranslated_messages.json')).readAsStringSync(), - ) as Map; - - final englishMessages = jsonDecode( - File(join(cwd.path, 'lib', 'l10n', 'app_en.arb')).readAsStringSync(), - ) as Map; - - final messagesWithValues = {}; - - for (final MapEntry(key: locale, value: messages) in file.entries) { - messagesWithValues[locale] = Map.fromEntries( - messages - .map( - (message) => - MapEntry(message, englishMessages[message]), - ) - .toList() - .cast>(), - ); - } - - stdout.writeln( - "Prompt:\n" - "Translate following to their appropriate locale for flutter arb translations files." - " Put the respective new translations in a map of their corresponding locale.", - ); - stdout.writeln( - const JsonEncoder.withIndent(' ').convert(messagesWithValues), - ); - } -} diff --git a/cli/core/env.dart b/cli/core/env.dart deleted file mode 100644 index 33cc5df1..00000000 --- a/cli/core/env.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'dart:io'; - -enum BuildChannel { - stable, - nightly; - - factory BuildChannel.fromEnvironment(String name) { - final channel = Platform.environment[name]!; - if (channel == "stable") { - return BuildChannel.stable; - } else if (channel == "nightly") { - return BuildChannel.nightly; - } else { - throw Exception("Invalid channel: $channel"); - } - } -} - -class CliEnv { - static final channel = BuildChannel.fromEnvironment("CHANNEL"); - static final dotenv = Platform.environment["DOTENV"]!; - static final ghRunNumber = Platform.environment["GITHUB_RUN_NUMBER"]; - static final flutterVersion = Platform.environment["FLUTTER_VERSION"]!; -} diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts new file mode 100644 index 00000000..c0a1fd96 --- /dev/null +++ b/composeApp/build.gradle.kts @@ -0,0 +1,343 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import org.jetbrains.compose.desktop.application.dsl.TargetFormat +import org.jetbrains.compose.reload.gradle.ComposeHotRun +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import java.io.FileInputStream +import java.util.Properties + +plugins { + alias(libs.plugins.kotlinMultiplatform) + alias(libs.plugins.androidApplication) + alias(libs.plugins.composeMultiplatform) + alias(libs.plugins.composeCompiler) + alias(libs.plugins.composeHotReload) + alias(libs.plugins.kotlinSerialization) + alias(libs.plugins.zipline.gradle.plugin) + alias(libs.plugins.kmpgen) + alias(libs.plugins.vlcjBundler) +} + +vlcjBundler { + packageName = "dev.krtirtho.spotube.core.generated" // choose a different package + objectName = "VLCBundleLoaderGenerated" // or rename the object +} + +kmpgen { + spec( + packageName = "dev.krtirtho.spotube.listenbrainz" + ) { + specFile = file("./specs/listenbrainz-openapi.yaml") + } +} + +kotlin { + // Note: For Android application modules, androidTarget() is still required as of AGP 8.x. + // The deprecation warning is expected. For libraries, use the androidKotlinMultiplatformLibrary plugin instead. + // Full migration support for applications will be available in AGP 9.0.0+ + androidTarget { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + } + } + + val iosArm64Target = iosArm64() + val iosSimulatorArm64Target = iosSimulatorArm64() + + listOf(iosArm64Target, iosSimulatorArm64Target).forEach { iosTarget -> + iosTarget.binaries.framework { + baseName = "ComposeApp" + isStatic = true + } + } + + jvm() + + sourceSets { + val commonMain by getting { + dependencies { + // Project dependencies + implementation(project(":plugin_interfaces")) + + // Jetpack Compose dependencies + implementation(libs.compose.runtime) + implementation(libs.compose.foundation) + implementation(libs.compose.material3) + implementation(libs.compose.ui) + implementation(libs.coil.compose) + implementation(libs.coil.network.ktor3) + implementation(libs.compose.components.resources) + implementation(libs.compose.uiToolingPreview) + implementation(libs.androidx.lifecycle.viewmodelCompose) + implementation(libs.androidx.lifecycle.runtimeCompose) + implementation(libs.kotlinx.serialization.json) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.datetime) + + // Navigation + implementation(libs.jetbrains.navigation3.ui) + implementation(libs.jetbrains.lifecycle.viewmodelNavigation3) + + // koin + api(libs.koin.core) + implementation(libs.koin.compose) + implementation(libs.koin.compose.viewmodel) + implementation(libs.koin.compose.navigation3) + + // 3rd party libraries + // ktor + implementation(libs.ktor.client.core) + implementation(libs.ktor.client.logging) + implementation(libs.ktor.client.cio) + implementation(libs.ktor.server.core) + implementation(libs.ktor.server.cio) + // Zipline + api(libs.zipline.core) + implementation(libs.zipline.loader) + // file-kit + implementation(libs.filekit.core) + implementation(libs.filekit.dialogs) + implementation(libs.filekit.dialogs.compose) + + // icons + implementation(libs.feather.icons) + + // Material3 adaptive + implementation(libs.jetbrains.material3.adaptive) + implementation(libs.jetbrains.material3.adaptive.layout) + implementation(libs.jetbrains.material3.adaptive.suite) + implementation(libs.jetbrains.material3.adaptiveNavigation3) + implementation(libs.jetbrains.material3.window.size) + // androidx-datastore + implementation(libs.androidx.datastore) + implementation(libs.androidx.datastore.preferences) + // kmp-zip + implementation(libs.kmp.zip) + implementation(libs.kmp.zip.okio) + implementation(libs.kmp.zip.kotlinx) + implementation(libs.murmurhash) + // logging + implementation(libs.kermit) + implementation(libs.kermit.koin) + + implementation(libs.semver) + + implementation(libs.material.kolor) + + // crypto + implementation(libs.cryptography.core) + implementation(libs.cryptography.provider.optimal) + + // webview + implementation(libs.compose.webview) + + // blur + implementation(libs.haze) + implementation(libs.haze.blur) + implementation(libs.haze.materials) + + // caching + implementation(libs.cache4k) + + // reorderable list + implementation(libs.reorderable) + + // Shimmer effect + implementation(libs.compose.shimmer) + implementation(libs.compose.placeholder.material3) + } + } + commonTest.dependencies { + implementation(libs.kotlin.test) + implementation(libs.kotlinx.coroutines.test) + } + // Shared code between mobile targets (Android + iOS) + val mobileMain by creating { + dependsOn(commonMain) + dependencies { +// implementation(libs.kmedia) + } + } + // Shared code between Java compatible targets (Android + Desktop) + val androidJvmMain by creating { + dependsOn(commonMain) + dependencies { + implementation(libs.newpipeextractor) + implementation(libs.ktor.client.okhttp) + } + } + androidMain { + dependsOn(mobileMain) + dependsOn(androidJvmMain) + dependencies { + implementation(libs.compose.uiToolingPreview) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.car.app) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.media3.common) + implementation(libs.media3.exoplayer) + implementation(libs.media3.session) + } + } + val iosMain by creating { + dependsOn(mobileMain) + dependencies { + // 3rd party libraries + implementation(libs.ktor.client.darwin) + implementation(libs.newpipe.extractor.kmp) + } + } + val iosArm64Main by getting { + dependsOn(iosMain) + } + val iosSimulatorArm64Main by getting { + dependsOn(iosMain) + } + jvmMain { + dependsOn(androidJvmMain) + dependencies { + // Jetpack Compose dependencies + implementation(compose.desktop.currentOs) + implementation(libs.kotlinx.coroutinesSwing) + + // vlcj dependencies + implementation(libs.vlcj) + implementation(libs.vlcj.natives) + + implementation(libs.appdirs) + implementation(libs.jna) + } + } + } +} + +android { + namespace = "dev.krtirtho.spotube" + compileSdk = libs.versions.android.compileSdk.get().toInt() + + defaultConfig { + applicationId = "dev.krtirtho.spotube" + minSdk = libs.versions.android.minSdk.get().toInt() + targetSdk = libs.versions.android.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } + + val secretProps = Properties().apply { + val propertiesFile = project.file("local.properties") + if (propertiesFile.exists()) { + load(FileInputStream(propertiesFile)) + } + } + + signingConfigs { + create("release") { + val storeFilePath = secretProps.getProperty("release.signing.storeFile") + if (!storeFilePath.isNullOrEmpty()) { + storeFile = file(storeFilePath) + storePassword = secretProps.getProperty("release.signing.storePassword") + keyAlias = secretProps.getProperty("release.signing.keyAlias") + keyPassword = secretProps.getProperty("release.signing.keyPassword") + } + } + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + signingConfig = signingConfigs.getByName("release") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + isCoreLibraryDesugaringEnabled = true + } + +} + +dependencies { + coreLibraryDesugaring(libs.desugar.jdk.libs) + debugImplementation(libs.compose.uiTooling) +} + +compose.desktop { + application { + mainClass = "dev.krtirtho.spotube.MainKt" + + jvmArgs += listOf( + "--enable-native-access=ALL-UNNAMED", // need for JNA for compose-webview (wry) to work + // --- ADD THESE FOR SPEED & LOW RAM --- + "-Xms64m", // Start with a tiny heap (prevents grabbing 500MB upfront) + "-Xmx384m", // Cap the max heap (VLC and WebView need a bit of room) + "-XX:TieredStopAtLevel=1", // Disables the heavy C2 compiler. Huge startup speedup! + "-XX:+UseSerialGC" // The Serial GC is the most efficient for heaps under 512MB + ) + + nativeDistributions { + packageName = "dev.krtirtho.spotube" + packageVersion = "6.0.0" + licenseFile = project.file("../LICENSE") + + targetFormats( + TargetFormat.Dmg, + TargetFormat.Deb, + TargetFormat.Rpm, + TargetFormat.AppImage, + TargetFormat.Msi, + TargetFormat.Exe, + ) + + modules("jdk.unsupported") + + linux { + modules("jdk.security.auth") + } + windows { + shortcut = true + menu = true + dirChooser = true + perUserInstall = true + } + + macOS { + notarization { + + } + } + } + + buildTypes.release.proguard { + configurationFiles.from(project.file("proguard-rules.pro")) + } + } +} + +// Issue with compose plugin +// https://github.com/JetBrains/compose-hot-reload/blob/master/docs/Known_limitations.md#property-composeapplicationresourcesdir-is-null-when-running-hot-reload-tasks +tasks.withType().configureEach { + systemProperty( + "compose.application.resources.dir", + project.layout.buildDirectory.dir("compose/tmp/prepareAppResources").get() + ) +} diff --git a/composeApp/proguard-rules.pro b/composeApp/proguard-rules.pro new file mode 100644 index 00000000..0a5f7168 --- /dev/null +++ b/composeApp/proguard-rules.pro @@ -0,0 +1,117 @@ +# Prevent ProGuard from deleting or obfuscating sun.misc.Unsafe +-keep class sun.misc.Unsafe { *; } +-dontwarn sun.misc.Unsafe + +## Rules for NewPipeExtractor +-keep class org.mozilla.javascript.** { *; } +-keep class org.mozilla.classfile.ClassFileWriter +-dontwarn org.mozilla.javascript.tools.** + +# 1. Keep all NewPipeExtractor classes, methods, and fields intact +-keep class org.schabi.newpipe.extractor.** { *; } + +# 2. CRITICAL: Prevent ProGuard from stripping the 'enum' flag from NewPipe enums +# This specifically fixes the "MediaCapability not an enum" ClassCastException +-keepclassmembers enum org.schabi.newpipe.extractor.** { + public static **[] values(); + public static ** valueOf(java.lang.String); + *; +} + +# 3. Keep ServiceLoader / SPI implementations used by NewPipe to discover services +-keep class * implements org.schabi.newpipe.extractor.Extractor { *; } +-keep class * implements org.schabi.newpipe.extractor.downloader.Downloader { *; } + +# JSR 305 annotations are for embedding nullability information. +-dontwarn javax.annotation.** + +# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java. +-dontwarn org.codehaus.mojo.animal_sniffer.* + +# OkHttp platform used only on JVM and when Conscrypt and other security providers are available. +# May be used with robolectric or deliberate use of Bouncy Castle on Android +-dontwarn okhttp3.internal.platform.** +-dontwarn org.conscrypt.** +-dontwarn org.bouncycastle.** +-keepattributes Signature +-keepattributes Annotation +-keep interface okhttp3.** { *; } +-dontwarn okhttp3.** +-dontwarn okio.** + +-dontwarn kotlin.Deprecated$Container +-dontwarn com.google.re2j.** + +-dontwarn java.awt.* +-keep class com.sun.jna.* { *; } +-keep class * extends com.sun.jna.* { *; } +-keepclassmembers class * extends com.sun.jna.* { public *; } + +# Most of volatile fields are updated with AtomicFU and should not be mangled/removed +-keepclassmembers class io.ktor.** { + volatile ; +} + +-keepclassmembernames class io.ktor.** { + volatile ; +} + +# client engines are loaded using ServiceLoader so we need to keep them +-keep class io.ktor.client.engine.** implements io.ktor.client.HttpClientEngineContainer + +-keep class uk.co.caprica.** { *; } + +# Prevent ProGuard from renaming, stripping, or optimizing Jetpack Navigation 3 UI structures +-keep class androidx.navigation3.** { *; } +-keep interface androidx.navigation3.** { *; } +-dontwarn androidx.navigation3.** + +# Keep related navigation event artifacts intact +-keep class androidx.navigationevent.** { *; } +-dontwarn androidx.navigationevent.** + +-keep class dev.whyoleg.cryptography.** { *; } +-keep interface dev.whyoleg.cryptography.** { *; } + +-keep class okio.** { *; } +-keep interface okio.** { *; } +-keepclassmembers class okio.** { *; } + +-keep class app.cash.zipline.** { *; } +-keep interface app.cash.zipline.** { *; } +-keepclassmembers class app.cash.zipline.** { *; } +-dontwarn app.cash.zipline.** + +# Keep all Ktor serialization provider metadata files intact +-keep class io.ktor.serialization.** { *; } +-keep interface io.ktor.serialization.** { *; } + +# Tell ProGuard to explicitly keep the underlying service registration descriptors +-keepclassmembers class * implements io.ktor.serialization.kotlinx.KotlinxSerializationExtensionProvider { *; } + +# Keep all core Coil packages intact +#-keep class coil3.** { *; } +#-keep interface coil3.** { *; } +#-dontwarn coil3.** +# +## Keep platform-specific image decoders (Skia/Skiko rendering targets for desktop) +#-keep class coil3.decode.** { *; } +#-keep class coil3.request.** { *; } +# +## Coil uses Ktor or OkHttp internally for fetching images over the network +## Ensure its network fetcher factory singletons aren't stripped +#-keep class * implements coil3.fetch.Fetcher$Factory { *; } +#-keep class * implements coil3.decode.Decoder$Factory { *; } +# +## Keep SVG or extra dynamic graphic components if you use them +#-keep class coil3.svg.** { *; } +-keep class coil3.util.DecoderServiceLoaderTarget { *; } +-keep class coil3.util.FetcherServiceLoaderTarget { *; } +-keep class coil3.util.ServiceLoaderComponentRegistry { *; } +-keep class * implements coil3.util.DecoderServiceLoaderTarget { *; } +-keep class * implements coil3.util.FetcherServiceLoaderTarget { *; } + +# AndroidX Car App Library +-keep class androidx.car.app.** { *; } +-keep interface androidx.car.app.** { *; } +-dontwarn androidx.car.app.** \ No newline at end of file diff --git a/composeApp/specs/listenbrainz-openapi.yaml b/composeApp/specs/listenbrainz-openapi.yaml new file mode 100644 index 00000000..73ed71bc --- /dev/null +++ b/composeApp/specs/listenbrainz-openapi.yaml @@ -0,0 +1,12322 @@ +# Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +openapi: 3.0.3 +info: + description: OpenAPI client defintion. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + termsOfService: https://listenbrainz.org/terms-of-service/ + title: ListenBrainz Swagger - OpenAPI 3.0 + version: v-2025-11-04.0 +servers: +- url: https://api.listenbrainz.org +tags: +- description: |- + ListenBrainz has a statistics infrastructure that collects and computes + statistics from the listen data that has been stored in the database. + The endpoints in this section offer a way to get this data programmatically. + name: lbStats +- description: The ListenBrainz server supports the following end-points for submitting + and fetching listens. + name: lbCore +- description: The playlists API allows for the creation and editing of lists of recordings. + name: lbPlaylists +- description: Feedback API and Pinned Recording API. + name: lbRecordings +- description: The popularity APIs return the total listen and listeners count for + various entities and also a way to query top entities for a given artist. + name: lbPopularity +- description: The metadata API looks up MusicBrainz metadata for recordings. + name: lbMetadata +- description: These api endpoints allow to create and fetch timeline events for a + user. + name: lbSocial +- description: "ListenBrainz uses collaborative filtering to generate recording recommendations,\ + \ which may be further processed to generate playlists for users." + name: lbRecommendations +- description: Various ListenBrainz API endpoints that are not documented elsewhere. + name: lbMisc +- description: ListenBrainz has a (cover) art infrastructure that creates new cover + art from a user's statistics or a user's instructions on how to composite a cover + art grid. + name: lbArt +paths: + /1/search/users: + get: + operationId: searchUsers + parameters: + - description: Input on which search operation is to be performed. + in: query + name: search_term + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/searchUsers" + description: Successful operation. + summary: Search a ListenBrainz-registered user. + tags: + - lbCore + /1/submit-listens: + post: + operationId: submitListens + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/submitListens" + required: true + responses: + "200": + description: Listen(s) accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Submit listens to the server. + tags: + - lbCore + /1/validate-token: + get: + operationId: validateToken + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/validateToken" + description: The user token is valid/invalid. + "400": + description: No token was sent to the endpoint. + security: + - ApiKeyAuth: [] + summary: Check whether a User Token is a valid entry in the database. + tags: + - lbCore + /1/user/{user_name}/listens: + get: + operationId: listensForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - description: "If you specify a 'max_ts' timestamp, listens with listened_at\ + \ less than (but not including) this value will be returned." + in: query + name: max_ts + schema: + type: integer + - description: "If you specify a 'min_ts' timestamp, listens with listened_at\ + \ greater than (but not including) this value will be returned." + in: query + name: min_ts + schema: + type: integer + - description: "Optional, number of listens to return." + in: query + name: count + required: false + schema: + default: 25 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listensForUser" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: Get listens for user 'user_name'. + tags: + - lbCore + /1/user/{user_name}/listen-count: + get: + operationId: listenCountForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listenCountForUser" + description: "Yay, you have listen counts!" + "404": + description: The requested user was not found. + summary: Get the number of listens for a user 'user_name'. + tags: + - lbCore + /1/user/{user_name}/playing-now: + get: + operationId: playingNowForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playingNowForUser" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: Get the listen being played right now for user 'user_name' + tags: + - lbCore + /1/user/{user_name}/similar-users: + get: + operationId: similarUsersForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/similarUsersForUser" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: Get the listen being played right now for user 'user_name'. + tags: + - lbCore + /1/user/{user_name}/similar-to/{other_user_name}: + get: + operationId: similarityOfUserForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: path + name: other_user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/similarityOfUserForUser" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: "Get the similarity of 'user_name' and 'other_user_name', based on\ + \ their listening history." + tags: + - lbCore + /1/delete-listen: + post: + operationId: deleteListen + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/deleteListen" + required: true + responses: + "200": + description: Listen deleted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Delete a particular listen from a user's listen history. + tags: + - lbCore + /1/latest-import: + get: + operationId: latestImport + parameters: + - description: The MusicBrainz ID of the user whose data is needed. + in: query + name: user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/latestImport" + description: "Yay, you have data!" + security: + - ApiKeyAuth: [] + summary: Get the timestamp of the newest listen submitted by a user in previous + imports to ListenBrainz. + tags: + - lbCore + /1/user/{user_name}/services: + get: + operationId: servicesForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/servicesForUser" + description: "Yay, you have data!" + "401": + description: Invalid authorization. + "403": + description: "Forbidden, you do not have permissions to view this user's\ + \ information." + "404": + description: The requested user was not found. + security: + - ApiKeyAuth: [] + summary: Get list of services which are connected to a given user's account. + tags: + - lbCore + /1/user/{playlist_user_name}/playlists/recommendations: + get: + operationId: recommendationPlaylistsForUser + parameters: + - in: path + name: playlist_user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playlists" + description: Success. + "404": + description: User not found. + summary: Fetch recommendation playlist metadata in JSPF format without recordings + for 'playlist_user_name'. This endpoint only lists playlists that are to be + shown on the listenbrainz.org recommendations pages. + tags: + - lbCore + /1/user/{playlist_user_name}/playlists/search: + get: + operationId: searchPlaylistForUser + parameters: + - in: path + name: playlist_user_name + required: true + schema: + type: string + - in: query + name: query + required: true + schema: + type: string + - description: The number of playlists to return (for pagination). + in: query + name: count + required: false + schema: + default: 25 + type: integer + - description: The offset of into the list of playlists to return (for pagination). + in: query + name: offset + required: false + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playlists" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: Search for a playlist by name for a user. + tags: + - lbCore + /1/lb-radio/artist/{seed_artist_mbid}: + get: + operationId: lbRadioRecordingsForArtist + parameters: + - in: path + name: seed_artist_mbid + required: true + schema: + format: uuid + type: string + - description: "The mode that LB radio should use. Must be easy, medium or hard." + in: query + name: mode + required: true + schema: + $ref: "#/components/schemas/Mode" + - description: The maximum number of similar artists to return recordings for. + in: query + name: max_similar_artists + required: true + schema: + type: integer + - description: "The maximum number of recordings to return for each artist.\ + \ If there are aren’t enough recordings, all available recordings will be\ + \ returned." + in: query + name: max_recordings_per_artist + required: true + schema: + type: integer + - description: "Popularity range percentage lower bound. A popularity range\ + \ is given to narrow down the recordings into a smaller target group. The\ + \ most popular recording(s) on LB have a pop percent of 100. The least popular\ + \ recordings have a score of 0. This range is not coupled to the specified\ + \ mode, but the mode would often determine the popularity range, so that\ + \ less popular recordings can be returned on the medium and harder modes." + in: query + name: pop_begin + required: true + schema: + type: integer + - description: Popularity range percentage upper bound. + in: query + name: pop_end + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/lbRadioRecordingsForArtist" + description: "Yay, you have data!" + "400": + description: Invalid or missing param in request. + summary: "Get recordings for use in LB radio with the given seed artist. The\ + \ endpoint returns a dict of all the similar artists, including the seed artist.\ + \ For each artists, there will be a list of dicts that contain recording_mbid,\ + \ similar_artist_mbid and total_listen_count." + tags: + - lbCore + /1/lb-radio/tags: + get: + operationId: lbRadioTags + parameters: + - description: "The MusicBrainz tag to fetch recordings for, this parameter\ + \ can be specified multiple times. if more than one tag is specified, the\ + \ operator param should also be specified." + in: query + name: tag + required: true + schema: + type: string + - description: "Specify AND to retrieve recordings that have all the tags, otherwise\ + \ specify OR to retrieve recordings that have any one of the tags." + in: query + name: operator + required: false + schema: + $ref: "#/components/schemas/Operator" + - description: "Popularity range percentage lower bound. A popularity range\ + \ is given to narrow down the recordings into a smaller target group. The\ + \ most popular recording(s) on LB have a pop percent of 100. The least popular\ + \ recordings have a score of 0. This range is not coupled to the specified\ + \ mode, but the mode would often determine the popularity range, so that\ + \ less popular recordings can be returned on the medium and harder modes." + in: query + name: pop_begin + required: true + schema: + type: integer + - description: Popularity range percentage upper bound. + in: query + name: pop_end + required: true + schema: + type: integer + - description: "Optional, number of listens to return." + in: query + name: count + required: true + schema: + default: 25 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/lbRadioTags" + description: "Yay, you have data!" + "400": + description: Invalid or missing param in request. + summary: Get recordings for use in LB radio with the specified tags that match + the requested criteria. + tags: + - lbCore + /1/stats/user/{user_name}/artists: + get: + operationId: topArtistsForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return" + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination" + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/topArtistsForUser" + description: successful operation + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get top artists for user 'user_name'. + tags: + - lbStats + /1/stats/user/{user_name}/releases: + get: + operationId: topReleasesForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return" + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination" + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/topReleasesForUser" + description: "Successful query, you have data!" + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get top releases for user 'user_name'. + tags: + - lbStats + /1/stats/user/{user_name}/release-groups: + get: + operationId: topReleaseGroupsForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return" + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination" + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/topReleaseGroupsForUser" + description: successful operation + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found + summary: Get top release groups for user 'user_name'. + tags: + - lbStats + /1/stats/user/{user_name}/recordings: + get: + operationId: topRecordingsForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return" + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination" + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/topRecordingsForUser" + description: successful operation + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get top recordings for user 'user_name'. + tags: + - lbStats + /1/stats/user/{user_name}/listening-activity: + get: + operationId: listeningActivityForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listeningActivityForUser" + description: successful operation + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get the listening activity for user 'user_name'. + tags: + - lbStats + /1/stats/user/{user_name}/daily-activity: + get: + operationId: dailyActivityForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/dailyActivityForUser" + description: successful operation + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get the daily activity for user 'user_name'. + tags: + - lbStats + /1/stats/user/{user_name}/artist-map: + get: + operationId: artistMapForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + - description: "Optional, recalculate the data instead of returning the cached\ + \ result." + in: query + name: force_recalculate + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/artistMapForUser" + description: successful operation + "204": + description: "Statistics for the user haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get the artist map for user 'user_name'. + tags: + - lbStats + /1/stats/artist/{artist_mbid}/listeners: + get: + operationId: listenersForArtist + parameters: + - in: path + name: artist_mbid + required: true + schema: + format: uuid + type: string + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listenersForArtist" + description: successful operation + "204": + description: "Statistics for the artist haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: Entity not found. + summary: Get top listeners for artist 'artist_mbid'. + tags: + - lbStats + /1/stats/release-group/{release_group_mbid}/listeners: + get: + operationId: listenersForReleaseGroup + parameters: + - in: path + name: release_group_mbid + required: true + schema: + format: uuid + type: string + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listenersForReleaseGroup" + description: successful operation + "204": + description: "Statistics for the artist haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: Entity not found. + summary: Get top listeners for release group 'release_group_mbid'. + tags: + - lbStats + /1/stats/sitewide/artists: + get: + operationId: sitewideTopArtists + parameters: + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return." + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination." + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/sitewideTopArtists" + description: successful operation + "204": + description: "Statistics for the artist haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: Entity not found. + summary: Get sitewide top artists. + tags: + - lbStats + /1/stats/sitewide/releases: + get: + operationId: sitewideTopReleases + parameters: + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return." + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination." + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/sitewideTopReleases" + description: successful operation + "204": + description: "Statistics for the artist haven't been calculated, empty response\ + \ will be returned." + "400": + description: Bad request. + "404": + description: Entity not found. + summary: Get sitewide top releases. + tags: + - lbStats + /1/stats/sitewide/release-groups: + get: + operationId: sitewideTopReleaseGroups + parameters: + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return." + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination." + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/sitewideTopReleaseGroups" + description: successful operation + "204": + description: "Statistics haven't been calculated, empty response will be\ + \ returned." + "400": + description: Bad request. + summary: Get sitewide top release groups. + tags: + - lbStats + /1/stats/sitewide/recordings: + get: + operationId: sitewideTopRecordings + parameters: + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of artists to return." + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of artists to skip from the beginning, for\ + \ pagination." + type: integer + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/sitewideTopRecordings" + description: successful operation + "204": + description: "Statistics haven't been calculated, empty response will be\ + \ returned." + "400": + description: Bad request. + summary: Get sitewide top recordings. + tags: + - lbStats + /1/stats/sitewide/listening-activity: + get: + operationId: sitewideListeningActivity + parameters: + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/sitewideListeningActivity" + description: successful operation + "204": + description: "Statistics haven't been calculated, empty response will be\ + \ returned." + "400": + description: Bad request. + summary: Get sitewide top recordings. + tags: + - lbStats + /1/stats/sitewide/artist-map: + get: + operationId: sitewideArtistMap + parameters: + - in: query + name: range + required: false + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + - description: "Optional, recalculate the data instead of returning the cached\ + \ result." + in: query + name: force_recalculate + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/sitewideArtistMap" + description: successful operation + "204": + description: "Statistics haven't been calculated, empty response will be\ + \ returned." + "400": + description: Bad request. + summary: Get sitewide top recordings. + tags: + - lbStats + /1/stats/user/{user_name}/year-in-music/{year}: + get: + operationId: yearInMusicForUser + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: path + name: year + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/yearInMusicForUser" + description: "Successful query, you have data!" + "204": + description: "Statistics haven't been calculated, empty response will be\ + \ returned." + "400": + description: Bad request. + summary: Get sitewide top recordings. + tags: + - lbStats + /1/user/{playlist_user_name}/playlists: + get: + operationId: playlistsForUser + parameters: + - in: path + name: playlist_user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: The number of playlists to return (for pagination). + type: integer + - in: query + name: offset + required: false + schema: + description: The offset of into the list of playlists to return (for pagination). + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playlists" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: Fetch playlist metadata in JSPF format without recordings for the given + user. + tags: + - lbPlaylists + /1/user/{playlist_user_name}/playlists/collaborator: + get: + operationId: playlistsForUserCollaborator + parameters: + - in: path + name: playlist_user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: The number of playlists to return (for pagination). + type: integer + - in: query + name: offset + required: false + schema: + description: The offset of into the list of playlists to return (for pagination). + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playlists" + description: "Yay, you have data!" + "404": + description: User not found. + summary: "Fetch playlist metadata in JSPF format without recordings for which\ + \ a user is a collaborator. If a playlist is private, it will only be returned\ + \ if the caller is authorized to edit that playlist." + tags: + - lbPlaylists + /1/user/{playlist_user_name}/playlists/createdfor: + get: + operationId: playlistsCreatedForUser + parameters: + - in: path + name: playlist_user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: The number of playlists to return (for pagination). + type: integer + - in: query + name: offset + required: false + schema: + description: The offset of into the list of playlists to return (for pagination). + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playlists" + description: "Yay, you have data!" + "404": + description: The requested user was not found. + summary: Fetch playlist metadata in JSPF format without recordings that have + been created for the user. + tags: + - lbPlaylists + /1/playlist/create: + post: + description: |- + Create a playlist. The playlist must be in JSPF format with MusicBrainz extensions, which is defined here: https://musicbrainz.org/doc/jspf . To create an empty playlist, you can send an empty playlist with only the title field filled out. If you would like to create a playlist populated with recordings, each of the track items in the playlist must have an identifier element that contains the MusicBrainz recording that includes the recording MBID. + + When creating a playlist, only the playlist title and the track identifier elements will be used - all other elements in the posted JSPF wil be ignored. + + If a created_for field is found and the user is not an approved playlist bot, then a 403 forbidden will be raised. + operationId: createPlaylist + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/createPlaylist_request" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/createPlaylist_200_response" + description: Playlist accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + "403": + description: The submitting user is not allowed to create playlists for + other users. + security: + - ApiKeyAuth: [] + summary: Create a playlist + tags: + - lbPlaylists + /1/playlist/search: + get: + operationId: searchPlaylists + parameters: + - in: query + name: query + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/playlists" + description: "Yay, you have data!" + "400": + description: "Invalid query string, see error message for details." + "401": + description: Invalid authorization. See error message for details. + summary: Search for playlists by name or description. The search query must + be at least 3 characters long. + tags: + - lbPlaylists + /1/playlist/edit/{playlist_mbid}: + post: + operationId: editPlaylist + parameters: + - description: The playlist mbid to edit. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/createPlaylist_request" + required: true + responses: + "200": + description: Playlist accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + "403": + description: The submitting user is not allowed to create playlists for + other users. + security: + - ApiKeyAuth: [] + summary: |- + Create a playlist. The playlist must be in JSPF format with MusicBrainz extensions, which is defined here: https://musicbrainz.org/doc/jspf . To create an empty playlist, you can send an empty playlist with only the title field filled out. If you would like to create a playlist populated with recordings, each of the track items in the playlist must have an identifier element that contains the MusicBrainz recording that includes the recording MBID. + + When creating a playlist, only the playlist title and the track identifier elements will be used - all other elements in the posted JSPF wil be ignored. + + If a created_for field is found and the user is not an approved playlist bot, then a 403 forbidden will be raised. + tags: + - lbPlaylists + /1/playlist/{playlist_mbid}: + get: + operationId: fetchPlaylist + parameters: + - description: The playlist mbid to fetch. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + - description: "Optional, pass value ‘false' to skip lookup up recording metadata." + in: query + name: fetch_metadata + required: false + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/createPlaylist_request" + description: "Yay, you have data!" + "401": + description: Invalid authorization. See error message for details. + "404": + description: Playlist not found. + summary: Fetch the given playlist. + tags: + - lbPlaylists + /1/playlist/{playlist_mbid}/item/add/{offset}: + post: + operationId: appendRecordings + parameters: + - description: The playlist mbid to append to. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + - description: Offset. + in: path + name: offset + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/playlist" + required: true + responses: + "200": + description: Playlist accepted. + "400": + description: "Invalid JSON sent, see error message for details." + "401": + description: Invalid authorization. See error message for details. + "403": + description: Forbidden. The requesting user was not allowed to carry out + this operation. + security: + - ApiKeyAuth: [] + summary: |- + Append recordings to an existing playlist by posting a playlist with one of more recordings in it. The playlist must be in JSPF format with MusicBrainz extensions, which is defined here: https://musicbrainz.org/doc/jspf . + + If the offset is provided in the URL, then the recordings will be added at that offset, otherwise they will be added at the end of the playlist. + tags: + - lbPlaylists + /1/playlist/{playlist_mbid}/item/move: + post: + operationId: moveItem + parameters: + - description: The playlist mbid to append to. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/moveItem_request" + required: true + responses: + "200": + description: Move operation succeeded. + "400": + description: "Invalid JSON sent, see error message for details." + "401": + description: Invalid authorization. See error message for details. + "403": + description: Forbidden. The requesting user was not allowed to carry out + this operation. + security: + - ApiKeyAuth: [] + summary: "To move an item in a playlist, the POST data needs to specify the\ + \ recording MBID and current index of the track to move (from), where to move\ + \ it to (to) and how many tracks from that position should be moved (count)." + tags: + - lbPlaylists + /1/playlist/{playlist_mbid}/item/delete: + post: + description: "To delete an item in a playlist, the POST data needs to specify\ + \ the recording MBID and current index of the track to delete, and how many\ + \ tracks from that position should be moved deleted." + operationId: itemDelete + parameters: + - description: The playlist mbid to fetch. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/itemDelete_request" + required: true + responses: + "200": + description: Playlist accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + "403": + description: The requesting user was not allowed to carry out this operation. + security: + - ApiKeyAuth: [] + summary: Delete an item in a playlist. + tags: + - lbPlaylists + /1/playlist/{playlist_mbid}/delete: + post: + description: POST body data does not need to contain anything. + operationId: deletePlaylist + parameters: + - description: The playlist mbid to fetch. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + responses: + "200": + description: Playlist deleted. + "401": + description: Invalid authorization. + "403": + description: The requesting user was not allowed to carry out this operation. + "404": + description: Playlist not found. + security: + - ApiKeyAuth: [] + summary: Delete a playlist. + tags: + - lbPlaylists + /1/playlist/{playlist_mbid}/copy: + post: + operationId: copyPlaylist + parameters: + - description: The playlist mbid to append to. + in: path + name: playlist_mbid + required: true + schema: + format: uuid + type: string + responses: + "200": + description: Playlist copied. + "401": + description: Invalid authorization. See error message for details. + "403": + description: Forbidden. The requesting user was not allowed to carry out + this operation. + "404": + description: Playlist not found. + security: + - ApiKeyAuth: [] + summary: Copy a playlist - the new playlist will be given the name “Copy of + ”. POST body data does not need to contain anything. + tags: + - lbPlaylists + /1/feedback/recording-feedback: + post: + operationId: recordingFeedback + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/recordingFeedback_request" + required: true + responses: + "200": + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Submit recording feedback (love/hate) to the server. A user token (found + on https://listenbrainz.org/settings/ ) must be provided in the Authorization + header! Each request should contain only one feedback in the payload. + tags: + - lbRecordings + /1/feedback/user/{user_name}/get-feedback: + get: + operationId: getFeedback + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: score + required: false + schema: + description: "Optional, If 1 then returns the loved recordings, if -1 returns\ + \ hated recordings." + type: integer + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of feedback items to return." + maximum: 1000 + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of feedback items to skip from the beginning,\ + \ for pagination. Ex. An offset of 5 means the top 5 feedback will be\ + \ skipped, defaults to 0." + type: integer + - in: query + name: metadata + required: false + schema: + description: "Optional, 'true' or 'false' if this call should return the\ + \ metadata for the feedback." + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedbackResponse" + description: "Yay, you have data!" + summary: |- + Get feedback given by user 'user_name'. The format for the JSON returned is defined in our Feedback JSON Documentation. + + If the optional argument score is not given, this endpoint will return all the feedback submitted by the user. Otherwise filters the feedback to be returned by score. + tags: + - lbRecordings + /1/feedback/recording/{recording_mbid}/get-feedback-mbid: + get: + operationId: getFeedbackMbid + parameters: + - in: path + name: recording_mbid + required: true + schema: + format: uuid + type: string + - in: query + name: score + required: false + schema: + description: "Optional, If 1 then returns the loved recordings, if -1 returns\ + \ hated recordings." + type: integer + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of feedback items to return." + maximum: 1000 + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of feedback items to skip from the beginning,\ + \ for pagination. Ex. An offset of 5 means the top 5 feedback will be\ + \ skipped, defaults to 0." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedbackResponse" + description: "Yay, you have data!" + summary: Get feedback for recording with given recording_mbid. + tags: + - lbRecordings + /1/feedback/user/{recording_msid}/get-feedback: + get: + operationId: getFeedbackMsid + parameters: + - in: path + name: recording_msid + required: true + schema: + type: string + - in: query + name: score + required: false + schema: + description: "Optional, If 1 then returns the loved recordings, if -1 returns\ + \ hated recordings." + type: integer + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of feedback items to return." + maximum: 1000 + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of feedback items to skip from the beginning,\ + \ for pagination. Ex. An offset of 5 means the top 5 feedback will be\ + \ skipped, defaults to 0." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedbackResponse" + description: "Yay, you have data!" + summary: Get feedback for recording with given recording_msid. + tags: + - lbRecordings + /1/feedback/user/{user_name}/get-feedback-for-recordings: + get: + operationId: getFeedbackForRecordings + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - description: Comma separated list of recording_msids for which feedback records + are to be fetched. + in: query + name: recording_msids + required: false + schema: + items: + format: uuid + type: string + type: array + - description: Comma separated list of recording_mbids for which feedback records + are to be fetched. + in: query + name: recording_mbids + required: false + schema: + items: + format: uuid + type: string + type: array + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedbackResponse" + description: "Yay, you have data!" + summary: Get feedback given by user user_name for the list of recordings supplied. + tags: + - lbRecordings + /1/pin: + post: + operationId: pin + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/pin_request" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/pin_200_response" + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Pin a recording for user. A user token (found on https://listenbrainz.org/settings/) + must be provided in the Authorization header! Each request should contain + only one pinned recording item in the payload. + tags: + - lbRecordings + /1/unpin: + post: + operationId: unpin + responses: + "200": + description: Recording unpinned. + "401": + description: Invalid authorization. + "404": + description: Could not find the active recording to unpin for the user. + security: + - ApiKeyAuth: [] + summary: Unpins the currently active pinned recording for the user. A user token + (found on https://listenbrainz.org/settings/) must be provided in the Authorization + header! + tags: + - lbRecordings + /1/pin/delete/{row_id}: + post: + operationId: pinDelete + parameters: + - in: path + name: row_id + required: true + schema: + type: integer + responses: + "200": + description: Recording unpinned. + "401": + description: Invalid authorization. + "404": + description: The requested row_id for the user was not found. + security: + - ApiKeyAuth: [] + summary: Deletes the pinned recording with given row_id from the server. A user + token (found on https://listenbrainz.org/settings/) must be provided in the + Authorization header! + tags: + - lbRecordings + /1/{user_name}/pins: + get: + operationId: getPins + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of feedback items to return." + maximum: 1000 + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of pinned recording items to skip from the\ + \ beginning, for pagination. Ex. An offset of 5 means the top 5 feedback\ + \ will be skipped, defaults to 0." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/getPins" + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + "404": + description: The requested user was not found. + summary: Get a list of all recordings ever pinned by a user with given user_name + in descending order of the time they were originally pinned. + tags: + - lbRecordings + /1/{user_name}/pins/following: + get: + operationId: getPinsFollowing + parameters: + - in: path + name: user_name + required: true + schema: + type: string + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of feedback items to return." + maximum: 1000 + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + description: "Optional, number of pinned recording items to skip from the\ + \ beginning, for pagination. Ex. An offset of 5 means the top 5 feedback\ + \ will be skipped, defaults to 0." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/getPins" + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + "404": + description: The requested user was not found. + summary: Get a list containing the active pinned recordings for all users in + a user's user_name following list. The returned pinned recordings are sorted + in descending order of the time they were pinned. + tags: + - lbRecordings + /1/{user_name}/pins/current: + get: + operationId: getPinsCurrent + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/getPinsCurrent_200_response" + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + "404": + description: The requested user was not found. + summary: Get the currently pinned recording by a user with given user_name. + tags: + - lbRecordings + /1/pin/update/{row_id}: + post: + operationId: updatePin + parameters: + - in: path + name: row_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/updatePin_request" + required: true + responses: + "200": + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Updates the blurb content of a pinned recording for the user. A user + token (found on https://listenbrainz.org/settings/) must be provided in the + Authorization header! Each request should contain only one pinned recording + item in the payload. + tags: + - lbRecordings + /1/popularity/top-recordings-for-artist/{artist_mbid}: + get: + operationId: topRecordingsForArtist + parameters: + - in: path + name: artist_mbid + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/topRecordingsForArtist" + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + "404": + description: The requested user was not found. + summary: Get a list of all recordings ever pinned by a user with given user_name + in descending order of the time they were originally pinned. + tags: + - lbPopularity + /1/popularity/top-release-groups-for-artist/{artist_mbid}: + get: + operationId: topReleaseGroupForArtist + parameters: + - in: path + name: artist_mbid + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/topReleaseGroupsForArtist" + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + "404": + description: The requested user was not found. + summary: Get the top release groups by listen count for a given artist. + tags: + - lbPopularity + /1/popularity/recording: + post: + operationId: recording + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/recording_request" + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/recording_200_response_inner" + type: array + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + summary: |- + Get the total listen count and total unique listeners count for a given recording. + + A JSON document with a list of recording_mbids and inc string must be POSTed. Up to MAX_ITEMS_PER_GET items can be requested at once. + tags: + - lbPopularity + /1/popularity/artist: + post: + operationId: artist + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/artist_request" + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/artist_200_response_inner" + type: array + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + summary: |- + Get the total listen count and total unique listeners count for a given artist. + + A JSON document with a list of artists and inc string must be POSTed. Up to MAX_ITEMS_PER_GET items can be requested at once. + tags: + - lbPopularity + /1/popularity/release: + post: + operationId: release + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/release_request" + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/release_200_response_inner" + type: array + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + summary: |- + Get the total listen count and total unique listeners count for a given release. + + A JSON document with a list of releases and inc string must be POSTed. Up to MAX_ITEMS_PER_GET items can be requested at once. + tags: + - lbPopularity + /1/popularity/release-group: + post: + operationId: releaseGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/releaseGroup_request" + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/releaseGroup_200_response_inner" + type: array + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + summary: |- + Get the total listen count and total unique listeners count for a given release group. + + A JSON document with a list of release groups and inc string must be POSTed. Up to MAX_ITEMS_PER_GET items can be requested at once. + tags: + - lbPopularity + /1/metadata/recording/: + get: + operationId: recordingMetadata + parameters: + - description: A comma separated list of recording_mbids. + in: query + name: recording_mbids + required: true + schema: + items: + format: uuid + type: string + type: array + - description: "A space separated list of “artist”, “tag” and/or “release” to\ + \ indicate which portions of metadata you're interested in fetching. We\ + \ encourage users to only fetch the data they plan to consume." + in: query + name: inc + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + additionalProperties: + $ref: "#/components/schemas/recordingMetadata" + type: object + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + "404": + description: The requested user was not found. + summary: "This endpoint takes in a list of recording_mbids and returns an array\ + \ of dicts that contain recording metadata suitable for showing in a context\ + \ that requires as much detail about a recording and the artist. Using the\ + \ inc parameter, you can control which portions of metadata to fetch." + tags: + - lbMetadata + /1/metadata/release_group/: + get: + operationId: releaseGroupMetadata + parameters: + - description: A comma separated list of release_group_mbids. + explode: false + in: query + name: release_group_mbids + required: true + schema: + items: + format: uuid + type: string + type: array + style: form + - description: "A space separated list of “artist”, “tag” and/or “release” to\ + \ indicate which portions of metadata you're interested in fetching. We\ + \ encourage users to only fetch the data they plan to consume." + in: query + name: inc + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + additionalProperties: + $ref: "#/components/schemas/releaseGroupMetadata" + type: object + description: "Yay, you have data!" + "400": + description: "Invalid query parameters, see error message for details." + summary: "This endpoint takes in a list of release_group_mbids and returns an\ + \ array of dicts that contain release_group metadata suitable for showing\ + \ in a context that requires as much detail about a release_group and the\ + \ artist. Using the inc parameter, you can control which portions of metadata\ + \ to fetch." + tags: + - lbMetadata + /1/metadata/lookup/: + get: + operationId: lookup + parameters: + - description: Artist name of the listen. + in: query + name: artist_name + required: true + schema: + type: string + - description: Track name of the listen. + in: query + name: recording_name + required: true + schema: + type: string + - description: Release name of the listen. + in: query + name: release_name + required: false + schema: + type: string + - description: "Should extra metadata be also returned if a match is found,\ + \ see /metadata/recording for details." + in: query + name: metadata + required: true + schema: + type: boolean + - description: "A space separated list of “artist”, “tag” and/or “release” to\ + \ indicate which portions of metadata you're interested in fetching. We\ + \ encourage users to only fetch the data they plan to consume." + in: query + name: inc + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/lookup" + description: "Yay, you have data!" + "400": + description: Invalid arguments. + summary: "This endpoint looks up mbid metadata for the given artist, recording\ + \ and optionally a release name. The total number of characters in the artist\ + \ name, recording name and release name query arguments should be less than\ + \ or equal to MAX_MAPPING_QUERY_LENGTH." + tags: + - lbMetadata + /1/metadata/submit_manual_mapping/: + post: + operationId: submitManualMapping + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/submitManualMapping" + required: true + responses: + "200": + description: Listen(s) accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Submit a manual mapping of a recording messybrainz ID to a musicbrainz + recording id. + tags: + - lbMetadata + /1/metadata/get_manual_mapping/: + get: + operationId: getManualMapping + parameters: + - in: query + name: recording_msid + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/getManualMapping" + description: "Yay, you have data!" + "404": + description: No such mapping for this user/recording msid. + security: + - ApiKeyAuth: [] + summary: Get the manual mapping of a recording messybrainz ID that a user added. + tags: + - lbMetadata + /1/metadata/artist/: + get: + operationId: artistMetadata + parameters: + - description: A comma separated list of recording_mbids. + in: query + name: artist_mbids + required: true + schema: + items: + format: uuid + type: string + type: array + - description: "A space separated list of “artist”, “tag” and/or “release” to\ + \ indicate which portions of metadata you're interested in fetching. We\ + \ encourage users to only fetch the data they plan to consume." + in: query + name: inc + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/artistMetadata" + type: array + description: "Yay, you have data!" + "400": + description: Invalid arguments. + summary: "This endpoint takes in a list of artist_mbids and returns an array\ + \ of dicts that contain recording metadata suitable for showing in a context\ + \ that requires as much detail about a recording and the artist. Using the\ + \ inc parameter, you can control which portions of metadata to fetch." + tags: + - lbMetadata + /1/user/{user_name}/timeline-event/create/recording: + post: + operationId: recommendRecording + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/recommendRecording_request" + required: true + responses: + "200": + description: "Successful query, recording has been recommended!" + "400": + description: Bad request. + "401": + description: "Unauthorized, you do not have permissions to recommend recordings\ + \ on the behalf of this user." + "403": + description: "Forbidden, you are not an approved user." + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Make the user recommend a recording to their followers. + tags: + - lbSocial + /1/user/{user_name}/timeline-event/create/notification: + post: + operationId: createNotification + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/createNotification_request" + required: true + responses: + "200": + description: "Successful query, message has been posted!" + "400": + description: Bad request. + "401": + description: "Unauthorized, you do not have permissions to recommend recordings\ + \ on the behalf of this user." + "403": + description: "Forbidden, you are not an approved user." + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Post a message with a link on a user's timeline. Only approved users + are allowed to perform this action. + tags: + - lbSocial + /1/user/{user_name}/timeline-event/create/review: + post: + operationId: createReview + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/createReview_request" + required: true + responses: + "200": + description: "Successful query, message has been posted!" + "400": + description: Bad request. + "403": + description: "Forbidden, you have not linked with a CritiqueBrainz account." + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Creates a CritiqueBrainz review event for the user. This also creates + a corresponding review in CritiqueBrainz. Users need to have linked their + ListenBrainz account with CritiqueBrainz first to use this endpoint successfully. + tags: + - lbSocial + /1/user/{user_name}/feed/events: + get: + operationId: feedEvents + parameters: + - in: path + name: user_name + required: true + schema: + description: The MusicBrainz ID of the user whose timeline is being requested. + type: string + - description: "If you specify a 'max_ts' timestamp, events with timestamps\ + \ less than the value will be returned." + in: query + name: max_ts + schema: + type: integer + - description: "If you specify a 'min_ts' timestamp, events with timestamps\ + \ greater than the value will be returned." + in: query + name: min_ts + schema: + type: integer + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of listens to return." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedEvents" + description: "Successful query, you have feed events!" + "400": + description: Bad request. + "401": + description: "Unauthorized, you do not have permission to view this user's\ + \ feed." + "403": + description: "Forbidden, you do not have permission to view this user's\ + \ feed." + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: CreatGet feed events for a user's timeline. + tags: + - lbSocial + /1/user/{user_name}/feed/events/listens/following: + get: + operationId: feedEventsListensFollowing + parameters: + - in: path + name: user_name + required: true + schema: + description: The MusicBrainz ID of the user whose timeline is being requested. + type: string + - description: "If you specify a 'max_ts' timestamp, events with timestamps\ + \ less than the value will be returned." + in: query + name: max_ts + schema: + type: integer + - description: "If you specify a 'min_ts' timestamp, events with timestamps\ + \ greater than the value will be returned." + in: query + name: min_ts + schema: + type: integer + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of listens to return." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedEvents" + description: "Successful query, you have feed listen-events!" + "400": + description: Bad request. + "401": + description: Invalid authorization. See error message for details. + "403": + description: "Forbidden, you do not have permission to view this user's\ + \ feed." + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Get feed's listen events for followed users. + tags: + - lbSocial + /1/user/{user_name}/feed/events/listens/similar: + get: + operationId: feedEventsListensSimilar + parameters: + - in: path + name: user_name + required: true + schema: + description: The MusicBrainz ID of the user whose timeline is being requested. + type: string + - description: "If you specify a 'max_ts' timestamp, events with timestamps\ + \ less than the value will be returned." + in: query + name: max_ts + schema: + type: integer + - description: "If you specify a 'min_ts' timestamp, events with timestamps\ + \ greater than the value will be returned." + in: query + name: min_ts + schema: + type: integer + - in: query + name: count + required: false + schema: + default: 25 + description: "Optional, number of listens to return." + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedEventsListensSimilar" + description: "Successful query, you have feed listen-events!" + "400": + description: Bad request. + "401": + description: Invalid authorization. See error message for details. + "403": + description: "Forbidden, you do not have permission to view this user's\ + \ feed." + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Get feed's listen events for similar users. + tags: + - lbSocial + /1/user/{user_name}/feed/events/delete: + post: + operationId: feedEventsDelete + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/feedEventsDelete_request" + required: true + responses: + "200": + description: Successful deletion. + "400": + description: Bad request. + "401": + description: Unauthorized. + "403": + description: "Forbidden, you do not have permission to delete from this\ + \ user's feed." + "404": + description: User not found. + "500": + description: API Internal Server Error. + security: + - ApiKeyAuth: [] + summary: "Delete those events from user's feed that belong to them. Supports\ + \ deletion of recommendation and notification. Along with the authorization\ + \ token, post the event type and event id." + tags: + - lbSocial + /1/user/{user_name}/feed/events/hide: + post: + operationId: feedEventsHide + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/feedEventsDelete_request" + required: true + responses: + "200": + description: Event hidden successfully. + "400": + description: Bad request. + "401": + description: Unauthorized. + "403": + description: "Forbidden, you don't have permissions to hide events from\ + \ this user's timeline." + "404": + description: User not found. + "500": + description: API Internal Server Error. + security: + - ApiKeyAuth: [] + summary: "Hide events from the user feed, only recording_recommendation and\ + \ recording_pin events that have been generated by the people one is following\ + \ can be deleted via this endpoint." + tags: + - lbSocial + /1/user/{user_name}/feed/events/unhide: + post: + operationId: feedEventsUnhide + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/feedEventsDelete_request" + required: true + responses: + "200": + description: Event unhidden successfully. + "400": + description: Bad request. + "401": + description: Unauthorized. + "403": + description: Forbidden. + "404": + description: User not found. + "500": + description: API Internal Server Error. + security: + - ApiKeyAuth: [] + summary: "Delete hidden events from the user feed, aka unhide events." + tags: + - lbSocial + /1/user/{user_name}/timeline-event/create/recommend-personal: + post: + operationId: recommendPersonalRecording + parameters: + - in: path + name: user_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/recommendPersonalRecording_request" + required: true + responses: + "200": + description: "Successful query, recording has been recommended!" + "400": + description: Bad request. + "401": + description: "Unauthorized, you do not have permissions to recommend." + security: + - ApiKeyAuth: [] + summary: "Make the user recommend a recording to their followers. The request\ + \ should post the following data about the recording being recommended (either\ + \ one of recording_msid or recording_mbid is sufficient), and also the list\ + \ of followers getting recommended." + tags: + - lbSocial + /1/user/{user_name}/followers: + get: + operationId: followers + parameters: + - in: path + name: user_name + required: true + schema: + description: The MusicBrainz ID of the user whose timeline is being requested. + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/followers" + description: "Yay, you have data!" + "400": + description: Bad request. + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Fetch the list of followers of the user 'user_name'. + tags: + - lbSocial + /1/user/{user_name}/following: + get: + operationId: following + parameters: + - in: path + name: user_name + required: true + schema: + description: The MusicBrainz ID of the user whose timeline is being requested. + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/following" + description: "Yay, you have data!" + "400": + description: Bad request. + "404": + description: User not found. + security: + - ApiKeyAuth: [] + summary: Fetch the list of users followed by the user 'user_name'. + tags: + - lbSocial + /1/user/{user_name}/follow: + post: + operationId: follow + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + description: Successfully followed the user 'user_name'. + "400": + description: "Already following the user user_name, or trying to follow\ + \ yourself." + "401": + description: Invalid authorization. See error message for details. + security: + - ApiKeyAuth: [] + summary: Follow the user 'user_name'. A user token (found on https://listenbrainz.org/settings/ + ) must be provided in the Authorization header! + tags: + - lbSocial + /1/user/{user_name}/unfollow: + post: + operationId: unfollow + parameters: + - in: path + name: user_name + required: true + schema: + type: string + responses: + "200": + description: Successfully unfollowed the user 'user_name'. + "401": + description: Invalid authorization. See error message for details. + security: + - ApiKeyAuth: [] + summary: Unfollow the user 'user_name'. A user token (found on https://listenbrainz.org/settings/ + ) must be provided in the Authorization header! + tags: + - lbSocial + /1/cf/recommendation/user/{user_name}/recording: + get: + operationId: recordingRecommendations + parameters: + - description: The MusicBrainz ID of the user whose timeline is being requested. + in: path + name: user_name + required: true + schema: + type: string + - description: "Optional, number of recording mbids to return." + in: query + name: count + schema: + default: 25 + type: integer + - description: "Optional, number of mbids to skip from the beginning, for pagination.\ + \ Ex. An offset of 5 means the 5 mbids will be skipped." + in: query + name: offset + schema: + default: 25 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/recordingRecommendations" + description: "Successful query, you have data!" + "204": + description: "Recommendations for the user haven't been generated, empty\ + \ response will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get recommendations sorted on rating and ratings for user 'user_name'. + tags: + - lbRecommendations + /1/recommendation/feedback/submit: + post: + operationId: submitFeedback + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/submitFeedback_request" + required: true + responses: + "200": + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Submit recommendation feedback. A user token (found on https://listenbrainz.org/settings/ + ) must be provided in the Authorization header! Each request should contain + only one feedback in the payload. + tags: + - lbRecommendations + /1/recommendations/feedback/delete: + post: + operationId: deleteFeedback + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/deleteFeedback_request" + required: true + responses: + "200": + description: Feedback accepted. + "400": + description: Invalid JSON sent. + "401": + description: Invalid authorization. + security: + - ApiKeyAuth: [] + summary: Delete feedback for a user. A user token (found on https://listenbrainz.org/settings/ + ) must be provided in the Authorization header! Each request should contain + only one recording mbid in the payload. + tags: + - lbRecommendations + /1/recommendations/feedback/user/{user_name}: + get: + operationId: feedbackGivenBy + parameters: + - description: The MusicBrainz ID of the user whose timeline is being requested. + in: path + name: user_name + required: true + schema: + type: string + - description: "Optional, refer to db/model/recommendation_feedback.py for allowed\ + \ rating values." + in: query + name: rating + required: false + schema: + type: string + - description: "Optional, number of recording mbids to return." + in: query + name: count + required: false + schema: + default: 25 + type: integer + - description: "Optional, number of mbids to skip from the beginning, for pagination.\ + \ Ex. An offset of 5 means the 5 mbids will be skipped." + in: query + name: offset + required: false + schema: + default: 25 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/feedbackGivenBy" + description: "Yay, you have data!" + "204": + description: "Recommendations for the user haven't been generated, empty\ + \ response will be returned." + "400": + description: Bad request. + "404": + description: User not found. + summary: Get feedback given by user 'user_name'. + tags: + - lbRecommendations + /1/recommendations/feedback/user/{user_name}/recordings: + get: + operationId: recordingsFeedbackGivenBy + parameters: + - description: The MusicBrainz ID of the user whose timeline is being requested. + in: path + name: user_name + required: true + schema: + type: string + - description: Comma separated list of recording_mbids for which feedback records + are to be fetched. + in: query + name: mbids + required: true + schema: + items: + format: uuid + type: string + type: array + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/recordingsFeedbackGivenBy" + description: "Yay, you have data!" + "400": + description: Bad request. + "404": + description: User not found. + summary: Get feedback given by user 'user_name' for the list of recordings supplied. + tags: + - lbRecommendations + /1/explore/fresh-releases/: + get: + operationId: freshReleases + parameters: + - description: Fresh releases will be shown around this pivot date. Must be + in YYYY-MM-DD format. + in: query + name: release_date + required: false + schema: + type: string + - description: The number of days of fresh releases to show. Max 90 days. + in: query + name: days + required: false + schema: + type: integer + - description: The sort order of the results. + in: query + name: sort + required: false + schema: + default: release_name + enum: + - release_date + - artist_credit_name + - release_name + type: string + - description: Whether to show releases in the past. + in: query + name: past + required: false + schema: + default: true + type: boolean + - description: Whether to show releases in the future. + in: query + name: future + required: false + schema: + default: true + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/freshReleases" + description: "Yay, you have data!" + "400": + description: Invalid date or number of days passed. + summary: This endpoint fetches upcoming and recently released (fresh) releases. + tags: + - lbMisc + /1/explore/color/{color}: + get: + operationId: color + parameters: + - description: Color must be a 6 digit hex color code. + in: path + name: color + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/color" + description: Success. + summary: Fetch a list of releases that have cover art that has a predominant + color that is close to the given color. + tags: + - lbMisc + /1/explore/lb-radio: + get: + operationId: lbRadio + parameters: + - description: The LB Radio prompt from which to generate playlists. + in: query + name: prompt + required: true + schema: + type: string + - description: "The mode that LB radio should use. Must be easy, medium or hard." + in: query + name: mode + required: true + schema: + $ref: "#/components/schemas/Mode" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/lbRadio" + description: Success. + summary: Generate a playlist with LB Radio. + tags: + - lbMisc + /1/status/get-dump-info: + get: + operationId: getDumpInfo + parameters: + - description: "Integer specifying the ID of the dump, if not provided, the\ + \ endpoint returns information about the latest data dump." + in: query + name: id + required: false + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/getDumpInfo" + description: Success. + "400": + description: You did not provide a valid dump ID. See error message for + details. + "404": + description: Dump with given ID does not exist. + summary: Get information about ListenBrainz data dumps. You need to pass the + id parameter in a GET request to get data about that particular dump. + tags: + - lbMisc + /1/art/grid/: + post: + operationId: createCoverArtGrid + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/createCoverArtGrid" + required: true + responses: + "200": + content: + image/svg+xml: + schema: + format: binary + type: string + description: Cover art created successfully. + "400": + description: Invalid JSON or invalid options in JSON passed. + summary: Create a cover art grid SVG file from the POSTed JSON data to this + endpoint. + tags: + - lbArt + /1/art/grid-stats/{user_name}/{time_range}/{dimension}/{layout}/{image_size}: + get: + operationId: createCoverArtGridForUser + parameters: + - description: The name of the user for whom to create the cover art. + in: path + name: user_name + required: true + schema: + type: string + - description: Must be a statistics time range. + in: path + name: time_range + required: true + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + - description: "The dimension to use for this grid. A grid of dimension 3 has\ + \ 3 images across and 3 images down, for a total of 9 images." + in: path + name: dimension + required: true + schema: + type: integer + - description: "The layout to be used for this grid. Layout 0 is always a simple\ + \ grid, but other layouts may have image images be of different sizes. See\ + \ https://art.listenbrainz.org for examples of the available layouts." + in: path + name: layout + required: true + schema: + type: integer + - description: The size of the cover art image. + in: path + name: image_size + required: true + schema: + type: integer + responses: + "200": + content: + image/svg+xml: + schema: + format: binary + type: string + description: Cover art created successfully. + "400": + description: Invalid JSON or invalid options in JSON passed. + summary: Create a cover art grid SVG file from the stats of a given user. + tags: + - lbArt + /1/art/{custom_name}/{user_name}/{time_range}/{image_size}: + get: + operationId: createCustomCoverArt + parameters: + - description: The name of cover art to be generated. + in: path + name: custom_name + required: true + schema: + $ref: "#/components/schemas/CoverTypes" + - description: The name of the user for whom to create the cover art. + in: path + name: user_name + required: true + schema: + type: string + - description: Must be a statistics time range. + in: path + name: time_range + required: true + schema: + $ref: "#/components/schemas/AllowedStatisticsRange" + - description: The size of the cover art image. + in: path + name: image_size + required: true + schema: + type: integer + responses: + "200": + content: + image/svg+xml: + schema: + format: binary + type: string + description: Cover art created successfully. + "400": + description: Invalid JSON or invalid options in JSON passed. + summary: Create a custom cover art SVG file from the stats of a given user. + tags: + - lbArt + /1/art/year-in-music/{year}/{user_name}: + get: + operationId: yearInMusic + parameters: + - in: path + name: year + required: true + schema: + type: integer + - description: The name of the user for whom to create the cover art. + in: path + name: user_name + required: true + schema: + type: string + - in: query + name: image + required: true + schema: + $ref: "#/components/schemas/YearInMusicImage" + responses: + "200": + content: + image/svg+xml: + schema: + format: binary + type: string + description: Cover art created successfully. + "400": + description: Invalid JSON or invalid options in JSON passed. + summary: Create the shareable svg image using YIM stats. + tags: + - lbArt +components: + schemas: + YearInMusicImage: + enum: + - overview + - stats + - artists + - albums + - tracks + - discovery-playlist + - missed-playlist + type: string + ListenType: + enum: + - single + - playing_now + - import + type: string + Mode: + description: mode is the LB radio mode to be used for this query + enum: + - easy + - medium + - hard + type: string + AllowedStatisticsRange: + enum: + - all_time + - month + - week + - year + - quarter + - half_yearly + - this_week + - this_month + - this_year + type: string + Operator: + enum: + - AND + - OR + type: string + AllowedRatings: + enum: + - like + - love + - dislike + - hate + - bad_recommendation + type: string + CoverTypes: + enum: + - designer-top-5 + - designer-top-10 + - lps-on-the-floor + - grid-stats + - grid-stats-special + type: string + searchUsers: + example: + users: + - user_name: user_name + - user_name: user_name + properties: + users: + items: + $ref: "#/components/schemas/searchUsers_users_inner" + type: array + required: + - users + type: object + submitListens: + properties: + listen_type: + $ref: "#/components/schemas/ListenType" + payload: + items: + $ref: "#/components/schemas/submitListens_payload_inner" + type: array + required: + - listen_type + - payload + type: object + validateToken: + example: + valid: true + code: 0 + user_name: user_name + message: message + properties: + code: + type: integer + message: + type: string + valid: + type: boolean + user_name: + type: string + required: + - code + - message + - valid + type: object + listensForUser: + example: + payload: + listens: + - recording_msid: recording_msid + listened_at: 5 + user_name: user_name + inserted_at: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + - recording_msid: recording_msid + listened_at: 5 + user_name: user_name + inserted_at: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + user_id: user_id + latest_listen_ts: 6 + count: 0 + oldest_listen_ts: 2 + properties: + payload: + $ref: "#/components/schemas/listensForUser_payload" + required: + - payload + type: object + listenCountForUser: + example: + payload: + count: 0 + properties: + payload: + $ref: "#/components/schemas/listenCountForUser_payload" + required: + - payload + type: object + playingNowForUser: + example: + payload: + listens: + - playing_now: true + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + - playing_now: true + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + playing_now: true + user_id: user_id + count: 0 + properties: + payload: + $ref: "#/components/schemas/playingNowForUser_payload" + required: + - payload + type: object + similarUsersForUser: + example: + payload: + - similarity: 0 + user_name: user_name + - similarity: 0 + user_name: user_name + properties: + payload: + items: + $ref: "#/components/schemas/similarUsersForUser_payload_inner" + type: array + required: + - payload + type: object + similarityOfUserForUser: + example: + payload: + similarity: 0 + user_name: user_name + properties: + payload: + $ref: "#/components/schemas/similarityOfUserForUser_payload" + required: + - payload + type: object + deleteListen: + properties: + listened_at: + type: integer + recording_msid: + type: string + required: + - listened_at + - recording_msid + type: object + latestImport: + example: + latest_import: latest_import + musicbrainz_id: musicbrainz_id + status: + count: 0 + state: state + properties: + musicbrainz_id: + description: the MusicBrainz ID of the user + type: string + latest_import: + description: the timestamp of the newest listen submitted in previous imports. + Defaults to 0 + type: string + status: + $ref: "#/components/schemas/latestImport_status" + required: + - latest_import + - musicbrainz_id + type: object + servicesForUser: + example: + user_name: user_name + services: + - services + - services + properties: + services: + items: + type: string + type: array + user_name: + type: string + required: + - services + - user_name + type: object + playlists: + example: + playlist_count: 1 + offset: 6 + count: 0 + playlists: + - playlist: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - playlist: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + properties: + count: + type: integer + offset: + type: integer + playlist_count: + type: integer + playlists: + items: + $ref: "#/components/schemas/createPlaylist_request" + type: array + type: object + lbRadioRecordingsForArtist: + additionalProperties: + items: + $ref: "#/components/schemas/lbRadioRecordingsForArtist_value_inner" + type: array + type: object + lbRadioTags: + items: + $ref: "#/components/schemas/lbRadioTags_inner" + type: array + topArtistsForUser: + example: + payload: + last_updated: 5 + offset: 5 + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + to_ts: 2 + user_id: user_id + from_ts: 1 + count: 6 + range: range + total_artist_count: 7 + properties: + payload: + $ref: "#/components/schemas/topArtistsForUser_payload" + required: + - payload + type: object + topReleasesForUser: + example: + payload: + last_updated: 1 + offset: 5 + to_ts: 7 + user_id: user_id + from_ts: 6 + count: 0 + total_release_count: 9 + range: range + releases: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/topReleasesForUser_payload" + required: + - payload + type: object + topReleaseGroupsForUser: + example: + payload: + total_release_group_count: 3 + last_updated: 1 + offset: 5 + to_ts: 9 + user_id: user_id + from_ts: 6 + count: 0 + range: range + release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/topReleaseGroupsForUser_payload" + required: + - payload + type: object + topRecordingsForUser: + example: + payload: + last_updated: 1 + offset: 5 + recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + to_ts: 7 + user_id: user_id + from_ts: 6 + count: 0 + range: range + total_recording_count: 9 + properties: + payload: + $ref: "#/components/schemas/topRecordingsForUser_payload" + required: + - payload + type: object + listeningActivityForUser: + example: + payload: + last_updated: 6 + listening_activity: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + to_ts: 2 + user_id: user_id + from_ts: 0 + range: range + properties: + payload: + $ref: "#/components/schemas/listeningActivityForUser_payload" + required: + - payload + type: object + dailyActivityForUser: + example: + payload: + last_updated: 5 + to_ts: 5 + user_id: user_id + from_ts: 1 + range: range + daily_activity: + Monday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Thursday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Friday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Sunday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Wednesday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Tuesday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Saturday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + properties: + payload: + $ref: "#/components/schemas/dailyActivityForUser_payload" + required: + - payload + type: object + artistMapForUser: + example: + payload: + last_updated: 5 + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + to_ts: 5 + user_id: user_id + from_ts: 1 + range: range + properties: + payload: + $ref: "#/components/schemas/artistMapForUser_payload" + required: + - payload + type: object + listenersForArtist: + example: + payload: + last_updated: 6 + listeners: + - listen_count: 1 + user_name: user_name + - listen_count: 1 + user_name: user_name + artist_name: artist_name + to_ts: 5 + from_ts: 0 + total_listen_count: 5 + total_user_count: 2 + stats_range: stats_range + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/listenersForArtist_payload" + required: + - payload + type: object + listenersForReleaseGroup: + example: + payload: + last_updated: 1 + caa_id: 0 + listeners: + - listen_count: 1 + user_name: user_name + - listen_count: 1 + user_name: user_name + artist_name: artist_name + from_ts: 6 + total_listen_count: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_user_count: 2 + stats_range: stats_range + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + to_ts: 5 + release_group_name: release_group_name + properties: + payload: + $ref: "#/components/schemas/listenersForReleaseGroup_payload" + required: + - payload + type: object + sitewideTopArtists: + example: + payload: + last_updated: 1 + offset: 5 + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + to_ts: 5 + from_ts: 6 + count: 0 + range: range + total_artist_count: 2 + properties: + payload: + $ref: "#/components/schemas/sitewideTopArtists_payload" + required: + - payload + type: object + sitewideTopReleases: + example: + payload: + last_updated: 1 + offset: 5 + to_ts: 7 + from_ts: 6 + count: 0 + total_release_count: 9 + range: range + releases: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: artists + artist_name: artist_name + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: artists + artist_name: artist_name + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/sitewideTopReleases_payload" + required: + - payload + type: object + sitewideTopReleaseGroups: + example: + payload: + total_release_group_count: 2 + last_updated: 1 + offset: 5 + to_ts: 5 + from_ts: 6 + count: 0 + range: range + release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/sitewideTopReleaseGroups_payload" + required: + - payload + type: object + sitewideTopRecordings: + example: + payload: + last_updated: 1 + offset: 5 + recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: + - artists + - artists + artist_name: artist_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: + - artists + - artists + artist_name: artist_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + to_ts: 7 + from_ts: 6 + count: 0 + range: range + total_recording_count: 9 + properties: + payload: + $ref: "#/components/schemas/sitewideTopRecordings_payload" + required: + - payload + type: object + sitewideListeningActivity: + example: + payload: + last_updated: 6 + listening_activity: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + to_ts: 1 + from_ts: 0 + range: range + properties: + payload: + $ref: "#/components/schemas/sitewideListeningActivity_payload" + required: + - payload + type: object + sitewideArtistMap: + example: + payload: + last_updated: 6 + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + to_ts: 1 + from_ts: 0 + stats_range: stats_range + properties: + payload: + $ref: "#/components/schemas/sitewideArtistMap_payload" + required: + - payload + type: object + yearInMusicForUser: + example: + payload: + data: + most_listened_year: + key: 0 + top_release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_new_artists_discovered: 3 + similar_users: + key: 1 + listens_per_day: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + total_listen_count: 7 + total_artists_count: 2 + total_recordings_count: 2 + new_releases_of_top_artists: + - artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + top_artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + top_recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + total_listening_time: 9 + playlist-top-missed-recordings-for-year: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + top_genres: + - genre_count_percent: 5 + genre_count: 5 + genre: genre + - genre_count_percent: 5 + genre_count: 5 + genre: genre + total_release_groups_count: 4 + playlist-top-discoveries-for-year: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + day_of_week: day_of_week + user_name: user_name + properties: + payload: + $ref: "#/components/schemas/yearInMusicForUser_payload" + required: + - payload + type: object + playlist: + example: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + properties: + album: + type: string + annotation: + type: string + creator: + type: string + date: + type: string + duration: + type: integer + extension: + $ref: "#/components/schemas/playlist-extension" + identifier: + type: string + title: + type: string + track: + items: + $ref: "#/components/schemas/playlist_track_inner" + type: array + type: object + feedbackResponse: + example: + feedback: + - score: 1 + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_id: user_id + created: 6 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + - score: 1 + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_id: user_id + created: 6 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + offset: 5 + total_count: 5 + count: 0 + properties: + count: + type: integer + feedback: + items: + $ref: "#/components/schemas/feedback" + type: array + offset: + type: integer + total_count: + type: integer + type: object + trackMetadata: + example: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + additional_info: + $ref: "#/components/schemas/additionalInfo" + artist_name: + type: string + brainzplayer_metadata: + $ref: "#/components/schemas/trackMetadata_brainzplayer_metadata" + mbid_mapping: + $ref: "#/components/schemas/mbidMapping" + release_name: + type: string + track_name: + type: string + type: object + getPins: + example: + offset: 6 + total_count: 2 + user_name: user_name + count: 0 + pinned_recordings: + - recording_msid: recording_msid + pinned_until: 5 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 1 + blurb_content: blurb_content + row_id: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + - recording_msid: recording_msid + pinned_until: 5 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 1 + blurb_content: blurb_content + row_id: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + count: + type: integer + offset: + type: integer + pinned_recordings: + items: + $ref: "#/components/schemas/getPins_pinned_recordings_inner" + type: array + total_count: + type: integer + user_name: + type: string + required: + - count + - offset + - pinned_recordings + - user_name + type: object + topRecordingsForArtist: + items: + $ref: "#/components/schemas/topRecordingsForArtist_inner" + type: array + topReleaseGroupsForArtist: + items: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner" + type: array + recordingMetadata: + properties: + artist: + $ref: "#/components/schemas/recordingMetadata_artist" + recording: + $ref: "#/components/schemas/recordingMetadata_recording" + tag: + $ref: "#/components/schemas/recordingMetadata_tag" + type: object + releaseGroupMetadata: + properties: + release_group: + $ref: "#/components/schemas/releaseGroupMetadata_release_group" + tag: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_tag" + artist: + $ref: "#/components/schemas/releaseGroupMetadata_artist" + release: + $ref: "#/components/schemas/releaseGroupMetadata_release_group" + type: object + lookup: + example: + artist_credit_name: artist_credit_name + metadata: + artist: + artist_credit_id: 0 + artists: + - area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + - area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + name: name + release: + caa_id: 5 + mbid: mbid + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + year: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + album_artist_name: album_artist_name + recording: + isrcs: + - isrcs + - isrcs + first_release_date: 2000-01-23 + length: 1 + name: name + items: items + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tag: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording: + - count: 2 + tag: tag + - count: 2 + tag: tag + release_group: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + recording_name: recording_name + release_name: release_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_credit_name: + type: string + artist_mbids: + items: + format: uuid + type: string + type: array + metadata: + $ref: "#/components/schemas/lookup_metadata" + recording_mbid: + format: uuid + type: string + recording_name: + type: string + release_mbid: + format: uuid + type: string + release_name: + type: string + type: object + submitManualMapping: + properties: + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + required: + - a + - b + type: object + getManualMapping: + example: + mapping: + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_id: 0 + created: created + status: status + properties: + mapping: + $ref: "#/components/schemas/getManualMapping_mapping" + status: + type: string + required: + - mapping + - status + type: object + artistMetadata: + example: + area: area + mbid: mbid + gender: gender + name: name + tag: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 0 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + properties: + area: + type: string + artist_mbid: + format: uuid + type: string + begin_year: + type: integer + gender: + type: string + mbid: + type: string + name: + type: string + rels: + $ref: "#/components/schemas/rels_1" + tag: + $ref: "#/components/schemas/artistMetadata_tag" + type: + type: string + type: object + feedEvents: + example: + payload: + user_id: user_id + count: 0 + events: + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + user_name: user_name + similarity: 7.061401241503109 + id: 1 + message: message + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + user_name: user_name + similarity: 7.061401241503109 + id: 1 + message: message + properties: + payload: + $ref: "#/components/schemas/feedEvents_payload" + type: object + feedEventsListensSimilar: + example: + payload: + user_id: user_id + count: 0 + events: + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + similarity: 1 + user_name: user_name + id: id + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + similarity: 1 + user_name: user_name + id: id + properties: + payload: + $ref: "#/components/schemas/feedEventsListensSimilar_payload" + required: + - payload + type: object + followers: + example: + followers: + - followers + - followers + user: user + properties: + followers: + items: + type: string + type: array + user: + type: string + required: + - followers + - user + type: object + following: + example: + following: + - following + - following + user: user + properties: + following: + items: + type: string + type: array + user: + type: string + required: + - following + - user + type: object + recordingRecommendations: + example: + payload: + last_updated: 6 + model_url: model_url + offset: 5 + user_name: user_name + count: 0 + model_id: model_id + mbids: + - score: 1 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + latest_listened_at: latest_listened_at + - score: 1 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + latest_listened_at: latest_listened_at + total_mbid_count: 5 + entity: entity + properties: + payload: + $ref: "#/components/schemas/recordingRecommendations_payload" + required: + - payload + type: object + feedbackGivenBy: + example: + feedback: + - recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 6 + rating: rating + - recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 6 + rating: rating + offset: 1 + total_count: 5 + user_name: user_name + count: 0 + properties: + count: + type: integer + feedback: + items: + $ref: "#/components/schemas/feedbackGivenBy_feedback_inner" + type: array + offset: + type: integer + total_count: + type: integer + user_name: + type: string + required: + - count + - feedback + - offset + - total_count + - user_name + type: object + recordingsFeedbackGivenBy: + example: + feedback: + - recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 6 + rating: rating + - recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 6 + rating: rating + user_name: user_name + properties: + feedback: + items: + $ref: "#/components/schemas/feedbackGivenBy_feedback_inner" + type: array + user_name: + type: string + required: + - feedback + - user_name + type: object + freshReleases: + example: + payload: + total_count: 6 + releases: + - artist_credit_name: artist_credit_name + listen_count: 0 + release_name: release_name + release_date: release_date + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_tags: + - key: release_tags + - key: release_tags + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_primary_type: release_group_primary_type + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 0 + release_name: release_name + release_date: release_date + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_tags: + - key: release_tags + - key: release_tags + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_primary_type: release_group_primary_type + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/freshReleases_payload" + required: + - payload + type: object + color: + example: + payload: + releases: + - caa_id: 0 + color: + - 6 + - 6 + release_name: release_name + artist_name: artist_name + recordings: + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + dist: 1 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - caa_id: 0 + color: + - 6 + - 6 + release_name: release_name + artist_name: artist_name + recordings: + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + dist: 1 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + payload: + $ref: "#/components/schemas/color_payload" + required: + - payload + type: object + lbRadio: + example: + payload: + feedback: + - feedback + - feedback + jspf: + playlist: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + properties: + payload: + $ref: "#/components/schemas/lbRadio_payload" + required: + - payload + type: object + getDumpInfo: + example: + id: 0 + timestamp: timestamp + properties: + id: + type: integer + timestamp: + type: string + required: + - id + - timestamp + type: object + createCoverArtGrid: + properties: + background: + description: The background for the cover art. + enum: + - transparent + - white + - black + type: string + image_size: + description: The size of the cover art image. + type: integer + dimension: + description: "The dimension to use for this grid. A grid of dimension 3\ + \ has 3 images across and 3 images down, for a total of 9 images." + type: integer + skip-missing: + description: "If cover art is missing for a given release_mbid, skip it\ + \ and move on to the next one, if true is passed. If false, the show-caa\ + \ option will decide what happens." + type: boolean + show-caa: + description: "If cover art is missing and skip-missing is false, then show-caa\ + \ will determine if a blank square is shown or if the Cover Art Archive\ + \ missing image is shown." + type: boolean + tiles: + description: "The tiles paramater is a list of strings that determines the\ + \ location where cover art images should be placed. Each string is a comma\ + \ separated list of image cells. A grid of dimension 3 has 9 cells, from\ + \ 0 in the upper left hand corner, 2 in the upper right hand corner, 6\ + \ in the lower left corner and 8 in the lower right corner. Specifying\ + \ only a single cell will have the image cover that cell exactly. If more\ + \ than one cell is specified, the image will cover the area defined by\ + \ the bounding box of all the given cells. These tiles only define bounding\ + \ box areas - no clipping of images that may fall outside of these tiles\ + \ will be performed." + items: + type: string + type: array + release_mbids: + description: An ordered list of release_mbids. The images will be loaded + and processed in the order that this list is in. The cover art for the + release_mbids will be placed on the tiles defined by the tiles parameter. + items: + format: uuid + type: string + type: array + required: + - background + - dimension + - image_size + - release_mbids + - show-caa + - skip-missing + - tiles + type: object + releaseGroups: + items: + $ref: "#/components/schemas/releaseGroups_inner" + type: array + playlist-extension: + example: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + properties: + https://musicbrainz.org/doc/jspf#playlist: + $ref: "#/components/schemas/playlistExtensionPayload" + type: object + feedback: + example: + score: 1 + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_id: user_id + created: 6 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + created: + type: integer + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + score: + type: integer + track_metadata: + $ref: "#/components/schemas/trackMetadata" + user_id: + type: string + type: object + additionalInfo: + additionalProperties: + type: string + example: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + properties: + media_player: + type: string + media_player_version: + type: string + submission_client: + type: string + submission_client_version: + type: string + music_service: + type: string + music_service_name: + type: string + origin_url: + type: string + release_mbid: + format: uuid + type: string + artist_mbids: + items: + format: uuid + type: string + type: array + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + tags: + items: + type: string + type: array + duration: + type: integer + duration_ms: + type: integer + tracknumber: + type: integer + release_group_mbid: + format: uuid + type: string + track_mbid: + format: uuid + type: string + work_mbids: + items: + format: uuid + type: string + type: array + isrc: + type: string + spotify_id: + type: string + discnumber: + type: integer + listening_from: + type: string + release_artist_name: + type: string + release_artist_names: + items: + type: string + type: array + spotify_album_artist_ids: + items: + type: string + type: array + spotify_album_id: + type: string + spotify_artist_ids: + items: + type: string + type: array + youtube_id: + type: string + albumartist: + type: string + comment: + type: string + date: + type: string + genre: + type: string + artist_names: + items: + type: string + type: array + trackNumber: + type: string + type: object + mbidMapping: + example: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbids: + items: + format: uuid + type: string + type: array + artists: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner_artists_inner" + type: array + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + recording_mbid: + format: uuid + type: string + recording_name: + type: string + release_mbid: + format: uuid + type: string + type: object + musicBrainzArtist: + example: + area: area + gender: gender + join_phrase: join_phrase + name: name + type: type + end_year: 1 + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + properties: + area: + type: string + artist_mbid: + format: uuid + type: string + begin_year: + type: integer + end_year: + type: integer + gender: + type: string + join_phrase: + type: string + name: + type: string + rels: + $ref: "#/components/schemas/rels_1" + type: + type: string + type: object + rels: + example: + artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbid: + format: uuid + type: string + artist_name: + type: string + instrument: + type: string + type: + type: string + type: object + rels_1: + example: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + properties: + free streaming: + type: string + lyrics: + type: string + official homepage: + type: string + purchase for download: + type: string + download for free: + type: string + purchase for mail-order: + type: string + social network: + type: string + streaming: + type: string + wikidata: + type: string + youtube: + type: string + patronage: + type: string + crowdfunding: + type: string + blog: + type: string + type: object + metadata: + additionalProperties: + type: string + example: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + created: + type: integer + relationship_type: + type: string + message: + type: string + blurb_content: + type: string + inserted_at: + type: integer + listened_at: + type: integer + listened_at_iso: + type: string + playing_now: + type: boolean + track_metadata: + $ref: "#/components/schemas/trackMetadata" + user_name: + type: string + type: object + createPlaylist_request: + example: + playlist: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + properties: + playlist: + $ref: "#/components/schemas/playlist" + type: object + createPlaylist_200_response: + example: + playlist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: status + properties: + playlist_mbid: + format: uuid + type: string + status: + type: string + type: object + moveItem_request: + properties: + mbid: + format: uuid + type: string + from: + type: integer + to: + type: integer + count: + type: integer + type: object + itemDelete_request: + properties: + index: + type: integer + count: + type: integer + type: object + recordingFeedback_request: + properties: + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + score: + maximum: 1 + minimum: -1 + type: integer + type: object + pin_request: + properties: + recording_msid: + format: uuid + type: string + recording_mbid: + format: uuid + type: string + blurb_content: + type: string + pinned_until: + format: int64 + type: integer + type: object + pin_200_response_pinned_recording: + example: + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pinned_until: 6 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 0 + blurb_content: blurb_content + row_id: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + created: + type: integer + pinned_until: + type: integer + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + row_id: + type: integer + blurb_content: + type: string + track_metadata: + $ref: "#/components/schemas/trackMetadata" + type: object + pin_200_response: + example: + pinned_recording: + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pinned_until: 6 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 0 + blurb_content: blurb_content + row_id: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + pinned_recording: + $ref: "#/components/schemas/pin_200_response_pinned_recording" + type: object + getPinsCurrent_200_response_pinned_recording: + example: + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pinned_until: 6 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 0 + blurb_content: blurb_content + row_id: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + blurb_content: + type: string + created: + type: integer + pinned_until: + type: integer + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + row_id: + type: integer + track_metadata: + $ref: "#/components/schemas/trackMetadata" + type: object + getPinsCurrent_200_response: + example: + pinned_recording: + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pinned_until: 6 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 0 + blurb_content: blurb_content + row_id: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + user_name: user_name + properties: + pinned_recording: + $ref: "#/components/schemas/getPinsCurrent_200_response_pinned_recording" + user_name: + type: string + type: object + updatePin_request: + properties: + blurb_content: + type: string + type: object + recording_request: + properties: + recording_mbids: + items: + format: uuid + type: string + maxItems: 1000 + type: array + required: + - recording_mbids + type: object + recording_200_response_inner: + example: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_listen_count: 0 + total_user_count: 6 + properties: + recording_mbid: + format: uuid + type: string + total_listen_count: + type: integer + total_user_count: + type: integer + type: object + artist_request: + properties: + artist_mbids: + items: + format: uuid + type: string + maxItems: 1000 + type: array + required: + - artist_mbids + type: object + artist_200_response_inner: + example: + total_listen_count: 0 + total_user_count: 6 + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbid: + format: uuid + type: string + total_listen_count: + type: integer + total_user_count: + type: integer + type: object + release_request: + properties: + release_mbids: + items: + format: uuid + type: string + maxItems: 1000 + type: array + required: + - release_mbids + type: object + release_200_response_inner: + example: + total_listen_count: 0 + total_user_count: 6 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + release_mbid: + format: uuid + type: string + total_listen_count: + type: integer + total_user_count: + type: integer + type: object + releaseGroup_request: + properties: + release_group_mbids: + items: + format: uuid + type: string + maxItems: 1000 + type: array + required: + - release_group_mbids + type: object + releaseGroup_200_response_inner: + example: + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_listen_count: 0 + total_user_count: 6 + properties: + release_group_mbid: + format: uuid + type: string + total_listen_count: + type: integer + total_user_count: + type: integer + type: object + recommendRecording_request_metadata: + properties: + recording_msid: + format: uuid + type: string + recording_mbid: + format: uuid + type: string + type: object + recommendRecording_request: + properties: + metadata: + $ref: "#/components/schemas/recommendRecording_request_metadata" + type: object + createNotification_request_metadata: + properties: + message: + type: string + type: object + createNotification_request: + properties: + metadata: + $ref: "#/components/schemas/createNotification_request_metadata" + type: object + createReview_request_metadata: + properties: + entity_name: + type: string + entity_id: + type: string + entity_type: + type: string + text: + type: string + language: + type: string + rating: + type: integer + type: object + createReview_request: + properties: + metadata: + $ref: "#/components/schemas/createReview_request_metadata" + type: object + feedEventsDelete_request: + properties: + event_type: + type: string + id: + type: integer + type: object + recommendPersonalRecording_request_metadata: + properties: + recording_msid: + format: uuid + type: string + recording_mbid: + format: uuid + type: string + users: + type: string + blurb_content: + type: string + type: object + recommendPersonalRecording_request: + properties: + metadata: + $ref: "#/components/schemas/recommendPersonalRecording_request_metadata" + type: object + submitFeedback_request: + properties: + recording_mbid: + format: uuid + type: string + rating: + $ref: "#/components/schemas/AllowedRatings" + type: object + deleteFeedback_request: + properties: + recording_mbid: + format: uuid + type: string + type: object + searchUsers_users_inner: + example: + user_name: user_name + properties: + user_name: + type: string + type: object + submitListens_payload_inner: + properties: + listened_at: + format: int32 + minimum: 0 + type: integer + track_metadata: + $ref: "#/components/schemas/trackMetadata" + type: object + listensForUser_payload_listens_inner: + example: + recording_msid: recording_msid + listened_at: 5 + user_name: user_name + inserted_at: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + inserted_at: + type: integer + listened_at: + type: integer + recording_msid: + type: string + track_metadata: + $ref: "#/components/schemas/trackMetadata" + user_name: + type: string + type: object + listensForUser_payload: + example: + listens: + - recording_msid: recording_msid + listened_at: 5 + user_name: user_name + inserted_at: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + - recording_msid: recording_msid + listened_at: 5 + user_name: user_name + inserted_at: 1 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + user_id: user_id + latest_listen_ts: 6 + count: 0 + oldest_listen_ts: 2 + properties: + count: + type: integer + latest_listen_ts: + type: integer + listens: + items: + $ref: "#/components/schemas/listensForUser_payload_listens_inner" + type: array + oldest_listen_ts: + type: integer + user_id: + type: string + type: object + listenCountForUser_payload: + example: + count: 0 + properties: + count: + type: integer + required: + - count + type: object + playingNowForUser_payload_listens_inner: + example: + playing_now: true + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + playing_now: + type: boolean + track_metadata: + $ref: "#/components/schemas/trackMetadata" + type: object + playingNowForUser_payload: + example: + listens: + - playing_now: true + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + - playing_now: true + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + playing_now: true + user_id: user_id + count: 0 + properties: + count: + type: integer + listens: + items: + $ref: "#/components/schemas/playingNowForUser_payload_listens_inner" + type: array + playing_now: + type: boolean + user_id: + type: string + required: + - count + - listens + - playing_now + - user_id + type: object + similarUsersForUser_payload_inner: + example: + similarity: 0 + user_name: user_name + properties: + similarity: + type: integer + user_name: + type: string + type: object + similarityOfUserForUser_payload: + example: + similarity: 0 + user_name: user_name + properties: + similarity: + type: integer + user_name: + type: string + required: + - similarity + - user_name + type: object + latestImport_status: + example: + count: 0 + state: state + properties: + state: + description: a short string denoting the state of the import + type: string + count: + description: the number of listens that have been imported for the user + by the importer + type: integer + type: object + lbRadioRecordingsForArtist_value_inner: + properties: + recording_mbid: + format: uuid + type: string + similar_artist_mbid: + format: uuid + type: string + similar_artist_name: + type: string + total_listen_count: + type: integer + type: object + lbRadioTags_inner: + example: + tag_count: 6 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + percent: 0 + properties: + percent: + type: integer + recording_mbid: + format: uuid + type: string + source: + type: string + tag_count: + type: integer + type: object + topArtistsForUser_payload_artists_inner: + example: + listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbid: + format: uuid + type: string + artist_name: + type: string + listen_count: + type: integer + type: object + topArtistsForUser_payload: + example: + last_updated: 5 + offset: 5 + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + to_ts: 2 + user_id: user_id + from_ts: 1 + count: 6 + range: range + total_artist_count: 7 + properties: + artists: + items: + $ref: "#/components/schemas/topArtistsForUser_payload_artists_inner" + type: array + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + to_ts: + type: integer + total_artist_count: + type: integer + user_id: + type: string + required: + - artists + - count + - from_ts + - last_updated + - offset + - range + - to_ts + - total_artist_count + - user_id + type: object + topReleasesForUser_payload_releases_inner_artists_inner: + example: + artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_credit_name: + type: string + artist_mbid: + format: uuid + type: string + join_phrase: + type: string + type: object + topReleasesForUser_payload_releases_inner: + example: + listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + artists: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner_artists_inner" + type: array + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + listen_count: + type: integer + release_mbid: + format: uuid + type: string + release_name: + type: string + type: object + topReleasesForUser_payload: + example: + last_updated: 1 + offset: 5 + to_ts: 7 + user_id: user_id + from_ts: 6 + count: 0 + total_release_count: 9 + range: range + releases: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + releases: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner" + type: array + to_ts: + type: integer + total_release_count: + type: integer + user_id: + type: string + required: + - count + - from_ts + - last_updated + - offset + - range + - releases + - to_ts + - total_release_count + - user_id + type: object + topReleaseGroupsForUser_payload: + example: + total_release_group_count: 3 + last_updated: 1 + offset: 5 + to_ts: 9 + user_id: user_id + from_ts: 6 + count: 0 + range: range + release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + release_groups: + items: + $ref: "#/components/schemas/releaseGroups_inner" + type: array + to_ts: + type: integer + total_release_group_count: + type: integer + user_id: + type: string + required: + - count + - from_ts + - last_updated + - offset + - range + - release_groups + - to_ts + - total_release_group_count + - user_id + type: object + topRecordingsForUser_payload_recordings_inner: + example: + listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + properties: + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + artists: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner_artists_inner" + type: array + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + listen_count: + type: integer + recording_mbid: + format: uuid + type: string + release_mbid: + format: uuid + type: string + release_name: + type: string + track_name: + type: string + type: object + topRecordingsForUser_payload: + example: + last_updated: 1 + offset: 5 + recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + to_ts: 7 + user_id: user_id + from_ts: 6 + count: 0 + range: range + total_recording_count: 9 + properties: + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + recordings: + items: + $ref: "#/components/schemas/topRecordingsForUser_payload_recordings_inner" + type: array + to_ts: + type: integer + total_recording_count: + type: integer + user_id: + type: string + required: + - count + - from_ts + - last_updated + - offset + - range + - recordings + - to_ts + - total_recording_count + - user_id + type: object + listeningActivityForUser_payload_listening_activity_inner: + example: + listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + properties: + from_ts: + type: integer + listen_count: + type: integer + time_range: + type: string + to_ts: + type: integer + type: object + listeningActivityForUser_payload: + example: + last_updated: 6 + listening_activity: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + to_ts: 2 + user_id: user_id + from_ts: 0 + range: range + properties: + from_ts: + type: integer + last_updated: + type: integer + listening_activity: + items: + $ref: "#/components/schemas/listeningActivityForUser_payload_listening_activity_inner" + type: array + range: + type: string + to_ts: + type: integer + user_id: + type: string + required: + - from_ts + - last_updated + - listening_activity + - range + - to_ts + - user_id + type: object + dailyActivityForUser_payload_daily_activity_Friday_inner: + example: + listen_count: 6 + hour: 0 + properties: + hour: + type: integer + listen_count: + type: integer + type: object + dailyActivityForUser_payload_daily_activity: + example: + Monday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Thursday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Friday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Sunday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Wednesday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Tuesday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Saturday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + properties: + Friday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + Monday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + Saturday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + Sunday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + Thursday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + Tuesday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + Wednesday: + items: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity_Friday_inner" + type: array + required: + - Friday + - Monday + - Saturday + - Sunday + - Thursday + - Tuesday + - Wednesday + type: object + dailyActivityForUser_payload: + example: + last_updated: 5 + to_ts: 5 + user_id: user_id + from_ts: 1 + range: range + daily_activity: + Monday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Thursday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Friday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Sunday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Wednesday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Tuesday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + Saturday: + - listen_count: 6 + hour: 0 + - listen_count: 6 + hour: 0 + properties: + daily_activity: + $ref: "#/components/schemas/dailyActivityForUser_payload_daily_activity" + from_ts: + type: integer + last_updated: + type: integer + range: + type: string + to_ts: + type: integer + user_id: + type: string + required: + - daily_activity + - from_ts + - last_updated + - range + - to_ts + - user_id + type: object + artistMapForUser_payload_artist_map_inner: + example: + listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + properties: + artist_count: + type: integer + artists: + items: + $ref: "#/components/schemas/topArtistsForUser_payload_artists_inner" + type: array + country: + type: string + listen_count: + type: integer + type: object + artistMapForUser_payload: + example: + last_updated: 5 + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + to_ts: 5 + user_id: user_id + from_ts: 1 + range: range + properties: + artist_map: + items: + $ref: "#/components/schemas/artistMapForUser_payload_artist_map_inner" + type: array + from_ts: + type: integer + last_updated: + type: integer + range: + type: string + to_ts: + type: integer + user_id: + type: string + required: + - artist_map + - from_ts + - last_updated + - range + - to_ts + - user_id + type: object + listenersForArtist_payload_listeners_inner: + example: + listen_count: 1 + user_name: user_name + properties: + listen_count: + type: integer + user_name: + type: string + type: object + listenersForArtist_payload: + example: + last_updated: 6 + listeners: + - listen_count: 1 + user_name: user_name + - listen_count: 1 + user_name: user_name + artist_name: artist_name + to_ts: 5 + from_ts: 0 + total_listen_count: 5 + total_user_count: 2 + stats_range: stats_range + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbid: + format: uuid + type: string + artist_name: + type: string + from_ts: + type: integer + last_updated: + type: integer + listeners: + items: + $ref: "#/components/schemas/listenersForArtist_payload_listeners_inner" + type: array + stats_range: + type: string + to_ts: + type: integer + total_listen_count: + type: integer + total_user_count: + type: integer + required: + - artist_mbid + - artist_name + - from_ts + - last_updated + - listeners + - stats_range + - to_ts + - total_listen_count + - total_user_count + type: object + listenersForReleaseGroup_payload: + example: + last_updated: 1 + caa_id: 0 + listeners: + - listen_count: 1 + user_name: user_name + - listen_count: 1 + user_name: user_name + artist_name: artist_name + from_ts: 6 + total_listen_count: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_user_count: 2 + stats_range: stats_range + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + to_ts: 5 + release_group_name: release_group_name + properties: + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + from_ts: + type: integer + last_updated: + type: integer + listeners: + items: + $ref: "#/components/schemas/listenersForArtist_payload_listeners_inner" + type: array + release_group_mbid: + format: uuid + type: string + release_group_name: + type: string + stats_range: + type: string + to_ts: + type: integer + total_listen_count: + type: integer + total_user_count: + type: integer + required: + - artist_mbids + - artist_name + - caa_id + - caa_release_mbid + - from_ts + - last_updated + - listeners + - release_group_mbid + - release_group_name + - stats_range + - to_ts + - total_listen_count + - total_user_count + type: object + sitewideTopArtists_payload: + example: + last_updated: 1 + offset: 5 + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + to_ts: 5 + from_ts: 6 + count: 0 + range: range + total_artist_count: 2 + properties: + artists: + items: + $ref: "#/components/schemas/topArtistsForUser_payload_artists_inner" + type: array + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + to_ts: + type: integer + total_artist_count: + type: integer + required: + - artists + - count + - from_ts + - last_updated + - offset + - range + - to_ts + - total_artist_count + type: object + sitewideTopReleases_payload_releases_inner: + example: + listen_count: 2 + caa_id: 5 + release_name: release_name + artists: artists + artist_name: artist_name + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artists: + nullable: true + type: string + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + listen_count: + type: integer + release_mbid: + format: uuid + type: string + release_name: + type: string + type: object + sitewideTopReleases_payload: + example: + last_updated: 1 + offset: 5 + to_ts: 7 + from_ts: 6 + count: 0 + total_release_count: 9 + range: range + releases: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: artists + artist_name: artist_name + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: artists + artist_name: artist_name + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + releases: + items: + $ref: "#/components/schemas/sitewideTopReleases_payload_releases_inner" + type: array + to_ts: + type: integer + total_release_count: + type: integer + required: + - count + - from_ts + - last_updated + - offset + - range + - releases + - to_ts + - total_release_count + type: object + sitewideTopReleaseGroups_payload: + example: + total_release_group_count: 2 + last_updated: 1 + offset: 5 + to_ts: 5 + from_ts: 6 + count: 0 + range: range + release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + release_groups: + items: + $ref: "#/components/schemas/releaseGroups_inner" + type: array + to_ts: + type: integer + total_release_group_count: + type: integer + required: + - count + - from_ts + - last_updated + - offset + - range + - release_groups + - to_ts + - total_release_group_count + type: object + sitewideTopRecordings_payload_recordings_inner: + example: + listen_count: 2 + caa_id: 5 + release_name: release_name + artists: + - artists + - artists + artist_name: artist_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + properties: + artists: + items: + type: string + type: array + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + listen_count: + type: integer + recording_mbid: + format: uuid + type: string + release_mbid: + format: uuid + type: string + release_name: + type: string + track_name: + type: string + type: object + sitewideTopRecordings_payload: + example: + last_updated: 1 + offset: 5 + recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: + - artists + - artists + artist_name: artist_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artists: + - artists + - artists + artist_name: artist_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + to_ts: 7 + from_ts: 6 + count: 0 + range: range + total_recording_count: 9 + properties: + count: + type: integer + from_ts: + type: integer + last_updated: + type: integer + offset: + type: integer + range: + type: string + recordings: + items: + $ref: "#/components/schemas/sitewideTopRecordings_payload_recordings_inner" + type: array + to_ts: + type: integer + total_recording_count: + type: integer + required: + - count + - from_ts + - last_updated + - offset + - range + - recordings + - to_ts + - total_recording_count + type: object + sitewideListeningActivity_payload: + example: + last_updated: 6 + listening_activity: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + to_ts: 1 + from_ts: 0 + range: range + properties: + from_ts: + type: integer + last_updated: + type: integer + listening_activity: + items: + $ref: "#/components/schemas/listeningActivityForUser_payload_listening_activity_inner" + type: array + range: + type: string + to_ts: + type: integer + required: + - from_ts + - last_updated + - listening_activity + - range + - to_ts + type: object + sitewideArtistMap_payload: + example: + last_updated: 6 + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + to_ts: 1 + from_ts: 0 + stats_range: stats_range + properties: + artist_map: + items: + $ref: "#/components/schemas/artistMapForUser_payload_artist_map_inner" + type: array + from_ts: + type: integer + last_updated: + type: integer + stats_range: + type: string + to_ts: + type: integer + required: + - artist_map + - from_ts + - last_updated + - range + - to_ts + type: object + yearInMusicForUser_payload_data_new_releases_of_top_artists_inner: + example: + artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_credit_mbids: + items: + format: uuid + type: string + type: array + artist_credit_name: + type: string + artists: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner_artists_inner" + type: array + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + release_group_mbid: + format: uuid + type: string + title: + type: string + type: object + yearInMusicForUser_payload_data_top_genres_inner: + example: + genre_count_percent: 5 + genre_count: 5 + genre: genre + properties: + genre: + type: string + genre_count: + type: integer + genre_count_percent: + type: integer + type: object + yearInMusicForUser_payload_data: + example: + most_listened_year: + key: 0 + top_release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_new_artists_discovered: 3 + similar_users: + key: 1 + listens_per_day: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + total_listen_count: 7 + total_artists_count: 2 + total_recordings_count: 2 + new_releases_of_top_artists: + - artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + top_artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + top_recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + total_listening_time: 9 + playlist-top-missed-recordings-for-year: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + top_genres: + - genre_count_percent: 5 + genre_count: 5 + genre: genre + - genre_count_percent: 5 + genre_count: 5 + genre: genre + total_release_groups_count: 4 + playlist-top-discoveries-for-year: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + day_of_week: day_of_week + properties: + artist_map: + items: + $ref: "#/components/schemas/artistMapForUser_payload_artist_map_inner" + type: array + day_of_week: + type: string + listens_per_day: + items: + $ref: "#/components/schemas/listeningActivityForUser_payload_listening_activity_inner" + type: array + most_listened_year: + additionalProperties: + type: integer + type: object + new_releases_of_top_artists: + items: + $ref: "#/components/schemas/yearInMusicForUser_payload_data_new_releases_of_top_artists_inner" + type: array + playlist-top-discoveries-for-year: + $ref: "#/components/schemas/playlist" + playlist-top-missed-recordings-for-year: + $ref: "#/components/schemas/playlist" + similar_users: + additionalProperties: + type: integer + type: object + top_artists: + items: + $ref: "#/components/schemas/topArtistsForUser_payload_artists_inner" + type: array + top_genres: + items: + $ref: "#/components/schemas/yearInMusicForUser_payload_data_top_genres_inner" + type: array + top_recordings: + items: + $ref: "#/components/schemas/topRecordingsForUser_payload_recordings_inner" + type: array + top_release_groups: + items: + $ref: "#/components/schemas/releaseGroups_inner" + type: array + total_artists_count: + type: integer + total_listen_count: + type: integer + total_listening_time: + type: integer + total_new_artists_discovered: + type: integer + total_recordings_count: + type: integer + total_release_groups_count: + type: integer + required: + - artist_map + - day_of_week + - listens_per_day + - most_listened_year + - new_releases_of_top_artists + - playlist-top-discoveries-for-year + - playlist-top-missed-recordings-for-year + - similar_users + - top_artists + - top_genres + - top_recordings + - top_release_groups + - total_artists_count + - total_listen_count + - total_listening_time + - total_new_artists_discovered + - total_recordings_count + - total_release_groups_count + type: object + yearInMusicForUser_payload: + example: + data: + most_listened_year: + key: 0 + top_release_groups: + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_new_artists_discovered: 3 + similar_users: + key: 1 + listens_per_day: + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + - listen_count: 5 + time_range: time_range + to_ts: 5 + from_ts: 1 + total_listen_count: 7 + total_artists_count: 2 + total_recordings_count: 2 + new_releases_of_top_artists: + - artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + caa_id: 6 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + title: title + artist_credit_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + top_artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + top_recordings: + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + - listen_count: 2 + caa_id: 5 + release_name: release_name + artist_name: artist_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + track_name: track_name + total_listening_time: 9 + playlist-top-missed-recordings-for-year: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + artist_map: + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + - listen_count: 6 + country: country + artists: + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - listen_count: 0 + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_count: 0 + top_genres: + - genre_count_percent: 5 + genre_count: 5 + genre: genre + - genre_count_percent: 5 + genre_count: 5 + genre: genre + total_release_groups_count: 4 + playlist-top-discoveries-for-year: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + day_of_week: day_of_week + user_name: user_name + properties: + data: + $ref: "#/components/schemas/yearInMusicForUser_payload_data" + user_name: + type: string + required: + - data + - user_name + type: object + playlist_track_inner_extension_https___musicbrainz_org_doc_jspf_track_additional_metadata: + example: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + caa_release_mbid: + format: uuid + type: string + caa_id: + type: integer + artists: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner_artists_inner" + type: array + type: object + playlist_track_inner_extension_https___musicbrainz_org_doc_jspf_track: + example: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_identifiers: + items: + type: string + type: array + release_identifier: + type: string + added_at: + type: string + added_by: + type: string + additional_metadata: + $ref: "#/components/schemas/playlist_track_inner_extension_https___musicbrainz_org_doc_jspf_track_additional_metadata" + type: object + playlist_track_inner_extension: + example: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + https://musicbrainz.org/doc/jspf#track: + $ref: "#/components/schemas/playlist_track_inner_extension_https___musicbrainz_org_doc_jspf_track" + required: + - https://musicbrainz.org/doc/jspf#track + type: object + playlist_track_inner: + example: + duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + properties: + album: + type: string + creator: + type: string + duration: + type: integer + extension: + $ref: "#/components/schemas/playlist_track_inner_extension" + identifier: + items: + type: string + type: array + title: + type: string + type: object + trackMetadata_brainzplayer_metadata: + example: + release_name: release_name + artist_name: artist_name + track_name: track_name + properties: + artist_name: + type: string + release_name: + type: string + track_name: + type: string + type: object + getPins_pinned_recordings_inner: + example: + recording_msid: recording_msid + pinned_until: 5 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 1 + blurb_content: blurb_content + row_id: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + properties: + blurb_content: + type: string + created: + type: integer + pinned_until: + type: integer + recording_mbid: + format: uuid + type: string + recording_msid: + type: string + row_id: + format: uuid + type: integer + track_metadata: + $ref: "#/components/schemas/trackMetadata" + type: object + topRecordingsForArtist_inner_release_color: + example: + red: 5 + green: 5 + blue: 1 + properties: + blue: + type: integer + green: + type: integer + red: + type: integer + type: object + topRecordingsForArtist_inner_tags_inner: + example: + genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + properties: + count: + type: integer + genre_mbid: + format: uuid + type: string + tag: + type: string + type: object + topRecordingsForArtist_inner: + example: + recording_name: recording_name + caa_id: 0 + artist_name: artist_name + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_listen_count: 2 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + length: 6 + total_user_count: 7 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tags: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + release_name: release_name + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_color: + red: 5 + green: 5 + blue: 1 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + artists: + items: + $ref: "#/components/schemas/topReleasesForUser_payload_releases_inner_artists_inner" + type: array + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + length: + type: integer + recording_mbid: + format: uuid + type: string + recording_name: + type: string + release_color: + $ref: "#/components/schemas/topRecordingsForArtist_inner_release_color" + release_mbid: + format: uuid + type: string + release_name: + type: string + total_listen_count: + type: integer + total_user_count: + type: integer + tags: + items: + $ref: "#/components/schemas/topRecordingsForArtist_inner_tags_inner" + type: array + type: object + topReleaseGroupsForArtist_inner_artist: + example: + artist_credit_id: 0 + artists: + - area: area + gender: gender + join_phrase: join_phrase + name: name + type: type + end_year: 1 + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + - area: area + gender: gender + join_phrase: join_phrase + name: name + type: type + end_year: 1 + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + name: name + properties: + artist_credit_id: + type: integer + artists: + items: + $ref: "#/components/schemas/musicBrainzArtist" + type: array + name: + type: string + type: object + topReleaseGroupsForArtist_inner_release: + example: + date: date + caa_id: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + type: type + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + rels: + items: + $ref: "#/components/schemas/rels" + type: array + date: + type: string + name: + type: string + type: + type: string + type: object + topReleaseGroupsForArtist_inner_release_group: + example: + date: date + caa_id: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + type: type + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + date: + type: string + name: + type: string + type: + type: string + rels: + items: + $ref: "#/components/schemas/rels" + type: array + type: object + topReleaseGroupsForArtist_inner_tag_artist_inner: + example: + genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbid: + format: uuid + type: string + count: + type: integer + genre_mbid: + format: uuid + type: string + tag: + type: string + type: object + topReleaseGroupsForArtist_inner_tag: + example: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + properties: + artist: + items: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_tag_artist_inner" + type: array + release_group: + items: + $ref: "#/components/schemas/topRecordingsForArtist_inner_tags_inner" + type: array + type: object + topReleaseGroupsForArtist_inner: + example: + artist: + artist_credit_id: 0 + artists: + - area: area + gender: gender + join_phrase: join_phrase + name: name + type: type + end_year: 1 + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + - area: area + gender: gender + join_phrase: join_phrase + name: name + type: type + end_year: 1 + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + name: name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release: + date: date + caa_id: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + type: type + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_listen_count: 7 + release_color: + red: 5 + green: 5 + blue: 1 + total_user_count: 9 + release_group: + date: date + caa_id: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + type: type + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tag: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + properties: + artist: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_artist" + release: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_release" + release_color: + $ref: "#/components/schemas/topRecordingsForArtist_inner_release_color" + release_group: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_release_group" + release_group_mbid: + format: uuid + type: string + tag: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_tag" + total_listen_count: + type: integer + total_user_count: + type: integer + type: object + recordingMetadata_artist_artists_inner: + example: + area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + properties: + area: + type: string + artist_mbid: + format: uuid + type: string + begin_year: + type: integer + join_phrase: + type: string + name: + type: string + rels: + $ref: "#/components/schemas/rels_1" + type: + type: string + type: object + recordingMetadata_artist: + example: + artist_credit_id: 0 + artists: + - area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + - area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + name: name + properties: + artist_credit_id: + type: integer + artists: + items: + $ref: "#/components/schemas/recordingMetadata_artist_artists_inner" + type: array + name: + type: string + type: object + recordingMetadata_recording: + example: + isrcs: + - isrcs + - isrcs + first_release_date: 2000-01-23 + length: 1 + name: name + items: items + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + first_release_date: + format: date + type: string + isrcs: + items: + description: TODO default missing array inner type to string + type: string + type: array + items: + type: string + length: + type: integer + name: + type: string + rels: + items: + $ref: "#/components/schemas/rels" + type: array + type: object + recordingMetadata_tag: + properties: + artist: + items: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_tag_artist_inner" + type: array + recording: + items: + $ref: "#/components/schemas/topRecordingsForArtist_inner_tags_inner" + type: array + release_group: + items: + $ref: "#/components/schemas/topRecordingsForArtist_inner_tags_inner" + type: array + type: object + releaseGroupMetadata_release_group: + properties: + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + date: + type: string + name: + type: string + rels: + items: + additionalProperties: + type: string + type: object + type: array + type: + type: string + type: object + releaseGroupMetadata_artist_artists_inner: + properties: + area: + type: string + artist_mbid: + format: uuid + type: string + begin_year: + type: integer + end_year: + type: integer + join_phrase: + type: string + name: + type: string + rels: + $ref: "#/components/schemas/rels_1" + type: + type: string + type: object + releaseGroupMetadata_artist: + properties: + artist_credit_id: + type: integer + artists: + items: + $ref: "#/components/schemas/releaseGroupMetadata_artist_artists_inner" + type: array + name: + type: string + type: object + lookup_metadata_release: + example: + caa_id: 5 + mbid: mbid + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + year: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + album_artist_name: album_artist_name + properties: + album_artist_name: + type: string + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + mbid: + type: string + name: + type: string + release_group_mbid: + format: uuid + type: string + year: + type: integer + type: object + lookup_metadata_tag_recording_inner: + example: + count: 2 + tag: tag + properties: + count: + type: integer + tag: + type: string + type: object + lookup_metadata_tag: + example: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording: + - count: 2 + tag: tag + - count: 2 + tag: tag + release_group: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + properties: + artist: + items: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_tag_artist_inner" + type: array + recording: + items: + $ref: "#/components/schemas/lookup_metadata_tag_recording_inner" + type: array + release_group: + items: + $ref: "#/components/schemas/topRecordingsForArtist_inner_tags_inner" + type: array + type: object + lookup_metadata: + example: + artist: + artist_credit_id: 0 + artists: + - area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + - area: area + join_phrase: join_phrase + name: name + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + begin_year: 6 + rels: + youtube: youtube + download for free: download for free + free streaming: free streaming + purchase for download: purchase for download + blog: blog + social network: social network + streaming: streaming + official homepage: official homepage + crowdfunding: crowdfunding + purchase for mail-order: purchase for mail-order + patronage: patronage + lyrics: lyrics + wikidata: wikidata + name: name + release: + caa_id: 5 + mbid: mbid + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + year: 5 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + album_artist_name: album_artist_name + recording: + isrcs: + - isrcs + - isrcs + first_release_date: 2000-01-23 + length: 1 + name: name + items: items + rels: + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_name: artist_name + instrument: instrument + type: type + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tag: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording: + - count: 2 + tag: tag + - count: 2 + tag: tag + release_group: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 9 + tag: tag + properties: + artist: + $ref: "#/components/schemas/recordingMetadata_artist" + recording: + $ref: "#/components/schemas/recordingMetadata_recording" + release: + $ref: "#/components/schemas/lookup_metadata_release" + tag: + $ref: "#/components/schemas/lookup_metadata_tag" + type: object + getManualMapping_mapping: + example: + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_id: 0 + created: created + properties: + created: + type: string + recording_mbid: + format: uuid + type: string + recording_msid: + format: uuid + type: string + user_id: + type: integer + required: + - created + - recording_mbid + - recording_msid + - user_id + type: object + artistMetadata_tag: + example: + artist: + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - genre_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + count: 2 + tag: tag + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist: + items: + $ref: "#/components/schemas/topReleaseGroupsForArtist_inner_tag_artist_inner" + type: array + required: + - artist + type: object + feedEvents_payload_events_inner: + example: + metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + user_name: user_name + similarity: 7.061401241503109 + id: 1 + message: message + properties: + created: + type: integer + event_type: + type: string + hidden: + type: boolean + id: + type: integer + message: + type: string + metadata: + $ref: "#/components/schemas/metadata" + user_name: + type: string + similarity: + type: number + type: object + feedEvents_payload: + example: + user_id: user_id + count: 0 + events: + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + user_name: user_name + similarity: 7.061401241503109 + id: 1 + message: message + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + user_name: user_name + similarity: 7.061401241503109 + id: 1 + message: message + properties: + count: + type: integer + events: + items: + $ref: "#/components/schemas/feedEvents_payload_events_inner" + type: array + user_id: + type: string + type: object + feedEventsListensSimilar_payload_events_inner: + example: + metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + similarity: 1 + user_name: user_name + id: id + properties: + id: + type: string + created: + type: integer + event_type: + type: string + hidden: + type: boolean + metadata: + $ref: "#/components/schemas/metadata" + similarity: + type: integer + user_name: + type: string + type: object + feedEventsListensSimilar_payload: + example: + user_id: user_id + count: 0 + events: + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + similarity: 1 + user_name: user_name + id: id + - metadata: + relationship_type: relationship_type + playing_now: true + listened_at: 2 + listened_at_iso: listened_at_iso + created: 5 + user_name: user_name + blurb_content: blurb_content + message: message + inserted_at: 5 + track_metadata: + release_name: release_name + additional_info: + date: date + artist_names: + - artist_names + - artist_names + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_artist_name: release_artist_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + work_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + duration: 5 + discnumber: 9 + spotify_album_artist_ids: + - spotify_album_artist_ids + - spotify_album_artist_ids + genre: genre + media_player_version: media_player_version + origin_url: origin_url + submission_client: submission_client + trackNumber: trackNumber + spotify_id: spotify_id + spotify_album_id: spotify_album_id + submission_client_version: submission_client_version + isrc: isrc + release_artist_names: + - release_artist_names + - release_artist_names + youtube_id: youtube_id + tags: + - tags + - tags + duration_ms: 2 + spotify_artist_ids: + - spotify_artist_ids + - spotify_artist_ids + music_service_name: music_service_name + recording_msid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + music_service: music_service + track_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + listening_from: listening_from + media_player: media_player + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tracknumber: 7 + albumartist: albumartist + artist_name: artist_name + mbid_mapping: + recording_name: recording_name + caa_id: 3 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + brainzplayer_metadata: + release_name: release_name + artist_name: artist_name + track_name: track_name + track_name: track_name + event_type: event_type + hidden: true + created: 6 + similarity: 1 + user_name: user_name + id: id + properties: + count: + type: integer + events: + items: + $ref: "#/components/schemas/feedEventsListensSimilar_payload_events_inner" + type: array + user_id: + type: string + required: + - count + - events + - user_id + type: object + recordingRecommendations_payload_mbids_inner: + example: + score: 1 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + latest_listened_at: latest_listened_at + properties: + latest_listened_at: + type: string + recording_mbid: + format: uuid + type: string + score: + type: integer + type: object + recordingRecommendations_payload: + example: + last_updated: 6 + model_url: model_url + offset: 5 + user_name: user_name + count: 0 + model_id: model_id + mbids: + - score: 1 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + latest_listened_at: latest_listened_at + - score: 1 + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + latest_listened_at: latest_listened_at + total_mbid_count: 5 + entity: entity + properties: + count: + type: integer + entity: + type: string + last_updated: + type: integer + mbids: + items: + $ref: "#/components/schemas/recordingRecommendations_payload_mbids_inner" + type: array + model_id: + type: string + model_url: + type: string + offset: + type: integer + total_mbid_count: + type: integer + user_name: + type: string + required: + - count + - entity + - last_updated + - mbids + - model_id + - model_url + - offset + - total_mbid_count + - user_name + type: object + feedbackGivenBy_feedback_inner: + example: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created: 6 + rating: rating + properties: + created: + type: integer + rating: + type: string + recording_mbid: + format: uuid + type: string + type: object + freshReleases_payload_releases_inner: + example: + artist_credit_name: artist_credit_name + listen_count: 0 + release_name: release_name + release_date: release_date + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_tags: + - key: release_tags + - key: release_tags + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_primary_type: release_group_primary_type + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_credit_name: + type: string + artist_mbids: + items: + format: uuid + type: string + type: array + listen_count: + type: integer + release_date: + type: string + release_group_mbid: + format: uuid + type: string + release_group_primary_type: + type: string + release_mbid: + format: uuid + type: string + release_name: + type: string + release_tags: + items: + additionalProperties: + type: string + type: object + type: array + type: object + freshReleases_payload: + example: + total_count: 6 + releases: + - artist_credit_name: artist_credit_name + listen_count: 0 + release_name: release_name + release_date: release_date + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_tags: + - key: release_tags + - key: release_tags + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_primary_type: release_group_primary_type + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 0 + release_name: release_name + release_date: release_date + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_tags: + - key: release_tags + - key: release_tags + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_primary_type: release_group_primary_type + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + releases: + items: + $ref: "#/components/schemas/freshReleases_payload_releases_inner" + type: array + total_count: + type: integer + required: + - releases + - total_count + type: object + color_payload_releases_inner_recordings_inner_track_metadata_additional_info: + example: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbids: + items: + format: uuid + type: string + type: array + recording_mbid: + format: uuid + type: string + release_mbid: + format: uuid + type: string + required: + - artist_mbids + - recording_mbid + - release_mbid + type: object + color_payload_releases_inner_recordings_inner_track_metadata: + example: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + properties: + additional_info: + $ref: "#/components/schemas/color_payload_releases_inner_recordings_inner_track_metadata_additional_info" + artist_name: + type: string + release_name: + type: string + track_name: + type: string + required: + - additional_info + - artist_name + - release_name + - track_name + type: object + color_payload_releases_inner_recordings_inner: + example: + track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + properties: + track_metadata: + $ref: "#/components/schemas/color_payload_releases_inner_recordings_inner_track_metadata" + type: object + color_payload_releases_inner: + example: + caa_id: 0 + color: + - 6 + - 6 + release_name: release_name + artist_name: artist_name + recordings: + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + dist: 1 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_name: + type: string + caa_id: + type: integer + color: + items: + type: integer + type: array + dist: + type: integer + recordings: + items: + $ref: "#/components/schemas/color_payload_releases_inner_recordings_inner" + type: array + release_mbid: + format: uuid + type: string + release_name: + type: string + type: object + color_payload: + example: + releases: + - caa_id: 0 + color: + - 6 + - 6 + release_name: release_name + artist_name: artist_name + recordings: + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + dist: 1 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - caa_id: 0 + color: + - 6 + - 6 + release_name: release_name + artist_name: artist_name + recordings: + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + - track_metadata: + release_name: release_name + additional_info: + recording_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + track_name: track_name + dist: 1 + release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + releases: + items: + $ref: "#/components/schemas/color_payload_releases_inner" + type: array + required: + - releases + type: object + lbRadio_payload: + example: + feedback: + - feedback + - feedback + jspf: + playlist: + annotation: annotation + date: date + duration: 5 + identifier: identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#playlist: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + album: album + title: title + track: + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + - duration: 5 + identifier: + - identifier + - identifier + creator: creator + extension: + https://musicbrainz.org/doc/jspf#track: + added_at: added_at + added_by: added_by + release_identifier: release_identifier + artist_identifiers: + - artist_identifiers + - artist_identifiers + additional_metadata: + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + join_phrase: join_phrase + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + album: album + title: title + properties: + feedback: + items: + type: string + type: array + jspf: + $ref: "#/components/schemas/createPlaylist_request" + required: + - feedback + - jspf + type: object + releaseGroups_inner_artists_inner: + example: + artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artist_mbid: + format: uuid + type: string + artist_name: + type: string + artist_credit_name: + type: string + listen_count: + type: integer + join_phrase: + type: string + type: object + releaseGroups_inner: + example: + listen_count: 7 + caa_id: 2 + artists: + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - artist_credit_name: artist_credit_name + listen_count: 5 + join_phrase: join_phrase + artist_name: artist_name + artist_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artist_name: artist_name + release_group_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + caa_release_mbid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + release_group_name: release_group_name + artist_mbids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + artists: + items: + $ref: "#/components/schemas/releaseGroups_inner_artists_inner" + type: array + artist_mbids: + items: + format: uuid + type: string + type: array + artist_name: + type: string + caa_id: + type: integer + caa_release_mbid: + format: uuid + type: string + listen_count: + type: integer + release_group_mbid: + format: uuid + type: string + release_group_name: + type: string + type: object + playlistExtensionPayload_additional_metadata_algorithm_metadata: + example: + source_patch: source_patch + properties: + source_patch: + type: string + type: object + playlistExtensionPayload_additional_metadata: + additionalProperties: + type: string + example: + algorithm_metadata: + source_patch: source_patch + properties: + algorithm_metadata: + $ref: "#/components/schemas/playlistExtensionPayload_additional_metadata_algorithm_metadata" + type: object + playlistExtensionPayload: + example: + creator: creator + created_for: created_for + public: true + collaborators: + - collaborators + - collaborators + copied_from: copied_from + copied_from_deleted: true + last_modified_at: last_modified_at + additional_metadata: + algorithm_metadata: + source_patch: source_patch + properties: + created_for: + type: string + creator: + type: string + collaborators: + items: + type: string + type: array + copied_from: + type: string + copied_from_deleted: + type: boolean + public: + type: boolean + last_modified_at: + type: string + additional_metadata: + $ref: "#/components/schemas/playlistExtensionPayload_additional_metadata" + title: playlistExtensionPayload + type: object + securitySchemes: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey diff --git a/composeApp/src/androidJvmMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeDownloader.kt b/composeApp/src/androidJvmMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeDownloader.kt new file mode 100644 index 00000000..afb9b395 --- /dev/null +++ b/composeApp/src/androidJvmMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeDownloader.kt @@ -0,0 +1,166 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.newpipe + +import androidx.datastore.core.DataStore +import androidx.datastore.preferences.core.PreferenceDataStoreFactory +import androidx.datastore.preferences.core.Preferences +import androidx.datastore.preferences.core.edit +import androidx.datastore.preferences.core.stringPreferencesKey +import dev.krtirtho.spotube.core.paths.Paths +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.runBlocking +import kotlinx.serialization.json.Json +import okhttp3.Cookie +import okhttp3.CookieJar +import okhttp3.HttpUrl +import okhttp3.OkHttpClient +import okhttp3.RequestBody.Companion.toRequestBody +import okio.Path.Companion.toPath +import org.schabi.newpipe.extractor.NewPipe +import org.schabi.newpipe.extractor.downloader.Downloader +import org.schabi.newpipe.extractor.downloader.Request +import org.schabi.newpipe.extractor.downloader.Response +import java.util.concurrent.TimeUnit + +class NewPipeDownloader(private val cookieJar: PersistentCookieJar) : Downloader() { + private val client: OkHttpClient = OkHttpClient.Builder() + .readTimeout(30, TimeUnit.SECONDS) + .connectTimeout(30, TimeUnit.SECONDS) + .cookieJar(cookieJar) + .build() + + override fun execute(request: Request): Response { + val httpMethod = request.httpMethod() + val url = request.url() + val headers = request.headers() + val dataToSend = request.dataToSend() + + val requestBuilder = okhttp3.Request.Builder() + .method(httpMethod, dataToSend?.toRequestBody()) + .url(url) + + headers.forEach { (key, values) -> + values.forEach { value -> requestBuilder.addHeader(key, value) } + } + + if (!headers.containsKey("User-Agent") && !headers.containsKey("user-agent")) { + requestBuilder.addHeader( + "User-Agent", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" + ) + } + + val response = client.newCall(requestBuilder.build()).execute() + val responseBody = response.body.string() + val latestUrl = response.request.url.toString() + + return Response( + response.code, + response.message, + response.headers.toMultimap(), + responseBody, + latestUrl + ) + } + + companion object { + private var instance: NewPipeDownloader? = null + + fun init(paths: Paths) { + val cookieJar = PersistentCookieJar(paths) + instance = NewPipeDownloader(cookieJar) + NewPipe.init(instance) + } + } +} + +class PersistentCookieJar(private val paths: Paths) : CookieJar { + private val cookieStore = mutableMapOf>() + private val dataStore: DataStore = PreferenceDataStoreFactory.createWithPath( + produceFile = { "${paths.getApplicationDataDirPath()}/spotube_cookies.preferences_pb".toPath() } + ) + + init { + loadCookies() + } + + private fun loadCookies() { + runBlocking { + val prefs = dataStore.data.first() + val json = prefs[stringPreferencesKey("newpipe_cookies")] ?: return@runBlocking + try { + val serialized: Map> = Json.decodeFromString(json) + serialized.forEach { (host, cookieStrings) -> + cookieStore[host] = cookieStrings.mapNotNull { s -> + runCatching { + Cookie.parse( + HttpUrl.Builder().scheme("https").host(host).build(), s + ) + }.getOrNull() + }.toMutableList() + } + } catch (e: Exception) { + cookieStore.clear() + } + } + } + + private fun saveCookies() { + runBlocking { + dataStore.edit { prefs -> + val serialized = cookieStore.mapValues { (_, cookies) -> + cookies.map { cookie -> + "${cookie.name}=${cookie.value}; domain=${cookie.domain}; path=${cookie.path}; ${if (cookie.secure) "Secure" else ""}; ${if (cookie.httpOnly) "HttpOnly" else ""}" + } + } + prefs[stringPreferencesKey("newpipe_cookies")] = Json.encodeToString(serialized) + } + } + } + + override fun saveFromResponse(url: HttpUrl, cookies: List) { + val host = url.host + val hostCookies = cookieStore.getOrPut(host) { mutableListOf() } + + for (newCookie in cookies) { + val existingIndex = + hostCookies.indexOfFirst { it.name == newCookie.name && it.path == newCookie.path } + if (existingIndex >= 0) { + hostCookies[existingIndex] = newCookie + } else { + hostCookies.add(newCookie) + } + } + + hostCookies.removeAll { it.expiresAt < System.currentTimeMillis() } + + saveCookies() + } + + override fun loadForRequest(url: HttpUrl): List { + val host = url.host + val hostCookies = cookieStore[host] ?: return emptyList() + + val validCookies = hostCookies.filter { cookie -> + cookie.matches(url) && cookie.expiresAt >= System.currentTimeMillis() + } + + return validCookies + } +} diff --git a/composeApp/src/androidJvmMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.androidJvm.kt b/composeApp/src/androidJvmMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.androidJvm.kt new file mode 100644 index 00000000..cf8dd550 --- /dev/null +++ b/composeApp/src/androidJvmMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.androidJvm.kt @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.newpipe + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioStream +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.StreamProtocol +import io.ktor.http.Url +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import org.schabi.newpipe.extractor.ServiceList.YouTube +import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory +import org.schabi.newpipe.extractor.stream.StreamInfoItem + + +actual class NewPipeService { + actual suspend fun searchVideos(query: String): List { + return withContext(Dispatchers.IO) { + val extractor = YouTube.getSearchExtractor( + query, + mutableListOf(YoutubeSearchQueryHandlerFactory.MUSIC_SONGS), + "" + ) + extractor.fetchPage() + val results = extractor.initialPage + + results.items.mapNotNull { item -> + if (item is StreamInfoItem) { + VideoSearchResult( + id = Url(item.url).parameters["v"] + ?: throw IllegalArgumentException("Invalid YouTube URL: ${item.url}"), + title = item.name, + url = item.url, + uploader = item.uploaderName, + durationMs = item.duration, + thumbnailUrl = item.thumbnails.first().url, + ) + } else { + null + } + } + } + } + + actual suspend fun getVideoInfo(id: String): VideoInfo { + return withContext(Dispatchers.IO) { + val extractor = YouTube.getStreamExtractor("https://www.youtube.com/watch?v=$id") + extractor.fetchPage() + + val audioStreams = extractor.audioStreams + .mapNotNull { stream -> + AudioStream.Lossy( + url = stream.content, + codec = stream.codec, + container = stream.format!!.suffix, + bitrate = stream.bitrate, + ) + } + buildList { + if (extractor.dashMpdUrl.isNotBlank()) add( + AudioStream.Lossy( + url = extractor.dashMpdUrl, + codec = "aac", + container = "mp4", + bitrate = 128_000, + protocol = StreamProtocol.DASH + ) + ) + if (extractor.hlsUrl.isNotBlank()) add( + AudioStream.Lossy( + url = extractor.hlsUrl, + codec = "aac", + container = "mp4", + bitrate = 128_000, + protocol = StreamProtocol.HLS + ) + ) + } + + + val videoStreams = extractor.videoStreams + .filter { stream -> stream.isUrl && stream.format != null } + .map { stream -> + AudioStream.Lossy( + url = stream.content, + codec = stream.codec, + bitrate = stream.bitrate, + container = stream.format!!.suffix, + ) + } + VideoInfo( + id = id, + title = extractor.name, + url = extractor.url, + uploader = extractor.uploaderName, + durationMs = extractor.length, + thumbnailUrl = extractor.thumbnails.first().url, + // fallback to video streams if no audio streams are available + audioStreams = audioStreams.ifEmpty { + videoStreams + }, + videoStreams = videoStreams + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml new file mode 100644 index 00000000..1ee6b8ae --- /dev/null +++ b/composeApp/src/androidMain/AndroidManifest.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MainActivity.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MainActivity.kt new file mode 100644 index 00000000..f6c099fc --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MainActivity.kt @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import dev.krtirtho.spotube.core.newpipe.NewPipeDownloader +import dev.krtirtho.spotube.core.paths.Paths +import io.github.vinceglb.filekit.FileKit +import io.github.vinceglb.filekit.dialogs.init + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + enableEdgeToEdge() + super.onCreate(savedInstanceState) + FileKit.init(this) + NewPipeDownloader.init(Paths(this)) + setContent { + App() + } + } +} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MyApplication.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MyApplication.kt new file mode 100644 index 00000000..306e4433 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MyApplication.kt @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import android.app.Application +import android.content.Intent +import android.os.Build +import dev.krtirtho.spotube.core.di.initKoin +import dev.krtirtho.spotube.media.PlaybackService +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import org.koin.android.ext.koin.androidContext +import org.koin.core.component.KoinComponent + +class MyApplication : Application(), KoinComponent { + private val appScope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + + override fun onCreate() { + super.onCreate() + initKoin { + androidContext(this@MyApplication) + } + val intent = Intent(this, PlaybackService::class.java) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + startForegroundService(intent) + } else { + startService(intent) + } + } + + override fun onTerminate() { + appScope.cancel() + super.onTerminate() + } +} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/Platform.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/Platform.android.kt new file mode 100644 index 00000000..e06110d6 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/Platform.android.kt @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import android.os.Build + +class AndroidPlatform : Platform { + override val name: String = "Android ${Build.VERSION.SDK_INT}" + override val type: PlatformType = PlatformType.Android +} + +actual fun getPlatform(): Platform = AndroidPlatform() \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.android.kt new file mode 100644 index 00000000..9e65bd91 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.android.kt @@ -0,0 +1,396 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import android.content.Context +import android.content.Intent +import android.os.Build +import androidx.media3.common.AudioAttributes +import androidx.media3.common.C +import androidx.media3.common.MediaMetadata +import androidx.media3.common.PlaybackException +import androidx.media3.common.Player +import androidx.media3.exoplayer.ExoPlayer +import dev.krtirtho.spotube.media.PlaybackService +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.isActive +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +actual class AudioPlayer actual constructor(context: Any) { + + actual val context: Any = context + + private val appContext: Context = (context as Context).applicationContext + + private fun ensureServiceStarted() { + val intent = Intent(appContext, PlaybackService::class.java) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + appContext.startForegroundService(intent) + } else { + appContext.startService(intent) + } + } + + private val exoPlayer: ExoPlayer = ExoPlayer.Builder(appContext) + .setAudioAttributes( + AudioAttributes.Builder() + .setContentType(C.AUDIO_CONTENT_TYPE_MUSIC) + .setUsage(C.USAGE_MEDIA) + .build(), + true + ) + .setHandleAudioBecomingNoisy(true) + .build() + + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main) + + private var disposed = false + + private val currentPlaylist = mutableListOf() + private val urlIndexMap = mutableMapOf() + + private val _playerState = MutableStateFlow(PlayerState.IDLE) + private val _currentMediaItem = MutableStateFlow(null) + private val _playlist = MutableStateFlow>(emptyList()) + private val _duration = MutableStateFlow(Duration.ZERO) + private val _position = MutableStateFlow(Duration.ZERO) + private val _bufferingPosition = MutableStateFlow(Duration.ZERO) + private val _loopState = MutableStateFlow(LoopState.NONE) + private val _shuffleMode = MutableStateFlow(false) + private val _playbackSpeed = MutableStateFlow(1.0f) + private val _volume = MutableStateFlow(1.0f) + private val _completion = MutableSharedFlow(extraBufferCapacity = 1) + private val _error = MutableSharedFlow(extraBufferCapacity = 1) + + actual val playerStateFlow: StateFlow = _playerState.asStateFlow() + actual val currentMediaItemFlow: StateFlow = _currentMediaItem.asStateFlow() + actual val playlistFlow: StateFlow> = _playlist.asStateFlow() + actual val durationFlow: StateFlow = _duration.asStateFlow() + actual val positionFlow: StateFlow = _position.asStateFlow() + actual val bufferingPositionFlow: StateFlow = _bufferingPosition.asStateFlow() + actual val loopStateFlow: StateFlow = _loopState.asStateFlow() + actual val shuffleModeFlow: StateFlow = _shuffleMode.asStateFlow() + actual val playbackSpeedFlow: StateFlow = _playbackSpeed.asStateFlow() + actual val volumeFlow: StateFlow = _volume.asStateFlow() + actual val completionFlow: Flow = _completion.asSharedFlow() + actual val errorFlow: Flow = _error.asSharedFlow() + + private var lastPlaybackState = Player.STATE_IDLE + + init { + exoPlayer.addListener(object : Player.Listener { + override fun onPlaybackStateChanged(playbackState: Int) { + syncPlaybackState(playbackState) + } + + override fun onPlayWhenReadyChanged(playWhenReady: Boolean, reason: Int) { + syncPlayWhenReady(playWhenReady) + } + + override fun onMediaItemTransition(mediaItem: androidx.media3.common.MediaItem?, reason: Int) { + syncCurrentItem() + } + + override fun onPlayerError(error: PlaybackException) { + _error.tryEmit(error) + } + + override fun onRepeatModeChanged(repeatMode: Int) { + _loopState.tryEmit( + when (repeatMode) { + Player.REPEAT_MODE_OFF -> LoopState.NONE + Player.REPEAT_MODE_ONE -> LoopState.ONE + Player.REPEAT_MODE_ALL -> LoopState.ALL + else -> LoopState.NONE + } + ) + } + + override fun onShuffleModeEnabledChanged(shuffleModeEnabled: Boolean) { + _shuffleMode.tryEmit(shuffleModeEnabled) + } + + override fun onVolumeChanged(volume: Float) { + _volume.tryEmit(volume) + } + }) + + scope.launch { + while (isActive && !disposed) { + _position.tryEmit(exoPlayer.currentPosition.milliseconds) + _duration.tryEmit( + if (exoPlayer.duration > 0) exoPlayer.duration.milliseconds else Duration.ZERO + ) + _bufferingPosition.tryEmit(exoPlayer.bufferedPosition.milliseconds) + delay(250) + } + } + } + + private fun syncPlaybackState(playbackState: Int) { + if (playbackState == Player.STATE_ENDED && lastPlaybackState != Player.STATE_ENDED) { + _completion.tryEmit(Unit) + _playerState.tryEmit(PlayerState.COMPLETED) + } + lastPlaybackState = playbackState + if (playbackState != Player.STATE_ENDED) { + syncPlayWhenReady(exoPlayer.playWhenReady) + } + } + + private fun syncPlayWhenReady(playWhenReady: Boolean) { + val state = when { + exoPlayer.playbackState == Player.STATE_IDLE -> PlayerState.IDLE + exoPlayer.playbackState == Player.STATE_BUFFERING -> PlayerState.BUFFERING + playWhenReady -> PlayerState.PLAYING + else -> PlayerState.PAUSED + } + _playerState.tryEmit(state) + } + + private fun syncCurrentItem() { + val index = exoPlayer.currentMediaItemIndex + _currentMediaItem.tryEmit( + if (index in currentPlaylist.indices) currentPlaylist[index] else null + ) + } + + internal val player: ExoPlayer get() = exoPlayer + + private fun MediaItem.toExoMediaItem(): androidx.media3.common.MediaItem { + return androidx.media3.common.MediaItem.Builder() + .setMediaId(url) + .setUri(url) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(title) + .setArtist(artist) + .setAlbumTitle(album) + .apply { + if (coverURL.isNotBlank()) { + setArtworkUri(android.net.Uri.parse(coverURL)) + } + } + .build() + ) + .build() + } + + actual suspend fun play() { + withContext(Dispatchers.Main) { + ensureServiceStarted() + exoPlayer.play() + } + } + + actual suspend fun pause() { + withContext(Dispatchers.Main) { + exoPlayer.pause() + } + } + + actual suspend fun stop() { + withContext(Dispatchers.Main) { + exoPlayer.stop() + _playerState.tryEmit(PlayerState.IDLE) + } + } + + actual suspend fun seekTo(position: Duration) { + withContext(Dispatchers.Main) { + val targetMs = position.inWholeMilliseconds.coerceIn(0, exoPlayer.duration) + exoPlayer.seekTo(targetMs) + _position.tryEmit(exoPlayer.currentPosition.milliseconds) + } + } + + actual suspend fun loop(state: LoopState) { + withContext(Dispatchers.Main) { + val repeatMode = when (state) { + LoopState.NONE -> Player.REPEAT_MODE_OFF + LoopState.ONE -> Player.REPEAT_MODE_ONE + LoopState.ALL -> Player.REPEAT_MODE_ALL + } + exoPlayer.repeatMode = repeatMode + _loopState.tryEmit(state) + } + } + + actual suspend fun shuffle(enabled: Boolean) { + withContext(Dispatchers.Main) { + exoPlayer.shuffleModeEnabled = enabled + _shuffleMode.tryEmit(enabled) + } + } + + actual suspend fun load( + playlist: List, + autoPlay: Boolean, + startPosition: Int + ) { + withContext(Dispatchers.Main) { + currentPlaylist.clear() + currentPlaylist.addAll(playlist) + urlIndexMap.clear() + playlist.forEachIndexed { index, item -> + urlIndexMap[item.url] = index + } + _playlist.tryEmit(currentPlaylist.toList()) + + if (playlist.isEmpty()) { + _playerState.tryEmit(PlayerState.IDLE) + _currentMediaItem.tryEmit(null) + _position.tryEmit(Duration.ZERO) + _duration.tryEmit(Duration.ZERO) + return@withContext + } + + val exoItems = playlist.map { it.toExoMediaItem() } + val safeIndex = startPosition.coerceIn(0, exoItems.lastIndex) + + exoPlayer.setMediaItems(exoItems, safeIndex, 0L) + exoPlayer.prepare() + + if (autoPlay) { + ensureServiceStarted() + exoPlayer.playWhenReady = true + } + + _currentMediaItem.tryEmit(playlist[safeIndex]) + } + } + + actual suspend fun addMediaItem(mediaItem: MediaItem) { + withContext(Dispatchers.Main) { + currentPlaylist.add(mediaItem) + urlIndexMap[mediaItem.url] = currentPlaylist.lastIndex + _playlist.tryEmit(currentPlaylist.toList()) + exoPlayer.addMediaItem(mediaItem.toExoMediaItem()) + } + } + + actual suspend fun insertMediaItemAtNextIndex(mediaItem: MediaItem) { + withContext(Dispatchers.Main) { + val currentIndex = exoPlayer.currentMediaItemIndex + val insertIndex = (currentIndex + 1).coerceAtMost(currentPlaylist.size) + + currentPlaylist.add(insertIndex, mediaItem) + urlIndexMap.clear() + currentPlaylist.forEachIndexed { index, item -> + urlIndexMap[item.url] = index + } + _playlist.tryEmit(currentPlaylist.toList()) + + exoPlayer.addMediaItem(insertIndex, mediaItem.toExoMediaItem()) + } + } + + actual suspend fun removeMediaItem(mediaItem: MediaItem) { + withContext(Dispatchers.Main) { + val index = urlIndexMap[mediaItem.url] ?: return@withContext + currentPlaylist.removeAt(index) + urlIndexMap.clear() + currentPlaylist.forEachIndexed { i, item -> + urlIndexMap[item.url] = i + } + _playlist.tryEmit(currentPlaylist.toList()) + exoPlayer.removeMediaItem(index) + } + } + + actual suspend fun moveMediaItem(fromIndex: Int, toIndex: Int) { + withContext(Dispatchers.Main) { + if (fromIndex !in currentPlaylist.indices || toIndex !in currentPlaylist.indices || fromIndex == toIndex) return@withContext + + val item = currentPlaylist.removeAt(fromIndex) + currentPlaylist.add(toIndex, item) + urlIndexMap.clear() + currentPlaylist.forEachIndexed { i, it -> + urlIndexMap[it.url] = i + } + _playlist.tryEmit(currentPlaylist.toList()) + + exoPlayer.moveMediaItem(fromIndex, toIndex) + } + } + + actual suspend fun skipToNext() { + withContext(Dispatchers.Main) { + exoPlayer.seekToNextMediaItem() + } + } + + actual suspend fun skipToPrevious() { + withContext(Dispatchers.Main) { + exoPlayer.seekToPreviousMediaItem() + } + } + + actual suspend fun jumpTo(index: Int) { + withContext(Dispatchers.Main) { + if (index in currentPlaylist.indices) { + exoPlayer.seekToDefaultPosition(index) + } + } + } + + actual suspend fun setVolume(volume: Float) { + withContext(Dispatchers.Main) { + val clamped = volume.coerceIn(0f, 1f) + exoPlayer.setVolume(clamped) + _volume.tryEmit(clamped) + } + } + + actual suspend fun setPlaybackSpeed(speed: Float) { + withContext(Dispatchers.Main) { + val clamped = speed.coerceIn(0.25f, 4f) + exoPlayer.setPlaybackSpeed(clamped) + _playbackSpeed.tryEmit(clamped) + } + } + + actual fun isDisposed(): Boolean = disposed + + actual fun dispose() { + disposed = true + exoPlayer.release() + currentPlaylist.clear() + urlIndexMap.clear() + + _playerState.tryEmit(PlayerState.IDLE) + _currentMediaItem.tryEmit(null) + _playlist.tryEmit(emptyList()) + _duration.tryEmit(Duration.ZERO) + _position.tryEmit(Duration.ZERO) + _bufferingPosition.tryEmit(Duration.ZERO) + } +} diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/di/Modules.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/di/Modules.android.kt new file mode 100644 index 00000000..7ce98069 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/di/Modules.android.kt @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.di + +import android.content.Context +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.core.share.AndroidShareService +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.media.MediaBrowseHelper +import dev.krtirtho.spotube.modules.library.local_tracks.media.AndroidLocalMediaDiscoveryService +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaDiscoveryService +import org.koin.dsl.module + +actual val platformModules = module { + single { Paths(get()) } + single { AudioPlayer(get()) } + single { AndroidLocalMediaDiscoveryService(get()) } + single { AndroidShareService(get()) } + single { + MediaBrowseHelper( + pluginManager = get(), + homeScreenRepository = get(), + libraryRepository = get(), + playlistRepository = get(), + albumRepository = get(), + savedTracksRepository = get(), + searchRepository = get(), + collectionPlaybackHelper = get(), + audioPlayerQueue = get(), + settingsRepository = get(), + ) + } +} diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.android.kt new file mode 100644 index 00000000..e8f172ce --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.android.kt @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.paths + +import android.content.Context +import android.os.Environment + +actual class Paths( + val context: Context +) { + actual fun getApplicationCacheDirPath(): String { + return context.cacheDir.absolutePath + } + + actual fun getApplicationDataDirPath(): String { + return context.filesDir.absolutePath + } + + actual fun getUserDownloadsDirPath(): String { + return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).absolutePath + java.io.File.separator + "Spotube" + } + + actual fun getMusicCacheDirPath(): String { + return context.cacheDir.absolutePath + "/music_cache" + } +} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/share/AndroidShareService.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/share/AndroidShareService.kt new file mode 100644 index 00000000..4624ff6d --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/share/AndroidShareService.kt @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.share + +import android.content.Context +import androidx.core.app.ShareCompat +import dev.krtirtho.spotube.core.share.ShareService + +class AndroidShareService(private val context: Context) : ShareService { + override fun share(url: String, title: String) { + ShareCompat.IntentBuilder(context) + .setType("text/plain") + .setSubject(title) + .setText(url) + .startChooser() + } +} diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.android.kt new file mode 100644 index 00000000..9fabbdfb --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.android.kt @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.webview + +import io.github.kdroidfilter.webview.web.WebViewState + +actual fun platformWebviewConfig(webView: WebViewState) { + webView.webView?.nativeWebView?.settings?.domStorageEnabled = true +} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.android.kt new file mode 100644 index 00000000..b05bcc5e --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.android.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import kotlinx.coroutines.asCoroutineDispatcher +import java.util.concurrent.Executors + +actual fun createZiplineDispatcher(): ZiplineDispatcher { + val executor = Executors.newSingleThreadExecutor { runnable -> + Thread(null, runnable, "Zipline", 8L * 1024 * 1024) // 8 MiB stack for QuickJS compile() + } + val dispatcher = executor.asCoroutineDispatcher() + return ZiplineDispatcher(dispatcher) { + dispatcher.close() + executor.shutdown() + } +} + diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/media/MediaBrowseHelper.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/media/MediaBrowseHelper.kt new file mode 100644 index 00000000..249f1808 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/media/MediaBrowseHelper.kt @@ -0,0 +1,605 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.media + +import android.net.Uri +import android.os.Bundle +import android.util.Log +import androidx.media3.common.MediaItem +import androidx.media3.common.MediaMetadata +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.modules.album.AlbumRepository +import dev.krtirtho.spotube.modules.home.HomeScreenRepository +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.playlist.PlaylistRepository +import dev.krtirtho.spotube.modules.plugin.PluginManager +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository +import dev.krtirtho.spotube.modules.search.SearchRepository +import dev.krtirtho.spotube.modules.settings.SettingsRepository +import kotlinx.coroutines.flow.first + +class MediaBrowseHelper( + private val pluginManager: PluginManager, + private val homeScreenRepository: HomeScreenRepository, + private val libraryRepository: LibraryRepository, + private val playlistRepository: PlaylistRepository, + private val albumRepository: AlbumRepository, + private val savedTracksRepository: SavedTracksRepository, + private val searchRepository: SearchRepository, + private val collectionPlaybackHelper: CollectionPlaybackHelper, + private val audioPlayerQueue: AudioPlayerQueue, + private val settingsRepository: SettingsRepository, +) { + + companion object { + const val MEDIA_ID_ROOT = "root" + const val MEDIA_ID_BROWSE = "browse" + const val MEDIA_ID_LIBRARY = "library" + const val MEDIA_ID_SAVED_PLAYLISTS = "library:playlists" + const val MEDIA_ID_SAVED_ALBUMS = "library:albums" + const val MEDIA_ID_SAVED_ARTISTS = "library:artists" + const val MEDIA_ID_SAVED_TRACKS = "library:tracks" + const val MEDIA_ID_PLAYLIST = "playlist" + const val MEDIA_ID_ALBUM = "album" + const val MEDIA_ID_ARTIST = "artist" + const val MEDIA_ID_ARTIST_TRACKS = "artist:tracks" + const val MEDIA_ID_ARTIST_ALBUMS = "artist:albums" + const val MEDIA_ID_TRACK = "track" + const val MEDIA_ID_QUEUE = "queue" + + private const val CONTENT_STYLE_BROWSABLE = "android.media.browse.CONTENT_STYLE_BROWSABLE_HINT" + private const val CONTENT_STYLE_GRID = 2 + private const val CONTENT_STYLE_GROUP_TITLE = "android.media.browse.CONTENT_STYLE_GROUP_TITLE_HINT" + } + + fun buildRootItem(): MediaItem { + return MediaItem.Builder() + .setMediaId(MEDIA_ID_ROOT) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Spotube") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build() + } + + suspend fun getChildren(parentId: String): List { + Log.d("MediaBrowseHelper", "Getting children for parentId: $parentId") + return when { + parentId == MEDIA_ID_ROOT -> buildRootChildren() + parentId == MEDIA_ID_BROWSE -> buildBrowseItems() + parentId == MEDIA_ID_LIBRARY -> buildLibraryRootChildren() + parentId == MEDIA_ID_SAVED_PLAYLISTS -> buildSavedPlaylistsItems() + parentId == MEDIA_ID_SAVED_ALBUMS -> buildSavedAlbumsItems() + parentId == MEDIA_ID_SAVED_ARTISTS -> buildSavedArtistsItems() + parentId == MEDIA_ID_SAVED_TRACKS -> buildSavedTracksItems() + parentId.startsWith("$MEDIA_ID_PLAYLIST:") -> { + val playlistId = parentId.removePrefix("$MEDIA_ID_PLAYLIST:") + buildPlaylistTracksItems(playlistId) + } + parentId.startsWith("$MEDIA_ID_ALBUM:") -> { + val albumId = parentId.removePrefix("$MEDIA_ID_ALBUM:") + buildAlbumTracksItems(albumId) + } + parentId.startsWith("$MEDIA_ID_ARTIST:") -> { + val artistId = parentId.removePrefix("$MEDIA_ID_ARTIST:") + buildArtistOverviewItems(artistId) + } + parentId.startsWith("$MEDIA_ID_ARTIST_TRACKS:") -> { + val artistId = parentId.removePrefix("$MEDIA_ID_ARTIST_TRACKS:") + buildArtistTracksItems(artistId) + } + parentId.startsWith("$MEDIA_ID_ARTIST_ALBUMS:") -> { + val artistId = parentId.removePrefix("$MEDIA_ID_ARTIST_ALBUMS:") + buildArtistAlbumsItems(artistId) + } + parentId == MEDIA_ID_QUEUE -> buildQueueItems() + else -> emptyList() + } + } + + suspend fun search(query: String): List { + val results = try { + searchRepository.searchAll(query) + } catch (_: Exception) { + return emptyList() + } + val items = mutableListOf() + for (result in results) { + val item = when (result) { + is MetadataSearchResult.Track -> + buildTrackMediaItem(result.data) + + is MetadataSearchResult.Album -> + buildAlbumMediaItem(result.data) + + is MetadataSearchResult.Artist -> + buildArtistMediaItem(result.data) + + is MetadataSearchResult.Playlist -> + buildPlaylistMediaItem(result.data) + + is MetadataSearchResult.User -> null + } + if (item != null) { + items.add(item) + } + } + return items + } + + suspend fun resolveTrackById(trackId: String): MetadataTrack? { + return getTrackById(trackId) + } + + suspend fun resolveTrackToMediaItem(trackId: String): MediaItem? { + val track = getTrackById(trackId) ?: return null + val url = buildStreamingUrl(track.id) ?: return null + return MediaItem.Builder() + .setMediaId("$MEDIA_ID_TRACK:${track.id}") + .setUri(url) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(track.title) + .setArtist(track.artists.joinToString(", ") { it.name }) + .setAlbumTitle(track.album?.title) + .setArtworkUri(track.album?.thumbnails?.firstOrNull()?.url?.let { Uri.parse(it) }) + .setTrackNumber(track.trackNumber) + .setIsPlayable(true) + .setIsBrowsable(false) + .build() + ) + .build() + } + + suspend fun resolveAndPlayTrack(track: MetadataTrack) { + val entry = QueueEntry.StreamingTrack(track = track, url = "") + audioPlayerQueue.load(listOf(entry), autoPlay = true, startPosition = 0) + } + + suspend fun resolveAndPlayFromMediaId(mediaId: String): Boolean { + return when { + mediaId.startsWith("$MEDIA_ID_TRACK:") -> { + val trackId = mediaId.removePrefix("$MEDIA_ID_TRACK:") + val track = getTrackById(trackId) ?: return false + resolveAndPlayTrack(track) + true + } + mediaId.startsWith("$MEDIA_ID_PLAYLIST:") -> { + val playlistId = mediaId.removePrefix("$MEDIA_ID_PLAYLIST:") + collectionPlaybackHelper.playPlaylist(playlistId) + true + } + mediaId.startsWith("$MEDIA_ID_ALBUM:") -> { + val albumId = mediaId.removePrefix("$MEDIA_ID_ALBUM:") + collectionPlaybackHelper.playAlbum(albumId) + true + } + mediaId == MEDIA_ID_SAVED_TRACKS -> { + collectionPlaybackHelper.playSavedTracks() + true + } + mediaId.startsWith("$MEDIA_ID_ARTIST_TRACKS:") -> { + val artistId = mediaId.removePrefix("$MEDIA_ID_ARTIST_TRACKS:") + playArtistTracks(artistId) + true + } + else -> false + } + } + + private fun buildRootChildren(): List { + val gridExtras = Bundle().apply { putInt(CONTENT_STYLE_BROWSABLE, CONTENT_STYLE_GRID) } + return listOf( + MediaItem.Builder() + .setMediaId(MEDIA_ID_BROWSE) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Browse") + .setIsBrowsable(true) + .setIsPlayable(false) + .setExtras(gridExtras) + .build() + ) + .build(), + MediaItem.Builder() + .setMediaId(MEDIA_ID_LIBRARY) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Library") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build(), + MediaItem.Builder() + .setMediaId(MEDIA_ID_QUEUE) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Now Playing") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build(), + ) + } + + private suspend fun buildBrowseItems(): List { + val featured = try { + homeScreenRepository.featuredItems() ?: emptyList() + } catch (_: Exception) { + emptyList() + } + + val sections = try { + homeScreenRepository.list()?.items ?: emptyList() + } catch (_: Exception) { + emptyList() + } + + val items = mutableListOf() + + if (featured.isNotEmpty()) { + for (item in featured) { + val mediaItem = browseItemToMediaItem(item) ?: continue + items.add(mediaItem.withGroupTitle("Featured")) + } + } + + for (section in sections) { + for (item in section.items) { + val mediaItem = browseItemToMediaItem( + when (item) { + is MetadataBrowseItem.Track -> item + is MetadataBrowseItem.Album -> item + is MetadataBrowseItem.Artist -> item + is MetadataBrowseItem.Playlist -> item + is MetadataBrowseItem.User -> null + } ?: continue + ) ?: continue + items.add(mediaItem.withGroupTitle(section.title)) + } + } + + return items + } + + private fun MediaItem.withGroupTitle(groupTitle: String): MediaItem { + val existingExtras = mediaMetadata.extras ?: Bundle() + existingExtras.putString(CONTENT_STYLE_GROUP_TITLE, groupTitle) + return buildUpon() + .setMediaMetadata( + mediaMetadata.buildUpon() + .setExtras(existingExtras) + .build() + ) + .build() + } + + private suspend fun buildLibraryRootChildren(): List { + return listOf( + MediaItem.Builder() + .setMediaId(MEDIA_ID_SAVED_PLAYLISTS) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Playlists") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build(), + MediaItem.Builder() + .setMediaId(MEDIA_ID_SAVED_ALBUMS) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Albums") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build(), + MediaItem.Builder() + .setMediaId(MEDIA_ID_SAVED_ARTISTS) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Artists") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build(), + MediaItem.Builder() + .setMediaId(MEDIA_ID_SAVED_TRACKS) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Saved Tracks") + .setIsPlayable(false) + .setIsBrowsable(true) + .build() + ) + .build(), + ) + } + + private suspend fun buildSavedPlaylistsItems(): List { + val result = try { + libraryRepository.savedPlaylists()?.items ?: emptyList() + } catch (_: Exception) { + emptyList() + } + return result.map { buildPlaylistMediaItem(it) } + } + + private suspend fun buildSavedAlbumsItems(): List { + val result = try { + libraryRepository.savedAlbums()?.items ?: emptyList() + } catch (_: Exception) { + emptyList() + } + return result.map { buildAlbumMediaItem(it) } + } + + private suspend fun buildSavedArtistsItems(): List { + val result = try { + libraryRepository.savedArtists()?.items ?: emptyList() + } catch (_: Exception) { + emptyList() + } + return result.map { buildArtistMediaItem(it) } + } + + private suspend fun buildSavedTracksItems(): List { + val allTracks = mutableListOf() + var pagination = savedTracksRepository.getSavedTracks() + pagination?.items?.let { allTracks.addAll(it) } + while (pagination?.nextPagination != null) { + pagination = savedTracksRepository.getSavedTracks(pagination.nextPagination) + pagination?.items?.let { allTracks.addAll(it) } + } + return allTracks.map { buildTrackMediaItem(it) } + } + + private suspend fun buildPlaylistTracksItems(playlistId: String): List { + val allTracks = mutableListOf() + var pagination = playlistRepository.getPlaylistTracks(playlistId) + pagination?.items?.let { allTracks.addAll(it) } + while (pagination?.nextPagination != null) { + pagination = playlistRepository.getPlaylistTracks(playlistId, pagination.nextPagination) + pagination?.items?.let { allTracks.addAll(it) } + } + return allTracks.map { buildTrackMediaItem(it) } + } + + private suspend fun buildAlbumTracksItems(albumId: String): List { + val allTracks = mutableListOf() + var pagination = albumRepository.getAlbumTracks(albumId) + pagination?.items?.let { allTracks.addAll(it) } + while (pagination?.nextPagination != null) { + pagination = albumRepository.getAlbumTracks(albumId, pagination.nextPagination) + pagination?.items?.let { allTracks.addAll(it) } + } + return allTracks.map { buildTrackMediaItem(it) } + } + + private suspend fun buildArtistOverviewItems(artistId: String): List { + return listOf( + MediaItem.Builder() + .setMediaId("$MEDIA_ID_ARTIST_TRACKS:$artistId") + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Top Tracks") + .setIsPlayable(false) + .setIsBrowsable(true) + .build() + ) + .build(), + MediaItem.Builder() + .setMediaId("$MEDIA_ID_ARTIST_ALBUMS:$artistId") + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle("Albums") + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build(), + ) + } + + private suspend fun buildArtistTracksItems(artistId: String): List { + val plugin = pluginManager.selectedMetadataPlugin.value ?: return emptyList() + val tracks = try { + pluginManager.withScope { + plugin.use { metadataArtistAPI.getArtistTop10Tracks(artistId) } + } + } catch (_: Exception) { + emptyList() + } + val items = mutableListOf() + for (track in tracks) { + val item = buildTrackMediaItem(track) + if (item != null) { + items.add(item) + } + } + return items + } + + private suspend fun buildArtistAlbumsItems(artistId: String): List { + val plugin = pluginManager.selectedMetadataPlugin.value ?: return emptyList() + val result = try { + pluginManager.withScope { + plugin.use { metadataArtistAPI.getArtistAlbums(artistId) } + } + } catch (_: Exception) { + null + } + return result?.items?.map { buildAlbumMediaItem(it) } ?: emptyList() + } + + private suspend fun buildQueueItems(): List { + val queue = audioPlayerQueue.queueFlow.value + val items = mutableListOf() + for (entry in queue) { + val item = when (entry) { + is QueueEntry.StreamingTrack -> buildTrackMediaItem(entry.track) + is QueueEntry.LocalTrack -> buildLocalTrackMediaItem(entry) + } + if (item != null) { + items.add(item) + } + } + return items + } + + private suspend fun playArtistTracks(artistId: String) { + val plugin = pluginManager.selectedMetadataPlugin.value ?: return + val tracks = try { + pluginManager.withScope { + plugin.use { metadataArtistAPI.getArtistTop10Tracks(artistId) } + } + } catch (_: Exception) { + return + } + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + if (entries.isNotEmpty()) { + audioPlayerQueue.load(entries, autoPlay = true, startPosition = 0) + } + } + + private suspend fun getTrackById(trackId: String): MetadataTrack? { + val plugin = pluginManager.selectedMetadataPlugin.value ?: return null + return try { + pluginManager.withScope { + plugin.use { metadataTrackAPI.getTrack(trackId) } + } + } catch (_: Exception) { + null + } + } + + private fun buildAlbumMediaItem(album: MetadataAlbum): MediaItem { + return MediaItem.Builder() + .setMediaId("$MEDIA_ID_ALBUM:${album.id}") + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(album.title) + .setArtist(album.artists.joinToString(", ") { it.name }) + .setArtworkUri(album.thumbnails.firstOrNull()?.url?.let { Uri.parse(it) }) + .setDescription(album.description) + .setMediaType(MediaMetadata.MEDIA_TYPE_ALBUM) + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build() + } + + private fun buildPlaylistMediaItem(playlist: MetadataPlaylist): MediaItem { + return MediaItem.Builder() + .setMediaId("$MEDIA_ID_PLAYLIST:${playlist.id}") + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(playlist.title) + .setArtist(playlist.owner?.displayName ?: playlist.owner?.username) + .setArtworkUri(playlist.thumbnails.firstOrNull()?.url?.let { Uri.parse(it) }) + .setDescription(playlist.description) + .setMediaType(MediaMetadata.MEDIA_TYPE_PLAYLIST) + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build() + } + + private fun buildTrackMediaItem(track: MetadataTrack): MediaItem { + return MediaItem.Builder() + .setMediaId("$MEDIA_ID_TRACK:${track.id}") + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(track.title) + .setArtist(track.artists.joinToString(", ") { it.name }) + .setAlbumTitle(track.album?.title) + .setArtworkUri(track.album?.thumbnails?.firstOrNull()?.url?.let { Uri.parse(it) }) + .setTrackNumber(track.trackNumber) + .setIsPlayable(true) + .setIsBrowsable(false) + .build() + ) + .build() + } + + private fun buildArtistMediaItem(artist: MetadataArtist): MediaItem { + return MediaItem.Builder() + .setMediaId("$MEDIA_ID_ARTIST:${artist.id}") + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(artist.name) + .setArtworkUri(artist.thumbnails.firstOrNull()?.url?.let { Uri.parse(it) }) + .setMediaType(MediaMetadata.MEDIA_TYPE_ARTIST) + .setIsBrowsable(true) + .setIsPlayable(false) + .build() + ) + .build() + } + + private fun buildLocalTrackMediaItem(localTrack: QueueEntry.LocalTrack): MediaItem { + return MediaItem.Builder() + .setMediaId(localTrack.url) + .setUri(localTrack.url) + .setMediaMetadata( + MediaMetadata.Builder() + .setTitle(localTrack.name) + .setArtist(localTrack.artists.joinToString(", ")) + .setAlbumTitle(localTrack.album) + .setIsPlayable(true) + .setIsBrowsable(false) + .build() + ) + .build() + } + + private suspend fun browseItemToMediaItem(item: MetadataBrowseItem): MediaItem? { + return when (item) { + is MetadataBrowseItem.Track -> buildTrackMediaItem(item.data) + is MetadataBrowseItem.Album -> buildAlbumMediaItem(item.data) + is MetadataBrowseItem.Artist -> buildArtistMediaItem(item.data) + is MetadataBrowseItem.Playlist -> buildPlaylistMediaItem(item.data) + is MetadataBrowseItem.User -> null + } + } + + private suspend fun buildStreamingUrl(trackId: String): String? { + val settings = settingsRepository.userSettings.first() + val port = settings.playbackProxyServerPort + if (port == 0) return null + return "http://127.0.0.1:$port/stream/$trackId" + } +} diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/media/PlaybackService.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/media/PlaybackService.kt new file mode 100644 index 00000000..45be4b51 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/media/PlaybackService.kt @@ -0,0 +1,391 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.media + +import android.annotation.SuppressLint +import android.app.NotificationChannel +import android.app.NotificationManager +import android.app.PendingIntent +import android.content.Intent +import android.os.Build +import android.util.Log +import androidx.annotation.OptIn +import androidx.media3.common.MediaItem as Media3MediaItem +import androidx.media3.common.Player +import androidx.media3.common.util.UnstableApi +import androidx.media3.session.LibraryResult +import androidx.media3.session.MediaLibraryService +import androidx.media3.session.MediaLibraryService.LibraryParams +import androidx.media3.session.MediaSession +import androidx.media3.session.SessionCommand +import androidx.media3.session.SessionCommands +import androidx.media3.session.SessionError +import com.google.common.collect.ImmutableList +import com.google.common.util.concurrent.Futures +import com.google.common.util.concurrent.ListenableFuture +import com.google.common.util.concurrent.SettableFuture +import dev.krtirtho.spotube.MainActivity +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject + +@OptIn(UnstableApi::class) +class PlaybackService : MediaLibraryService(), KoinComponent { + + private val audioPlayer: AudioPlayer by inject() + private val audioPlayerQueue: AudioPlayerQueue by inject() + private val mediaBrowseHelper: MediaBrowseHelper by inject() + private lateinit var librarySession: MediaLibrarySession + + private val serviceScope = CoroutineScope(SupervisorJob() + Dispatchers.IO) + + override fun onCreate() { + super.onCreate() + Log.i(TAG, "onCreate") + + createNotificationChannel() + + val sessionActivity = PendingIntent.getActivity( + this, + 0, + Intent(this, MainActivity::class.java).apply { + flags = Intent.FLAG_ACTIVITY_SINGLE_TOP + }, + PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE + ) + + librarySession = MediaLibrarySession.Builder(this, audioPlayer.player, LibrarySessionCallback()) + .setSessionActivity(sessionActivity) + .build() + + addSession(librarySession) + + Log.i(TAG, "Library session created") + } + + @SuppressLint("ObsoleteSdkInt") + private fun createNotificationChannel() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + val channel = NotificationChannel( + CHANNEL_ID, + "Playback", + NotificationManager.IMPORTANCE_LOW + ).apply { + description = "Media playback controls" + setShowBadge(false) + } + val manager = getSystemService(NotificationManager::class.java) + manager.createNotificationChannel(channel) + } + } + + override fun onGetSession(controllerInfo: MediaSession.ControllerInfo): MediaLibrarySession = librarySession + + override fun onDestroy() { + Log.i(TAG, "onDestroy") + removeSession(librarySession) + librarySession.release() + super.onDestroy() + } + + override fun onTaskRemoved(rootIntent: Intent?) { + pauseAllPlayersAndStopSelf() + } + + private inner class LibrarySessionCallback : MediaLibrarySession.Callback { + + override fun onConnect( + session: MediaSession, + controller: MediaSession.ControllerInfo + ): MediaSession.ConnectionResult { + val sessionCommands = SessionCommands.Builder() + .add(SessionCommand.COMMAND_CODE_LIBRARY_GET_CHILDREN) + .add(SessionCommand.COMMAND_CODE_LIBRARY_GET_ITEM) + .add(SessionCommand.COMMAND_CODE_LIBRARY_SEARCH) + .add(SessionCommand.COMMAND_CODE_LIBRARY_GET_SEARCH_RESULT) + .add(SessionCommand.COMMAND_CODE_LIBRARY_GET_LIBRARY_ROOT) + .add(SessionCommand.COMMAND_CODE_LIBRARY_SUBSCRIBE) + .add(SessionCommand.COMMAND_CODE_LIBRARY_UNSUBSCRIBE) + .build() + + val playerCommands = Player.Commands.Builder() + .addAllCommands() + .build() + + return MediaSession.ConnectionResult.accept( + sessionCommands, + playerCommands + ) + } + + override fun onGetLibraryRoot( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + params: LibraryParams? + ): ListenableFuture> { + return Futures.immediateFuture( + LibraryResult.ofItem(mediaBrowseHelper.buildRootItem(), params) + ) + } + + override fun onGetItem( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + mediaId: String + ): ListenableFuture> { + val future = SettableFuture.create>() + serviceScope.launch { + try { + val items = mediaBrowseHelper.getChildren(mediaId) + if (items.isEmpty()) { + future.set(LibraryResult.ofError(SessionError.ERROR_NOT_SUPPORTED)) + } else { + future.set(LibraryResult.ofItem(items.first(), null)) + } + } catch (e: Exception) { + Log.e(TAG, "onGetItem failed for $mediaId", e) + future.set(LibraryResult.ofError(SessionError.ERROR_UNKNOWN)) + } + } + return future + } + + override fun onGetChildren( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + parentId: String, + page: Int, + pageSize: Int, + params: LibraryParams? + ): ListenableFuture>> { + val future = SettableFuture.create>>() + serviceScope.launch { + try { + Log.d(TAG, "onGetChildren: parentId=$parentId, page=$page, pageSize=$pageSize") + val children = mediaBrowseHelper.getChildren(parentId) + val paged = if (pageSize in 1 until children.size) { + val start = page * pageSize + val end = minOf(start + pageSize, children.size) + if (start < children.size) children.subList(start, end) else emptyList() + } else { + children + } + Log.d(TAG, "onGetChildren: returning ${paged.size} items for $parentId") + future.set(LibraryResult.ofItemList(paged, params)) + } catch (e: Exception) { + Log.e(TAG, "onGetChildren failed for $parentId", e) + future.set(LibraryResult.ofError(SessionError.ERROR_UNKNOWN)) + } + } + return future + } + + override fun onSubscribe( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + parentId: String, + params: LibraryParams? + ): ListenableFuture> { + return Futures.immediateFuture(LibraryResult.ofVoid(params)) + } + + override fun onUnsubscribe( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + parentId: String + ): ListenableFuture> { + return Futures.immediateFuture(LibraryResult.ofVoid(null)) + } + + override fun onSearch( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + query: String, + params: LibraryParams? + ): ListenableFuture> { + val future = SettableFuture.create>() + serviceScope.launch { + try { + val results = mediaBrowseHelper.search(query) + Log.d(TAG, "onSearch: query=$query, got ${results.size} results") + session.notifySearchResultChanged(browser, query, results.size, params) + future.set(LibraryResult.ofVoid(params)) + } catch (e: Exception) { + Log.e(TAG, "onSearch failed for $query", e) + future.set(LibraryResult.ofError(SessionError.ERROR_UNKNOWN)) + } + } + return future + } + + override fun onGetSearchResult( + session: MediaLibrarySession, + browser: MediaSession.ControllerInfo, + query: String, + page: Int, + pageSize: Int, + params: LibraryParams? + ): ListenableFuture>> { + val future = SettableFuture.create>>() + serviceScope.launch { + try { + val results = mediaBrowseHelper.search(query) + val paged = if (pageSize in 1 until results.size) { + val start = page * pageSize + val end = minOf(start + pageSize, results.size) + if (start < results.size) results.subList(start, end) else emptyList() + } else { + results + } + Log.d(TAG, "onGetSearchResult: query=$query, page=$page, returning ${paged.size} items") + future.set(LibraryResult.ofItemList(paged, params)) + } catch (e: Exception) { + Log.e(TAG, "onGetSearchResult failed for $query", e) + future.set(LibraryResult.ofError(SessionError.ERROR_UNKNOWN)) + } + } + return future + } + + override fun onSetMediaItems( + session: MediaSession, + controller: MediaSession.ControllerInfo, + mediaItems: List, + startIndex: Int, + startPositionMs: Long + ): ListenableFuture { + val future = SettableFuture.create() + serviceScope.launch { + try { + handlePlaybackRequest(mediaItems, startIndex, startPositionMs) + val currentItems = buildCurrentMediaItemList() + future.set( + MediaSession.MediaItemsWithStartPosition( + currentItems, + startIndex, + startPositionMs + ) + ) + } catch (e: Exception) { + Log.e(TAG, "onSetMediaItems failed", e) + future.setException(e) + } + } + return future + } + + override fun onAddMediaItems( + session: MediaSession, + controller: MediaSession.ControllerInfo, + mediaItems: List + ): ListenableFuture> { + val future = SettableFuture.create>() + serviceScope.launch { + try { + val entries = mutableListOf() + for (item in mediaItems) { + val track = mediaBrowseHelper.resolveTrackById( + item.mediaId.removePrefix("${MediaBrowseHelper.MEDIA_ID_TRACK}:") + ) + if (track != null) { + entries.add(QueueEntry.StreamingTrack(track = track, url = "")) + } + } + if (entries.isNotEmpty()) { + audioPlayerQueue.addAllToQueue(entries) + } + future.set(buildCurrentMediaItemList()) + } catch (e: Exception) { + Log.e(TAG, "onAddMediaItems failed", e) + future.setException(e) + } + } + return future + } + } + + private suspend fun handlePlaybackRequest( + mediaItems: List, + startIndex: Int, + startPositionMs: Long + ) { + val firstItem = mediaItems.firstOrNull() + if (firstItem != null) { + val mediaId = firstItem.mediaId + when { + mediaId.startsWith("${MediaBrowseHelper.MEDIA_ID_PLAYLIST}:") -> { + val playlistId = mediaId.removePrefix("${MediaBrowseHelper.MEDIA_ID_PLAYLIST}:") + val helper: dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper by inject() + helper.playPlaylist(playlistId) + return + } + mediaId.startsWith("${MediaBrowseHelper.MEDIA_ID_ALBUM}:") -> { + val albumId = mediaId.removePrefix("${MediaBrowseHelper.MEDIA_ID_ALBUM}:") + val helper: dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper by inject() + helper.playAlbum(albumId) + return + } + mediaId == MediaBrowseHelper.MEDIA_ID_SAVED_TRACKS -> { + val helper: dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper by inject() + helper.playSavedTracks() + return + } + mediaId.startsWith("${MediaBrowseHelper.MEDIA_ID_ARTIST_TRACKS}:") -> { + mediaBrowseHelper.resolveAndPlayFromMediaId(mediaId) + return + } + } + } + + val entries = mutableListOf() + for (item in mediaItems) { + val track = mediaBrowseHelper.resolveTrackById( + item.mediaId.removePrefix("${MediaBrowseHelper.MEDIA_ID_TRACK}:") + ) + if (track != null) { + entries.add(QueueEntry.StreamingTrack(track = track, url = "")) + } + } + if (entries.isNotEmpty()) { + audioPlayerQueue.load(entries, autoPlay = true, startPosition = startIndex) + } + } + + private fun buildCurrentMediaItemList(): List { + val count = audioPlayer.player.mediaItemCount + val items = mutableListOf() + for (i in 0 until count) { + val item = audioPlayer.player.getMediaItemAt(i) + if (item != null) { + items.add(item) + } + } + return items + } + + companion object { + private const val TAG = "PlaybackService" + private const val CHANNEL_ID = "spotube_playback" + } +} diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/AndroidLocalMediaDiscoveryService.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/AndroidLocalMediaDiscoveryService.kt new file mode 100644 index 00000000..228b7daf --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/AndroidLocalMediaDiscoveryService.kt @@ -0,0 +1,363 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import android.Manifest +import android.content.Context +import android.content.pm.PackageManager +import android.database.ContentObserver +import android.os.Build +import android.os.Environment +import android.os.Handler +import android.os.Looper +import android.provider.MediaStore +import dev.krtirtho.spotube.core.di.injectLogger +import org.koin.core.component.KoinComponent +import java.io.File +import java.util.Locale + +class AndroidLocalMediaDiscoveryService( + private val context: Context, +) : LocalMediaDiscoveryService, KoinComponent { + val logger by injectLogger() + + override suspend fun discoverFolders(roots: List): List { + logger.i { "discoverFolders: start roots=${roots.size}" } + if (!hasReadPermission()) { + logger.w { "discoverFolders: missing media permission, returning empty result" } + return emptyList() + } + + val tracksByFolder = linkedMapOf>() + val resolver = context.contentResolver + val collection = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI + var totalRows = 0 + var acceptedRows = 0 + var skippedNonAudioRows = 0 + var unknownFolderRows = 0 + var nullCursor = false + + val projection = arrayOf( + MediaStore.Audio.Media._ID, + MediaStore.Audio.Media.DISPLAY_NAME, + MediaStore.Audio.Media.TITLE, + MediaStore.Audio.Media.ARTIST, + MediaStore.Audio.Media.ALBUM, + MediaStore.Audio.Media.DURATION, + MediaStore.Audio.Media.MIME_TYPE, + ) + if (Build.VERSION.SDK_INT >= 29) { + arrayOf(MediaStore.Audio.Media.RELATIVE_PATH) + } else { + emptyArray() + } + + val sortOrder = "${MediaStore.Audio.Media.DATE_ADDED} DESC" + + logger.d { "discoverFolders: querying MediaStore with collection=${collection} projection=${projection.joinToString()} sortOrder=$sortOrder" } + + resolver.query(collection, projection, null, null, sortOrder)?.use { cursor -> + val idCol = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media._ID) + val displayNameCol = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DISPLAY_NAME) + val titleCol = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE) + val artistCol = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST) + val albumCol = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM) + val durationCol = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION) + val mimeTypeCol = cursor.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE) + val relativePathCol = cursor.getColumnIndex(MediaStore.Audio.Media.RELATIVE_PATH) + + logger.d { + "discoverFolders: query ok columns(mimeType=$mimeTypeCol, relativePath=$relativePathCol)" + } + + while (cursor.moveToNext()) { + totalRows += 1 + val id = cursor.getLong(idCol) + val uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI.buildUpon() + .appendPath(id.toString()) + .build() + .toString() + + val rawTitle = cursor.getString(titleCol).orEmpty().trim() + val displayName = cursor.getString(displayNameCol).orEmpty().trim() + val mimeType = if (mimeTypeCol >= 0) { + cursor.getString(mimeTypeCol).orEmpty().trim() + } else { + "" + } + if (!isAudioCandidate(displayName, mimeType)) { + skippedNonAudioRows += 1 + if (skippedNonAudioRows <= 5) { + logger.d { + "discoverFolders: skip row id=$id displayName=$displayName mimeType=$mimeType" + } + } + continue + } + + val relativePath = if (relativePathCol >= 0) { + cursor.getString(relativePathCol).orEmpty().trim() + } else { + "Unknown" + } + val folderPath = relativePath.ifBlank { "Unknown" } + if (folderPath == "Unknown") unknownFolderRows += 1 + val artist = cursor.getString(artistCol).orEmpty() + .takeUnless { it.equals("", true) } + val album = cursor.getString(albumCol).orEmpty().takeUnless { it.isBlank() } + val durationMs = cursor.getLong(durationCol).coerceAtLeast(0L) + + val name = rawTitle.ifBlank { + displayName.substringBeforeLast('.').takeIf { it.isNotBlank() } ?: displayName + } + + val track = LocalMediaTrack( + path = uri, + name = name.ifBlank { "Unknown track" }, + artists = listOfNotNull(artist), + durationMs = durationMs, + album = album, + coverBytes = null, + ) + + tracksByFolder.getOrPut(folderPath) { mutableListOf() }.add(track) + acceptedRows += 1 + } + } ?: run { + nullCursor = true + } + + if (nullCursor) { + logger.w { "discoverFolders: MediaStore query returned null cursor" } + } + + val mediaStoreFolders = tracksByFolder.entries + .map { (folderPath, tracks) -> + LocalMediaFolder( + path = folderPath, + name = normalizeFolderName(folderPath), + tracks = tracks.sortedBy { it.name.lowercase(Locale.getDefault()) }, + ) + } + .sortedBy { it.name.lowercase(Locale.getDefault()) } + + val fallbackFolders = discoverFileSystemFallback(roots) + val merged = mergeFolders(mediaStoreFolders, fallbackFolders) + + logger.i { + "discoverFolders: done folders=${merged.size} mediaStoreFolders=${mediaStoreFolders.size} fallbackFolders=${fallbackFolders.size} tracks=$acceptedRows totalRows=$totalRows skippedNonAudio=$skippedNonAudioRows unknownFolderRows=$unknownFolderRows" + } + + if (merged.isNotEmpty()) { + val preview = merged.take(3).joinToString { "${it.name}:${it.trackCount}" } + logger.d { "discoverFolders: folder preview=$preview" } + } + + return merged + } + + override fun observeChanges( + roots: List, + onChanged: LocalMediaChangeCallback, + ): LocalMediaObservation? { + logger.i { "observeChanges: start roots=${roots.size}" } + if (!hasReadPermission()) { + logger.w { "observeChanges: missing media permission, observer not registered" } + return null + } + + val observer = object : ContentObserver(Handler(Looper.getMainLooper())) { + override fun onChange(selfChange: Boolean) { + logger.d { "observeChanges: MediaStore changed selfChange=$selfChange" } + onChanged() + } + } + + context.contentResolver.registerContentObserver( + MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, + true, + observer, + ) + + logger.i { "observeChanges: observer registered" } + + return LocalMediaObservation { + context.contentResolver.unregisterContentObserver(observer) + logger.i { "observeChanges: observer unregistered" } + } + } + + private fun hasReadPermission(): Boolean { + val permission = if (Build.VERSION.SDK_INT >= 33) { + Manifest.permission.READ_MEDIA_AUDIO + } else { + Manifest.permission.READ_EXTERNAL_STORAGE + } + + val granted = + context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED + logger.d { "hasReadPermission: permission=$permission granted=$granted" } + return granted + } + + private fun normalizeFolderName(path: String): String { + return path.trimEnd('/', '\\').substringAfterLast('/').ifBlank { + path.trimEnd('/', '\\').substringAfterLast('\\').ifBlank { "Unknown" } + } + } + + private fun isAudioCandidate(displayName: String, mimeType: String): Boolean { + if (mimeType.startsWith("audio/", ignoreCase = true)) return true + val extension = displayName.substringAfterLast('.', missingDelimiterValue = "") + .lowercase(Locale.getDefault()) + return extension in SUPPORTED_EXTENSIONS + } + + private fun discoverFileSystemFallback(roots: List): List { + val candidateRoots = resolveCandidateRoots(roots) + if (candidateRoots.isEmpty()) { + logger.d { "discoverFileSystemFallback: no candidate roots" } + return emptyList() + } + + logger.d { + "discoverFileSystemFallback: scanning roots=${candidateRoots.joinToString()}" + } + + val tracksByFolder = linkedMapOf>() + var scannedFiles = 0 + var acceptedFiles = 0 + + candidateRoots.forEach { root -> + scanDirectory(root) { file -> + scannedFiles += 1 + val extension = file.extension.lowercase(Locale.getDefault()) + if (extension !in SUPPORTED_EXTENSIONS) return@scanDirectory + acceptedFiles += 1 + + val folderPath = file.parentFile?.absolutePath ?: "Unknown" + val name = file.nameWithoutExtension.ifBlank { file.name } + val track = LocalMediaTrack( + path = file.absolutePath, + name = name, + artists = emptyList(), + durationMs = 0L, + album = null, + coverBytes = null, + ) + + tracksByFolder.getOrPut(folderPath) { mutableListOf() }.add(track) + } + } + + val folders = tracksByFolder.entries + .map { (folderPath, tracks) -> + LocalMediaFolder( + path = folderPath, + name = normalizeFolderName(folderPath), + tracks = tracks.sortedBy { it.name.lowercase(Locale.getDefault()) }, + ) + } + .sortedBy { it.name.lowercase(Locale.getDefault()) } + + logger.i { + "discoverFileSystemFallback: scannedFiles=$scannedFiles acceptedFiles=$acceptedFiles folders=${folders.size}" + } + + return folders + } + + private fun resolveCandidateRoots(roots: List): List { + val configured = roots.mapNotNull { raw -> + val normalized = raw.trim() + if (normalized.isBlank()) return@mapNotNull null + File(normalized) + } + + val defaults = listOfNotNull( + Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC), + Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), + context.getExternalFilesDir(Environment.DIRECTORY_MUSIC), + context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS), + ) + + return (configured + defaults) + .map { it.absoluteFile } + .distinctBy { it.absolutePath } + .filter { it.exists() && it.isDirectory } + } + + private fun scanDirectory(root: File, onFile: (File) -> Unit) { + val queue = ArrayDeque() + queue.add(root) + + while (queue.isNotEmpty()) { + val current = queue.removeFirst() + val children = current.listFiles() ?: continue + children.forEach { child -> + if (child.isDirectory) { + queue.add(child) + } else if (child.isFile) { + onFile(child) + } + } + } + } + + private fun mergeFolders( + mediaStoreFolders: List, + fallbackFolders: List, + ): List { + if (fallbackFolders.isEmpty()) return mediaStoreFolders + if (mediaStoreFolders.isEmpty()) return fallbackFolders + + val merged = linkedMapOf>() + val seenTrackPaths = mutableSetOf() + + (mediaStoreFolders + fallbackFolders).forEach { folder -> + val bucket = merged.getOrPut(folder.path) { mutableListOf() } + folder.tracks.forEach { track -> + if (seenTrackPaths.add(track.path)) { + bucket.add(track) + } + } + } + + return merged.entries + .map { (path, tracks) -> + LocalMediaFolder( + path = path, + name = normalizeFolderName(path), + tracks = tracks.sortedBy { it.name.lowercase(Locale.getDefault()) }, + ) + } + .sortedBy { it.name.lowercase(Locale.getDefault()) } + } + + companion object { + private val SUPPORTED_EXTENSIONS = setOf( + "mp3", + "m4a", + "aac", + "flac", + "wav", + "ogg", + "opus", + "wma", + ) + } +} diff --git a/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.android.kt b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.android.kt new file mode 100644 index 00000000..65c44906 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.android.kt @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import android.Manifest +import android.content.pm.PackageManager +import android.os.Build +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.platform.LocalContext + +@Composable +actual fun rememberLocalMediaPermissionState(): LocalMediaPermissionState { + val context = LocalContext.current + val permission = remember { + if (Build.VERSION.SDK_INT >= 33) { + Manifest.permission.READ_MEDIA_AUDIO + } else { + Manifest.permission.READ_EXTERNAL_STORAGE + } + } + + var isGranted by remember { + mutableStateOf( + context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED, + ) + } + + val launcher = rememberLauncherForActivityResult( + contract = ActivityResultContracts.RequestPermission(), + ) { granted -> + isGranted = granted || + context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED + } + + return LocalMediaPermissionState( + isGranted = isGranted, + requestPermission = { launcher.launch(permission) }, + ) +} diff --git a/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..5c58c8bf --- /dev/null +++ b/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml b/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..9faa29bb --- /dev/null +++ b/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..2ad9808b --- /dev/null +++ b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,22 @@ + + + + + + + \ No newline at end of file diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..2ad9808b --- /dev/null +++ b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,22 @@ + + + + + + + \ No newline at end of file diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..a571e600 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..61da551c Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..c41dd285 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..db5080a7 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..6dba46da Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..da31a871 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..15ac6817 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..b216f2d3 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..f25a4197 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..e96783cc Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/values/strings.xml b/composeApp/src/androidMain/res/values/strings.xml new file mode 100644 index 00000000..4ffaafbe --- /dev/null +++ b/composeApp/src/androidMain/res/values/strings.xml @@ -0,0 +1,22 @@ + + + + Spotube + Now Playing + Play music from your phone to start listening in the car + \ No newline at end of file diff --git a/composeApp/src/androidMain/res/xml/automotive_app_desc.xml b/composeApp/src/androidMain/res/xml/automotive_app_desc.xml new file mode 100644 index 00000000..1db61205 --- /dev/null +++ b/composeApp/src/androidMain/res/xml/automotive_app_desc.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml b/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml new file mode 100644 index 00000000..c5f82544 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/drawable/compose-multiplatform.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/composeApp/src/commonMain/composeResources/drawable/liked_tracks.jpg b/composeApp/src/commonMain/composeResources/drawable/liked_tracks.jpg new file mode 100644 index 00000000..71e010dc Binary files /dev/null and b/composeApp/src/commonMain/composeResources/drawable/liked_tracks.jpg differ diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..73baf533 --- /dev/null +++ b/composeApp/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,163 @@ + + + + Settings + + Plugins + Language and Region + Appearance + Playback + Downloads + Caching + Desktop + Updates + + Close + Save + Cancel + + Language + Language for the app interface. Current: %1$s + Country + Regional country for content and availability. Current: %1$s + %1$s (%2$s) + + Theme + Choose how Spotube matches your system appearance. Current: %1$s + Light + Dark + System + + Accent color + Current palette: %1$s + Accent color + Choose an accent palette and preview it in both light and dark themes. + Light + Dark + Preview + Button + Green Goblin + Electric Violet + Oceanic Cyan + Sunset Orange + Rose Garden + Midnight Blue + Metallic Slate + + Download folder override + Current folder: %1$s + Current folder: default music folder + Leave this empty to use the default music folder. + C:\Music\Spotube + Local media folders + Custom folders to scan on desktop. Added: %1$d + No custom folder added yet + Use the picker to add folders. Download folder override is included automatically. + Manage + Add folder + Remove folder + No custom folders added. + Download music format + Preferred codec and container for downloads. Current: %1$s + Download music quality + + Streaming music format + Preferred codec and container for music streaming. Current: %1$s + Streaming music quality + Current: %1$s + Enable music caching + Store streamed audio locally to speed up repeat playback. + Cache folder + Current: %1$s + Current: default application cache + Cache size limit + No limit + Current limit: %1$d MB + Set the maximum cache size in MB. Enter 0 or leave blank for no limit. + 500 + Size must be 0 or a positive number. + Enable endless playback + Keep playback going with recommended tracks when your queue ends. + Enable Connect + Expose remote playback controls through the Spotube Connect feature. + Playback proxy server port + Port used by the playback proxy server. Current: %1$d + Choose a port between 1 and 65535. + 14769 + Enter a valid whole number. + Port must be between 1 and 65535. + + Minimize to tray + Keep Spotube running in the system tray when the window is minimized. + Discord rich presence + Show your current playback status in Discord on desktop. + + Automatically check for updates + Look for new Spotube releases in the background. + + Manage Plugins + Manage your plugins + Default %1$s Plugin + Metadata + Audio + Lyrics + Scrobble + No plugin selected + Change + Select + Selected + Clear selection + No plugins available + %1$s plugin + Clear + + Plugin Manager + Please enter a URL + URL must start with http:// or https:// + Failed to download plugin + No plugins installed yet + Paste a download URL or pick a file above. + %1$d %2$s installed + plugin + plugins + Install a Plugin + https://example.com/plugin.smplug + Download + Install from file (.smplug) + Active + v%1$s + Built-in + Remove plugin + Login + Logout + + • %1$s + Permissions requested + This plugin requires no special permissions. + Installed vs supplied + Installed + Supplied + API %1$s → %2$s + Persistent Storage + Read and write data to disk + Network Requests + Send and receive data over the internet + WebView + Display web content inside the app + + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/App.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/App.kt new file mode 100644 index 00000000..6424de89 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/App.kt @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import androidx.navigation3.ui.NavDisplay +import dev.krtirtho.spotube.core.navigation.Navigator +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.navigation.TOP_LEVEL_ROUTES +import dev.krtirtho.spotube.core.navigation.rememberNavigationState +import dev.krtirtho.spotube.core.navigation.toEntries +import dev.krtirtho.spotube.core.ui.theming.SpotubeTheme +import dev.krtirtho.spotube.modules.settings.SettingsRepository +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.shell.AppShell +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxHome +import dev.krtirtho.spotube.resources.iconsax.IconsaxHomeBroken +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicLibrary +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicLibraryOutline +import dev.krtirtho.spotube.resources.iconsax.IconsaxSearch +import dev.krtirtho.spotube.resources.iconsax.IconsaxSearchBroken +import dev.krtirtho.spotube.resources.iconsax.IconsaxSetting2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxSettingTwotone +import kotlinx.coroutines.ExperimentalCoroutinesApi +import org.koin.compose.koinInject +import org.koin.compose.navigation3.koinEntryProvider +import org.koin.core.annotation.KoinExperimentalAPI + +data class TabItem( + val title: String, + val icon: ImageVector, + val activeIcon: ImageVector, + val route: Routes +) + +val tabs = listOf( + TabItem( + "Home", + Iconsax.IconsaxHomeBroken, + Iconsax.IconsaxHome, + Routes.Home + ), + TabItem( + "Search", + Iconsax.IconsaxSearchBroken, + Iconsax.IconsaxSearch, + Routes.Search + ), + TabItem( + "Library", + Iconsax.IconsaxMusicLibraryOutline, + Iconsax.IconsaxMusicLibrary, + Routes.Library + ), + TabItem( + "Settings", + Iconsax.IconsaxSettingTwotone, + Iconsax.IconsaxSetting2, + Routes.Settings + ) +) + +@OptIn(KoinExperimentalAPI::class, ExperimentalCoroutinesApi::class) +@Composable +fun App( + content: @Composable () -> Unit = {} +) { + val settingsRepository: SettingsRepository = koinInject() + val userSettings by settingsRepository.userSettings.collectAsStateWithLifecycle(initialValue = UserSettings()) + + val navigationState = rememberNavigationState( + startRoute = Routes.Home, + topLevelRoutes = TOP_LEVEL_ROUTES + ) + val navigator = remember { + Navigator(navigationState) + } + + SpotubeTheme(settings = userSettings) { + AppShell(navigator, navigationState) { + Column { + NavDisplay( + modifier = Modifier.fillMaxSize(), + onBack = navigator::pop, + entries = navigationState.toEntries(koinEntryProvider()) + ) + } + } + content() + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/Greeting.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/Greeting.kt new file mode 100644 index 00000000..5d53f202 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/Greeting.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +class Greeting { + private val platform = getPlatform() + + fun greet(): String { + return "Hello, ${platform.name}!" + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/Platform.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/Platform.kt new file mode 100644 index 00000000..74bf0230 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/Platform.kt @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +enum class PlatformType { + Android, IOS, Windows, Linux, MacOS, Unknown +} + +interface Platform { + val name: String + val type: PlatformType +} + +expect fun getPlatform(): Platform + +fun Platform.isDesktop(): Boolean { + return type == PlatformType.Windows || + type == PlatformType.Linux || + type == PlatformType.MacOS +} + +fun Platform.isMobile(): Boolean { + return type == PlatformType.Android || + type == PlatformType.IOS +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.kt new file mode 100644 index 00000000..94aca2c2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.kt @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.StreamProtocol +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.StateFlow +import kotlin.time.Duration + +data class MediaItem( + val title: String, + val artist: String, + val album: String, + val duration: Duration, + val coverURL: String, + val url: String, + val protocol: StreamProtocol = StreamProtocol.PROGRESSIVE, +) { + fun toDebugString(): String { + return "MediaItem(title='$title', artist='$artist', album='$album', duration=$duration, coverURL='$coverURL', url='$url', protocol=$protocol)" + } +} + +enum class LoopState { + NONE, ONE, ALL; + + fun next(): LoopState { + return when (this) { + NONE -> ONE + ONE -> ALL + ALL -> NONE + } + } +} + +enum class PlayerState { + IDLE, BUFFERING, READY, PLAYING, PAUSED, COMPLETED +} + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +expect class AudioPlayer(context: Any) { + val context: Any // Optional context for platform-specific implementations (e.g., Android Context) + + // Playback + suspend fun play() + suspend fun pause() + suspend fun stop() + suspend fun seekTo(position: Duration) + suspend fun loop(state: LoopState) + suspend fun shuffle(enabled: Boolean) + + // Playlist management + suspend fun load(playlist: List, autoPlay: Boolean = true, startPosition: Int = 0) + suspend fun addMediaItem(mediaItem: MediaItem) + suspend fun insertMediaItemAtNextIndex(mediaItem: MediaItem) + suspend fun removeMediaItem(mediaItem: MediaItem) + suspend fun moveMediaItem(fromIndex: Int, toIndex: Int) + suspend fun skipToNext() + suspend fun skipToPrevious() + suspend fun jumpTo(index: Int) + + // State as flows StateFlow + + val playerStateFlow : StateFlow + val currentMediaItemFlow : StateFlow + val playlistFlow : StateFlow> + val durationFlow : StateFlow + val positionFlow : StateFlow + val bufferingPositionFlow : StateFlow + val loopStateFlow : StateFlow + val shuffleModeFlow : StateFlow + val playbackSpeedFlow : StateFlow + val volumeFlow : StateFlow + val completionFlow : Flow + val errorFlow : Flow + + suspend fun setVolume(volume: Float) + suspend fun setPlaybackSpeed(speed: Float) + + fun isDisposed(): Boolean + fun dispose() // Clean up resources when done. The player should not be used after this is called. +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerModels.kt new file mode 100644 index 00000000..b2864360 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerModels.kt @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.StreamProtocol +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +sealed interface QueueEntry { + val url: String + + @Serializable + @SerialName("streaming") + data class StreamingTrack( + val track: MetadataTrack, + override val url: String, + val protocol: StreamProtocol = StreamProtocol.PROGRESSIVE, + ) : QueueEntry + + @Serializable + @SerialName("local") + data class LocalTrack( + val name: String, + val artists: List, + val duration: Long, + val album: String?, + val coverBytes: ByteArray?, + override val url: String + ) : QueueEntry { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other == null || this::class != other::class) return false + + other as LocalTrack + + if (duration != other.duration) return false + if (name != other.name) return false + if (artists != other.artists) return false + if (album != other.album) return false + if (!coverBytes.contentEquals(other.coverBytes)) return false + if (url != other.url) return false + + return true + } + + override fun hashCode(): Int { + var result = duration.hashCode() + result = 31 * result + name.hashCode() + result = 31 * result + artists.hashCode() + result = 31 * result + (album?.hashCode() ?: 0) + result = 31 * result + (coverBytes?.contentHashCode() ?: 0) + result = 31 * result + url.hashCode() + return result + } + } +} + +@Serializable +sealed interface QueueCollectionEntry { + val id: String + + @Serializable + @SerialName("playlist") + data class Playlist( + override val id: String, + ) : QueueCollectionEntry + + @Serializable + @SerialName("album") + data class Album( + override val id: String, + ) : QueueCollectionEntry + + @Serializable + @SerialName("saved_tracks") + data object SavedTracks : QueueCollectionEntry { + override val id: String = "saved_tracks" + } +} + +@Serializable +data class PersistedQueueState( + val entries: List, + val currentIndex: Int, + val currentCollectionEntry: QueueCollectionEntry? = null, + val collectionHistory: List = emptyList(), +) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerQueue.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerQueue.kt new file mode 100644 index 00000000..8a524add --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerQueue.kt @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import kotlinx.coroutines.flow.StateFlow + +interface AudioPlayerQueue { + val queueFlow: StateFlow> + val currentQueueEntryFlow: StateFlow + val currentCollectionEntryFlow: StateFlow + val collectionHistoryFlow: StateFlow> + + suspend fun load( + entries: List, + autoPlay: Boolean = true, + startPosition: Int = 0, + collectionEntry: QueueCollectionEntry? = null, + ) + suspend fun addToQueue(entry: QueueEntry) + suspend fun addAllToQueue(entries: List, collectionEntry: QueueCollectionEntry? = null) + suspend fun addAllAfterCurrent(entries: List) + suspend fun removeFromQueue(entry: QueueEntry) + suspend fun removeFromQueueByMediaUrl(mediaUrl: String) + suspend fun move(fromIndex: Int, toIndex: Int) + suspend fun jumpTo(index: Int, autoPlay: Boolean = true) + suspend fun reloadCurrent() + suspend fun clear() + suspend fun getQueue(): List + suspend fun getCurrentQueueEntry(): QueueEntry? + suspend fun getCurrentCollectionEntry(): QueueCollectionEntry? + suspend fun getCollectionHistory(): List + + fun isPlaylistPlaying(playlistId: String? = null): Boolean { + val entry = currentCollectionEntryFlow.value as? QueueCollectionEntry.Playlist ?: return false + return playlistId == null || entry.id == playlistId + } + + fun isAlbumPlaying(albumId: String? = null): Boolean { + val entry = currentCollectionEntryFlow.value as? QueueCollectionEntry.Album ?: return false + return albumId == null || entry.id == albumId + } + + fun isSavedTracksPlaying(): Boolean { + return currentCollectionEntryFlow.value is QueueCollectionEntry.SavedTracks + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerQueueRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerQueueRepository.kt new file mode 100644 index 00000000..72394652 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayerQueueRepository.kt @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import androidx.datastore.preferences.core.edit +import dev.krtirtho.spotube.core.db.Database +import dev.krtirtho.spotube.core.db.DatabaseKeys +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.map +import kotlinx.serialization.json.Json + +class AudioPlayerQueueRepository(private val database: Database) { + private val json = Json { + ignoreUnknownKeys = true + } + + suspend fun getPersistedState(): PersistedQueueState? { + return database.audioPlayerQueueDataStore.data.map { preferences -> + val payload = preferences[DatabaseKeys.AUDIO_PLAYER_QUEUE_STATE_KEY] + payload?.let { + runCatching { json.decodeFromString(it) } + .getOrNull() + } + }.first() + } + + suspend fun saveState(state: PersistedQueueState) { + database.audioPlayerQueueDataStore.edit { preferences -> + preferences[DatabaseKeys.AUDIO_PLAYER_QUEUE_STATE_KEY] = json.encodeToString(state) + } + } + + suspend fun clearState() { + database.audioPlayerQueueDataStore.edit { preferences -> + preferences.remove(DatabaseKeys.AUDIO_PLAYER_QUEUE_STATE_KEY) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/DeviceAudioPlayerQueue.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/DeviceAudioPlayerQueue.kt new file mode 100644 index 00000000..3896c64f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/audioplayer/DeviceAudioPlayerQueue.kt @@ -0,0 +1,413 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.StreamProtocol +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.mapNotNull +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent +import kotlin.time.Duration.Companion.milliseconds + +class DeviceAudioPlayerQueue( + private val audioPlayer: AudioPlayer, + private val settingsViewModel: SettingsViewModel, + private val repository: AudioPlayerQueueRepository, +) : AudioPlayerQueue, KoinComponent { + + private val logger by injectLogger() + + private val scope = CoroutineScope(Dispatchers.IO + SupervisorJob()) + + private val entryByMediaUrl = MutableStateFlow>(emptyMap()) + private val currentCollectionEntryState = MutableStateFlow(null) + private val collectionHistoryState = MutableStateFlow>(emptyList()) + + private var isRestoringPersistedState = true + + override val queueFlow: StateFlow> = combine( + audioPlayer.playlistFlow, + entryByMediaUrl, + ) { playlist, knownEntries -> + playlist.map { mediaItem -> + knownEntries[mediaItem.url] ?: mediaItem.toFallbackQueueEntry() + } + }.stateIn(scope, SharingStarted.WhileSubscribed(5_000), emptyList()) + + override val currentQueueEntryFlow: StateFlow = combine( + audioPlayer.currentMediaItemFlow, + entryByMediaUrl, + ) { mediaItem, knownEntries -> + mediaItem?.let { knownEntries[it.url] ?: it.toFallbackQueueEntry() } + }.stateIn(scope, SharingStarted.WhileSubscribed(5_000), null) + + override val currentCollectionEntryFlow: StateFlow = + currentCollectionEntryState.asStateFlow() + + override val collectionHistoryFlow: StateFlow> = + collectionHistoryState.asStateFlow() + + init { + logger.d { "Initializing DeviceAudioPlayerQueue" } + scope.launch { + logger.d { "Starting restoration of persisted queue state" } + restorePersistedState() + isRestoringPersistedState = false + logger.d { "Persisted queue state restoration completed" } + } + + scope.launch { + audioPlayer.playlistFlow.collect { + logger.d { "Playlist changed, persisting queue state" } + persistQueueStateIfReady() + } + } + + scope.launch { + audioPlayer.currentMediaItemFlow.collect { + logger.d { "Current media item changed, persisting queue state" } + persistQueueStateIfReady() + } + } + } + + override suspend fun load( + entries: List, + autoPlay: Boolean, + startPosition: Int, + collectionEntry: QueueCollectionEntry?, + ) { + logger.i { "Loading queue with ${entries.size} entries, autoPlay=$autoPlay, startPosition=$startPosition" } + val mediaItems = entries.mapNotNull { it.toMediaItem() } + if (mediaItems.isEmpty()) { + logger.w { "load: no valid media items after filtering blanks" } + } + val normalizedStartPosition = + if (mediaItems.isEmpty()) 0 else startPosition.coerceIn(0, mediaItems.lastIndex) + logger.d { "Normalized start position: $startPosition -> $normalizedStartPosition" } + entryByMediaUrl.value = mediaItems.associate { it.url to entries.firstOrNull { e -> e.toMediaItem()?.url == it.url }!! } + updateCollectionContext(collectionEntry) + audioPlayer.load(mediaItems, autoPlay, normalizedStartPosition) + persistQueueStateIfReady() + logger.i { "Queue loaded successfully" } + } + + override suspend fun addToQueue(entry: QueueEntry) { + val mediaItem = entry.toMediaItem() ?: run { + logger.w { "addToQueue: skipping entry with blank url" } + return + } + logger.d { "Adding entry to queue: ${mediaItem.title}" } + entryByMediaUrl.update { it + (mediaItem.url to entry) } + audioPlayer.addMediaItem(mediaItem) + persistQueueStateIfReady() + logger.d { "Entry added successfully" } + } + + override suspend fun addAllToQueue(entries: List, collectionEntry: QueueCollectionEntry?) { + if (entries.isEmpty()) { + logger.d { "addAllToQueue called with empty list, skipping" } + return + } + + logger.i { "Adding ${entries.size} entries to queue" } + val mediaItems = entries.mapNotNull { it.toMediaItem() } + if (mediaItems.isEmpty()) { + logger.w { "addAllToQueue: all entries had blank urls, skipping" } + return + } + val validEntries = entries.zip(mediaItems).map { (entry) -> + entry + } + entryByMediaUrl.update { + it + mediaItems.zip(validEntries).associate { (mediaItem, entry) -> mediaItem.url to entry } + } + + updateCollectionContext(collectionEntry) + + mediaItems.forEach { mediaItem -> + audioPlayer.addMediaItem(mediaItem) + } + + persistQueueStateIfReady() + logger.d { "All entries added successfully" } + } + + override suspend fun addAllAfterCurrent(entries: List) { + if (entries.isEmpty()) { + logger.d { "addAllAfterCurrent called with empty list, skipping" } + return + } + + logger.i { "Adding ${entries.size} entries after current position" } + val mediaItems = entries.mapNotNull { it.toMediaItem() } + if (mediaItems.isEmpty()) { + logger.w { "addAllAfterCurrent: all entries had blank urls, skipping" } + return + } + val validEntries = entries.zip(mediaItems).map { (entry) -> entry } + entryByMediaUrl.update { + it + mediaItems.zip(validEntries).associate { (mediaItem, entry) -> mediaItem.url to entry } + } + + mediaItems.forEach { mediaItem -> + audioPlayer.insertMediaItemAtNextIndex(mediaItem) + } + + persistQueueStateIfReady() + logger.d { "All entries added after current successfully" } + } + + override suspend fun removeFromQueue(entry: QueueEntry) { + val mediaUrl = entry.toMediaItem()?.url ?: return + removeFromQueueByMediaUrl(mediaUrl) + } + + override suspend fun removeFromQueueByMediaUrl(mediaUrl: String) { + val mediaItem = audioPlayer.playlistFlow.value.firstOrNull { it.url == mediaUrl } + if (mediaItem == null) { + logger.w { "Attempted to remove non-existent media item: $mediaUrl" } + return + } + logger.d { "Removing media item from queue: ${mediaItem.title}" } + audioPlayer.removeMediaItem(mediaItem) + entryByMediaUrl.update { it - mediaUrl } + persistQueueStateIfReady() + logger.d { "Media item removed successfully" } + } + + override suspend fun move(fromIndex: Int, toIndex: Int) { + logger.d { "Moving queue item from index $fromIndex to $toIndex" } + audioPlayer.moveMediaItem(fromIndex, toIndex) + persistQueueStateIfReady() + logger.d { "Queue item moved successfully" } + } + + override suspend fun jumpTo(index: Int, autoPlay: Boolean) { + val queueSize = audioPlayer.playlistFlow.value.size + if (queueSize == 0) { + logger.w { "jumpTo called with empty queue" } + return + } + + val normalizedIndex = index.coerceIn(0, queueSize - 1) + logger.d { "Jumping to queue index $index (normalized: $normalizedIndex), autoPlay=$autoPlay" } + audioPlayer.jumpTo(normalizedIndex) + if (autoPlay) { + audioPlayer.play() + } + persistQueueStateIfReady() + } + + override suspend fun reloadCurrent() { + val current = currentQueueEntryFlow.value ?: run { + logger.w { "reloadCurrent called with no current entry" } + return + } + val queue = queueFlow.value + val index = queue.indexOfFirst { entry -> + when { + entry is QueueEntry.StreamingTrack && current is QueueEntry.StreamingTrack -> + entry.track.id == current.track.id + entry is QueueEntry.LocalTrack && current is QueueEntry.LocalTrack -> + entry.url == current.url && entry.name == current.name + else -> false + } + } + if (index < 0) { + logger.w { "reloadCurrent: current entry not found in queue" } + return + } + logger.i { "Reloading current track at queue index $index" } + jumpTo(index, autoPlay = true) + } + + override suspend fun clear() { + logger.i { "Clearing queue and collection history" } + entryByMediaUrl.value = emptyMap() + currentCollectionEntryState.value = null + collectionHistoryState.value = emptyList() + audioPlayer.load(emptyList(), autoPlay = false, startPosition = 0) + repository.clearState() + logger.i { "Queue cleared successfully" } + } + + override suspend fun getQueue(): List { + val knownEntries = entryByMediaUrl.value + return audioPlayer.playlistFlow.value.map { mediaItem -> + knownEntries[mediaItem.url] ?: mediaItem.toFallbackQueueEntry() + } + } + + override suspend fun getCurrentQueueEntry(): QueueEntry? { + val mediaItem = audioPlayer.currentMediaItemFlow.value ?: return null + return entryByMediaUrl.value[mediaItem.url] ?: mediaItem.toFallbackQueueEntry() + } + + override suspend fun getCurrentCollectionEntry(): QueueCollectionEntry? { + return currentCollectionEntryState.value + } + + override suspend fun getCollectionHistory(): List { + return collectionHistoryState.value + } + + private suspend fun restorePersistedState() { + val state = repository.getPersistedState() + if (state == null) { + logger.d { "No persisted state found" } + return + } + + logger.i { "Restoring persisted state with ${state.entries.size} entries, currentIndex=${state.currentIndex}" } + currentCollectionEntryState.value = state.currentCollectionEntry + collectionHistoryState.value = state.collectionHistory.ifEmpty { + state.currentCollectionEntry?.let(::listOf) ?: emptyList() + } + + if (state.entries.isEmpty()) { + logger.d { "Persisted state has no entries" } + return + } + + val mediaItems = state.entries.mapNotNull { it.toMediaItem() } + if (mediaItems.isEmpty()) { + logger.w { "restorePersistedState: all entries had blank urls" } + return + } + entryByMediaUrl.value = mediaItems.associate { it.url to state.entries.firstOrNull { e -> e.toMediaItem()?.url == it.url }!! } + val normalizedStartPosition = state.currentIndex.coerceIn(0, mediaItems.lastIndex) + logger.d { "Loading restored playlist with normalized start position: ${state.currentIndex} -> $normalizedStartPosition" } + audioPlayer.load(mediaItems, autoPlay = false, startPosition = normalizedStartPosition) + logger.i { "Persisted state restored successfully" } + } + + private suspend fun persistQueueStateIfReady() { + if (isRestoringPersistedState) { + logger.v { "Skipping persist: still restoring persisted state" } + return + } + + val queueEntries = getQueue() + if (queueEntries.isEmpty()) { + logger.d { "Persisting queue state: clearing state (queue is empty)" } + repository.clearState() + return + } + + val playlist = audioPlayer.playlistFlow.value + val currentMedia = audioPlayer.currentMediaItemFlow.value + val currentIndex = currentMedia?.let { current -> + playlist.indexOfFirst { it.url == current.url }.takeIf { it >= 0 } + } ?: 0 + val normalizedCurrentIndex = currentIndex.coerceIn(0, queueEntries.lastIndex) + + logger.d { "Persisting queue state: ${queueEntries.size} entries, currentIndex=$currentIndex (normalized: $normalizedCurrentIndex)" } + repository.saveState( + PersistedQueueState( + entries = queueEntries, + currentIndex = normalizedCurrentIndex, + currentCollectionEntry = currentCollectionEntryState.value, + collectionHistory = collectionHistoryState.value, + ) + ) + } + + private fun updateCollectionContext(collectionEntry: QueueCollectionEntry?) { + if (collectionEntry != null) { + logger.d { "Updating collection context: ${collectionEntry.id}" } + } else { + logger.d { "Clearing collection context" } + } + + currentCollectionEntryState.value = collectionEntry + + if (collectionEntry == null) return + + collectionHistoryState.update { history -> + val updated = listOf(collectionEntry) + history.filterNot { it == collectionEntry } + logger.v { "Collection history updated, size now: ${updated.size}" } + updated + } + } + + private suspend fun QueueEntry.toMediaItem(): MediaItem? { + return when (this) { + is QueueEntry.StreamingTrack -> { + val resolvedUrl = url.ifBlank { buildStreamingUrl(track.id, protocol) } + if (resolvedUrl.isBlank()) return null + MediaItem( + title = track.title, + artist = track.artists.joinToString(", ") { artist -> artist.name }, + album = track.album?.title.orEmpty(), + duration = track.durationMs.milliseconds, + coverURL = (track.album?.thumbnails ?: track.thumbnails)?.firstOrNull()?.url.orEmpty(), + url = resolvedUrl, + protocol = protocol, + ) + } + + is QueueEntry.LocalTrack -> { + if (url.isBlank()) return null + MediaItem( + title = name, + artist = artists.joinToString(", "), + album = album.orEmpty(), + duration = duration.milliseconds, + coverURL = "", + url = url, + ) + } + } + } + + private fun MediaItem.toFallbackQueueEntry(): QueueEntry { + return QueueEntry.LocalTrack( + name = title, + artists = artist.split(',').map { it.trim() }.filter { it.isNotEmpty() }, + duration = duration.inWholeMilliseconds, + album = album.ifBlank { null }, + coverBytes = null, + url = url, + ) + } + + private suspend fun buildStreamingUrl(trackId: String, protocol: StreamProtocol): String { + val port: Int = + settingsViewModel.settingsState.mapNotNull { it?.playbackProxyServerPort }.first() + val baseUrl = "http://127.0.0.1:$port" + return when (protocol) { + StreamProtocol.HLS, StreamProtocol.DASH -> "${baseUrl.trimEnd('/')}/manifest/$trackId" + StreamProtocol.PROGRESSIVE -> "${baseUrl.trimEnd('/')}/stream/$trackId" + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/db/Database.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/db/Database.kt new file mode 100644 index 00000000..ae3c51ed --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/db/Database.kt @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.db + +import androidx.datastore.core.DataStore +import androidx.datastore.preferences.core.PreferenceDataStoreFactory +import androidx.datastore.preferences.core.Preferences +import androidx.datastore.preferences.core.longPreferencesKey +import androidx.datastore.preferences.core.stringPreferencesKey +import dev.krtirtho.spotube.core.paths.Paths +import okio.Path.Companion.toPath + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +class Database(val paths: Paths) { + val settingsDataStore: DataStore by lazy { + PreferenceDataStoreFactory.createWithPath( + produceFile = { "${paths.getApplicationDataDirPath()}/spotube.preferences_pb".toPath() } + ) + } + val pluginsDataStore: DataStore by lazy { + PreferenceDataStoreFactory.createWithPath( + produceFile = { "${paths.getApplicationDataDirPath()}/spotube_plugins.preferences_pb".toPath() } + ) + } + + val matchedTracksDataStore: DataStore by lazy { + PreferenceDataStoreFactory.createWithPath( + produceFile = { "${paths.getApplicationDataDirPath()}/spotube_matched_tracks.preferences_pb".toPath() } + ) + } + + val audioPlayerQueueDataStore: DataStore by lazy { + PreferenceDataStoreFactory.createWithPath( + produceFile = { "${paths.getApplicationDataDirPath()}/spotube_audio_player_queue.preferences_pb".toPath() } + ) + } + + val localMediaDataStore: DataStore by lazy { + PreferenceDataStoreFactory.createWithPath( + produceFile = { "${paths.getApplicationDataDirPath()}/spotube_local_media.preferences_pb".toPath() } + ) + } +} + +object DatabaseKeys { + val PLUGINS_STATE_KEY = stringPreferencesKey("plugins_state") + val AUDIO_PLAYER_QUEUE_STATE_KEY = stringPreferencesKey("audio_player_queue_state") + val LOCAL_MEDIA_CACHE_STATE_KEY = stringPreferencesKey("local_media_cache_state") + val LOCAL_MEDIA_LAST_SCAN_AT_KEY = longPreferencesKey("local_media_last_scan_at") +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/EnrichKoin.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/EnrichKoin.kt new file mode 100644 index 00000000..5a035274 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/EnrichKoin.kt @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.di + +import androidx.compose.runtime.Composable +import co.touchlab.kermit.Logger +import org.koin.compose.koinInject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject +import org.koin.core.parameter.parametersOf + +inline fun KoinComponent.injectLogger(): Lazy { + return inject { parametersOf(T::class.simpleName ?: "Unknown") } +} + +@Composable +inline fun rememberLogger(): Logger { + val tag = T::class.simpleName ?: "Unknown" + return koinInject { parametersOf(tag) } +} + +@Composable +fun rememberLogger(tag: String): Logger { + return koinInject { parametersOf(tag) } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/Init.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/Init.kt new file mode 100644 index 00000000..9b95c525 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/Init.kt @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.di + +import co.touchlab.kermit.Logger +import co.touchlab.kermit.koin.KermitKoinLogger +import org.koin.core.context.startKoin +import org.koin.dsl.KoinAppDeclaration + +fun initKoin(configuration: KoinAppDeclaration? = null) { + startKoin { + configuration?.invoke(this) + logger( + KermitKoinLogger(Logger.withTag("koin")) + ) + modules( + sharedModules, + platformModules + ) + } + +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/Modules.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/Modules.kt new file mode 100644 index 00000000..e3050e43 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/di/Modules.kt @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.di + +import co.touchlab.kermit.Logger +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueueRepository +import dev.krtirtho.spotube.core.audioplayer.DeviceAudioPlayerQueue +import dev.krtirtho.spotube.core.db.Database +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.navigation.navigationModule +import dev.krtirtho.spotube.core.server.LocalServer +import dev.krtirtho.spotube.core.server.MatchedTracksRepository +import dev.krtirtho.spotube.core.server.StreamingUrlRepository +import dev.krtirtho.spotube.core.server.AlternativeTracksRepository +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.modules.artist.ArtistViewModel +import dev.krtirtho.spotube.modules.album.AlbumRepository +import dev.krtirtho.spotube.modules.album.AlbumViewModel +import dev.krtirtho.spotube.modules.home.HomeScreenRepository +import dev.krtirtho.spotube.modules.home.HomeScreenViewModel +import dev.krtirtho.spotube.modules.downloads.DownloadManager +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.library.LibraryState +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaCacheRepository +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaFoldersConfig +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaLibraryCoordinator +import dev.krtirtho.spotube.modules.library.album.LibraryAlbumsViewModel +import dev.krtirtho.spotube.modules.library.artist.LibraryArtistsViewModel +import dev.krtirtho.spotube.modules.library.local_tracks.LibraryLocalTracksViewModel +import dev.krtirtho.spotube.modules.library.playlist.LibraryPlaylistsViewModel +import dev.krtirtho.spotube.modules.lyrics.LyricsViewModel +import dev.krtirtho.spotube.modules.playlist.PlaylistRepository +import dev.krtirtho.spotube.modules.playlist.PlaylistViewModel +import dev.krtirtho.spotube.modules.plugin.PluginManager +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksViewModel +import dev.krtirtho.spotube.modules.search.SearchRepository +import dev.krtirtho.spotube.modules.search.SearchScreenViewModel +import dev.krtirtho.spotube.modules.settings.SettingsRepository +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.shell.AppShellViewModel +import dev.krtirtho.spotube.modules.shell.alternative_track.AlternativeTrackContentViewModel +import dev.krtirtho.spotube.modules.shell.player_queue.PlayerQueueContentViewModel +import org.koin.core.module.Module +import org.koin.core.module.dsl.createdAtStart +import org.koin.core.module.dsl.singleOf +import org.koin.core.module.dsl.viewModel +import org.koin.core.module.dsl.viewModelOf +import org.koin.core.module.dsl.withOptions +import org.koin.dsl.module + +expect val platformModules: Module + +val sharedModules = module { + includes(navigationModule) + singleOf(::Database) + + singleOf(::WebViewController) + + // Shell + viewModelOf(::AppShellViewModel) + viewModelOf(::PlayerQueueContentViewModel) + viewModelOf(::AlternativeTrackContentViewModel) + + // Home + singleOf(::HomeScreenRepository) + viewModelOf(::HomeScreenViewModel) + + // Search + singleOf(::SearchRepository) + viewModelOf(::SearchScreenViewModel) + + // Library + singleOf(::LibraryState) + singleOf(::LibraryRepository) + singleOf(::LocalMediaCacheRepository) + singleOf(::LocalMediaFoldersConfig) + singleOf(::LocalMediaLibraryCoordinator) + viewModelOf(::LibraryPlaylistsViewModel) + viewModelOf(::LibraryAlbumsViewModel) + viewModelOf(::LibraryArtistsViewModel) + viewModelOf(::LibraryLocalTracksViewModel) + + // Plugin system + singleOf(::PluginManager) + + // Settings + singleOf(::SettingsRepository) + viewModelOf(::SettingsViewModel) + + // Downloads + singleOf(::DownloadManager) + viewModelOf(::DownloadsViewModel) + + // Playlist + singleOf(::PlaylistRepository) + viewModel { (playlistId: String) -> + PlaylistViewModel( + playlistId = playlistId, + repository = get(), + savedTracksRepository = get(), + libraryRepository = get(), + playbackHelper = get(), + audioPlayerQueue = get(), + ) + } + + // Saved Tracks + singleOf(::SavedTracksRepository) + viewModelOf(::SavedTracksViewModel) + + // Artist + viewModel { (artistId: String) -> + ArtistViewModel( + artistId = artistId, + pluginManager = get(), + savedTracksRepository = get(), + libraryRepository = get(), + audioPlayerQueue = get(), + ) + } + + // Album + singleOf(::AlbumRepository) + viewModel { (albumId: String) -> + AlbumViewModel( + albumId = albumId, + repository = get(), + savedTracksRepository = get(), + playbackHelper = get(), + audioPlayerQueue = get(), + libraryRepository = get(), + ) + } + + // Lyrics + viewModelOf(::LyricsViewModel) + + // Local playback proxy server + singleOf(::CollectionPlaybackHelper) + singleOf(::MatchedTracksRepository) + singleOf(::StreamingUrlRepository) + singleOf(::AlternativeTracksRepository) + singleOf(::LocalServer) withOptions { + createdAtStart() + } + singleOf(::AudioPlayerQueueRepository) + single { + DeviceAudioPlayerQueue(get(), get(), get()) + } + + factory { (tag: String?) -> + if (tag != null) { + Logger.withTag(tag) + } else { + // Default logger if no tag is provided + Logger + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationCommands.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationCommands.kt new file mode 100644 index 00000000..7041d557 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationCommands.kt @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.navigation + +import kotlinx.coroutines.channels.Channel +import kotlinx.coroutines.flow.receiveAsFlow + +// For providing navigation commands to the NavViewModel from other non-viewmodel classes like WebViewController +class NavigationCommands { + private val _navigationCommand = Channel(capacity = Channel.BUFFERED) + val navigationCommandFlow = _navigationCommand.receiveAsFlow() + + private val _navigationPopCommand = Channel(capacity = Channel.BUFFERED) + val navigationPopCommandFlow = _navigationPopCommand.receiveAsFlow() + + fun navigateTo(route: Routes) { + _navigationCommand.trySend(route) + } + + // Pops the last route. if route is provided, pops if the current route is the provided route, else pops unconditionally + fun pop(route: Routes? = null) { + _navigationPopCommand.trySend(route) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationModule.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationModule.kt new file mode 100644 index 00000000..ecdf5951 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationModule.kt @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.navigation + +import androidx.navigation3.runtime.NavKey +import dev.krtirtho.spotube.modules.artist.ArtistScreen +import dev.krtirtho.spotube.modules.album.AlbumScreen +import dev.krtirtho.spotube.modules.home.HomeScreen +import dev.krtirtho.spotube.modules.library.LibraryScreen +import dev.krtirtho.spotube.modules.lyrics.LyricsScreen +import dev.krtirtho.spotube.modules.playlist.PlaylistScreen +import dev.krtirtho.spotube.modules.plugin.PluginScreen +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksScreen +import dev.krtirtho.spotube.modules.search.SearchScreen +import dev.krtirtho.spotube.modules.settings.SettingsScreen +import dev.krtirtho.spotube.modules.webview.WebViewScreen +import kotlinx.serialization.Serializable +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.annotation.KoinExperimentalAPI +import org.koin.core.module.dsl.singleOf +import org.koin.dsl.module +import org.koin.dsl.navigation3.navigation + +@Serializable +sealed interface Routes : NavKey { + @Serializable + data object Home : Routes + + @Serializable + data object Library : Routes + + @Serializable + data object Search : Routes + + @Serializable + data object Settings : Routes + + @Serializable + data object Plugins : Routes + + @Serializable + data object WebView: Routes + + @Serializable + data object Lyrics: Routes + + @Serializable + data class Playlist(val playlistId: String): Routes + + @Serializable + data class Artist(val artistId: String): Routes + + @Serializable + data class Album(val albumId: String): Routes + + @Serializable + data object SavedTracks: Routes +} + +@OptIn(KoinExperimentalAPI::class) +val navigationModule = module { + singleOf(::NavigationCommands) + navigation { + HomeScreen(viewModel = koinViewModel()) + } + navigation { + SearchScreen() + } + navigation { + LibraryScreen() + } + navigation { + SettingsScreen(pluginManager = get(), settingsViewModel = koinViewModel()) + } + navigation { + PluginScreen(pluginManager = get()) + } + navigation { + WebViewScreen(get()) + } + navigation { + PlaylistScreen(it.playlistId) + } + navigation { + ArtistScreen(it.artistId) + } + navigation { + AlbumScreen(it.albumId) + } + navigation { + LyricsScreen(viewModel = koinViewModel()) + } + navigation { + SavedTracksScreen() + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationState.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationState.kt new file mode 100644 index 00000000..e37d1ed0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/navigation/NavigationState.kt @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.navigation + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSerializable +import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshots.SnapshotStateList +import androidx.compose.runtime.toMutableStateList +import androidx.lifecycle.viewmodel.navigation3.rememberViewModelStoreNavEntryDecorator +import androidx.navigation3.runtime.NavBackStack +import androidx.navigation3.runtime.NavEntry +import androidx.navigation3.runtime.NavKey +import androidx.navigation3.runtime.rememberDecoratedNavEntries +import androidx.navigation3.runtime.rememberNavBackStack +import androidx.navigation3.runtime.rememberSaveableStateHolderNavEntryDecorator +import androidx.savedstate.compose.serialization.serializers.MutableStateSerializer +import androidx.savedstate.serialization.SavedStateConfiguration +import dev.krtirtho.spotube.core.di.injectLogger +import kotlinx.serialization.PolymorphicSerializer +import kotlinx.serialization.modules.SerializersModule +import kotlinx.serialization.modules.polymorphic +import org.koin.core.component.KoinComponent + +val TOP_LEVEL_ROUTES = setOf( + Routes.Home, + Routes.Search, + Routes.Library, + Routes.Settings +) + +val serializersConfig = SavedStateConfiguration { + serializersModule = SerializersModule { + polymorphic(NavKey::class) { + subclass(Routes.Home::class, Routes.Home.serializer()) + subclass(Routes.Search::class, Routes.Search.serializer()) + subclass(Routes.Library::class, Routes.Library.serializer()) + subclass(Routes.Settings::class, Routes.Settings.serializer()) + subclass(Routes.Plugins::class, Routes.Plugins.serializer()) + subclass(Routes.WebView::class, Routes.WebView.serializer()) + subclass(Routes.Playlist::class, Routes.Playlist.serializer()) + subclass(Routes.Artist::class, Routes.Artist.serializer()) + subclass(Routes.Album::class, Routes.Album.serializer()) + } + } +} + +class NavigationState( + val startRoute: NavKey, + topLevelRoute: MutableState, + val backStacks: Map> +) : KoinComponent { + var topLevelRoute by topLevelRoute + + val stacksInUse: List + get() = if (topLevelRoute == startRoute) { + listOf(startRoute) + } else { + listOf(startRoute, topLevelRoute) + } + + internal val logger by injectLogger() + +} + +@Composable +fun rememberNavigationState( + startRoute: NavKey, + topLevelRoutes: Set +): NavigationState { + val topLevelRoute = rememberSerializable( + startRoute, + topLevelRoutes, + configuration = serializersConfig, + serializer = MutableStateSerializer(PolymorphicSerializer(NavKey::class)) + ) { + mutableStateOf(startRoute) + } + + val backStacks = topLevelRoutes.associateWith { key -> + rememberNavBackStack( + configuration = serializersConfig, + key + ) + } + + return remember(startRoute, topLevelRoutes) { + NavigationState( + startRoute = startRoute, + topLevelRoute = topLevelRoute, + backStacks = backStacks + ) + } +} + +@Composable +fun NavigationState.toEntries( + entryProvider: (NavKey) -> NavEntry +): SnapshotStateList> { + val decoratedEntries = backStacks.mapValues { (_, stack) -> + val decorators = listOf( + rememberSaveableStateHolderNavEntryDecorator(), + rememberViewModelStoreNavEntryDecorator() + ) + rememberDecoratedNavEntries( + backStack = stack, + entryDecorators = decorators, + entryProvider = entryProvider + ) + } + + val state = stacksInUse + .flatMap { decoratedEntries[it] ?: emptyList() } + .toMutableStateList() + logger.d { "Current entries: ${state.joinToString("->") { it.contentKey.toString() }}" } + return state +} + +class Navigator(val navigationState: NavigationState) : KoinComponent { + val logger by injectLogger() + fun navigate(route: NavKey) { + if (route in TOP_LEVEL_ROUTES) { + val targetStack = navigationState.backStacks[navigationState.topLevelRoute] + if (targetStack != null) { + // Clear everything except the very first entry (the root) + while (targetStack.size > 1) { + targetStack.removeLastOrNull() + } + } + navigationState.topLevelRoute = route + logger.d { "Navigating to top-level route: $route, cleared back stack: ${targetStack != null}" } + } else { + logger.d { "Navigating to route: $route" } + logger.d { + "Back stack before navigation: ${ + navigationState.backStacks[navigationState.topLevelRoute]?.joinToString( + "->" + ) + }" + } + val currentStack = navigationState.backStacks[navigationState.topLevelRoute] + if (currentStack?.lastOrNull() != route) { + currentStack?.add(route) + } + } + } + + fun pop() { + val currentStack = navigationState.backStacks[navigationState.topLevelRoute] + ?: error("Current back stack not found for route: ${navigationState.topLevelRoute}") + val currentRoute = currentStack.last() + if (currentRoute == navigationState.topLevelRoute) { + navigationState.topLevelRoute = navigationState.startRoute + } else { + currentStack.removeLastOrNull() + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeModels.kt new file mode 100644 index 00000000..36009bd8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeModels.kt @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.newpipe + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioStream +import kotlinx.serialization.Serializable + +@Serializable +data class VideoSearchResult( + val id: String, + val title: String, + val url: String, + val uploader: String, + val durationMs: Long, + val thumbnailUrl: String +) + +@Serializable +data class VideoInfo( + val id: String, + val title: String, + val url: String, + val uploader: String, + val durationMs: Long, + val thumbnailUrl: String, + val audioStreams: List, + val videoStreams: List +) + +@Serializable +data class MediaStream( + val url: String, + val codec: String, + val container: String, + val bitrate: Int, + val isAudio: Boolean, + val isVideo: Boolean, +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.kt new file mode 100644 index 00000000..5cbb3c81 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.kt @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.newpipe + +expect class NewPipeService() { + suspend fun searchVideos(query: String): List + suspend fun getVideoInfo(id: String): VideoInfo +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.kt new file mode 100644 index 00000000..a44f2f6f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.paths + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +expect class Paths { + fun getApplicationCacheDirPath(): String + fun getApplicationDataDirPath(): String + fun getUserDownloadsDirPath(): String + fun getMusicCacheDirPath(): String +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/playback/CollectionPlaybackHelper.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/playback/CollectionPlaybackHelper.kt new file mode 100644 index 00000000..c6d12df5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/playback/CollectionPlaybackHelper.kt @@ -0,0 +1,233 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.playback + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueCollectionEntry +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.modules.album.AlbumRepository +import dev.krtirtho.spotube.modules.playlist.PlaylistRepository +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository + +class CollectionPlaybackHelper( + private val albumRepository: AlbumRepository, + private val playlistRepository: PlaylistRepository, + private val savedTracksRepository: SavedTracksRepository, + private val audioPlayerQueue: AudioPlayerQueue, +) { + suspend fun playAlbum(albumId: String) { + if (audioPlayerQueue.isAlbumPlaying(albumId)) return + val entries = fetchAllAlbumTracks(albumId) + if (entries.isNotEmpty()) { + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = 0, + collectionEntry = QueueCollectionEntry.Album(albumId), + ) + } + } + + suspend fun addAlbumToQueue(albumId: String) { + val entries = fetchAllAlbumTracks(albumId) + if (entries.isNotEmpty()) { + audioPlayerQueue.addAllToQueue( + entries, + collectionEntry = QueueCollectionEntry.Album(albumId), + ) + } + } + + suspend fun playAlbumFromTrack(albumId: String, track: MetadataTrack) { + val entries = fetchAllAlbumTracks(albumId) + if (entries.isEmpty()) return + + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.jumpTo(queueIndex) + return + } + + val startPosition = entries.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }.coerceAtLeast(0) + + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = startPosition, + collectionEntry = QueueCollectionEntry.Album(albumId), + ) + } + + suspend fun playPlaylist(playlistId: String) { + if (audioPlayerQueue.isPlaylistPlaying(playlistId)) return + val entries = fetchAllPlaylistTracks(playlistId) + if (entries.isNotEmpty()) { + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = 0, + collectionEntry = QueueCollectionEntry.Playlist(playlistId), + ) + } + } + + suspend fun addPlaylistToQueue(playlistId: String) { + val entries = fetchAllPlaylistTracks(playlistId) + if (entries.isNotEmpty()) { + audioPlayerQueue.addAllToQueue( + entries, + collectionEntry = QueueCollectionEntry.Playlist(playlistId), + ) + } + } + + suspend fun playPlaylistFromTrack(playlistId: String, track: MetadataTrack) { + val entries = fetchAllPlaylistTracks(playlistId) + if (entries.isEmpty()) return + + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.jumpTo(queueIndex) + return + } + + val startPosition = entries.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }.coerceAtLeast(0) + + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = startPosition, + collectionEntry = QueueCollectionEntry.Playlist(playlistId), + ) + } + + suspend fun playSavedTracks() { + if (audioPlayerQueue.isSavedTracksPlaying()) return + val entries = fetchAllSavedTracks() + if (entries.isNotEmpty()) { + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = 0, + collectionEntry = QueueCollectionEntry.SavedTracks, + ) + } + } + + suspend fun addSavedTracksToQueue() { + val entries = fetchAllSavedTracks() + if (entries.isNotEmpty()) { + audioPlayerQueue.addAllToQueue( + entries, + collectionEntry = QueueCollectionEntry.SavedTracks, + ) + } + } + + suspend fun playSavedTracksFromTrack(track: MetadataTrack) { + val entries = fetchAllSavedTracks() + if (entries.isEmpty()) return + + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.jumpTo(queueIndex) + return + } + + val startPosition = entries.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }.coerceAtLeast(0) + + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = startPosition, + collectionEntry = QueueCollectionEntry.SavedTracks, + ) + } + + private suspend fun fetchAllAlbumTracks(albumId: String): List { + val allTracks = mutableListOf() + var pagination = albumRepository.getAlbumTracks(albumId) + pagination?.items?.let { allTracks.addAll(it) } + + while (pagination?.nextPagination != null) { + pagination = albumRepository.getAlbumTracks(albumId, pagination.nextPagination) + pagination?.items?.let { allTracks.addAll(it) } + } + + return allTracks.map { track -> + QueueEntry.StreamingTrack(track = track, url = "") + } + } + + private suspend fun fetchAllPlaylistTracks(playlistId: String): List { + val allTracks = mutableListOf() + var pagination = playlistRepository.getPlaylistTracks(playlistId) + pagination?.items?.let { allTracks.addAll(it) } + + while (pagination?.nextPagination != null) { + pagination = playlistRepository.getPlaylistTracks(playlistId, pagination.nextPagination) + pagination?.items?.let { allTracks.addAll(it) } + } + + return allTracks.map { track -> + QueueEntry.StreamingTrack(track = track, url = "") + } + } + + private suspend fun fetchAllSavedTracks(): List { + val allTracks = mutableListOf() + var pagination = savedTracksRepository.getSavedTracks() + pagination?.items?.let { allTracks.addAll(it) } + + while (pagination?.nextPagination != null) { + pagination = savedTracksRepository.getSavedTracks(pagination.nextPagination) + pagination?.items?.let { allTracks.addAll(it) } + } + + return allTracks.map { track -> + QueueEntry.StreamingTrack(track = track, url = "") + } + } + + private fun MetadataTrack.matchesTrack(other: MetadataTrack): Boolean { + if (id.isNotBlank() && other.id.isNotBlank()) { + return id == other.id + } + + return title == other.title && + durationMs == other.durationMs && + album?.id == other.album?.id && + artists.map { it.id.ifBlank { it.name } } == other.artists.map { it.id.ifBlank { it.name } } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/AlternativeTracksRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/AlternativeTracksRepository.kt new file mode 100644 index 00000000..45ad3a3d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/AlternativeTracksRepository.kt @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.server + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.plugin.PluginManager +import org.koin.core.component.KoinComponent + +class AlternativeTracksRepository( + private val pluginManager: PluginManager, + private val matchedTracksRepository: MatchedTracksRepository, + private val streamingUrlRepository: StreamingUrlRepository, + private val audioPlayerQueue: AudioPlayerQueue, +) : KoinComponent { + + private val logger by injectLogger() + + suspend fun resolveAlternatives(track: MetadataTrack): List { + val trackId = track.id + streamingUrlRepository.getCachedAlternatives(trackId)?.let { cached -> + logger.v { "Using cached alternatives for track $trackId" } + return cached + } + + val audioPlugin = pluginManager.selectedAudioPlugin.value + if (audioPlugin == null) { + logger.w { "No audio plugin selected while resolving alternatives for track $trackId" } + return emptyList() + } + + val sources = runCatching { + audioPlugin.use { audioAPI.getStreamsByTrack(track) } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to fetch alternative sources for track $trackId" } + return emptyList() + } + + if (sources.isEmpty()) { + logger.d { "Plugin returned no alternative sources for track $trackId" } + return emptyList() + } + + streamingUrlRepository.cacheAlternatives(trackId, sources) + logger.d { "Resolved ${sources.size} alternative sources for track $trackId" } + return sources + } + + suspend fun getActiveSourceId(track: MetadataTrack): String? { + return matchedTracksRepository.getTrackSource(track)?.id + } + + suspend fun selectAlternative(track: MetadataTrack, source: AudioSource) { + val trackId = track.id + val basic = when (source) { + is AudioSource.Streamed -> source.toBasic() + is AudioSource.Basic -> source + } + + logger.i { "Selecting alternative source for track $trackId: ${basic.id} (${basic.title})" } + matchedTracksRepository.saveTrackSource(track, basic) + streamingUrlRepository.invalidateCachedStreamUrl(trackId) + streamingUrlRepository.invalidateCachedAlternatives(trackId) + audioPlayerQueue.reloadCurrent() + logger.d { "Alternative source selection complete for track $trackId" } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/CacheManager.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/CacheManager.kt new file mode 100644 index 00000000..2305cba5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/CacheManager.kt @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.server + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.paths.Paths +import io.ktor.http.ContentType +import io.ktor.http.Headers +import io.ktor.http.HeadersBuilder +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpStatusCode +import io.ktor.http.content.OutgoingContent +import io.ktor.server.application.ApplicationCall +import io.ktor.server.response.respond +import io.ktor.utils.io.writeFully +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json +import okio.FileSystem +import okio.Path +import okio.Path.Companion.toPath +import okio.SYSTEM +import okio.buffer +import okio.use + +@Serializable +internal data class CacheIndex( + val entries: List = emptyList() +) + +@Serializable +internal data class CacheEntry( + val trackId: String, + val filename: String, + val sizeBytes: Long, + val createdAtMs: Long, + val contentType: String = "application/octet-stream", +) + +internal class CacheManager( + private val paths: Paths, + private val resolveCacheFolder: () -> String?, + private val resolveSizeLimitMB: () -> Long, + private val fileSystem: FileSystem = FileSystem.SYSTEM, + private val cacheMutex: Mutex = Mutex(), + private val json: Json = Json { ignoreUnknownKeys = true }, +) { + companion object { + private val cacheIndexFileName = "cache_index.json".toPath() + } + + fun resolveCacheDir(): Path { + val folder = resolveCacheFolder() + return if (!folder.isNullOrBlank()) { + folder.toPath() + } else { + paths.getMusicCacheDirPath().toPath() + } + } + + private fun getCacheIndexPath(): Path = resolveCacheDir() / cacheIndexFileName + + fun readCacheIndex(): CacheIndex { + val indexPath = getCacheIndexPath() + if (!fileSystem.exists(indexPath)) return CacheIndex() + return runCatching { + fileSystem.source(indexPath).buffer().use { source -> + json.decodeFromString(source.readUtf8()) + } + }.getOrDefault(CacheIndex()) + } + + fun writeCacheIndex(index: CacheIndex) { + val indexPath = getCacheIndexPath() + fileSystem.createDirectories(indexPath.parent ?: resolveCacheDir()) + fileSystem.sink(indexPath).buffer().use { sink -> + sink.writeUtf8(json.encodeToString(index)) + } + } + + fun findCachedEntry(trackId: String): Pair? { + val index = readCacheIndex() + val entry = index.entries.firstOrNull { it.trackId == trackId } ?: return null + val filePath = resolveCacheDir() / entry.filename.toPath() + return if (fileSystem.exists(filePath)) filePath to entry else null + } + + fun resolveCacheFilename(track: MetadataTrack, contentType: String?): String { + val artists = track.artists.joinToString(", ") { it.name }.sanitizeFilenamePart() + val title = track.title.sanitizeFilenamePart() + val ext = contentTypeToExtension(contentType) + return "$artists - $title.$ext" + } + + suspend fun evictIfNeeded() { + val limitMB = resolveSizeLimitMB() + if (limitMB <= 0L) return + + cacheMutex.withLock { + val cacheDir = resolveCacheDir() + if (!fileSystem.exists(cacheDir)) return + + val index = readCacheIndex() + val sorted = index.entries.sortedBy { it.createdAtMs }.toMutableList() + + var totalSize = sorted.sumOf { it.sizeBytes } + val limitBytes = limitMB * 1024 * 1024 + + while (totalSize > limitBytes && sorted.isNotEmpty()) { + val entry = sorted.removeFirst() + val filePath = cacheDir / entry.filename.toPath() + if (fileSystem.exists(filePath)) { + fileSystem.delete(filePath) + } + totalSize -= entry.sizeBytes + } + + writeCacheIndex(index.copy(entries = sorted)) + } + } + + suspend fun commitCacheEntry( + trackId: String, + filename: String, + allBytes: ByteArray, + contentType: String, + ) { + val entry = CacheEntry( + trackId = trackId, + filename = filename, + sizeBytes = allBytes.size.toLong(), + createdAtMs = kotlin.time.Clock.System.now().toEpochMilliseconds(), + contentType = contentType, + ) + cacheMutex.withLock { + val index = readCacheIndex() + writeCacheIndex(CacheIndex( + entries = index.entries.filter { it.trackId != trackId } + entry + )) + } + } + + suspend fun serveCacheHead(call: ApplicationCall, entry: CacheEntry) { + call.respond(object : OutgoingContent.NoContent() { + override val status: HttpStatusCode = HttpStatusCode.OK + override val headers: Headers = HeadersBuilder().apply { + append(HttpHeaders.ContentType, entry.contentType) + append(HttpHeaders.ContentLength, entry.sizeBytes.toString()) + append(HttpHeaders.AcceptRanges, "bytes") + }.build() + override val contentLength: Long = entry.sizeBytes + override val contentType: ContentType = entry.toContentType() + }) + } + + suspend fun serveCacheGet(call: ApplicationCall, filePath: Path, entry: CacheEntry) { + val fileSize = entry.sizeBytes + val rangeHeader = call.request.headers[HttpHeaders.Range] + + if (rangeHeader != null) { + val range = parseRange(rangeHeader, fileSize) + if (range != null) { + val (start, end) = range + val length = end - start + 1 + val contentRange = "bytes $start-$end/$fileSize" + fileSystem.source(filePath).buffer().use { source -> + source.skip(start) + val bytes = source.readByteArray(length) + call.respond(object : OutgoingContent.WriteChannelContent() { + override val status: HttpStatusCode = HttpStatusCode.PartialContent + override val contentLength: Long = bytes.size.toLong() + override val contentType: ContentType = entry.toContentType() + override val headers: Headers = HeadersBuilder().apply { + append(HttpHeaders.ContentRange, contentRange) + append(HttpHeaders.AcceptRanges, "bytes") + }.build() + override suspend fun writeTo(channel: io.ktor.utils.io.ByteWriteChannel) { + channel.writeFully(bytes) + } + }) + } + return + } + call.respond(object : OutgoingContent.NoContent() { + override val status: HttpStatusCode = HttpStatusCode.RequestedRangeNotSatisfiable + override val headers: Headers = HeadersBuilder().apply { + append(HttpHeaders.ContentRange, "bytes */$fileSize") + }.build() + }) + return + } + + fileSystem.source(filePath).buffer().use { source -> + val bytes = source.readByteArray() + call.respond(object : OutgoingContent.WriteChannelContent() { + override val status: HttpStatusCode = HttpStatusCode.OK + override val contentLength: Long = bytes.size.toLong() + override val contentType: ContentType = entry.toContentType() + override val headers: Headers = HeadersBuilder().apply { + append(HttpHeaders.AcceptRanges, "bytes") + }.build() + override suspend fun writeTo(channel: io.ktor.utils.io.ByteWriteChannel) { + channel.writeFully(bytes) + } + }) + } + } +} + +internal fun parseRange(rangeHeader: String, fileSize: Long): Pair? { + val match = Regex("""bytes=(\d*)-(\d*)""").find(rangeHeader) ?: return null + val startStr = match.groupValues[1] + val endStr = match.groupValues[2] + if (startStr.isEmpty() && endStr.isEmpty()) return null + + val start = startStr.toLongOrNull() ?: 0L + val end = if (endStr.isNotEmpty()) endStr.toLongOrNull() ?: (fileSize - 1) else (fileSize - 1) + + if (start >= fileSize || start > end) return null + return start to end.coerceAtMost(fileSize - 1) +} + +internal fun CacheEntry.toContentType(): ContentType = + runCatching { ContentType.parse(contentType) }.getOrDefault(ContentType.Application.OctetStream) + +internal fun contentTypeToExtension(contentType: String?): String { + return when { + contentType == null -> "dat" + "webm" in contentType -> "webm" + "ogg" in contentType || "opus" in contentType -> "ogg" + "mp4" in contentType || "m4a" in contentType || "aac" in contentType -> "m4a" + "mpeg" in contentType || "mp3" in contentType -> "mp3" + "flac" in contentType -> "flac" + "wav" in contentType -> "wav" + else -> "dat" + } +} + +internal fun String.sanitizeFilenamePart(): String { + return this.replace(Regex("""[/\\:*?"<>|]"""), "_").take(200).trim() +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/LocalServer.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/LocalServer.kt new file mode 100644 index 00000000..0b31ea27 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/LocalServer.kt @@ -0,0 +1,205 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.server + +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import io.ktor.client.HttpClient +import io.ktor.http.HttpMethod +import io.ktor.server.application.Application +import io.ktor.server.cio.CIO +import io.ktor.server.engine.EmbeddedServer +import io.ktor.server.engine.embeddedServer +import io.ktor.server.response.respondText +import io.ktor.server.routing.get +import io.ktor.server.routing.head +import io.ktor.server.routing.routing +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.collectLatest +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.mapNotNull +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import org.koin.core.component.KoinComponent + +class LocalServer( + private val paths: Paths, + settingsViewModel: SettingsViewModel, + private val streamingUrlRepository: StreamingUrlRepository, + private val audioPlayerQueue: AudioPlayerQueue, +) : KoinComponent { + + val logger by injectLogger() + private val httpClient = HttpClient() + + private val scope = CoroutineScope(Dispatchers.IO + SupervisorJob()) + private val serverMutex = Mutex() + private var portWatcher: Job? = null + private val serverState = MutableStateFlow?>(null) + + val server: StateFlow?> = serverState.asStateFlow() + + private val activePort = MutableStateFlow(null) + val port = activePort.asStateFlow() + + val baseUrl = activePort.map { port -> + port?.let { "http://$HOST:$it" } + }.stateIn(scope, SharingStarted.WhileSubscribed(5_000), null) + + private val cachedCacheEnabled = MutableStateFlow(false) + private val cachedCacheFolder = MutableStateFlow(null) + private val cachedCacheSizeLimitMB = MutableStateFlow(0L) + + private val cacheManager = CacheManager( + paths = paths, + resolveCacheFolder = { cachedCacheFolder.value }, + resolveSizeLimitMB = { cachedCacheSizeLimitMB.value }, + ) + + private val streamProxy by lazy { + StreamProxy( + httpClient = httpClient, + streamingUrlRepository = streamingUrlRepository, + cacheManager = cacheManager, + audioPlayerQueue = audioPlayerQueue, + isCachingEnabled = { cachedCacheEnabled.value }, + activePort = { activePort.value }, + scope = scope, + logger = logger, + ) + } + + companion object { + private const val HOST = "127.0.0.1" + } + + init { + logger.d { "Starting playback proxy port watcher" } + portWatcher = scope.launch { + settingsViewModel.settingsState + .mapNotNull { it?.playbackProxyServerPort } + .distinctUntilChanged() + .collectLatest { port -> + logger.d { "Observed playback proxy port change to $port" } + restartServer(port) + } + } + scope.launch { + settingsViewModel.settingsState + .collect { settings -> + if (settings != null) { + cachedCacheEnabled.value = settings.enableMusicCaching + cachedCacheFolder.value = settings.cacheFolder + cachedCacheSizeLimitMB.value = settings.cacheSizeLimitMB + } + } + } + } + + @Suppress("unused") + suspend fun stop() { + logger.i { "Stopping playback proxy server and watcher" } + serverMutex.withLock { + stopServerLocked() + } + portWatcher?.cancel() + portWatcher = null + runCatching { httpClient.close() } + .onFailure { throwable -> + logger.w(throwable) { "Failed to close proxy HTTP client cleanly" } + } + scope.cancel() + logger.d { "Playback proxy server stopped" } + } + + private suspend fun restartServer(port: Int) { + serverMutex.withLock { + if (serverState.value != null && activePort.value == port) { + logger.v { "Playback proxy server already running on port $port; skipping restart" } + return + } + + logger.d { "Restarting playback proxy server on port $port" } + stopServerLocked() + + serverState.value = embeddedServer( + factory = CIO, + host = HOST, + port = port, + module = { configureRoutes() } + ).also { engine -> + engine.start(wait = false) + } + activePort.value = port + logger.i { "Playback proxy server started at ${baseUrl.value ?: "http://$HOST:$port"}" } + } + } + + private fun stopServerLocked() { + serverState.value?.let { engine -> + logger.d { "Stopping playback proxy server on port ${activePort.value}" } + runCatching { engine.stop(gracePeriodMillis = 1_000, timeoutMillis = 3_000) } + .onSuccess { + logger.d { "Playback proxy server stopped cleanly" } + } + .onFailure { throwable -> + logger.w(throwable) { "Failed to stop playback proxy server cleanly" } + } + } + serverState.value = null + activePort.value = null + } + + private fun Application.configureRoutes() { + routing { + get("/health") { + call.respondText("ok") + } + + head("/stream/{trackId}") { + streamProxy.handleStreamRequest(call, HttpMethod.Head) + } + + get("/stream/{trackId}") { + streamProxy.handleStreamRequest(call, HttpMethod.Get) + } + + get("/manifest/{trackId}") { + streamProxy.handleManifestRequest(call) + } + + get("/segment/{trackId}") { + streamProxy.handleSegmentRequest(call) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/MatchTracksRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/MatchTracksRepository.kt new file mode 100644 index 00000000..3dcda56c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/MatchTracksRepository.kt @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.server + +import androidx.datastore.preferences.core.edit +import androidx.datastore.preferences.core.stringPreferencesKey +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.db.Database +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.map +import kotlinx.serialization.json.Json + +class MatchedTracksRepository(private val database: Database) { + suspend fun getTrackSource(track: MetadataTrack): AudioSource.Basic? { + return database.matchedTracksDataStore.data.map { prefs -> + val json = prefs[stringPreferencesKey(track.id)] + if (json != null) { + Json.decodeFromString(json as String) + } else { + return@map null + } + }.first() + } + + suspend fun saveTrackSource(track: MetadataTrack, source: AudioSource.Basic) { + database.matchedTracksDataStore.edit { prefs -> + prefs[stringPreferencesKey(track.id)] = Json.encodeToString(source) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/StreamProxy.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/StreamProxy.kt new file mode 100644 index 00000000..ed63e17e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/StreamProxy.kt @@ -0,0 +1,507 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.server + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.StreamProtocol +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import io.ktor.client.HttpClient +import io.ktor.client.request.request +import io.ktor.client.statement.HttpResponse +import io.ktor.client.statement.bodyAsChannel +import io.ktor.client.statement.bodyAsText +import io.ktor.http.ContentType +import io.ktor.http.Headers +import io.ktor.http.HeadersBuilder +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpMethod +import io.ktor.http.HttpStatusCode +import io.ktor.http.content.OutgoingContent +import io.ktor.http.decodeURLQueryComponent +import io.ktor.http.encodeURLParameter +import io.ktor.server.application.ApplicationCall +import io.ktor.server.response.respond +import io.ktor.utils.io.copyTo +import io.ktor.utils.io.readRemaining +import io.ktor.utils.io.writeFully +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.io.readByteArray +import okio.FileSystem +import okio.Path.Companion.toPath +import okio.SYSTEM +import okio.buffer +import okio.use + +internal class StreamProxy( + private val httpClient: HttpClient, + private val streamingUrlRepository: StreamingUrlRepository, + private val cacheManager: CacheManager, + private val audioPlayerQueue: AudioPlayerQueue, + private val isCachingEnabled: () -> Boolean, + private val activePort: () -> Int?, + private val scope: CoroutineScope, + private val logger: co.touchlab.kermit.Logger, +) { + companion object { + private const val HOST = "127.0.0.1" + } + + private val fileSystem = FileSystem.SYSTEM + private val streamingInProgress = mutableSetOf() + private val streamingMutex = Mutex() + + private fun getTrackMetadata(trackId: String): MetadataTrack? { + return audioPlayerQueue.queueFlow.value + .filterIsInstance() + .firstOrNull { it.track.id == trackId } + ?.track + } + + suspend fun handleStreamRequest(call: ApplicationCall, requestMethod: HttpMethod) { + val trackId = call.parameters["trackId"]?.trim().orEmpty() + if (trackId.isBlank()) { + logger.w { "Rejecting /stream request with missing track id" } + call.respond(HttpStatusCode.BadRequest, "Missing track id") + return + } + + if (isCachingEnabled()) { + val cachedEntry = cacheManager.findCachedEntry(trackId) + if (cachedEntry != null) { + val (filePath, entry) = cachedEntry + logger.d { "Serving track $trackId from cache" } + when (requestMethod) { + HttpMethod.Head -> cacheManager.serveCacheHead(call, entry) + HttpMethod.Get -> cacheManager.serveCacheGet(call, filePath, entry) + else -> call.respond(HttpStatusCode.MethodNotAllowed) + } + return + } + + val isFirstRequest = streamingMutex.withLock { + if (trackId in streamingInProgress) { + false + } else { + streamingInProgress.add(trackId) + true + } + } + + if (!isFirstRequest) { + logger.d { "Track $trackId is being cached, waiting for cache" } + var waited = 0 + while (waited < 30) { + delay(200) + waited++ + val entry = cacheManager.findCachedEntry(trackId) + if (entry != null) { + val (filePath, e) = entry + logger.d { "Track $trackId became available from cache" } + when (requestMethod) { + HttpMethod.Head -> cacheManager.serveCacheHead(call, e) + HttpMethod.Get -> cacheManager.serveCacheGet(call, filePath, e) + else -> call.respond(HttpStatusCode.MethodNotAllowed) + } + return + } + } + logger.w { "Timeout waiting for cache of track $trackId, falling through to upstream" } + } + + try { + doStreamFromUpstream(call, trackId, requestMethod) + } finally { + if (isFirstRequest) { + streamingMutex.withLock { streamingInProgress.remove(trackId) } + } + } + return + } + + doStreamFromUpstream(call, trackId, requestMethod) + } + + private suspend fun doStreamFromUpstream(call: ApplicationCall, trackId: String, requestMethod: HttpMethod) { + val streamInfo = streamingUrlRepository.resolveStreamInfo(trackId) + if (streamInfo == null) { + logger.w { "Unable to resolve stream for track $trackId" } + call.respond(HttpStatusCode.NotFound, "Unable to resolve stream for track $trackId") + return + } + + if (streamInfo.protocol != StreamProtocol.PROGRESSIVE) { + val port = activePort() ?: 8080 + val manifestUrl = "http://$HOST:$port/manifest/${trackId}" + logger.d { "Redirecting $trackId to manifest URL: $manifestUrl" } + call.response.headers.append(HttpHeaders.Location, manifestUrl) + call.respond(HttpStatusCode.Found) + return + } + + proxyStream(call, streamInfo.url, trackId, requestMethod) + } + + suspend fun handleManifestRequest(call: ApplicationCall) { + val trackId = call.parameters["trackId"]?.trim().orEmpty() + if (trackId.isBlank()) { + logger.w { "Rejecting /manifest request with missing track id" } + call.respond(HttpStatusCode.BadRequest, "Missing track id") + return + } + + val streamInfo = streamingUrlRepository.resolveStreamInfo(trackId) + if (streamInfo == null) { + logger.w { "Unable to resolve stream for track $trackId" } + call.respond(HttpStatusCode.NotFound, "Unable to resolve stream for track $trackId") + return + } + + if (streamInfo.protocol == StreamProtocol.PROGRESSIVE) { + logger.w { "Track $trackId is not a manifest stream" } + call.respond(HttpStatusCode.BadRequest, "Not a manifest stream") + return + } + + proxyManifest(call, streamInfo.url, trackId, streamInfo.protocol) + } + + suspend fun handleSegmentRequest(call: ApplicationCall) { + val trackId = call.parameters["trackId"]?.trim().orEmpty() + val segmentUrl = call.parameters["url"]?.let { decodeUrl(it) } + + if (trackId.isBlank() || segmentUrl.isNullOrBlank()) { + logger.w { "Rejecting /segment request with missing parameters" } + call.respond(HttpStatusCode.BadRequest, "Missing track id or segment url") + return + } + + proxySegment(call, segmentUrl, trackId) + } + + private suspend fun proxyManifest( + call: ApplicationCall, + manifestUrl: String, + trackId: String, + protocol: StreamProtocol + ) { + logger.d { "Proxying manifest for track $trackId ($protocol): $manifestUrl" } + + val response = runCatching { + httpClient.request(manifestUrl) { + method = HttpMethod.Get + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.Accept) + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.UserAgent) + } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to fetch manifest for track $trackId" } + call.respond(HttpStatusCode.BadGateway, "Failed to fetch manifest") + return + } + + if (response.status.value >= 400) { + logger.w { "Manifest request failed for track $trackId with status ${response.status.value}" } + call.respond(HttpStatusCode.BadGateway, "Failed to fetch manifest") + return + } + + val manifestText = response.bodyAsText() + val port = activePort() ?: 8080 + val serverUrl = "http://$HOST:$port" + val rewrittenManifest = when (protocol) { + StreamProtocol.HLS -> rewriteHlsManifest(manifestText, manifestUrl, serverUrl, trackId) + StreamProtocol.DASH -> rewriteDashManifest(manifestText, manifestUrl, serverUrl, trackId) + else -> manifestText + } + + val contentType = when (protocol) { + StreamProtocol.HLS -> ContentType("application", "vnd.apple.mpegurl") + StreamProtocol.DASH -> ContentType("application", "dash+xml") + else -> ContentType.Application.OctetStream + } + + call.respond(object : OutgoingContent.WriteChannelContent() { + override val status: HttpStatusCode = HttpStatusCode.OK + override val contentType: ContentType = contentType + override val contentLength: Long? = rewrittenManifest.encodeToByteArray().size.toLong() + + override suspend fun writeTo(channel: io.ktor.utils.io.ByteWriteChannel) { + channel.writeFully(rewrittenManifest.encodeToByteArray()) + } + }) + } + + private suspend fun proxySegment( + call: ApplicationCall, + segmentUrl: String, + trackId: String + ) { + logger.d { "Proxying segment for track $trackId" } + + val response = runCatching { + httpClient.request(segmentUrl) { + method = HttpMethod.Get + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.Range) + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.Accept) + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.UserAgent) + } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to fetch segment for track $trackId" } + call.respond(HttpStatusCode.BadGateway, "Failed to fetch segment") + return + } + + if (response.status.value >= 400) { + logger.w { "Segment request failed for track $trackId with status ${response.status.value}" } + call.respond(HttpStatusCode.BadGateway, "Failed to fetch segment") + return + } + + val downstreamHeaders = upstreamHeadersToForward(response) + val downstreamContentLength = downstreamHeaders[HttpHeaders.ContentLength]?.toLongOrNull() + + call.respond(object : OutgoingContent.WriteChannelContent() { + override val status: HttpStatusCode = response.status + override val headers: Headers = downstreamHeaders + override val contentLength: Long? = downstreamContentLength + override val contentType: ContentType? = + downstreamHeaders[HttpHeaders.ContentType]?.let(ContentType.Companion::parse) + + override suspend fun writeTo(channel: io.ktor.utils.io.ByteWriteChannel) { + response.bodyAsChannel().copyTo(channel) + } + }) + } + + private suspend fun proxyStream( + call: ApplicationCall, + streamUrl: String, + trackId: String, + requestMethod: HttpMethod + ) { + logger.d { "Proxying stream for track $trackId using $requestMethod" } + + var currentUrl = streamUrl + var attemptedRefresh = false + var upstream: HttpResponse? = null + + while (true) { + val response = runCatching { + httpClient.request(currentUrl) { + method = requestMethod + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.Range) + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.IfRange) + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.Accept) + call.forwardRequestHeaderIfPresent(headers, HttpHeaders.UserAgent) + } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to fetch upstream stream for track $trackId" } + call.respond(HttpStatusCode.BadGateway, "Failed to fetch upstream stream") + return + } + + if (response.status.value < 400) { + upstream = response + break + } + + logger.w { "Upstream stream request failed for track $trackId with status ${response.status.value}" } + streamingUrlRepository.invalidateCachedStreamUrl(trackId, currentUrl) + + if (attemptedRefresh) { + upstream = response + break + } + + val refreshedUrl = + streamingUrlRepository.resolveStreamInfo(trackId, forceRefresh = true)?.url + if (refreshedUrl.isNullOrBlank() || refreshedUrl == currentUrl) { + upstream = response + break + } + + logger.d { "Retrying stream for track $trackId using refreshed URL" } + currentUrl = refreshedUrl + attemptedRefresh = true + } + + if (upstream.status.value >= 400 && isCachingEnabled()) { + val cachedEntry = cacheManager.findCachedEntry(trackId) + if (cachedEntry != null) { + val (filePath, entry) = cachedEntry + logger.d { "Falling back to cache for track $trackId after upstream error" } + if (requestMethod == HttpMethod.Get) { + cacheManager.serveCacheGet(call, filePath, entry) + } else { + cacheManager.serveCacheHead(call, entry) + } + return + } + } + + val downstreamHeaders = upstreamHeadersToForward(upstream) + val downstreamContentLength = downstreamHeaders[HttpHeaders.ContentLength]?.toLongOrNull() + logger.v { + "Proxy response headers for $trackId status=${upstream.status.value} " + + "contentType=${downstreamHeaders[HttpHeaders.ContentType]} " + + "contentLength=${downstreamHeaders[HttpHeaders.ContentLength]} " + + "contentRange=${downstreamHeaders[HttpHeaders.ContentRange]} " + + "acceptRanges=${downstreamHeaders[HttpHeaders.AcceptRanges]}" + } + + if (requestMethod == HttpMethod.Head) { + call.respond(object : OutgoingContent.NoContent() { + override val status: HttpStatusCode = upstream.status + override val headers: Headers = downstreamHeaders + override val contentLength: Long? = downstreamContentLength + }) + return + } + + val doCache = requestMethod == HttpMethod.Get && isCachingEnabled() + val cacheTrack = if (doCache) getTrackMetadata(trackId) else null + val cacheFilename = if (cacheTrack != null) { + cacheManager.resolveCacheFilename(cacheTrack, downstreamHeaders[HttpHeaders.ContentType]) + } else { + null + } + val trackIdForCache = trackId + val cacheContentType = downstreamHeaders[HttpHeaders.ContentType] ?: "application/octet-stream" + + call.respond(object : OutgoingContent.WriteChannelContent() { + override val status: HttpStatusCode = upstream.status + override val headers: Headers = downstreamHeaders + override val contentLength: Long? = downstreamContentLength + override val contentType: ContentType? = + downstreamHeaders[HttpHeaders.ContentType]?.let(ContentType.Companion::parse) + + override suspend fun writeTo(channel: io.ktor.utils.io.ByteWriteChannel) { + if (cacheFilename != null) { + val cacheDir = cacheManager.resolveCacheDir() + val cacheFile = cacheDir / cacheFilename.toPath() + fileSystem.createDirectories(cacheDir) + try { + val packet = upstream.bodyAsChannel().readRemaining() + val allBytes = packet.readByteArray() + channel.writeFully(allBytes) + fileSystem.sink(cacheFile).buffer().use { sink -> + sink.write(allBytes) + } + cacheManager.commitCacheEntry( + trackId = trackIdForCache, + filename = cacheFilename, + allBytes = allBytes, + contentType = cacheContentType, + ) + scope.launch { + cacheManager.evictIfNeeded() + } + } catch (e: Exception) { + if (fileSystem.exists(cacheFile)) { + fileSystem.delete(cacheFile) + } + throw e + } + } else { + upstream.bodyAsChannel().copyTo(channel) + } + } + }) + } + + private fun rewriteHlsManifest( + manifest: String, + baseUrl: String, + serverUrl: String, + trackId: String + ): String { + val manifestBase = baseUrl.substringBeforeLast('/') + val lines = manifest.lines() + val rewritten = lines.map { line -> + when { + line.isBlank() || line.startsWith("#") -> line + line.startsWith("http") -> { + "${serverUrl}/segment/${trackId}?url=${encodeUrl(line)}" + } + else -> { + val absoluteUrl = if (line.startsWith("/")) { + val urlBase = + baseUrl.substringBefore("://") + "://" + baseUrl.substringAfter("://") + .substringBefore('/') + "$urlBase$line" + } else { + "$manifestBase/$line" + } + "${serverUrl}/segment/${trackId}?url=${encodeUrl(absoluteUrl)}" + } + } + } + return rewritten.joinToString("\n") + } + + private fun rewriteDashManifest( + manifest: String, + baseUrl: String, + serverUrl: String, + trackId: String + ): String { + val manifestBase = baseUrl.substringBeforeLast('/') + var rewritten = manifest + + val urlRegex = Regex("""(BaseURL|SegmentURL|Location)>([^<]+)""") + rewritten = urlRegex.replace(rewritten) { match -> + val tag = match.groupValues[1] + val url = match.groupValues[2] + val absoluteUrl = if (url.startsWith("http")) url else "$manifestBase/$url" + "$tag>${serverUrl}/segment/${trackId}?url=${encodeUrl(absoluteUrl)}" + } + + val srcRegex = Regex("""src="([^"]+)"""") + rewritten = srcRegex.replace(rewritten) { match -> + val url = match.groupValues[1] + val absoluteUrl = if (url.startsWith("http")) url else "$manifestBase/$url" + """src="${serverUrl}/segment/${trackId}?url=${encodeUrl(absoluteUrl)}""" + } + + return rewritten + } + + private fun encodeUrl(url: String): String = url.encodeURLParameter() + private fun decodeUrl(encoded: String): String = encoded.decodeURLQueryComponent() + + private fun ApplicationCall.forwardRequestHeaderIfPresent( + builder: HeadersBuilder, + headerName: String + ) { + request.headers.getAll(headerName)?.forEach { value -> + builder.append(headerName, value) + } + } + + private fun upstreamHeadersToForward(upstream: HttpResponse): Headers { + return HeadersBuilder().apply { + upstream.headers.forEach { name, values -> + values.forEach { value -> append(name, value) } + } + }.build() + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/StreamingUrlRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/StreamingUrlRepository.kt new file mode 100644 index 00000000..c3af11d4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/server/StreamingUrlRepository.kt @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.server + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.StreamProtocol +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.plugin.PluginManager +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import org.koin.core.component.KoinComponent +import kotlin.time.Clock +import kotlin.time.Duration.Companion.seconds + +data class CachedStreamUrl( + val url: String, + val protocol: StreamProtocol, + val expiresAtMs: Long, + val container: String, + val codec: String, +) + +data class StreamInfo( + val url: String, + val protocol: StreamProtocol, + val codec: String, + val container: String, +) + + +class StreamingUrlRepository( + private val pluginManager: PluginManager, + private val audioPlayerQueue: AudioPlayerQueue, + private val matchedTracksRepository: MatchedTracksRepository, +) : KoinComponent { + + companion object { + private val STREAM_URL_CACHE_TTL_MS = 30.seconds.inWholeMilliseconds + } + + private val logger by injectLogger() + private val streamUrlCacheMutex = Mutex() + private val streamUrlCache = mutableMapOf() + private val alternativesCacheMutex = Mutex() + private val alternativesCache = mutableMapOf>() + + private fun normalizeManifestUrl(url: String, protocol: StreamProtocol): String { + if (url.startsWith("http")) return url + val base = when (protocol) { + StreamProtocol.DASH, StreamProtocol.HLS -> "https://www.youtube.com" + StreamProtocol.PROGRESSIVE -> return url + } + return "$base$url" + } + + suspend fun resolveStreamInfo( + trackId: String, + forceRefresh: Boolean = false + ): StreamInfo? { + val queueEntry = audioPlayerQueue.queueFlow.value.firstOrNull { + it is QueueEntry.StreamingTrack && it.track.id == trackId + } as QueueEntry.StreamingTrack? + + if (queueEntry == null) { + logger.v { "Track $trackId is not present in current queue" } + return null + } + return resolveStreamInfo(queueEntry.track, forceRefresh) + } + + suspend fun resolveStreamInfo( + track: MetadataTrack, + forceRefresh: Boolean = false + ): StreamInfo? { + val trackId = track.id + if (!forceRefresh) { + getCachedStreamUrl(trackId)?.let { cached -> + logger.v { "Using cached stream URL for track $trackId" } + return cached + } + } + + val audioPlugin = pluginManager.selectedAudioPlugin.value + if (audioPlugin == null) { + logger.w { "No audio plugin selected while resolving stream for track $trackId" } + return null + } + + val source = matchedTracksRepository.getTrackSource(track) + + if (source != null) { + logger.d { "Attempting stream resolution for track $trackId using cached source" } + val stream = runCatching { + audioPlugin.use { + audioAPI.getStreamsOfAudioSource(source) + .firstOrNull() + } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to resolve audio stream for track $trackId using matched source" } + null + } + + if (stream != null) { + logger.d { "Resolved stream for track $trackId using cached source" } + val resolvedStream = stream.streams.firstOrNull() + if (resolvedStream != null) { + val url = normalizeManifestUrl(resolvedStream.url, resolvedStream.protocol) + val info = StreamInfo( + url, + resolvedStream.protocol, + resolvedStream.codec, + resolvedStream.container + ) + cacheStreamInfo(trackId, info) + return info + } + } + + logger.d { "Cached source did not provide a stream for track $trackId; falling back to track lookup" } + } + + logger.d { "Attempting stream resolution for track $trackId using track lookup" } + val sources = runCatching { + audioPlugin.use { + audioAPI.getStreamsByTrack(track) + } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to resolve audio stream for track $trackId" } + return null + } + + if (sources.isEmpty()) { + logger.w { "No stream candidates found for track $trackId" } + return null + } + + cacheAlternatives(trackId, sources) + + val stream = runCatching { + audioPlugin.use { + sources.firstNotNullOfOrNull { src -> + when (src) { + is AudioSource.Streamed -> { + matchedTracksRepository.saveTrackSource(track, src.toBasic()) + src + } + + is AudioSource.Basic -> { + matchedTracksRepository.saveTrackSource(track, src) + audioAPI.getStreamsOfAudioSource(src) + .firstOrNull() + } + } + } + } + }.getOrElse { throwable -> + logger.w(throwable) { "Failed to resolve audio stream for track $trackId" } + return null + } + + if (stream == null) { + logger.w { "No stream candidates found for track $trackId" } + return null + } + + logger.d { "Resolved stream for track $trackId via track lookup" } + val resolvedStream = stream.streams.firstOrNull() + if (resolvedStream != null) { + val url = normalizeManifestUrl(resolvedStream.url, resolvedStream.protocol) + val info = StreamInfo( + url, + resolvedStream.protocol, + resolvedStream.codec, + resolvedStream.container + ) + cacheStreamInfo(trackId, info) + return info + } + return null + } + + suspend fun getCachedStreamUrl(trackId: String): StreamInfo? { + val now = Clock.System.now().toEpochMilliseconds() + return streamUrlCacheMutex.withLock { + val cached = streamUrlCache[trackId] ?: return@withLock null + if (cached.expiresAtMs <= now) { + streamUrlCache.remove(trackId) + logger.v { "Cached stream URL expired for track $trackId" } + return@withLock null + } + StreamInfo(cached.url, cached.protocol, cached.container, cached.codec) + } + } + + suspend fun cacheStreamInfo(trackId: String, info: StreamInfo) { + val expiresAtMs = Clock.System.now().toEpochMilliseconds() + STREAM_URL_CACHE_TTL_MS + streamUrlCacheMutex.withLock { + streamUrlCache[trackId] = + CachedStreamUrl( + url = info.url, + protocol = info.protocol, + expiresAtMs = expiresAtMs, + container = info.container, + codec = info.codec + ) + } + } + + suspend fun invalidateCachedStreamUrl(trackId: String, url: String? = null) { + streamUrlCacheMutex.withLock { + val cached = streamUrlCache[trackId] ?: return@withLock + if (url == null || cached.url == url) { + streamUrlCache.remove(trackId) + logger.v { "Invalidated cached stream URL for track $trackId" } + } + } + } + + suspend fun getCachedAlternatives(trackId: String): List? { + return alternativesCacheMutex.withLock { + alternativesCache[trackId] + } + } + + suspend fun cacheAlternatives(trackId: String, sources: List) { + alternativesCacheMutex.withLock { + alternativesCache[trackId] = sources + logger.v { "Cached ${sources.size} alternative sources for track $trackId" } + } + } + + suspend fun invalidateCachedAlternatives(trackId: String) { + alternativesCacheMutex.withLock { + alternativesCache.remove(trackId) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/share/ShareService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/share/ShareService.kt new file mode 100644 index 00000000..d98d8ad2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/share/ShareService.kt @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.share + +interface ShareService { + fun share(url: String, title: String) +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/tools/user_agents/UserAgents.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/tools/user_agents/UserAgents.kt new file mode 100644 index 00000000..a537a8a1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/tools/user_agents/UserAgents.kt @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.tools.user_agents + +object UserAgents { + private val agents = listOf( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36", + "Mozilla/5.0 (Linux; Android 15; ALI-NX1 Build/HONORALI-N21) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/147.0.7727.92 Mobile Safari/537.36", + "Mozilla/5.0 (Linux; Android 14; SM-A528B Build/UP1A.231005.007) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/147.0.7727.108 Mobile Safari/537.36", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:68.0) Gecko/20100101 Firefox/68.0 Waterfox/56.6.2021.2816", + "Mozilla/5.0 (Macintosh; Intel Mac OS X10.14; rv:65.0) Gecko/20100101 Firefox/65.0 Waterfox/56.2.7", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Vivaldi/7.6.3797.63", + "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.91 Safari/537.36 Vivaldi/1.92.917.39", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Vivaldi/7.5.3735.47" + ) + + fun random(): String = agents.random() +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/Buttons.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/Buttons.kt new file mode 100644 index 00000000..d589ebca --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/Buttons.kt @@ -0,0 +1,834 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.base + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.interaction.collectIsPressedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.defaultMinSize +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.LocalContentColor +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.Immutable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithCache +import androidx.compose.ui.draw.shadow +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.graphics.luminance +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import dev.krtirtho.spotube.resources.iconsax.ArrowLeft3 +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.Iconsax3DotsMore +import dev.krtirtho.spotube.resources.iconsax.IconsaxAddSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxArrowSquareUp +import dev.krtirtho.spotube.resources.iconsax.IconsaxDocumentText +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxMagic +import dev.krtirtho.spotube.resources.iconsax.IconsaxNext +import dev.krtirtho.spotube.resources.iconsax.IconsaxShare +import dev.krtirtho.spotube.resources.iconsax.User + +private val ButtonShape = RoundedCornerShape(14.dp) +private val GroupShape = RoundedCornerShape(14.dp) +private val BadgeShape = RoundedCornerShape(11.dp) +private val ButtonMinHeight = 40.dp +private val SquareButtonSize = 40.dp + +@Immutable +data class ButtonColors( + val containerLighter: Color, + val containerDarker: Color, + val containerPressed: Color, + val onContainer: Color, + val border: Color, + val accent: Color, + val onAccent: Color, + val secondaryContainer: Color, + val onSecondaryContainer: Color, + val secondaryContainerPressed: Color, + val secondaryHighlight: Color, + val shadow: Color, + val highlight: Color, +) + +@Composable +fun rememberButtonColors(): ButtonColors { + val scheme = MaterialTheme.colorScheme + val isLight = scheme.surface.luminance() > 0.5f + + return remember(scheme) { + ButtonColors( + containerLighter = if (isLight) { + Color.White + } else { + scheme.surfaceContainerHigh + }, + containerDarker = if (isLight) { + Color(0xFFF2F2F4) + } else { + scheme.surfaceContainer + }, + containerPressed = if (isLight) { + Color(0xFFE0E0E3) + } else { + scheme.surfaceContainerHighest + }, + onContainer = scheme.onSurface, + border = scheme.outlineVariant, + accent = scheme.primary, + onAccent = scheme.onPrimary, + secondaryContainer = scheme.secondaryContainer, + onSecondaryContainer = scheme.onSecondaryContainer, + secondaryContainerPressed = scheme.secondaryContainer.copy( + alpha = if (isLight) 0.85f else 0.92f + ), + secondaryHighlight = if (isLight) { + Color.White.copy(alpha = 0.5f) + } else { + Color.White.copy(alpha = 0.08f) + }, + shadow = scheme.onSurface.copy(alpha = 0.12f), + highlight = if (isLight) { + Color.White.copy(alpha = 0.9f) + } else { + Color.White.copy(alpha = 0.06f) + }, + ) + } +} + +@Composable +fun outlinedGradient(colors: ButtonColors, pressed: Boolean): Brush { + val top = if (pressed) colors.containerPressed else colors.containerLighter + val bottom = if (pressed) colors.containerPressed else colors.containerDarker + return remember(colors, pressed) { Brush.verticalGradient(listOf(top, bottom)) } +} + +@Composable +fun primaryGradient(colors: ButtonColors, pressed: Boolean): Brush { + val alpha = if (pressed) 0.85f else 1f + return remember(colors, pressed) { + Brush.verticalGradient( + listOf(colors.accent.copy(alpha = alpha), colors.accent) + ) + } +} + +@Composable +private fun secondaryGradient(colors: ButtonColors, pressed: Boolean): Brush { + val top = if (pressed) colors.secondaryContainerPressed else colors.secondaryContainer + val bottom = if (pressed) { + colors.secondaryContainerPressed + } else { + colors.secondaryContainer.copy( + alpha = if (top.luminance() > 0.5f) 0.92f else 1f + ) + } + return remember(colors, pressed) { Brush.verticalGradient(listOf(top, bottom)) } +} + +@Composable +private fun badgeGradient(colors: ButtonColors): Brush = remember(colors) { + Brush.verticalGradient(listOf(colors.containerLighter, colors.containerDarker)) +} + +@Composable +private fun buttonShadow( + shape: androidx.compose.ui.graphics.Shape, + pressed: Boolean, + primary: Boolean, + colors: ButtonColors, + hovered: Boolean = false, +): Modifier { + val elevation = when { + pressed -> 1.dp + hovered -> 9.dp + else -> 6.dp + } + val ambient = if (primary) { + colors.accent.copy( + alpha = when { + pressed -> 0.2f + hovered -> 0.45f + else -> 0.35f + } + ) + } else { + colors.shadow.copy( + alpha = when { + pressed -> 0.08f + hovered -> 0.22f + else -> 0.15f + } + ) + } + val spot = if (primary) { + colors.accent.copy( + alpha = when { + pressed -> 0.25f + hovered -> 0.5f + else -> 0.4f + } + ) + } else { + colors.shadow.copy( + alpha = when { + pressed -> 0.1f + hovered -> 0.26f + else -> 0.18f + } + ) + } + return Modifier.shadow( + elevation = elevation, + shape = shape, + ambientColor = ambient, + spotColor = spot, + ) +} + +@Composable +fun OutlineButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: androidx.compose.ui.graphics.Shape = ButtonShape, + contentPadding: PaddingValues = PaddingValues(horizontal = 20.dp, vertical = 10.dp), + content: @Composable RowScope.() -> Unit, +) { + val colors = rememberButtonColors() + val interactionSource = remember { MutableInteractionSource() } + val isPressed by interactionSource.collectIsPressedAsState() + val isHovered by interactionSource.collectIsHoveredAsState() + val gradient = outlinedGradient(colors, isPressed) + val border = colors.border.copy(alpha = if (isPressed) 0.7f else 1f) + val lift = if (isHovered && !isPressed) (-1).dp else 0.dp + + Box( + modifier = modifier + .defaultMinSize(minHeight = ButtonMinHeight) + .hoverable(interactionSource = interactionSource, enabled = enabled) + .graphicsLayer { translationY = lift.toPx() } + .then(buttonShadow(shape, isPressed, primary = false, colors, hovered = isHovered)) + .clip(shape) + .background(gradient, shape) + .border(BorderStroke(1.5.dp, border), shape) + .clickable( + enabled = enabled, + interactionSource = interactionSource, + indication = ripple(), + onClick = onClick, + ) + .drawWithCache { + val highlightBrush = Brush.verticalGradient( + colors = listOf(colors.highlight, Color.Transparent), + startY = 0f, + endY = size.height * 0.5f, + ) + onDrawWithContent { + drawContent() + drawRect( + brush = highlightBrush, + topLeft = androidx.compose.ui.geometry.Offset.Zero, + size = size, + ) + } + } + .padding(contentPadding), + contentAlignment = Alignment.Center, + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + content = content, + ) + } +} + +@Composable +fun PrimaryButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: androidx.compose.ui.graphics.Shape = ButtonShape, + contentPadding: PaddingValues = PaddingValues(horizontal = 20.dp, vertical = 10.dp), + content: @Composable RowScope.() -> Unit, +) { + val colors = rememberButtonColors() + val interactionSource = remember { MutableInteractionSource() } + val isPressed by interactionSource.collectIsPressedAsState() + val isHovered by interactionSource.collectIsHoveredAsState() + val gradient = primaryGradient(colors, isPressed) + val lift = if (isHovered && !isPressed) (-1).dp else 0.dp + + Box( + modifier = modifier + .defaultMinSize(minHeight = ButtonMinHeight) + .hoverable(interactionSource = interactionSource, enabled = enabled) + .graphicsLayer { translationY = lift.toPx() } + .then(buttonShadow(shape, isPressed, primary = true, colors, hovered = isHovered)) + .clip(shape) + .background(gradient, shape) + .border(BorderStroke(1.5.dp, colors.accent), shape) + .clickable( + enabled = enabled, + interactionSource = interactionSource, + indication = ripple(), + onClick = onClick, + ) + .drawWithCache { + val highlightBrush = Brush.verticalGradient( + colors = listOf(Color.White.copy(alpha = 0.25f), Color.Transparent), + startY = 0f, + endY = size.height * 0.5f, + ) + onDrawWithContent { + drawContent() + drawRect( + brush = highlightBrush, + topLeft = androidx.compose.ui.geometry.Offset.Zero, + size = size, + ) + } + } + .padding(contentPadding), + contentAlignment = Alignment.Center, + ) { + CompositionLocalProvider(LocalContentColor provides colors.onAccent) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + content = content, + ) + } + } +} + +@Composable +fun SecondaryButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: androidx.compose.ui.graphics.Shape = ButtonShape, + contentPadding: PaddingValues = PaddingValues(horizontal = 20.dp, vertical = 10.dp), + content: @Composable RowScope.() -> Unit, +) { + val colors = rememberButtonColors() + val interactionSource = remember { MutableInteractionSource() } + val isPressed by interactionSource.collectIsPressedAsState() + val isHovered by interactionSource.collectIsHoveredAsState() + val gradient = secondaryGradient(colors, isPressed) + val lift = if (isHovered && !isPressed) (-1).dp else 0.dp + + Box( + modifier = modifier + .defaultMinSize(minHeight = ButtonMinHeight) + .hoverable(interactionSource = interactionSource, enabled = enabled) + .graphicsLayer { translationY = lift.toPx() } + .then(buttonShadow(shape, isPressed, primary = false, colors, hovered = isHovered)) + .clip(shape) + .background(gradient, shape) + .border( + BorderStroke(1.5.dp, colors.secondaryContainer.copy(alpha = 0.5f)), + shape, + ) + .clickable( + enabled = enabled, + interactionSource = interactionSource, + indication = ripple(), + onClick = onClick, + ) + .drawWithCache { + val highlightBrush = Brush.verticalGradient( + colors = listOf(colors.secondaryHighlight, Color.Transparent), + startY = 0f, + endY = size.height * 0.5f, + ) + onDrawWithContent { + drawContent() + drawRect( + brush = highlightBrush, + topLeft = androidx.compose.ui.geometry.Offset.Zero, + size = size, + ) + } + } + .padding(contentPadding), + contentAlignment = Alignment.Center, + ) { + CompositionLocalProvider(LocalContentColor provides colors.onSecondaryContainer) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + content = content, + ) + } + } +} + +@Composable +fun IconButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: androidx.compose.ui.graphics.Shape = ButtonShape, + content: @Composable () -> Unit, +) { + OutlineButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + shape = shape, + contentPadding = PaddingValues(8.dp), + ) { + content() + } +} + +@Composable +fun PrimaryIconButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: androidx.compose.ui.graphics.Shape = ButtonShape, + content: @Composable () -> Unit, +) { + PrimaryButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + shape = shape, + contentPadding = PaddingValues(8.dp), + ) { + content() + } +} + +@Composable +fun SecondaryIconButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: androidx.compose.ui.graphics.Shape = ButtonShape, + content: @Composable () -> Unit, +) { + SecondaryButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + shape = shape, + contentPadding = PaddingValues(8.dp), + ) { + content() + } +} + +@Composable +fun ButtonBadge( + count: Int, + modifier: Modifier = Modifier, +) { + val colors = rememberButtonColors() + Box( + modifier = modifier + .heightIn(min = 22.dp) + .defaultMinSize(minWidth = 22.dp) + .background(badgeGradient(colors), BadgeShape) + .border(1.dp, colors.border, BadgeShape) + .padding(horizontal = 7.dp), + contentAlignment = Alignment.Center, + ) { + Text( + text = count.toString(), + fontSize = 12.sp, + fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold, + maxLines = 1, + softWrap = false, + color = colors.onContainer.copy(alpha = 0.7f), + ) + } +} + +@Composable +fun GroupButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + contentPadding: PaddingValues = PaddingValues(horizontal = 14.dp, vertical = 11.dp), + content: @Composable RowScope.() -> Unit, +) { + val colors = rememberButtonColors() + val interactionSource = remember { MutableInteractionSource() } + val isPressed by interactionSource.collectIsPressedAsState() + val isHovered by interactionSource.collectIsHoveredAsState() + val overlay = when { + isPressed -> colors.containerPressed + isHovered -> colors.containerPressed.copy(alpha = 0.5f) + else -> Color.Transparent + } + val lift = if (isHovered && !isPressed) (-1).dp else 0.dp + + Box( + modifier = modifier + .defaultMinSize(minHeight = ButtonMinHeight) + .graphicsLayer { translationY = lift.toPx() } + .background(overlay) + .hoverable(interactionSource = interactionSource, enabled = enabled) + .clickable( + enabled = enabled, + interactionSource = interactionSource, + indication = ripple(), + onClick = onClick, + ) + .padding(contentPadding), + contentAlignment = Alignment.Center, + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + content = content, + ) + } +} + +@Composable +fun GroupIconButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + content: @Composable () -> Unit, +) { + val colors = rememberButtonColors() + val interactionSource = remember { MutableInteractionSource() } + val isPressed by interactionSource.collectIsPressedAsState() + val isHovered by interactionSource.collectIsHoveredAsState() + val overlay = when { + isPressed -> colors.containerPressed + isHovered -> colors.containerPressed.copy(alpha = 0.5f) + else -> Color.Transparent + } + val lift = if (isHovered && !isPressed) (-1).dp else 0.dp + + Box( + modifier = modifier + .size(SquareButtonSize) + .graphicsLayer { translationY = lift.toPx() } + .background(overlay) + .hoverable(interactionSource = interactionSource, enabled = enabled) + .clickable( + enabled = enabled, + interactionSource = interactionSource, + indication = ripple(), + onClick = onClick, + ), + contentAlignment = Alignment.Center, + ) { + content() + } +} + +@Composable +fun ButtonGroup( + modifier: Modifier = Modifier, + content: @Composable () -> Unit, +) { + val colors = rememberButtonColors() + Surface( + modifier = modifier + .defaultMinSize(minHeight = ButtonMinHeight) + .then(buttonShadow(GroupShape, pressed = false, primary = false, colors, hovered = false)), + shape = GroupShape, + color = Color.Transparent, + border = BorderStroke(1.5.dp, colors.border), + ) { + Box( + modifier = Modifier.background(outlinedGradient(colors, false), GroupShape), + ) { + Row(verticalAlignment = Alignment.CenterVertically) { + content() + } + } + } +} + +@Composable +fun ButtonGroupDivider() { + val colors = rememberButtonColors() + Box( + modifier = Modifier + .width(1.5.dp) + .heightIn(min = 20.dp) + .background(colors.border), + ) +} + +@Preview(showBackground = true) +@Composable +private fun ButtonsRow1Preview() { + MaterialTheme { + Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + OutlineButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxShare, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + Text( + "Copy link", + maxLines = 1, + softWrap = false, + ) + } + OutlineButton(onClick = {}) { + Icon( + imageVector = Iconsax.User, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + Text("Login", maxLines = 1, softWrap = false) + } + PrimaryButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxAddSquare, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + Text( + "Sign Up", + maxLines = 1, + softWrap = false, + fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold, + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +private fun ButtonsRow2Preview() { + MaterialTheme { + Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + ButtonGroup { + GroupButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxDocumentText, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + Text("Documents", maxLines = 1, softWrap = false) + } + ButtonGroupDivider() + GroupButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxShare, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + Text("Export", maxLines = 1, softWrap = false) + } + ButtonGroupDivider() + GroupIconButton(onClick = {}) { + Icon( + imageVector = Iconsax.Iconsax3DotsMore, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + } + ButtonGroup { + GroupIconButton(onClick = {}) { + Icon( + imageVector = Iconsax.ArrowLeft3, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + ButtonGroupDivider() + GroupIconButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxNext, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +private fun ButtonsRow3Preview() { + MaterialTheme { + Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + OutlineButton(onClick = {}) { + Text("Cancel", maxLines = 1, softWrap = false) + } + PrimaryButton(onClick = {}) { + Text( + "Done", + maxLines = 1, + softWrap = false, + fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold, + ) + } + IconButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxMagic, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + OutlineButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxHeart, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + Text("Like", maxLines = 1, softWrap = false) + ButtonBadge(count = 2) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +private fun ButtonsRow4Preview() { + MaterialTheme { + Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + ButtonGroup { + GroupIconButton(onClick = {}) { + Icon( + imageVector = Iconsax.ArrowLeft3, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + ButtonGroupDivider() + GroupIconButton(onClick = {}) { + Icon( + imageVector = Iconsax.IconsaxNext, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + } + OutlineButton(onClick = {}) { + Text("Forward", maxLines = 1, softWrap = false) + Icon( + imageVector = Iconsax.IconsaxArrowSquareUp, + contentDescription = null, + modifier = Modifier.size(18.dp), + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +private fun ButtonStylesPreview() { + MaterialTheme { + Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + OutlineButton(onClick = {}) { + Text("Outline", maxLines = 1, softWrap = false) + } + SecondaryButton(onClick = {}) { + Text("Secondary", maxLines = 1, softWrap = false) + } + PrimaryButton(onClick = {}) { + Text( + "Primary", + maxLines = 1, + softWrap = false, + fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold, + ) + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/CheckBox.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/CheckBox.kt new file mode 100644 index 00000000..799d0fb8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/CheckBox.kt @@ -0,0 +1,286 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.base + +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.tween +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.interaction.collectIsPressedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithCache +import androidx.compose.ui.draw.shadow +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp + +enum class CheckBoxState { + SELECTED, + UNSELECTED, + INDETERMINATE, + @Deprecated("Use INDETERMINATE", ReplaceWith("CheckBoxState.INDETERMINATE")) + CLEAR; +} + +private val CheckBoxShape = RoundedCornerShape(6.dp) +private val CheckBoxSize = 22.dp + +@Composable +fun CheckBox( + state: CheckBoxState = CheckBoxState.UNSELECTED, + onClick: (() -> Unit)?, + modifier: Modifier = Modifier, + enabled: Boolean = true, + interactionSource: MutableInteractionSource? = null, +) { + val colors = rememberButtonColors() + val source = interactionSource ?: remember { MutableInteractionSource() } + val isPressed by source.collectIsPressedAsState() + val isHovered by source.collectIsHoveredAsState() + val lift = if (isHovered && !isPressed && onClick != null) (-1).dp else 0.dp + + val isSelected = state == CheckBoxState.SELECTED + val isIndeterminate = state == CheckBoxState.INDETERMINATE + val isFilled = isSelected || isIndeterminate + + val backgroundBrush = if (isFilled) { + primaryGradient(colors, isPressed) + } else { + outlinedGradient(colors, false) + } + val borderColor = when { + !enabled -> colors.onContainer.copy(alpha = 0.38f) + isFilled -> colors.accent + else -> colors.border + } + val borderWidth = if (isFilled) 1.5.dp else 1.5.dp + + val shadowElevation = when { + isPressed -> 1.dp + isFilled && isHovered -> 8.dp + isFilled -> 6.dp + isHovered -> 5.dp + else -> 3.dp + } + val shadowAmbient = if (isFilled) { + colors.accent.copy( + alpha = when { + isPressed -> 0.2f + isHovered -> 0.4f + else -> 0.3f + } + ) + } else { + colors.shadow.copy( + alpha = when { + isPressed -> 0.08f + isHovered -> 0.2f + else -> 0.15f + } + ) + } + val shadowSpot = if (isFilled) { + colors.accent.copy( + alpha = when { + isPressed -> 0.25f + isHovered -> 0.45f + else -> 0.35f + } + ) + } else { + colors.shadow.copy( + alpha = when { + isPressed -> 0.1f + isHovered -> 0.24f + else -> 0.18f + } + ) + } + + val checkProgress by animateFloatAsState( + targetValue = if (isSelected) 1f else 0f, + animationSpec = tween(durationMillis = 180), + label = "checkProgress", + ) + val dashProgress by animateFloatAsState( + targetValue = if (isIndeterminate) 1f else 0f, + animationSpec = tween(durationMillis = 150), + label = "dashProgress", + ) + + Box( + modifier = modifier + .size(CheckBoxSize) + .graphicsLayer { translationY = lift.toPx() } + .shadow( + elevation = shadowElevation, + shape = CheckBoxShape, + ambientColor = shadowAmbient, + spotColor = shadowSpot, + ) + .clip(CheckBoxShape) + .background(backgroundBrush, CheckBoxShape) + .border(BorderStroke(borderWidth, borderColor), CheckBoxShape) + .drawWithCache { + val highlight = Brush.verticalGradient( + colors = listOf( + if (isFilled) Color.White.copy(alpha = 0.25f) else colors.highlight, + Color.Transparent, + ), + startY = 0f, + endY = size.height * 0.5f, + ) + onDrawWithContent { + drawContent() + drawRect( + brush = highlight, + topLeft = Offset.Zero, + size = size, + ) + } + } + .then( + if (onClick != null) { + Modifier + .hoverable(interactionSource = source, enabled = enabled) + .clickable( + interactionSource = source, + indication = ripple(), + enabled = enabled, + onClick = onClick, + ) + } else { + Modifier + } + ), + contentAlignment = Alignment.Center, + ) { + if (isSelected) { + Box( + modifier = Modifier + .size(14.dp) + .graphicsLayer { alpha = checkProgress }, + ) { + androidx.compose.foundation.Canvas(modifier = Modifier.size(14.dp)) { + val stroke = 2.dp.toPx() + val path = Path().apply { + val w = size.width + val h = size.height + moveTo(w * 0.2f, h * 0.52f) + lineTo(w * 0.42f, h * 0.74f) + lineTo(w * 0.82f, h * 0.28f) + } + drawPath( + path = path, + color = colors.onAccent, + style = Stroke( + width = stroke, + cap = StrokeCap.Round, + join = StrokeJoin.Round, + ), + ) + } + } + } else if (isIndeterminate) { + Box( + modifier = Modifier + .size(width = 10.dp, height = 2.dp) + .graphicsLayer { alpha = dashProgress } + .clip(RoundedCornerShape(1.dp)) + .background( + brush = Brush.horizontalGradient( + colors = listOf( + colors.onAccent, + colors.onAccent.copy(alpha = 0.92f), + ) + ), + ), + ) + } + } +} + +@Preview +@Composable +fun CheckBoxPreview() { + MaterialTheme { + Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + Column(verticalArrangement = Arrangement.spacedBy(16.dp)) { + Row( + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + CheckBox(state = CheckBoxState.SELECTED, onClick = {}) + Text("Selected", style = MaterialTheme.typography.bodyMedium) + } + Row( + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + CheckBox(state = CheckBoxState.UNSELECTED, onClick = {}) + Text("Unselected", style = MaterialTheme.typography.bodyMedium) + } + Row( + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + CheckBox(state = CheckBoxState.INDETERMINATE, onClick = {}) + Text("Indeterminate", style = MaterialTheme.typography.bodyMedium) + } + Row( + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + CheckBox(state = CheckBoxState.SELECTED, onClick = {}, enabled = false) + Text("Disabled", style = MaterialTheme.typography.bodyMedium) + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/TextField.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/TextField.kt new file mode 100644 index 00000000..44c53ae4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/base/TextField.kt @@ -0,0 +1,246 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.base + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsFocusedAsState +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.defaultMinSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.BasicTextField +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithCache +import androidx.compose.ui.draw.shadow +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.input.VisualTransformation +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxSearchBroken +import dev.krtirtho.spotube.resources.iconsax.IconsaxTrash + +private val TextFieldShape = RoundedCornerShape(14.dp) +private val TextFieldMinHeight = 44.dp + +@Composable +private fun textFieldShadow( + shape: androidx.compose.ui.graphics.Shape, + focused: Boolean, + colors: ButtonColors, +): Modifier { + val elevation = if (focused) 9.dp else 6.dp + val ambient = if (focused) { + colors.accent.copy(alpha = 0.2f) + } else { + colors.shadow.copy(alpha = 0.15f) + } + val spot = if (focused) { + colors.accent.copy(alpha = 0.25f) + } else { + colors.shadow.copy(alpha = 0.18f) + } + return Modifier.shadow( + elevation = elevation, + shape = shape, + ambientColor = ambient, + spotColor = spot, + ) +} + +@Composable +fun TextField( + value: String, + onValueChange: (String) -> Unit, + modifier: Modifier = Modifier, + placeholder: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit)? = null, + trailingIcon: @Composable (() -> Unit)? = null, + label: @Composable (() -> Unit)? = null, + singleLine: Boolean = false, + maxLines: Int = Int.MAX_VALUE, + enabled: Boolean = true, + readOnly: Boolean = false, + isError: Boolean = false, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, + keyboardActions: KeyboardActions = KeyboardActions.Default, + visualTransformation: VisualTransformation = VisualTransformation.None, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + textStyle: TextStyle = LocalTextStyle.current, + cursorBrush: Color = MaterialTheme.colorScheme.primary, +) { + val colors = rememberButtonColors() + val isFocused by interactionSource.collectIsFocusedAsState() + val isHovered by interactionSource.collectIsHoveredAsState() + + val gradient = outlinedGradient(colors, false) + val border = when { + isError -> MaterialTheme.colorScheme.error + isFocused -> MaterialTheme.colorScheme.primary + isHovered -> colors.border.copy(alpha = 0.85f) + else -> colors.border + } + + val contentColor = when { + !enabled -> colors.onContainer.copy(alpha = 0.38f) + else -> colors.onContainer + } + + Column(modifier = modifier) { + AnimatedVisibility( + visible = label != null, + enter = fadeIn(), + exit = fadeOut(), + ) { + label?.invoke() + } + + Box( + modifier = Modifier + .defaultMinSize(minHeight = TextFieldMinHeight) + .then(textFieldShadow(TextFieldShape, isFocused, colors)) + .clip(TextFieldShape) + .background(gradient, TextFieldShape) + .border(BorderStroke(1.5.dp, border), TextFieldShape) + .drawWithCache { + val highlightBrush = Brush.verticalGradient( + colors = listOf(colors.highlight, Color.Transparent), + startY = 0f, + endY = size.height * 0.5f, + ) + onDrawWithContent { + drawContent() + drawRect( + brush = highlightBrush, + topLeft = androidx.compose.ui.geometry.Offset.Zero, + size = size, + ) + } + } + .padding(horizontal = 14.dp, vertical = 10.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp), + ) { + if (leadingIcon != null) { + leadingIcon() + } + + Box(modifier = Modifier.weight(1f)) { + BasicTextField( + value = value, + onValueChange = onValueChange, + modifier = Modifier + .fillMaxWidth() + .hoverable(interactionSource = interactionSource, enabled = enabled), + enabled = enabled, + readOnly = readOnly, + textStyle = textStyle.copy(color = contentColor), + cursorBrush = SolidColor(cursorBrush), + keyboardOptions = keyboardOptions, + keyboardActions = keyboardActions, + singleLine = singleLine, + maxLines = maxLines, + visualTransformation = visualTransformation, + interactionSource = interactionSource, + decorationBox = { innerTextField -> + if (value.isEmpty() && placeholder != null && !isFocused) { + CompositionLocalProvider(LocalTextStyle provides textStyle) { + Box(contentAlignment = Alignment.CenterStart) { + placeholder() + } + } + } else { + innerTextField() + } + }, + ) + } + + if (trailingIcon != null) { + trailingIcon() + } + } + } + } +} + +@Preview +@Composable +fun TextFieldPreview() { + MaterialTheme { + androidx.compose.material3.Surface( + color = MaterialTheme.colorScheme.background, + modifier = Modifier.padding(24.dp), + ) { + TextField( + modifier = Modifier.padding(top = 4.dp), + value = "Twenty One Pilots", + onValueChange = {}, + placeholder = { Text("Placeholder") }, + label = { + Text( + "Search Field", + modifier = Modifier.padding(bottom = 6.dp), + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.7f), + ) + }, + leadingIcon = { + androidx.compose.material3.Icon( + imageVector = Iconsax.IconsaxSearchBroken, + contentDescription = "Search Icon", + ) + }, + trailingIcon = { + androidx.compose.material3.Icon( + imageVector = Iconsax.IconsaxTrash, + contentDescription = "Clear Icon", + ) + }, + ) + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/AdaptiveDropdownBottomSheet.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/AdaptiveDropdownBottomSheet.kt new file mode 100644 index 00000000..49a448f4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/AdaptiveDropdownBottomSheet.kt @@ -0,0 +1,472 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.DropdownMenu +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.shadow +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.DpOffset +import androidx.compose.ui.unit.dp +import compose.icons.FeatherIcons +import compose.icons.feathericons.Check +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.Iconsax3DotsMore +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxShare +import dev.krtirtho.spotube.resources.iconsax.IconsaxTrash + +data class AdaptiveMenuItem( + val icon: ImageVector? = null, + val label: String, + val onClick: () -> Unit, + val enabled: Boolean = true, + val selected: Boolean = false, + val dividerBefore: Boolean = false, +) + +enum class HeaderDisplayMode { + Always, + OnlyInDropdown, + OnlyInBottomSheet, +} + +@Composable +fun AdaptiveDropdownBottomSheet( + items: List, + trigger: @Composable (onClick: () -> Unit) -> Unit, + modifier: Modifier = Modifier, + breakpointDp: Float = 600f, + menuMinWidth: Dp = 200.dp, + header: @Composable (() -> Unit)? = null, + headerDisplayMode: HeaderDisplayMode = HeaderDisplayMode.Always, + filter: ((AdaptiveMenuItem, String) -> Boolean)? = null, +) { + var expanded by remember { mutableStateOf(false) } + val adaptiveInfo = currentWindowAdaptiveInfo() + val isLargeScreen = adaptiveInfo.windowSizeClass.minWidthDp >= breakpointDp + + Box(modifier = modifier) { + trigger { expanded = true } + + if (isLargeScreen) { + ShadcnDropdownMenu( + expanded = expanded, + onDismissRequest = { expanded = false }, + minWidth = menuMinWidth, + ) { + if (header != null && (headerDisplayMode == HeaderDisplayMode.Always || headerDisplayMode == HeaderDisplayMode.OnlyInDropdown)) { + header() + } + + var query by remember { mutableStateOf("") } + if (filter != null) { + TextField( + value = query, + onValueChange = { + query = it + }, + placeholder = { Text("Search...") }, + singleLine = true, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Search", + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + }, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 12.dp, vertical = 8.dp) + ) + } + + val hasSelection = items.any { it.selected } + + items + .forEach { item -> + if (query.isNotBlank() && filter != null && !filter(item, query)) { + return@forEach + } + if (item.dividerBefore) { + HorizontalDivider( + modifier = Modifier.padding(vertical = 4.dp), + color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.5f), + ) + } + ShadcnDropdownMenuItem( + item = item, + onClick = { + item.onClick() + expanded = false + }, + hasSelection = hasSelection, + ) + } + } + } else { + if (expanded) { + AdaptiveBottomSheetContent( + onDismiss = { expanded = false }, + items = items, + header = if (header != null && (headerDisplayMode == HeaderDisplayMode.Always || headerDisplayMode == HeaderDisplayMode.OnlyInBottomSheet)) { + header + } else { + null + }, + filter = filter, + ) + } + } + } +} + +@Composable +private fun ShadcnDropdownMenu( + expanded: Boolean, + onDismissRequest: () -> Unit, + minWidth: Dp, + content: @Composable () -> Unit, +) { + val shape = RoundedCornerShape(6.dp) + DropdownMenu( + expanded = expanded, + onDismissRequest = onDismissRequest, + offset = DpOffset(x = 0.dp, y = 4.dp), + modifier = Modifier + .width(minWidth) + .shadow( + elevation = 2.dp, + shape = shape, + ambientColor = Color.Black.copy(alpha = 0.06f), + spotColor = Color.Black.copy(alpha = 0.1f), + ) + .border( + width = 1.dp, + color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.5f), + shape = shape, + ) + .background( + color = MaterialTheme.colorScheme.surfaceContainerHigh, + shape = shape, + ) + .clip(shape), + ) { + Column( + modifier = Modifier.padding(vertical = 4.dp), + ) { + content() + } + } +} + +@Composable +private fun ShadcnDropdownMenuItem( + item: AdaptiveMenuItem, + onClick: () -> Unit, + hasSelection: Boolean, +) { + val interactionSource = remember { MutableInteractionSource() } + val isHovered by interactionSource.collectIsHoveredAsState() + + val hoverColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f) + + Row( + modifier = Modifier + .fillMaxWidth() + .hoverable(interactionSource) + .background( + color = if (isHovered && item.enabled) hoverColor else Color.Transparent, + ) + .clickable( + enabled = item.enabled, + interactionSource = interactionSource, + indication = null, + onClick = onClick, + ) + .padding(horizontal = 12.dp, vertical = 8.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + ) { + if (item.icon != null) { + Icon( + imageVector = item.icon, + contentDescription = null, + modifier = Modifier.size(16.dp), + tint = if (item.enabled) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) + }, + ) + } else if (item.selected) { + Icon( + imageVector = FeatherIcons.Check, + contentDescription = "Selected", + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } else if (hasSelection) { + Spacer(modifier = Modifier.size(16.dp)) + } + + Text( + text = item.label, + style = MaterialTheme.typography.bodyMedium, + color = if (item.enabled) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) + }, + modifier = Modifier.weight(1f), + ) + + if (item.selected && item.icon != null) { + Icon( + imageVector = FeatherIcons.Check, + contentDescription = "Selected", + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +private fun AdaptiveBottomSheetContent( + onDismiss: () -> Unit, + items: List, + header: @Composable (() -> Unit)?, + filter: ((AdaptiveMenuItem, String) -> Boolean)? = null, +) { + val hasSelection = items.any { it.selected } + var query by remember { mutableStateOf("") } + val filteredItems = if (filter != null && query.isNotBlank()) { + items.filter { filter(it, query) } + } else { + items + } + ModalBottomSheet( + onDismissRequest = onDismiss, + dragHandle = null, + ) { + Column( + modifier = Modifier.fillMaxWidth(), + ) { + header?.invoke() + + if (filter != null) { + Spacer(modifier = Modifier.height(8.dp)) + TextField( + value = query, + onValueChange = { + query = it + }, + placeholder = { Text("Search...") }, + singleLine = true, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Search", + modifier = Modifier.size(18.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + }, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 12.dp, vertical = 8.dp) + ) + } + + LazyColumn( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 8.dp, vertical = 8.dp), + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + items( + count = filteredItems.size, + ) { index -> + val item = filteredItems[index] + + if (item.dividerBefore) { + HorizontalDivider( + modifier = Modifier.padding(vertical = 4.dp), + color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.5f), + ) + } + Row( + modifier = Modifier + .fillMaxWidth() + .clip(MaterialTheme.shapes.medium) + .clickable( + enabled = item.enabled, + onClick = { + item.onClick() + onDismiss() + }, + ) + .background( + color = if (item.selected) { + MaterialTheme.colorScheme.secondary.copy(alpha = 0.12f) + } else { + Color.Transparent + }, + shape = MaterialTheme.shapes.medium, + ) + .padding(horizontal = 12.dp, vertical = 14.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + ) { + Row( + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + if (item.icon != null) { + Icon( + imageVector = item.icon, + contentDescription = null, + modifier = Modifier.size(22.dp), + tint = if (item.enabled) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) + }, + ) + } else if (item.selected) { + Icon( + imageVector = FeatherIcons.Check, + contentDescription = "Selected", + modifier = Modifier.size(22.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } else if (hasSelection) { + Spacer(modifier = Modifier.size(22.dp)) + } + Text( + text = item.label, + style = MaterialTheme.typography.bodyLarge, + color = if (item.enabled) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) + }, + ) + } + + if (item.selected && item.icon != null) { + Icon( + imageVector = FeatherIcons.Check, + contentDescription = "Selected", + modifier = Modifier.size(22.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } + } + } + } +} + +@Preview +@Composable +private fun AdaptiveDropdownBottomSheetPreview() { + Scaffold { + AdaptiveDropdownBottomSheet( + items = listOf( + AdaptiveMenuItem( + icon = Iconsax.IconsaxHeart, + label = "Favorite", + onClick = {}, + ), + AdaptiveMenuItem( + icon = Iconsax.IconsaxShare, + label = "Share", + onClick = {}, + ), + AdaptiveMenuItem( + icon = Iconsax.IconsaxTrash, + label = "Delete", + onClick = {}, + enabled = false, + ), + ), + trigger = { onClick -> + IconButton( + onClick = onClick, + modifier = Modifier + .size(32.dp) + .background( + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.1f), + shape = CircleShape, + ) + .clip(CircleShape), + ) { + Icon( + imageVector = Iconsax.Iconsax3DotsMore, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + ) + } + }, + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/AlbumCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/AlbumCard.kt new file mode 100644 index 00000000..3dfcd375 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/AlbumCard.kt @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.width +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import kotlinx.coroutines.launch +import org.koin.compose.koinInject + +@Composable +fun AlbumCard( + album: MetadataAlbum, + modifier: Modifier = Modifier, + audioPlayerQueue: AudioPlayerQueue = koinInject(), + playbackHelper: CollectionPlaybackHelper = koinInject(), + navigationCommands: NavigationCommands = koinInject() +) { + val scope = rememberCoroutineScope() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + + PlayableCard( + title = album.title, + subtitle = album.description ?: "${album.albumType} • ${album.artists.joinToString { it.name }}", + imageURL = album.thumbnails.firstOrNull()?.url, + isPlaying = currentCollectionEntry?.id == album.id, + onClick = { + navigationCommands.navigateTo(Routes.Album(album.id)) + }, + onPlay = { + if (currentCollectionEntry?.id == album.id) return@PlayableCard + scope.launch { playbackHelper.playAlbum(album.id) } + }, + onAddToQueue = { + scope.launch { playbackHelper.addAlbumToQueue(album.id) } + }, + modifier = modifier.width(160.dp), + ) +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.kt new file mode 100644 index 00000000..359ee469 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.kt @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.RowScope +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.runtime.Composable +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.resources.iconsax.ArrowLeft3 +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import org.koin.compose.koinInject + +@Composable +fun ApplicationBackButton() { + val navigationCommands: NavigationCommands = koinInject() + + IconButton( + onClick = { + navigationCommands.pop() + }, + ) { + Icon( + imageVector = Iconsax.ArrowLeft3, + contentDescription = "Back" + ) + } +} + +@Composable +expect fun ApplicationMainBar( + title: @Composable () -> Unit = {}, + subtitle: @Composable () -> Unit = {}, + actions: @Composable (RowScope.() -> Unit) = {}, + backButton: Boolean = true +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ArtistCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ArtistCard.kt new file mode 100644 index 00000000..2459d276 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ArtistCard.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.Card +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.Alignment +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.ui.component.cards.AvatarCard +import org.koin.compose.koinInject + +@Composable +fun ArtistCard( + artist: MetadataArtist.Basic, + modifier: Modifier = Modifier, +) { + val navigationCommands = koinInject() + + AvatarCard( + title = artist.name, + subtitle = "Artist", + imageURL = artist.thumbnails.firstOrNull()?.url, + onClick = { + navigationCommands.navigateTo(Routes.Artist(artist.id)) + }, + modifier = modifier, + ) +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/CollectionDetails.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/CollectionDetails.kt new file mode 100644 index 00000000..c75c7cbd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/CollectionDetails.kt @@ -0,0 +1,320 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.spotube.core.ui.base.ButtonGroup +import dev.krtirtho.spotube.core.ui.base.ButtonGroupDivider +import dev.krtirtho.spotube.core.ui.base.GroupIconButton +import dev.krtirtho.spotube.core.ui.base.OutlineButton +import dev.krtirtho.spotube.core.ui.base.PrimaryButton +import dev.krtirtho.spotube.core.ui.misc.TextWithShimmer +import dev.krtirtho.spotube.core.ui.misc.shimmerApply +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxAddSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxPauseCircle +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlayCircle2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxShuffle +import dev.krtirtho.spotube.resources.iconsax.User +import org.jetbrains.compose.resources.DrawableResource +import org.jetbrains.compose.resources.painterResource + + +@Composable +fun CollectionDetails( + modifier: Modifier = Modifier, + title: String, + description: String, + imageURL: String, + imageResource: DrawableResource? = null, + ownerName: String, + ownerImageURL: String?, + onOwnerClick: () -> Unit, + onPlay: () -> Unit, + onShufflePlay: () -> Unit, + onAddToQueue: () -> Unit, + isPlaying: Boolean = false, + isFollowing: Boolean = false, + onFollowClick: () -> Unit = { }, + showFollowButton: Boolean = true, +) { + + + BoxWithConstraints(modifier = modifier.fillMaxWidth()) { + val isCompact = maxWidth < 600.dp + + val playPauseButton = @Composable { + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(6.dp), + ) { + val modifier = if (isCompact) { + Modifier.weight(1f) + } else { + Modifier + } + + PrimaryButton( + modifier = modifier, + onClick = onPlay, + ) { + Icon( + imageVector = if (isPlaying) Iconsax.IconsaxPauseCircle else Iconsax.IconsaxPlayCircle2, + contentDescription = if (isPlaying) "Pause" else "Play", + ) + TextWithShimmer( + text = if (isPlaying) "Pause" else "Play", + modifier = Modifier.padding(start = 6.dp), + ) + } + OutlineButton( + modifier = modifier, + onClick = onShufflePlay + ) { + Icon(imageVector = Iconsax.IconsaxShuffle, contentDescription = "Shuffle play") + TextWithShimmer( + text = "Shuffle", + modifier = Modifier.padding(start = 6.dp), + ) + } + } + } + + val actions = @Composable { + ButtonGroup { + GroupIconButton(onClick = onAddToQueue) { + Icon( + imageVector = Iconsax.IconsaxAddSquare, + contentDescription = "Add to queue" + ) + } + ButtonGroupDivider() + if (showFollowButton) { + if (isFollowing) { + GroupIconButton(onClick = onFollowClick) { + Icon( + imageVector = Iconsax.IconsaxHeart2, + contentDescription = "Unfollow", + ) + } + } else { + GroupIconButton(onClick = onFollowClick) { + Icon( + imageVector = Iconsax.IconsaxHeart, + contentDescription = "Follow", + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } + } + } + val ownerInfo = @Composable { + Row( + modifier = Modifier.clickable(onClick = onOwnerClick), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp), + ) { + if (ownerImageURL != null) { + AsyncImage( + model = ownerImageURL, + contentDescription = ownerName, + modifier = Modifier + .size(16.dp) + .clip(CircleShape) + .shimmerApply(), + contentScale = ContentScale.Crop, + ) + } else { + Icon( + imageVector = Iconsax.User, + contentDescription = ownerName, + modifier = Modifier + .size(16.dp) + .background( + MaterialTheme.colorScheme.primaryContainer, + CircleShape + ) + .padding(6.dp), + tint = MaterialTheme.colorScheme.onPrimaryContainer, + ) + } + TextWithShimmer( + text = "By $ownerName", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + + val artwork = @Composable { + Box( + modifier = Modifier + .size(if (isCompact) 100.dp else 200.dp) + .clip(RoundedCornerShape(12.dp)) + .shimmerApply(), + contentAlignment = Alignment.Center, + ) { + if (imageURL.isNotBlank()) { + AsyncImage( + model = imageURL, + contentDescription = title, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } else if (imageResource != null) { + androidx.compose.foundation.Image( + painter = painterResource(imageResource), + contentDescription = title, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } else { + Text( + text = title.take(1).ifBlank { "?" }.uppercase(), + style = MaterialTheme.typography.displaySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } + + + val metadata = @Composable { + Column { + TextWithShimmer( + text = title, + style = if (isCompact) MaterialTheme.typography.bodyLarge else MaterialTheme.typography.headlineLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + + if (description.isNotBlank()) { + TextWithShimmer( + text = description, + style = if (isCompact) MaterialTheme.typography.labelSmall else MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + } + } + + Card( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 8.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceContainer, + ), + shape = RoundedCornerShape(20.dp), + ) { + if (isCompact) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(14.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + artwork() + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(6.dp), + ) { + metadata() + ownerInfo() + actions() + } + } + playPauseButton() + } + } else { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalAlignment = Alignment.Top, + ) { + artwork() + + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + metadata() + ownerInfo() + actions() + playPauseButton() + } + } + } + } + } +} + +@Composable +@Preview +fun CollectionDetailsPreview() { + CollectionDetails( + title = "My Playlist", + description = "A collection of my favorite songs.", + imageURL = "https://example.com/playlist.jpg", + ownerName = "John Doe", + ownerImageURL = "https://example.com/john.jpg", + onOwnerClick = {}, + onPlay = {}, + onShufflePlay = {}, + onAddToQueue = {}, + ) +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ErrorDisplay.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ErrorDisplay.kt new file mode 100644 index 00000000..585ba1d5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/ErrorDisplay.kt @@ -0,0 +1,287 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.text.selection.SelectionContainer +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Button +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.platform.LocalClipboardManager +import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import compose.icons.FeatherIcons +import compose.icons.feathericons.AlertCircle +import compose.icons.feathericons.Copy +import compose.icons.feathericons.Maximize2 +import compose.icons.feathericons.RefreshCw + +@Composable +fun ErrorDisplay( + errorMessage: String, + onRetry: () -> Unit, + modifier: Modifier = Modifier, +) { + var showFullLog by remember { mutableStateOf(false) } + val clipboardManager = LocalClipboardManager.current + + Column( + modifier = modifier + .fillMaxWidth() + .padding(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(20.dp), + ) { + Icon( + imageVector = FeatherIcons.AlertCircle, + contentDescription = null, + modifier = Modifier.size(64.dp), + tint = MaterialTheme.colorScheme.error.copy(alpha = 0.7f), + ) + + Text( + text = "We're Truly Sorry", + style = MaterialTheme.typography.headlineSmall, + fontWeight = FontWeight.Bold, + color = MaterialTheme.colorScheme.onSurface, + textAlign = TextAlign.Center, + ) + + Text( + text = "Something isn't working right now. Your experience matters to us, and we're doing our best to fix this. Please try again or check the error details below.", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.Center, + lineHeight = MaterialTheme.typography.bodyMedium.lineHeight * 1.2, + ) + + Card( + modifier = Modifier.fillMaxWidth(), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.errorContainer.copy(alpha = 0.15f), + ), + shape = MaterialTheme.shapes.medium, + ) { + Column( + modifier = Modifier.fillMaxWidth(), + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 12.dp, vertical = 8.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = "Error Details", + style = MaterialTheme.typography.labelMedium, + fontWeight = FontWeight.SemiBold, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Row( + horizontalArrangement = Arrangement.spacedBy(4.dp), + ) { + IconButton( + onClick = { + clipboardManager.setText(AnnotatedString(errorMessage)) + }, + modifier = Modifier.size(32.dp), + ) { + Icon( + imageVector = FeatherIcons.Copy, + contentDescription = "Copy to clipboard", + modifier = Modifier.size(16.dp), + ) + } + + IconButton( + onClick = { showFullLog = true }, + modifier = Modifier.size(32.dp), + ) { + Icon( + imageVector = FeatherIcons.Maximize2, + contentDescription = "View full log", + modifier = Modifier.size(16.dp), + ) + } + } + } + + Surface( + modifier = Modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surfaceContainerHighest.copy(alpha = 0.3f), + ) { + SelectionContainer { + Text( + text = errorMessage, + style = MaterialTheme.typography.bodySmall.copy( + fontFamily = FontFamily.Monospace, + ), + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 5, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.padding(12.dp), + ) + } + } + } + } + + Row( + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + Button( + onClick = onRetry, + modifier = Modifier.height(40.dp), + ) { + Icon( + imageVector = FeatherIcons.RefreshCw, + contentDescription = null, + modifier = Modifier.padding(end = 8.dp).size(18.dp), + ) + Text("Retry") + } + } + } + + if (showFullLog) { + ErrorLogDialog( + errorMessage = errorMessage, + onDismiss = { showFullLog = false }, + ) + } +} + +@Composable +private fun ErrorLogDialog( + errorMessage: String, + onDismiss: () -> Unit, +) { + val clipboardManager = LocalClipboardManager.current + + AlertDialog( + onDismissRequest = onDismiss, + title = { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = "Full Error Log", + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.Bold, + ) + + IconButton( + onClick = { + clipboardManager.setText(AnnotatedString(errorMessage)) + }, + ) { + Icon( + imageVector = FeatherIcons.Copy, + contentDescription = "Copy to clipboard", + ) + } + } + }, + text = { + Box( + modifier = Modifier + .fillMaxWidth() + .height(400.dp) + .clip(MaterialTheme.shapes.small) + .background(MaterialTheme.colorScheme.surfaceContainerHighest.copy(alpha = 0.3f)), + ) { + SelectionContainer { + Text( + text = errorMessage, + style = MaterialTheme.typography.bodySmall.copy( + fontFamily = FontFamily.Monospace, + ), + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier + .fillMaxSize() + .verticalScroll(rememberScrollState()) + .padding(12.dp), + ) + } + } + }, + confirmButton = { + TextButton(onClick = onDismiss) { + Text("Close") + } + }, + ) +} + +@Preview +@Composable +private fun ErrorDisplayPreview() { + Surface { + ErrorDisplay( + errorMessage = "This is an error message", + onRetry = {}, + ) + } +} + +@Preview +@Composable +private fun ErrorLogDialogPreview() { + Scaffold { + ErrorLogDialog( + errorMessage = "This is an error message", + onDismiss = {}, + ) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/FeaturedCarousel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/FeaturedCarousel.kt new file mode 100644 index 00000000..810c69e4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/FeaturedCarousel.kt @@ -0,0 +1,404 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.tween +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import coil3.compose.AsyncImage +import dev.chrisbanes.haze.blur.HazeColorEffect +import dev.chrisbanes.haze.blur.blurEffect +import dev.chrisbanes.haze.hazeEffect +import dev.chrisbanes.haze.hazeSource +import dev.chrisbanes.haze.rememberHazeState +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueCollectionEntry +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.ui.coverflow.Coverflow +import dev.krtirtho.spotube.core.ui.coverflow.CoverflowParams +import dev.krtirtho.spotube.core.ui.coverflow.rememberCoverflowState +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxPause +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlay +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlayCircle +import dev.krtirtho.spotube.resources.iconsax.Play +import kotlinx.coroutines.launch +import org.koin.compose.koinInject + +@Composable +fun FeaturedCarousel( + items: List, + modifier: Modifier = Modifier, +) { + val filteredItems = remember(items) { + items.filter { it is MetadataBrowseItem.Album || it is MetadataBrowseItem.Playlist || it is MetadataBrowseItem.Track } + } + + if (filteredItems.isEmpty()) return + + FeaturedCarouselContent( + items = filteredItems, + ) +} + +@Composable +private fun FeaturedCarouselContent( + items: List, + modifier: Modifier = Modifier, +) { + val centerIndex = items.size / 2 + var selectedIndex by remember { mutableIntStateOf(centerIndex) } + val state = rememberCoverflowState(centerIndex) { index -> selectedIndex = index } + val adaptiveInfo = currentWindowAdaptiveInfo() + val isSmallScreen = adaptiveInfo.windowSizeClass.minWidthDp <= 600 + + Box( + modifier = modifier + .fillMaxWidth() + .height( + if (isSmallScreen) 200.dp else 300.dp + ), + contentAlignment = Alignment.Center, + ) { + Coverflow( + state = state, + params = CoverflowParams( + size = 1f, + offset = 0.38f, + angle = 12f, + shift = 0.255f, + zoom = 0.7864f, + mirror = false, + ), + modifier = modifier, + ) { + items( + items = items, + key = { index: Int -> items[index].hashCode() }, + ) { item: MetadataBrowseItem -> + FeaturedCarouselCard( + item = item, + isCentered = selectedIndex == items.indexOf(item), + onScrollToCenter = { + state.scrollToItem(items.indexOf(item)) + }, + ) + } + } + } +} + +@Composable +private fun FeaturedCarouselCard( + item: MetadataBrowseItem, + isCentered: Boolean, + modifier: Modifier = Modifier, + onScrollToCenter: () -> Unit = { }, +) { + val navigationCommands = koinInject() + val audioPlayerQueue = koinInject() + + val hazeState = rememberHazeState() + + val thumbnailUrl = when (item) { + is MetadataBrowseItem.Album -> item.data.thumbnails.firstOrNull()?.url + is MetadataBrowseItem.Playlist -> item.data.thumbnails.firstOrNull()?.url + is MetadataBrowseItem.Track -> (item.data.album?.thumbnails ?: item.data.thumbnails)?.firstOrNull()?.url + else -> null + } + + val title = when (item) { + is MetadataBrowseItem.Album -> item.data.title + is MetadataBrowseItem.Playlist -> item.data.title + is MetadataBrowseItem.Track -> item.data.title + else -> "" + } + + val subtitle = when (item) { + is MetadataBrowseItem.Album -> item.data.artists.joinToString { it.name } + is MetadataBrowseItem.Playlist -> item.data.owner?.displayName ?: item.data.owner?.username + ?: "Playlist" + + is MetadataBrowseItem.Track -> item.data.artists.joinToString { it.name } + else -> "" + } + + val dimAlpha by animateFloatAsState( + targetValue = if (isCentered) 0f else 0.5f, + label = "dim_alpha" + ) + + Box( + modifier = modifier + .clip(RoundedCornerShape(24.dp)) + .clickable() { + if (!isCentered) { + onScrollToCenter() + return@clickable + } + when (item) { + is MetadataBrowseItem.Album -> navigationCommands.navigateTo(Routes.Album(item.data.id)) + is MetadataBrowseItem.Playlist -> navigationCommands.navigateTo( + Routes.Playlist( + item.data.id + ) + ) + + is MetadataBrowseItem.Track -> {} + else -> {} + } + } + .aspectRatio(1f) + .hazeSource(hazeState), + ) { + AsyncImage( + model = thumbnailUrl, + contentDescription = title, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + + Box( + modifier = Modifier + .fillMaxSize() + .background(Color.Black.copy(alpha = dimAlpha)), + ) + + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.BottomCenter, + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .height(140.dp) + .background( + brush = Brush.verticalGradient( + colors = listOf( + Color.Transparent, + Color.Black.copy(alpha = 0.9f), + ), + ), + ), + ) + } + } + + Box( + modifier = Modifier + .fillMaxSize(), + contentAlignment = Alignment.BottomCenter, + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + ) { + Column(modifier = Modifier.weight(1f)) { + Text( + text = title, + style = MaterialTheme.typography.titleMedium, + fontWeight = FontWeight.Bold, + color = Color.White, + maxLines = 2, + overflow = TextOverflow.Ellipsis, + ) + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = subtitle, + style = MaterialTheme.typography.bodySmall, + color = Color.White.copy(alpha = 0.85f), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + + val animatedAlpha by animateFloatAsState( + targetValue = if (isCentered) 1f else 0f, + animationSpec = tween(durationMillis = 300), + label = "ButtonFade" + ) + + FeaturedPlayButton( + item = item, + audioPlayerQueue = audioPlayerQueue, + navigationCommands = navigationCommands, + enabled = isCentered, + modifier = Modifier + .clip(CircleShape) + .graphicsLayer { + alpha = animatedAlpha + } + .hazeEffect(state = hazeState) { + blurEffect { + blurRadius = 20.dp + colorEffects = + listOf(HazeColorEffect.tint(Color.White.copy(alpha = 0.1f))) + } + } + ) + + } + } +} + +@Composable +private fun FeaturedPlayButton( + item: MetadataBrowseItem, + audioPlayerQueue: AudioPlayerQueue, + navigationCommands: NavigationCommands, + playbackHelper: CollectionPlaybackHelper = koinInject(), + enabled: Boolean, + modifier: Modifier = Modifier, +) { + val scope = rememberCoroutineScope() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + + when (item) { + is MetadataBrowseItem.Album -> { + val isPlaying = currentCollectionEntry is QueueCollectionEntry.Album && + (currentCollectionEntry as QueueCollectionEntry.Album).id == item.data.id + + Box( + modifier = modifier.size(44.dp), + contentAlignment = Alignment.BottomEnd + ) { + IconButton( + onClick = { + if (isPlaying) { + navigationCommands.navigateTo(Routes.Album(item.data.id)) + } else { + scope.launch { playbackHelper.playAlbum(item.data.id) } + } + }, + enabled = enabled + ) { + Icon( + imageVector = if (isPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = null, + tint = Color.White + ) + } + } + } + + is MetadataBrowseItem.Playlist -> { + val isPlaying = currentCollectionEntry is QueueCollectionEntry.Playlist && + (currentCollectionEntry as QueueCollectionEntry.Playlist).id == item.data.id + + Box( + modifier = modifier.size(44.dp), + contentAlignment = Alignment.BottomEnd + ) { + IconButton( + onClick = { + if (isPlaying) { + navigationCommands.navigateTo(Routes.Playlist(item.data.id)) + } else { + scope.launch { playbackHelper.playPlaylist(item.data.id) } + } + }, + enabled = enabled + ) { + Icon( + imageVector = if (isPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = null, + tint = Color.White + ) + } + } + } + + is MetadataBrowseItem.Track -> { + val queueEntry = QueueEntry.StreamingTrack(track = item.data, url = "") + val currentTrack by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val isPlaying = + currentTrack is QueueEntry.StreamingTrack && (currentTrack as QueueEntry.StreamingTrack).track.id == + item.data.id + + Box( + modifier = modifier.size(44.dp), + contentAlignment = Alignment.BottomEnd + ) { + IconButton( + onClick = { + scope.launch { + audioPlayerQueue.load( + entries = listOf(queueEntry), + autoPlay = true, + startPosition = 0, + collectionEntry = null, + ) + } + }, + enabled = enabled + ) { + Icon( + imageVector = if (isPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = null, + tint = Color.White + ) + } + } + } + + else -> {} + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/LikedTracksCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/LikedTracksCard.kt new file mode 100644 index 00000000..635a10a5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/LikedTracksCard.kt @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.foundation.clickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.FilledIconButton +import androidx.compose.material3.FilledTonalIconButton +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueCollectionEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxAddSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxPauseCircle +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlayCircle +import dev.krtirtho.spotube.resources.iconsax.Play +import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.painterResource +import org.koin.compose.koinInject +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.liked_tracks + +@Composable +fun LikedTracksCard( + modifier: Modifier = Modifier, + audioPlayerQueue: AudioPlayerQueue = koinInject(), + playbackHelper: CollectionPlaybackHelper = koinInject(), + navigationCommands: NavigationCommands = koinInject(), +) { + val scope = rememberCoroutineScope() + val interactionSource = remember { MutableInteractionSource() } + val isHovered by interactionSource.collectIsHoveredAsState() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + val isPlaying = currentCollectionEntry is QueueCollectionEntry.SavedTracks + + Box( + modifier = modifier + .clip(RoundedCornerShape(8.dp)) + .clickable(onClick = { navigationCommands.navigateTo(Routes.SavedTracks) }) + .width(160.dp) + .hoverable(interactionSource = interactionSource), + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Box(modifier = Modifier.fillMaxWidth()) { + androidx.compose.foundation.Image( + painter = painterResource(Res.drawable.liked_tracks), + contentDescription = "Liked Tracks", + modifier = Modifier.fillMaxWidth().aspectRatio(1f) + .clip(RoundedCornerShape(8.dp)), + contentScale = ContentScale.Crop, + ) + + Box( + modifier = Modifier.fillMaxWidth().aspectRatio(1f).padding(8.dp), + contentAlignment = Alignment.BottomEnd + ) { + if (isHovered) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.padding(4.dp) + ) { + FilledTonalIconButton( + onClick = { scope.launch { playbackHelper.addSavedTracksToQueue() } }, + modifier = Modifier.size(30.dp) + ) { + Icon( + imageVector = Iconsax.IconsaxAddSquare, + contentDescription = "Add to queue", + modifier = Modifier.size(16.dp) + ) + } + Spacer(modifier = Modifier.height(8.dp)) + FilledIconButton( + onClick = { scope.launch { playbackHelper.playSavedTracks() } }, + modifier = Modifier.size(30.dp) + ) { + Icon( + imageVector = if (isPlaying) { + Iconsax.IconsaxPauseCircle + } else Iconsax.Play, + contentDescription = "Play", + modifier = Modifier.size(16.dp) + ) + } + } + } + } + } + Column( + modifier = Modifier.fillMaxWidth().padding(12.dp) + ) { + Text( + text = "Liked Tracks", + style = MaterialTheme.typography.titleSmall, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = "Your saved songs", + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/PlaylistCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/PlaylistCard.kt new file mode 100644 index 00000000..d604f23e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/PlaylistCard.kt @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Modifier +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import kotlinx.coroutines.launch +import org.koin.compose.koinInject + +@Composable +fun PlaylistCard( + playlist: MetadataPlaylist, + modifier: Modifier = Modifier, + audioPlayerQueue: AudioPlayerQueue = koinInject(), + playbackHelper: CollectionPlaybackHelper = koinInject(), + navigationCommands: NavigationCommands = koinInject() +) { + val scope = rememberCoroutineScope() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + + PlayableCard( + title = playlist.title, + subtitle = playlist.description, + imageURL = playlist.thumbnails.firstOrNull()?.url, + isPlaying = currentCollectionEntry?.id == playlist.id, + onClick = { + navigationCommands.navigateTo(Routes.Playlist(playlist.id)) + }, + onPlay = { + if (audioPlayerQueue.isPlaylistPlaying(playlist.id)) return@PlayableCard + scope.launch { playbackHelper.playPlaylist(playlist.id) } + }, + onAddToQueue = { + scope.launch { playbackHelper.addPlaylistToQueue(playlist.id) } + }, + modifier = modifier + ) +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackCard.kt new file mode 100644 index 00000000..4d81fd73 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackCard.kt @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.material3.Card +import androidx.compose.material3.FilledIconButton +import androidx.compose.material3.FilledTonalIconButton +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import compose.icons.FeatherIcons +import compose.icons.feathericons.Play +import compose.icons.feathericons.PlusSquare +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import kotlinx.coroutines.launch +import org.koin.compose.koinInject + +@Composable +fun TrackCard( + track: MetadataTrack, + modifier: Modifier = Modifier, + audioPlayerQueue: AudioPlayerQueue = koinInject(), +) { + val scope = rememberCoroutineScope() + val queueEntry = QueueEntry.StreamingTrack(track = track, url = "") + + PlayableCard( + title = track.title, + subtitle = track.artists.joinToString { it.name }, + imageURL = (track.album?.thumbnails ?: track.thumbnails)?.firstOrNull()?.url, + onPlay = { + scope.launch { + audioPlayerQueue.load( + entries = listOf(queueEntry), + autoPlay = true, + startPosition = 0, + collectionEntry = null, + ) + } + }, + onAddToQueue = { + scope.launch { + audioPlayerQueue.addToQueue(queueEntry) + } + }, + modifier = modifier + ) +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackList.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackList.kt new file mode 100644 index 00000000..139f34bb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackList.kt @@ -0,0 +1,853 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.animation.AnimatedContent +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.togetherWith +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.combinedClickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalWindowInfo +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import coil3.compose.LocalPlatformContext +import coil3.request.ImageRequest +import coil3.request.crossfade +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.ui.base.ButtonGroup +import dev.krtirtho.spotube.core.ui.base.ButtonGroupDivider +import dev.krtirtho.spotube.core.ui.base.CheckBox +import dev.krtirtho.spotube.core.ui.base.CheckBoxState +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.core.ui.base.GroupIconButton +import dev.krtirtho.spotube.core.ui.base.IconButton +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.core.ui.misc.TextWithShimmer +import dev.krtirtho.spotube.core.ui.misc.shimmerApply +import dev.krtirtho.spotube.getPlatform +import dev.krtirtho.spotube.isDesktop +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.Iconsax3DotsMore +import dev.krtirtho.spotube.resources.iconsax.IconsaxAddSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxDirectboxReceive +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import dev.krtirtho.spotube.resources.iconsax.IconsaxNext +import dev.krtirtho.spotube.resources.iconsax.IconsaxPause +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlay +import dev.krtirtho.spotube.resources.iconsax.IconsaxSort + +private val CompactTrackListBreakpoint = 600.dp +private val LargeTrackListBreakpoint = 840.dp +private const val ShimmerRowCount = 6 + +enum class TrackSortOption(val label: String) { + None("Original"), + Title("Title"), + Artist("Artist"), + Album("Album"), + Duration("Duration"), +} + +@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class) +@Composable +fun TrackList( + tracks: List = emptyList(), + error: String? = null, + hasMore: Boolean = false, + isLoading: Boolean = false, + isLoadingNextPage: Boolean = false, + showEmptyMessage: Boolean = true, + headerContent: (@Composable () -> Unit)? = null, + footerContent: (@Composable () -> Unit)? = null, + onLoadNextPage: () -> Unit = {}, + onTrackClick: (MetadataTrack) -> Unit = {}, + onTrackOptionsAction: (MetadataTrack, TrackOptionsAction) -> Unit = { _, _ -> }, + onArtistClick: (MetadataArtist.Basic) -> Unit = {}, + onAlbumClick: (MetadataAlbum.Detailed) -> Unit = {}, + onArtistsOverflowClick: (MetadataTrack) -> Unit = {}, + onBulkDownload: (List) -> Unit = {}, + onBulkAddToQueue: (List) -> Unit = {}, + onBulkPlayNext: (List) -> Unit = {}, + currentTrackId: String? = null, + isCurrentTrackPlaying: Boolean = false, + trackOptionsState: (MetadataTrack) -> TrackOptionsState = { TrackOptionsState() }, + modifier: Modifier = Modifier, + contentPadding: PaddingValues = PaddingValues(bottom = LocalAppShellBottomInset.current), + simplified: Boolean = false, +) { + var filterQuery by rememberSaveable { mutableStateOf("") } + var sortBy by rememberSaveable { mutableStateOf(TrackSortOption.None) } + var selectedTrackForOptions by remember { mutableStateOf(null) } + var isSelectionMode by rememberSaveable { mutableStateOf(false) } + var selectedTrackIds by rememberSaveable { mutableStateOf>(emptySet()) } + + val normalizedQuery = remember(filterQuery) { filterQuery.trim().lowercase() } + val visibleTracks = remember(tracks, normalizedQuery, sortBy) { + val filtered = if (normalizedQuery.isBlank()) { + tracks + } else { + tracks.filter { track -> + val searchableText = buildString { + append(track.title).append(' ') + append(track.album?.title.orEmpty()).append(' ') + append(track.artists.joinToString(" ") { it.name }) + }.lowercase() + searchableText.contains(normalizedQuery) + } + } + + when (sortBy) { + TrackSortOption.None -> filtered + TrackSortOption.Title -> filtered.sortedBy { it.title.lowercase() } + TrackSortOption.Artist -> filtered.sortedBy { + it.artists.firstOrNull()?.name?.lowercase().orEmpty() + } + + TrackSortOption.Album -> filtered.sortedBy { it.album?.title?.lowercase() } + TrackSortOption.Duration -> filtered.sortedBy { it.durationMs } + } + } + + val listState = rememberLazyListState() + val shouldLoadMore = remember { + derivedStateOf { + val lastVisibleItem = listState.layoutInfo.visibleItemsInfo.lastOrNull() + // Note: totalItemsCount includes headers/footers, so this safely triggers + // a few items before the absolute bottom without index-shifting bugs. + lastVisibleItem != null && lastVisibleItem.index >= listState.layoutInfo.totalItemsCount - 5 + } + } + + LaunchedEffect(shouldLoadMore.value) { + if (shouldLoadMore.value && hasMore && !isLoading && !isLoadingNextPage) { + onLoadNextPage() + } + } + + val windowInfo = LocalWindowInfo.current + val density = LocalDensity.current + val maxWidth = with(density) { windowInfo.containerSize.width.toDp() } + val isCompact = maxWidth < CompactTrackListBreakpoint + val isDesktop = remember { getPlatform().isDesktop() } + val showIndex = maxWidth >= LargeTrackListBreakpoint + val showAlbum = !isCompact + val useDropdownForOptions = isDesktop && !isCompact + + + Box(modifier = modifier.fillMaxWidth()) { + LazyColumn( + state = listState, + modifier = Modifier + .widthIn(max = 1280.dp) + .align(Alignment.TopCenter) + .padding(horizontal = if (isCompact) 6.dp else 16.dp, vertical = 8.dp), + contentPadding = contentPadding, + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + if (headerContent != null) { + item { + headerContent() + } + } + if (!simplified) + item { + Row( + modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp) + .heightIn(max = 60.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(6.dp, Alignment.End), + ) { + if (showIndex || isSelectionMode) { + val allSelected = + visibleTracks.isNotEmpty() && selectedTrackIds.size == visibleTracks.size + val anySelected = selectedTrackIds.isNotEmpty() + val headerState = when { + allSelected -> CheckBoxState.SELECTED + anySelected -> CheckBoxState.INDETERMINATE + else -> CheckBoxState.UNSELECTED + } + CheckBox( + state = headerState, + onClick = { + if (allSelected) { + isSelectionMode = false + selectedTrackIds = emptySet() + } else { + isSelectionMode = true + selectedTrackIds = visibleTracks.map { it.id }.toSet() + } + }, + ) + } + + Box( + modifier = Modifier + .weight(1f) + ) { + TextField( + value = filterQuery, + onValueChange = { filterQuery = it }, + modifier = Modifier + .widthIn(max = 400.dp) + .align(Alignment.CenterEnd), + placeholder = { TextWithShimmer("Filter") }, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Filter", + ) + }, + singleLine = true, + ) + } + + ButtonGroup { + Box( + contentAlignment = Alignment.Center, + ) { + AdaptiveDropdownBottomSheet( + items = TrackSortOption.entries.map { option -> + AdaptiveMenuItem( + label = option.label, + onClick = { sortBy = option }, + selected = sortBy == option, + ) + }, + trigger = { onClick -> + GroupIconButton( + onClick = onClick, + ) { + Icon( + imageVector = Iconsax.IconsaxSort, + contentDescription = "Sort", + ) + } + }, + ) + } + ButtonGroupDivider() + Box( + contentAlignment = Alignment.Center, + ) { + val targetTracks = if (selectedTrackIds.isNotEmpty()) { + visibleTracks.filter { selectedTrackIds.contains(it.id) } + } else { + visibleTracks + } + val trackCount = targetTracks.size + val isAll = + selectedTrackIds.isEmpty() || trackCount == visibleTracks.size + AdaptiveDropdownBottomSheet( + items = listOf( + AdaptiveMenuItem( + icon = Iconsax.IconsaxDirectboxReceive, + label = if (isAll) "Download All" else "Download $trackCount", + onClick = { onBulkDownload(targetTracks) }, + ), + AdaptiveMenuItem( + icon = Iconsax.IconsaxAddSquare, + label = if (isAll) "Add All to Queue" else "Add $trackCount to Queue", + onClick = { onBulkAddToQueue(targetTracks) }, + ), + AdaptiveMenuItem( + icon = Iconsax.IconsaxNext, + label = if (isAll) "Play All Next" else "Play $trackCount Next", + onClick = { onBulkPlayNext(targetTracks) }, + ), + ), + trigger = { onClick -> + GroupIconButton( + onClick = onClick, + ) { + Icon( + imageVector = Iconsax.Iconsax3DotsMore, + contentDescription = "Bulk actions", + ) + } + }, + ) + } + } + } + } + + itemsIndexed( + items = visibleTracks, + key = { _, indexedTrack -> "${indexedTrack.id}-${indexedTrack.title}-${indexedTrack.album?.title ?: ""}" }, + ) { displayedIndex, track -> + TrackListRow( + index = displayedIndex + 1, + track = track, + showIndex = showIndex, + showAlbum = showAlbum, + useDropdownForOptions = useDropdownForOptions, + isCurrentTrack = track.id == currentTrackId, + isCurrentTrackPlaying = isCurrentTrackPlaying, + isSelectionMode = isSelectionMode, + isSelected = selectedTrackIds.contains(track.id), + onTrackClick = { + if (isSelectionMode) { + selectedTrackIds = if (selectedTrackIds.contains(track.id)) { + selectedTrackIds - track.id + } else { + selectedTrackIds + track.id + } + } else { + onTrackClick(track) + } + }, + onLongClick = { + if (!useDropdownForOptions && !isSelectionMode) { + isSelectionMode = true + selectedTrackIds = setOf(track.id) + } else if (!useDropdownForOptions) { + selectedTrackForOptions = track + } + }, + onSelectionToggle = { checked -> + isSelectionMode = true + selectedTrackIds = if (checked) { + selectedTrackIds + track.id + } else { + selectedTrackIds - track.id + } + }, + onTrackOptionsAction = { action -> onTrackOptionsAction(track, action) }, + trackOptionsState = trackOptionsState(track), + onShowOptionsClick = { selectedTrackForOptions = track }, + onArtistClick = onArtistClick, + onAlbumClick = onAlbumClick, + onArtistsOverflowClick = { onArtistsOverflowClick(track) }, + ) + } + + if (isLoading && tracks.isEmpty()) { + items(ShimmerRowCount) { shimmerIndex -> + ShimmerTrackListRow( + index = shimmerIndex + 1, + showIndex = showIndex, + showAlbum = showAlbum, + useDropdownForOptions = useDropdownForOptions, + ) + } + } + + if (error != null) { + item { + TrackListFeedbackRow( + message = error, + isError = true, + ) + } + } + + if (showEmptyMessage && !isLoading && visibleTracks.isEmpty() && error == null) { + item { + TrackListFeedbackRow("No tracks found") + } + } + + if (isLoadingNextPage) { + item { + ShimmerTrackListRow( + index = visibleTracks.size + 1, + showIndex = showIndex, + showAlbum = showAlbum, + useDropdownForOptions = useDropdownForOptions, + ) + } + } + + if (footerContent != null) { + item { + footerContent() + } + } + } + + if (!useDropdownForOptions) { + selectedTrackForOptions?.let { track -> + TrackOptionsBottomSheet( + track = track, + state = trackOptionsState(track), + onDismiss = { selectedTrackForOptions = null }, + onAction = { action -> + onTrackOptionsAction(track, action) + selectedTrackForOptions = null + }, + onAlbumClick = { track.album?.let { onAlbumClick(it) } }, + ) + } + } + VerticalScrollbar(listState, modifier = Modifier.align(Alignment.CenterEnd)) + } + +} + +@OptIn(ExperimentalFoundationApi::class) +@Composable +private fun TrackListRow( + index: Int, + track: MetadataTrack, + showIndex: Boolean, + showAlbum: Boolean, + useDropdownForOptions: Boolean, + isCurrentTrack: Boolean, + isCurrentTrackPlaying: Boolean, + isSelectionMode: Boolean, + isSelected: Boolean, + onTrackClick: () -> Unit, + onLongClick: () -> Unit, + onSelectionToggle: (Boolean) -> Unit, + onTrackOptionsAction: (TrackOptionsAction) -> Unit, + trackOptionsState: TrackOptionsState, + onShowOptionsClick: () -> Unit, + onArtistClick: (MetadataArtist.Basic) -> Unit, + onAlbumClick: (MetadataAlbum.Detailed) -> Unit, + onArtistsOverflowClick: () -> Unit, + modifier: Modifier = Modifier, +) { + val artworkInteractionSource = remember { MutableInteractionSource() } + val isArtworkHovered by artworkInteractionSource.collectIsHoveredAsState() + val rowInteractionSource = remember { MutableInteractionSource() } + val isRowHovered by rowInteractionSource.collectIsHoveredAsState() + val rowBackgroundColor = when { + isSelected -> MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.3f) + isCurrentTrack && isCurrentTrackPlaying -> MaterialTheme.colorScheme.primary.copy(alpha = 0.14f) + isCurrentTrack -> MaterialTheme.colorScheme.onSurface.copy(alpha = 0.06f) + else -> Color.Transparent + } + + Row( + modifier = modifier + .fillMaxWidth() + .clip(MaterialTheme.shapes.small) + .background(rowBackgroundColor) + .hoverable(rowInteractionSource) + .combinedClickable( + onClick = onTrackClick, + onLongClick = onLongClick, + ) + .padding(horizontal = 8.dp, vertical = 6.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp), + ) { + if (isSelectionMode) { + CheckBox( + state = if (isSelected) CheckBoxState.SELECTED else CheckBoxState.UNSELECTED, + onClick = { onSelectionToggle(!isSelected) }, + modifier = Modifier.shimmerApply() + ) + } else if (showIndex) { + Box( + modifier = Modifier.width(30.dp), + contentAlignment = Alignment.Center, + ) { + AnimatedContent( + targetState = isRowHovered, + transitionSpec = { + fadeIn() togetherWith fadeOut() + }, + label = "index-checkbox", + ) { hovered -> + if (hovered) { + CheckBox( + state = if (isSelected) CheckBoxState.SELECTED else CheckBoxState.UNSELECTED, + onClick = { onSelectionToggle(!isSelected) }, + modifier = Modifier.shimmerApply() + ) + } else { + TextWithShimmer( + text = index.toString(), + style = MaterialTheme.typography.labelMedium, + textAlign = TextAlign.Center, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } + } + + Box( + modifier = Modifier + .size(44.dp) + .clip(MaterialTheme.shapes.small) + .hoverable(interactionSource = artworkInteractionSource), + contentAlignment = Alignment.Center, + ) { + + val imageUrl = (track.album?.thumbnails ?: track.thumbnails)?.firstOrNull()?.url + val platformContext = LocalPlatformContext.current + val imageRequest = remember(imageUrl) { + ImageRequest.Builder(platformContext) + .data(imageUrl) + .size(128) // 44.dp * ~3x density = ~132px. 128 is a perfect power-of-2 size. + .crossfade(false) // Crucial for scroll performance + .build() + } + + AsyncImage( + model = imageRequest, + contentDescription = track.title, + contentScale = ContentScale.Crop, + modifier = Modifier.fillMaxSize().shimmerApply(), + ) + + if (isArtworkHovered || isCurrentTrack) { + Box( + modifier = Modifier + .fillMaxSize() + .background(Color.Black.copy(alpha = 0.10f)), + contentAlignment = Alignment.Center, + ) { + Icon( + imageVector = if (isCurrentTrack && isCurrentTrackPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = if (isCurrentTrack && isCurrentTrackPlaying) "Pause" else "Play", + tint = Color.White, + modifier = Modifier.size(18.dp).shimmerApply(), + ) + } + } + } + + Column(modifier = Modifier.weight(1.2f)) { + TextWithShimmer( + text = track.title, + style = MaterialTheme.typography.bodyLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + ArtistChips( + artists = track.artists, + onArtistClick = onArtistClick, + onArtistsOverflowClick = onArtistsOverflowClick, + ) + } + + if (showAlbum && track.album != null) { + TextWithShimmer( + text = track.album!!.title, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.primary, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier + .weight(1f) + .clickable { onAlbumClick(track.album!!) }, + ) + } + + TextWithShimmer( + text = track.durationMs.toDurationString(), + style = MaterialTheme.typography.bodySmall, + textAlign = TextAlign.End, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.width(56.dp), + ) + + if (useDropdownForOptions) { + TrackOptions( + track = track, + state = trackOptionsState, + onAction = onTrackOptionsAction, + onAlbumClick = { track.album?.let { onAlbumClick(it) } }, + ) + } else { + IconButton(onClick = onShowOptionsClick) { + Icon( + imageVector = Iconsax.Iconsax3DotsMore, + contentDescription = "Track options", + ) + } + } + } +} + +@Composable +private fun ArtistChips( + artists: List, + onArtistClick: (MetadataArtist.Basic) -> Unit, + onArtistsOverflowClick: () -> Unit, +) { + val visibleArtists = artists.take(2) + Row( + horizontalArrangement = Arrangement.spacedBy(6.dp), + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.fillMaxWidth(), + ) { + visibleArtists.forEach { artist -> + TextWithShimmer( + text = artist.name, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.primary, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.clickable { onArtistClick(artist) }, + ) + } + + val remaining = artists.size - visibleArtists.size + if (remaining > 0) { + TextWithShimmer( + text = "+$remaining more", + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.primary, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.clickable(onClick = onArtistsOverflowClick), + ) + } + } +} + +@Composable +private fun ShimmerTrackListRow( + index: Int, + showIndex: Boolean, + showAlbum: Boolean, + useDropdownForOptions: Boolean, +) { + val dummyTrack = remember(index) { dummyTrackForShimmer(index) } + SkeletonTree(true) { + TrackListRow( + index = index, + track = dummyTrack, + showIndex = showIndex, + showAlbum = showAlbum, + useDropdownForOptions = useDropdownForOptions, + isCurrentTrack = false, + isCurrentTrackPlaying = false, + isSelectionMode = false, + isSelected = false, + onTrackClick = {}, + onLongClick = {}, + onSelectionToggle = {}, + onTrackOptionsAction = {}, + trackOptionsState = TrackOptionsState(), + onShowOptionsClick = {}, + onArtistClick = {}, + onAlbumClick = {}, + onArtistsOverflowClick = {}, + ) + } +} + +private fun dummyTrackForShimmer(index: Int): MetadataTrack { + val artist = MetadataArtist.Basic( + id = "shimmer_artist_$index", + name = "Artist Name", + thumbnails = emptyList(), + externalUri = null, + ) + return MetadataTrack( + id = "shimmer_track_$index", + title = "Track Title Here", + durationMs = 210_000, + trackNumber = index, + discNumber = 1, + artists = listOf( + artist, + artist.copy(id = "shimmer_artist_${index}_2", name = "Another Artist") + ), + album = MetadataAlbum.Detailed( + releaseDate = null, + genres = emptyList(), + trackCount = 10, + id = "shimmer_album_$index", + title = "Album Name", + description = null, + thumbnails = emptyList(), + albumType = MetadataAlbumType.Album, + artists = listOf(artist), + externalUri = null, + ), + thumbnails = null, + explicit = false, + popularity = 0, + isrcCode = null, + externalUri = null, + ) +} + +@Composable +private fun TrackListFeedbackRow( + message: String, + isError: Boolean = false, +) { + TextWithShimmer( + text = message, + color = if (isError) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.onSurfaceVariant, + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 8.dp, vertical = 12.dp), + ) +} + +private fun Long.toDurationString(): String { + val totalSeconds = (this / 1000).coerceAtLeast(0) + val minutes = totalSeconds / 60 + val seconds = totalSeconds % 60 + return "$minutes:${seconds.toString().padStart(2, '0')}" +} + +fun previewTracks(): List { + val artists = listOf( + MetadataArtist.Basic( + id = "artist_1", + name = "Aria Vale", + thumbnails = emptyList(), + externalUri = null, + ), + MetadataArtist.Basic( + id = "artist_2", + name = "Neon Harbor", + thumbnails = emptyList(), + externalUri = null, + ), + MetadataArtist.Basic( + id = "artist_3", + name = "Echo Drift", + thumbnails = emptyList(), + externalUri = null, + ), + ) + + val album = MetadataAlbum.Detailed( + releaseDate = null, + genres = emptyList(), + trackCount = 10, + id = "album_1", + title = "Night Drive Archives", + description = null, + thumbnails = listOf( + Thumbnail( + url = "https://picsum.photos/120", + width = 120, + height = 120, + ) + ), + albumType = MetadataAlbumType.Album, + artists = artists.take(2), + externalUri = null, + ) + + return listOf( + MetadataTrack( + id = "track_1", + title = "Signal Bloom", + durationMs = 198_000, + trackNumber = 1, + discNumber = 1, + artists = artists, + album = album, + thumbnails = null, + explicit = false, + popularity = 92, + isrcCode = null, + externalUri = null, + ), + MetadataTrack( + id = "track_2", + title = "Static Horizon", + durationMs = 224_000, + trackNumber = 2, + discNumber = 1, + artists = artists.take(2), + album = album.copy(id = "album_2", title = "City Pulse"), + explicit = false, + popularity = 80, + isrcCode = null, + externalUri = null, + thumbnails = null, + ), + MetadataTrack( + id = "track_3", + title = "Last Train Echo", + durationMs = 246_000, + trackNumber = 3, + discNumber = 1, + artists = artists.take(1), + album = album.copy(id = "album_3", title = "Afterlight"), + explicit = false, + popularity = 77, + isrcCode = null, + externalUri = null, + thumbnails = null, + ), + ) +} + +@Composable +@Preview +private fun TrackListPreview() { + Scaffold { + TrackList( + tracks = previewTracks(), + hasMore = true, + isLoadingNextPage = true, + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackOptions.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackOptions.kt new file mode 100644 index 00000000..dfbbbc42 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/TrackOptions.kt @@ -0,0 +1,311 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.ui.base.IconButton +import dev.krtirtho.spotube.core.ui.misc.shimmerApply +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.Iconsax3DotsMore +import dev.krtirtho.spotube.resources.iconsax.IconsaxAddSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxCd +import dev.krtirtho.spotube.resources.iconsax.IconsaxDirectboxReceive +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicCircle +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicSquareRemove +import dev.krtirtho.spotube.resources.iconsax.IconsaxNext +import dev.krtirtho.spotube.resources.iconsax.IconsaxShare + +sealed interface TrackOptionsAction { + data object StartRadio : TrackOptionsAction + data object PlayNext : TrackOptionsAction + data object AddToQueue : TrackOptionsAction + data object RemoveFromQueue : TrackOptionsAction + data object ToggleFavorite : TrackOptionsAction + data object Download : TrackOptionsAction + data object ToggleBlacklist : TrackOptionsAction + data object Share : TrackOptionsAction +} + +data class TrackOptionsState( + val isInQueue: Boolean = false, + val isCurrentlyPlaying: Boolean = false, + val isFavorite: Boolean = false, + val isBlacklisted: Boolean = false, +) + +@Composable +fun TrackOptions( + track: MetadataTrack, + state: TrackOptionsState, + onAction: (TrackOptionsAction) -> Unit, + onAlbumClick: () -> Unit, + modifier: Modifier = Modifier, +) { + AdaptiveDropdownBottomSheet( + items = buildTrackMenuItems( + track = track, + state = state, + onAction = onAction, + onAlbumClick = onAlbumClick, + ), + trigger = { onClick -> + IconButton(onClick = onClick) { + Icon( + imageVector = Iconsax.Iconsax3DotsMore, + contentDescription = "Track options", + modifier = Modifier.shimmerApply() + ) + } + }, + headerDisplayMode = HeaderDisplayMode.OnlyInBottomSheet, + header = { TrackOptionsSheetHeader(track = track) }, + modifier = modifier, + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun TrackOptionsBottomSheet( + track: MetadataTrack, + state: TrackOptionsState, + onDismiss: () -> Unit, + onAction: (TrackOptionsAction) -> Unit, + onAlbumClick: () -> Unit, +) { + ModalBottomSheet(onDismissRequest = onDismiss) { + Column(modifier = Modifier.fillMaxWidth()) { + TrackOptionsSheetHeader(track = track) + + Column( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 8.dp, vertical = 8.dp), + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + buildTrackMenuItems( + track = track, + state = state, + onAction = { action -> + onAction(action) + onDismiss() + }, + onAlbumClick = { + onAlbumClick() + onDismiss() + }, + ).forEach { item -> + Row( + modifier = Modifier + .fillMaxWidth() + .clickable( + enabled = item.enabled, + onClick = item.onClick, + ) + .padding(horizontal = 12.dp, vertical = 14.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + item.icon?.let { icon -> + Icon( + imageVector = icon, + contentDescription = null, + modifier = Modifier.size(22.dp), + tint = if (item.enabled) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) + }, + ) + } + Text( + text = item.label, + style = MaterialTheme.typography.bodyLarge, + color = if (item.enabled) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) + }, + ) + } + } + } + } + } +} + +@Composable +fun TrackOptionsSheetHeader(track: MetadataTrack) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + AsyncImage( + model = (track.album?.thumbnails ?: track.thumbnails)?.firstOrNull()?.url, + contentDescription = null, + contentScale = ContentScale.Crop, + modifier = Modifier + .size(56.dp) + .clip(MaterialTheme.shapes.small), + ) + + Column(modifier = Modifier.weight(1f)) { + Text( + text = track.title, + style = MaterialTheme.typography.titleMedium, + maxLines = 2, + overflow = TextOverflow.Ellipsis, + ) + Text( + text = track.artists.joinToString(", ") { it.name }, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + track.album?.let { album -> + Text( + text = album.title, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + } + } +} + +private fun buildTrackMenuItems( + track: MetadataTrack, + state: TrackOptionsState, + onAction: (TrackOptionsAction) -> Unit, + onAlbumClick: () -> Unit, +): List = buildList { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxMusicCircle, + label = "Start radio", + onClick = { onAction(TrackOptionsAction.StartRadio) }, + ), + ) + + if (!state.isInQueue && !state.isCurrentlyPlaying) { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxNext, + label = "Play next", + onClick = { onAction(TrackOptionsAction.PlayNext) }, + ), + ) + } else if (state.isInQueue && !state.isCurrentlyPlaying) { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxNext, + label = "Move to next", + onClick = { onAction(TrackOptionsAction.PlayNext) }, + ), + ) + } + + if (!state.isInQueue) { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxAddSquare, + label = "Add to queue", + onClick = { onAction(TrackOptionsAction.AddToQueue) }, + ), + ) + } else { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxMusicSquareRemove, + label = "Remove from queue", + onClick = { onAction(TrackOptionsAction.RemoveFromQueue) }, + ), + ) + } + + add( + AdaptiveMenuItem( + icon = if (state.isFavorite) Iconsax.IconsaxHeart2 else Iconsax.IconsaxHeart, + label = if (state.isFavorite) "Remove from favorites" else "Save as favorite", + onClick = { onAction(TrackOptionsAction.ToggleFavorite) }, + ), + ) + + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxDirectboxReceive, + label = "Download", + onClick = { onAction(TrackOptionsAction.Download) }, + ), + ) + + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxMusicSquareRemove, + label = if (state.isBlacklisted) "Remove from blacklist" else "Add to blacklist", + onClick = { onAction(TrackOptionsAction.ToggleBlacklist) }, + ), + ) + + if (!track.externalUri.isNullOrBlank()) { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxShare, + label = "Share", + onClick = { onAction(TrackOptionsAction.Share) }, + ), + ) + } + + if (track.album != null) { + add( + AdaptiveMenuItem( + icon = Iconsax.IconsaxCd, + label = "Go to album", + onClick = onAlbumClick, + ), + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/UserCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/UserCard.kt new file mode 100644 index 00000000..1b4b9b13 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/UserCard.kt @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.Card +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.Alignment +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.core.ui.component.cards.AvatarCard + +@Composable +fun UserCard( + user: MetadataUser, + modifier: Modifier = Modifier, +) { + AvatarCard( + title = user.displayName ?: user.username, + subtitle = "User", + imageURL = user.thumbnails.firstOrNull()?.url, + onClick = { + // TODO: Route to user details screen. + }, + modifier = modifier, + ) +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.kt new file mode 100644 index 00000000..2522f276 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.kt @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.gestures.detectDragGestures +import androidx.compose.foundation.lazy.LazyListState +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.input.pointer.pointerInput +import dev.krtirtho.spotube.getPlatform +import dev.krtirtho.spotube.isDesktop + +@Composable +expect fun VerticalScrollbar( + listState: LazyListState, + modifier: Modifier = Modifier, +) + +fun Modifier.dragScrollable(rowState: LazyListState): Modifier = + if (getPlatform().isDesktop()) pointerInput(rowState) { + detectDragGestures { change, dragAmount -> + // Invert drag direction so content follows direct-manipulation behavior. + rowState.dispatchRawDelta(-dragAmount.x) + } + } else Modifier diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/cards/AvatarCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/cards/AvatarCard.kt new file mode 100644 index 00000000..797fd961 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/cards/AvatarCard.kt @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component.cards + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.ui.misc.TextWithShimmer +import dev.krtirtho.spotube.core.ui.misc.shimmerApply +import org.koin.compose.koinInject + +@Composable +fun AvatarCard( + title: String, + subtitle: String? = null, + imageURL: String? = null, + onClick: () -> Unit = {}, + modifier: Modifier = Modifier, +) { + Box( + modifier = modifier + .clip(RoundedCornerShape(8.dp)) + .clickable(onClick = { onClick.invoke() }, enabled = true) + .width(160.dp), + ) { + Column( + modifier = Modifier + .fillMaxWidth(), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .clip(CircleShape) + .padding(12.dp), + contentAlignment = Alignment.Center, + ) { + AsyncImage( + model = imageURL, + contentDescription = title, + modifier = Modifier + .fillMaxWidth() + .aspectRatio(1f) + .clip(CircleShape) + .shimmerApply(), + contentScale = ContentScale.Crop, + ) + } + Column( + modifier = Modifier.fillMaxWidth().padding(12.dp) + ) { + TextWithShimmer( + text = title, + style = MaterialTheme.typography.titleSmall, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.fillMaxWidth(), + ) + subtitle?.let { + TextWithShimmer( + text = subtitle, + style = MaterialTheme.typography.bodyMedium, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.fillMaxWidth(), + ) + } + } + } + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/cards/PlayableCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/cards/PlayableCard.kt new file mode 100644 index 00000000..105757fe --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/component/cards/PlayableCard.kt @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component.cards + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.foundation.clickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import dev.krtirtho.spotube.core.ui.base.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.PreviewLightDark +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.spotube.core.ui.base.PrimaryIconButton +import dev.krtirtho.spotube.core.ui.base.SecondaryIconButton +import dev.krtirtho.spotube.core.ui.misc.TextWithShimmer +import dev.krtirtho.spotube.core.ui.misc.shimmerApply +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxAddSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxPauseCircle +import dev.krtirtho.spotube.resources.iconsax.Play + +@Composable +fun PlayableCard( + title: String, + subtitle: String? = null, + imageURL: String? = null, + isPlaying: Boolean = false, + onClick: (() -> Unit)? = null, + onPlay: (() -> Unit)? = null, + onAddToQueue: (() -> Unit)? = null, + modifier: Modifier = Modifier, +) { + val interactionSource = remember { MutableInteractionSource() } + + Box( + modifier = modifier + .clip(RoundedCornerShape(8.dp)) + .clickable(onClick = { onClick?.invoke() }, enabled = true) + .width(160.dp) + .hoverable(interactionSource = interactionSource), + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Box(modifier = Modifier.fillMaxWidth().shimmerApply()) { + AsyncImage( + model = imageURL, + contentDescription = title, + modifier = Modifier.fillMaxWidth().aspectRatio(1f) + .clip(RoundedCornerShape(8.dp)), + contentScale = ContentScale.Crop, + ) + + if (onPlay != null || onAddToQueue != null) + Box( + modifier = Modifier.fillMaxWidth().aspectRatio(1f).padding(8.dp), + contentAlignment = Alignment.BottomEnd + ) { + val isHovered by interactionSource.collectIsHoveredAsState() + this@Column.AnimatedVisibility( + visible = isHovered, + //fade in/out animation when hovered + enter = fadeIn(), + exit = fadeOut(), + ) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.padding(4.dp) + ) { + onAddToQueue?.let { + SecondaryIconButton( + onClick = onAddToQueue, + modifier = Modifier.size(30.dp), + shape = RoundedCornerShape(6.dp) + ) { + Icon( + imageVector = Iconsax.IconsaxAddSquare, + contentDescription = "Add to queue", + ) + } + } + Spacer(modifier = Modifier.height(8.dp)) + onPlay?.let { + PrimaryIconButton( + onClick = onPlay, + modifier = Modifier.size(30.dp), + shape = RoundedCornerShape(6.dp) + ) { + Icon( + imageVector = if (isPlaying) { + Iconsax.IconsaxPauseCircle + } else Iconsax.Play, + contentDescription = "Play", + ) + } + } + } + } + } + } + Column( + modifier = Modifier.fillMaxWidth().padding(12.dp) + ) { + TextWithShimmer( + text = title, + style = MaterialTheme.typography.titleSmall, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + Spacer(modifier = Modifier.height(4.dp)) + subtitle?.let { + TextWithShimmer( + text = subtitle, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + } + } + + } +} + + +@PreviewLightDark +@Composable +private fun PlayableCardPreview() { + Scaffold { + PlayableCard( + title = "Sample Title", + subtitle = "Sample Subtitle", + imageURL = "https://placehold.co/600x400", + isPlaying = true, + onClick = {}, + onPlay = {}, + onAddToQueue = {} + ) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/Coverflow.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/Coverflow.kt new file mode 100644 index 00000000..84569b6e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/Coverflow.kt @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.clickable +import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.IntSize + +@OptIn(ExperimentalFoundationApi::class) +@Composable +fun Coverflow( + modifier: Modifier = Modifier, + state: CoverflowState = rememberCoverflowState(), + params: CoverflowParams = CoverflowParams(), + content: CoverflowScope.() -> Unit, +) { + var size by remember { mutableStateOf(IntSize.Zero) } + var geometry by remember { mutableStateOf(null) } + + LaunchedEffect(geometry) { + if (state.initialScrollDone) return@LaunchedEffect + val g = geometry ?: return@LaunchedEffect + state.lazyListState.scrollToItem( + state.selectedIndex + 1, + -g.spacerWidth, + ) + state.initialScrollDone = true + } + + Box(modifier = modifier.fillMaxSize()) { + LazyRow( + modifier = Modifier + .fillMaxSize() + .onGloballyPositioned { coordinates -> + size = coordinates.size + }, + verticalAlignment = Alignment.CenterVertically, + state = state.lazyListState, + flingBehavior = rememberSnapFlingBehavior(lazyListState = state.lazyListState), + ) { + if (size != IntSize.Zero) { + val g = Geometry(params, size) + geometry = g + state.geometry = g + + val coverflowScope = CoverflowScopeImpl( + geometry = g, + lazyListScope = this, + coverflowState = state, + ) + + item { + Spacer(modifier = Modifier.width(with(LocalDensity.current) { g.spacerWidth.toDp() })) + } + + coverflowScope.apply(content) + + item { + Spacer(modifier = Modifier.width(with(LocalDensity.current) { g.spacerWidth.toDp() })) + } + } + } + + Box( + modifier = Modifier + .fillMaxHeight() + .align(Alignment.CenterStart) + .clickable { + if (state.selectedIndex > 0) { + state.scrollToItem(state.selectedIndex - 1) + } + }, + ) {} + Box( + modifier = Modifier + .fillMaxHeight() + .align(Alignment.CenterEnd) + .clickable { + state.scrollToItem(state.selectedIndex + 1) + }, + ) {} + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowGeometry.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowGeometry.kt new file mode 100644 index 00000000..0ea24cc7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowGeometry.kt @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.runtime.Stable +import androidx.compose.ui.unit.IntSize +import kotlin.math.abs +import kotlin.math.min + +@Stable +internal class Geometry( + internal val params: CoverflowParams = CoverflowParams(), + private val size: IntSize = IntSize.Zero, +) { + @Stable + private val shortEdge + get() = min(size.width, size.height) + + @Stable + private val containerCenter + get() = size.width / 2 + + @Stable + private val zoomDelta + get() = 1 - params.zoom + + @Stable + internal val coverSize + get() = shortEdge * params.size + + @Stable + internal val coverOffset + get() = (coverSize * params.offset).toInt() + + @Stable + internal val spacerWidth + get() = containerCenter - coverOffset / 2 + + @Stable + internal fun isSelected(horizontalPosition: Float): Boolean { + return distanceToCenter(horizontalPosition).toInt() == 0 + } + + @Stable + internal fun distanceToCenter(horizontalPosition: Float): Float { + return horizontalPosition + coverOffset * 0.5f - containerCenter + } + + @Stable + internal fun effectFactor(distanceToCenter: Float): Float { + val relative = distanceToCenter / coverSize + val absolute = abs(relative) + val start = 0f + val end = 0.5f + var factor = if (absolute <= start) { + 0f + } else if (absolute >= end) { + 1f + } else { + val intervalStep = absolute - start + val delta = end - start + intervalStep / delta + } + if (relative < 0) { + factor = -factor + } + return factor + } + + @Stable + internal fun rotation(distanceToCenter: Float): Float { + return -params.angle * effectFactor(distanceToCenter) + } + + @Stable + internal fun scale(distanceToCenter: Float): Float { + return 1 - zoomDelta * abs(effectFactor(distanceToCenter)) + } + + @Stable + internal fun translationX(distanceToCenter: Float): Float { + return coverOffset * params.shift * effectFactor(distanceToCenter) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowItem.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowItem.kt new file mode 100644 index 00000000..9eabc429 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowItem.kt @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.requiredSize +import androidx.compose.foundation.layout.width +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.layout.positionInParent +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.zIndex +import kotlin.math.abs + +@Composable +internal fun CoverflowItem( + geometry: Geometry, + onClickHandler: () -> Unit = {}, + onSelectedHandler: (Boolean) -> Unit, + content: @Composable () -> Unit, +) { + var horizontalPosition by remember { mutableStateOf(null) } + val distanceToCenter = geometry.distanceToCenter(horizontalPosition ?: 0f) + + Box( + modifier = Modifier + .width(with(LocalDensity.current) { geometry.coverOffset.toDp() }) + .zIndex(1f - abs(distanceToCenter)) + .onGloballyPositioned { coordinates -> + horizontalPosition = coordinates.positionInParent().x + }, + contentAlignment = Alignment.Center, + ) { + if (horizontalPosition != null) { + onSelectedHandler(geometry.isSelected(horizontalPosition ?: 0f)) + + Box( + modifier = Modifier + .requiredSize(with(LocalDensity.current) { geometry.coverSize.toDp() }) + .graphicsLayer( + rotationY = geometry.rotation(distanceToCenter), + translationX = geometry.translationX(distanceToCenter), + scaleY = geometry.scale(distanceToCenter), + scaleX = geometry.scale(distanceToCenter), + ), + propagateMinConstraints = true, + ) { + val interactionSource = remember { MutableInteractionSource() } + if (geometry.params.mirror) { + Mirror( + modifier = Modifier.clickable( + interactionSource = interactionSource, + indication = null, + onClick = onClickHandler, + ), + coverSize = geometry.coverSize, + ) { + content() + } + } else { + Box( + modifier = Modifier.clickable( + interactionSource = interactionSource, + indication = null, + onClick = onClickHandler, + ), + ) { + content() + } + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowParams.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowParams.kt new file mode 100644 index 00000000..6298a886 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowParams.kt @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.runtime.Immutable + +@Immutable +data class CoverflowParams( + val size: Float = 0.5f, + val offset: Float = 0.4f, + val angle: Float = 45f, + val shift: Float = 0.4f, + val zoom: Float = 0.8f, + val mirror: Boolean = false, +) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowScope.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowScope.kt new file mode 100644 index 00000000..ef4fb578 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowScope.kt @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.runtime.Composable + +interface CoverflowScope { + fun items( + items: List, + onSelectHandler: (item: T, index: Int) -> Unit = { _: T, _: Int -> }, + key: ((index: Int) -> Any)? = null, + contentType: (index: Int) -> Any? = { null }, + itemContent: @Composable ((item: T) -> Unit), + ) + + fun items( + count: Int, + onSelectHandler: (index: Int) -> Unit = {}, + key: ((index: Int) -> Any)? = null, + contentType: (index: Int) -> Any? = { null }, + itemContent: @Composable ((index: Int) -> Unit), + ) +} + +internal class CoverflowScopeImpl( + private val geometry: Geometry, + private val lazyListScope: LazyListScope, + private val coverflowState: CoverflowState, +) : CoverflowScope { + override fun items( + items: List, + onSelectHandler: (item: T, index: Int) -> Unit, + key: ((index: Int) -> Any)?, + contentType: (index: Int) -> Any?, + itemContent: @Composable (item: T) -> Unit, + ) = items( + count = items.size, + onSelectHandler = { + onSelectHandler(items[it], it) + }, + key = key, + contentType = contentType, + ) { + itemContent(items[it]) + } + + override fun items( + count: Int, + onSelectHandler: (index: Int) -> Unit, + key: ((index: Int) -> Any)?, + contentType: (index: Int) -> Any?, + itemContent: @Composable (index: Int) -> Unit, + ) = lazyListScope.items( + count, + key, + contentType, + ) { + CoverflowItem( + onClickHandler = { coverflowState.scrollToItem(it) }, + onSelectedHandler = { isSelected: Boolean -> + if (selectHandler(it, isSelected)) { + onSelectHandler(it) + } + }, + geometry = geometry, + ) { + itemContent(it) + } + } + + private fun selectHandler( + index: Int, + isSelected: Boolean, + ): Boolean { + if (!isSelected && index == coverflowState.selectedIndex) { + coverflowState.selectedIndex = -1 + } else if (isSelected && index != coverflowState.selectedIndex) { + coverflowState.selectedIndex = index + return true + } + return false + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowState.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowState.kt new file mode 100644 index 00000000..99a16d77 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/CoverflowState.kt @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.foundation.lazy.LazyListState +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.launch + +@Composable +fun rememberCoverflowState( + initialIndex: Int = 0, + onSelectHandler: (Int) -> Unit = {}, +): CoverflowState { + val lazyListState: LazyListState = rememberLazyListState( + initialFirstVisibleItemIndex = initialIndex + 1, + ) + val coroutineScope: CoroutineScope = rememberCoroutineScope() + return remember { + CoverflowState( + lazyListState, + coroutineScope, + onSelectHandler, + initialIndex, + ) + } +} + +class CoverflowState internal constructor( + internal val lazyListState: LazyListState, + private val coroutineScope: CoroutineScope, + private val onSelectHandler: (Int) -> Unit = {}, + initialIndex: Int = 0, +) { + internal var geometry: Geometry? = null + internal var initialScrollDone: Boolean = false + + var selectedIndex: Int = initialIndex + internal set(it) { + field = it + onSelectHandler(it) + } + + fun scrollToItem(index: Int) { + val geometryCopy = geometry + if (geometryCopy != null) { + coroutineScope.launch { + lazyListState.animateScrollToItem( + index + 1, + -geometryCopy.spacerWidth, + ) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/Mirror.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/Mirror.kt new file mode 100644 index 00000000..3ec6fa81 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/coverflow/Mirror.kt @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.coverflow + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredHeight +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.blur +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithContent +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.geometry.Rect +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.BlendMode +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.CompositingStrategy +import androidx.compose.ui.graphics.Outline +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.Density +import androidx.compose.ui.unit.LayoutDirection +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.times + +@Composable +internal fun Mirror( + modifier: Modifier = Modifier, + coverSize: Float, + content: @Composable () -> Unit, +) { + val coverSizeDp = with(LocalDensity.current) { coverSize.toDp() } + + Column( + modifier = modifier + .padding(top = coverSizeDp) + .fillMaxWidth() + .requiredHeight(2 * coverSizeDp), + ) { + Box( + propagateMinConstraints = true, + modifier = Modifier + .weight(1f) + .fillMaxWidth() + .height(coverSizeDp), + ) { + content() + } + Box( + propagateMinConstraints = true, + modifier = Modifier + .weight(1f) + .fillMaxWidth() + .height(coverSizeDp) + .graphicsLayer( + compositingStrategy = CompositingStrategy.Offscreen, + rotationX = 180f, + ) + .clip(HalfSizeShape) + .drawWithContent { + val colors = listOf( + Color.Transparent, + Color.Transparent, + Color.Black, + ) + drawContent() + drawRect( + topLeft = Offset( + 0f, + this.size.height / 2, + ), + size = Size( + this.size.width, + this.size.height / 2, + ), + brush = Brush.verticalGradient(colors), + blendMode = BlendMode.DstIn, + ) + } + .blur( + radiusX = 1.dp, + radiusY = 3.dp, + ), + ) { + content() + } + } +} + +private object HalfSizeShape : Shape { + override fun createOutline( + size: Size, + layoutDirection: LayoutDirection, + density: Density, + ): Outline = Outline.Rectangle( + Rect( + Offset( + 0f, + size.height / 2, + ), + Size( + size.width, + size.height, + ), + ), + ) +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/misc/Shimmer.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/misc/Shimmer.kt new file mode 100644 index 00000000..a5040409 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/misc/Shimmer.kt @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.misc + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.text.TextAutoSize +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.compositionLocalOf +import androidx.compose.ui.Modifier +import androidx.compose.ui.composed +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.input.pointer.PointerEventPass +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.text.TextLayoutResult +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.TextUnit +import com.eygraber.compose.placeholder.material3.placeholder +import com.valentinilk.shimmer.ShimmerBounds +import com.valentinilk.shimmer.rememberShimmer +import com.valentinilk.shimmer.shimmer + +val LocalSkeletonLoading = compositionLocalOf { false } + +@Composable +fun SkeletonTree( + isLoading: Boolean, + modifier: Modifier = Modifier, + content: @Composable () -> Unit +) { + // Intercept clicks and touches globally when loading + val interactionModifier = if (isLoading) { + modifier.pointerInput(Unit) { + awaitPointerEventScope { + while (true) { + val event = awaitPointerEvent(PointerEventPass.Initial) + event.changes.forEach { it.consume() } + } + } + } + } else { + modifier + } + + CompositionLocalProvider(LocalSkeletonLoading provides isLoading) { + if (isLoading) { + // Valentinilk's synchronized hardware-accelerated shimmer loop + Box(modifier = interactionModifier.shimmer(rememberShimmer(shimmerBounds = ShimmerBounds.View))) { + content() + } + } else { + Box(modifier = interactionModifier) { + content() + } + } + } +} + +fun Modifier.shimmerApply( + color: Color = Color.LightGray.copy(alpha = 0.5f) // Adjust alpha/color to match your theme +): Modifier = composed { + val isTreeLoading = LocalSkeletonLoading.current + + this.placeholder( + visible = isTreeLoading, + color = color, + shape = null, + ) +} + +@Composable +fun TextWithShimmer( + text: String, + modifier: Modifier = Modifier, + color: Color = Color.Unspecified, + autoSize: TextAutoSize? = null, + fontSize: TextUnit = TextUnit.Unspecified, + fontStyle: FontStyle? = null, + fontWeight: FontWeight? = null, + fontFamily: FontFamily? = null, + letterSpacing: TextUnit = TextUnit.Unspecified, + textDecoration: TextDecoration? = null, + textAlign: TextAlign? = null, + lineHeight: TextUnit = TextUnit.Unspecified, + overflow: TextOverflow = TextOverflow.Clip, + softWrap: Boolean = true, + maxLines: Int = Int.MAX_VALUE, + minLines: Int = 1, + onTextLayout: ((TextLayoutResult) -> Unit)? = null, + style: TextStyle = LocalTextStyle.current, +) { + Text( + text = text, + color = color, + modifier = Modifier.shimmerApply().then(modifier), + autoSize = autoSize, + fontSize = fontSize, + fontStyle = fontStyle, + fontWeight = fontWeight, + fontFamily = fontFamily, + letterSpacing = letterSpacing, + textDecoration = textDecoration, + textAlign = textAlign, + lineHeight = lineHeight, + overflow = overflow, + softWrap = softWrap, + maxLines = maxLines, + minLines = minLines, + onTextLayout = onTextLayout, + style = style + ) +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/theming/AppTheme.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/theming/AppTheme.kt new file mode 100644 index 00000000..1e5d69cc --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/ui/theming/AppTheme.kt @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.theming + +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.runtime.Composable +import com.materialkolor.rememberDynamicColorScheme +import dev.krtirtho.spotube.modules.settings.Theme +import dev.krtirtho.spotube.modules.settings.UserSettings + +@Composable +fun SpotubeTheme( + settings: UserSettings, + content: @Composable () -> Unit, +) { + val isDarkTheme = when (settings.theme) { + Theme.LIGHT -> false + Theme.DARK -> true + Theme.SYSTEM -> isSystemInDarkTheme() + } + + val accent = if (isDarkTheme) { + settings.accentColor.toDarkColor() + } else { + settings.accentColor.toLightColor() + } + + val colorScheme = rememberDynamicColorScheme( + seedColor = accent, + isDark = isDarkTheme, + ) + + MaterialTheme( + colorScheme = colorScheme, + ) { + Surface(content = content) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebView.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebView.kt new file mode 100644 index 00000000..98870847 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebView.kt @@ -0,0 +1,157 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.webview + +import io.github.kdroidfilter.webview.web.WebContent +import io.github.kdroidfilter.webview.web.WebViewNavigator +import io.github.kdroidfilter.webview.cookie.CookieManager +import dev.krtirtho.plugin_interfaces.host_apis.Cookie +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import org.koin.core.component.KoinComponent + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +class WebViewController(val navigationCommands: NavigationCommands): KoinComponent { + private val logger by injectLogger() + private var cookieManager: CookieManager? = null + private val urlFlow = MutableStateFlow("") + private val webViewCreated = MutableSharedFlow(replay = 1) + + suspend fun getCookies(url: String): List { + if (cookieManager == null) { + logger.w { "CookieManager is not initialized. Returning empty cookie list." } + return emptyList() + } + val cookies = cookieManager!!.getCookies(url) + val cookieList = mutableListOf() + cookies.forEach { + cookieList.add( + Cookie( + name = it.name, + value = it.value, + domain = it.domain ?: "", + path = it.path, + expiresAt = it.expiresDate, + secure = it.isSecure ?: false, + httpOnly = it.isHttpOnly ?: false + ) + ) + } + return cookieList + } + + private var content: String? = null + private var isHtmlContent: Boolean = false + fun getContent(): String? = content + fun getWebContent(additionalHttpHeaders: Map = emptyMap()): WebContent { + if (content == null) throw IllegalStateException("Content is null. This should not happen as WebView should only be opened when content is set.") + if (isHtmlContent) return WebContent.Data(data = content!!, mimeType = "text/html") + return WebContent.Url(url = content!!, additionalHttpHeaders = additionalHttpHeaders) + } + + var webViewNavigator: WebViewNavigator? = null + + fun emitUrlChange(url: String) { + urlFlow.value = url + } + + fun emitWebViewCreated() { + webViewCreated.tryEmit(Unit) + } + + fun setCookieManager(cookieManager: CookieManager) { + this.cookieManager = cookieManager + } + + @OptIn(ExperimentalCoroutinesApi::class) + fun closeWebview() { + cookieManager = null + content = null + isHtmlContent = false + webViewNavigator = null + navigationCommands.pop(Routes.WebView) + urlFlow.value = "" + webViewCreated.resetReplayCache() + _postMessagesFlow.resetReplayCache() + } + + fun dispose() { + cookieManager = null + content = null + isHtmlContent = false + webViewNavigator = null + } + + fun navigateTo(url: String) { + if (this.content != null) { + throw IllegalStateException("WebView is already open. Please close the current WebView before navigating to a new URL.") + } + this.content = url + this.isHtmlContent = false + navigationCommands.navigateTo(Routes.WebView) + } + + fun navigateToHTML(html: String) { + if (this.content != null) { + throw IllegalStateException("WebView is already open. Please close the current WebView before navigating to a new URL.") + } + this.content = html + this.isHtmlContent = true + navigationCommands.navigateTo(Routes.WebView) + } + + suspend fun evaluateJavascript(jsCode: String): String? { + if (webViewNavigator == null) { + throw IllegalStateException("WebView is not initialized. Cannot evaluate JavaScript.") + } + val completer = CompletableDeferred() + try { + webViewNavigator?.evaluateJavaScript(jsCode) { result -> + completer.complete(result) + } + } catch (e: Exception) { + completer.completeExceptionally(e) + throw e + } + return completer.await() + } + + suspend fun clearData() { + cookieManager?.removeAllCookies() + cookieManager = null + content = null + isHtmlContent = false + webViewNavigator = null + } + + val urlChangedFlow = urlFlow.asStateFlow() + val webviewCreatedFlow = webViewCreated.asSharedFlow() + private val _postMessagesFlow = MutableSharedFlow(replay = 1) + fun emitPostMessage(message: String) { + _postMessagesFlow.tryEmit(message) + } + + val postMessagesFlow = _postMessagesFlow.asSharedFlow() +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.kt new file mode 100644 index 00000000..66fc7a0b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.kt @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.webview + +import io.github.kdroidfilter.webview.web.WebViewState + +expect fun platformWebviewConfig(webView: WebViewState) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewScreen.kt new file mode 100644 index 00000000..5c10a031 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewScreen.kt @@ -0,0 +1,228 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.webview + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.statusBars +import androidx.compose.foundation.layout.statusBarsPadding +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.BasicTextField +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import io.github.kdroidfilter.webview.jsbridge.IJsMessageHandler +import io.github.kdroidfilter.webview.jsbridge.JsMessage +import io.github.kdroidfilter.webview.jsbridge.rememberWebViewJsBridge +import io.github.kdroidfilter.webview.web.WebView +import io.github.kdroidfilter.webview.web.rememberWebViewNavigator +import io.github.kdroidfilter.webview.web.WebViewState +import io.github.kdroidfilter.webview.web.WebViewNavigator +import compose.icons.FeatherIcons +import compose.icons.feathericons.ChevronLeft +import compose.icons.feathericons.ChevronRight +import compose.icons.feathericons.X +import dev.krtirtho.spotube.core.tools.user_agents.UserAgents +import kotlinx.coroutines.launch + +class PostMessageHandler( + private val onMessageReceived: (String) -> Unit = {} +) : IJsMessageHandler { + override fun methodName(): String { + return "sendMessage" + } + + override fun handle( + message: JsMessage, navigator: WebViewNavigator?, callback: (String) -> Unit + ) { + onMessageReceived(message.params) + callback(message.params) + } +} + +@Composable +fun PlatformWebViewScreen(webViewController: WebViewController) { + if (webViewController.getContent() == null) { + // This should never happen, but just in case + Text("No URL to load") + return + } + + val state = remember { + WebViewState( + webViewController.getWebContent( + additionalHttpHeaders = mapOf( + "User-Agent" to UserAgents.random() + ) + ) + ) + }.apply { + this.content = webViewController.getWebContent() + platformWebviewConfig(this) + } + + val navigator = rememberWebViewNavigator() + val webViewBridge = rememberWebViewJsBridge(navigator) + + val bridgeBootstrapScript = remember { + """ + (function() { + if (typeof window.sendMessage !== "function") { + window.sendMessage = function(message) { + if (typeof message !== "string") { + throw new TypeError("[window.sendMessage] Message must be a string"); + } + window.kmpJsBridge.callNative("sendMessage", message); + }; + } + + if (!window.bridgeReady) { + const event = new CustomEvent("onBridgeReady"); + window.dispatchEvent(event); + window.bridgeReady = true; + } + })(); + """.trimIndent() + } + + LaunchedEffect(state) { + snapshotFlow { state.lastLoadedUrl }.collect { url -> + if (url != null) { + webViewController.emitUrlChange(url) + navigator.evaluateJavaScript(bridgeBootstrapScript) + webViewController.emitWebViewCreated() + } + } + } + + LaunchedEffect(state.cookieManager, navigator) { + webViewController.setCookieManager(cookieManager = state.cookieManager) + webViewController.webViewNavigator = navigator + } + + LaunchedEffect(webViewBridge) { + webViewBridge.register(PostMessageHandler { message -> + webViewController.emitPostMessage(message) + }) + } + + DisposableEffect(Unit) { + onDispose { + webViewController.dispose() + } + } + + Scaffold( + contentWindowInsets = WindowInsets.statusBars, + topBar = { + Row( + modifier = Modifier.fillMaxWidth().statusBarsPadding().height(56.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Start, + modifier = Modifier.height(56.dp) + ) { + IconButton( + onClick = { + navigator.navigateBack() + }, enabled = navigator.canGoBack + ) { + Icon( + FeatherIcons.ChevronLeft, + contentDescription = "Go back to browser history" + ) + } + IconButton( + onClick = { + navigator.navigateForward() + }, enabled = navigator.canGoForward + ) { + Icon( + FeatherIcons.ChevronRight, + contentDescription = "Go forward to browser history" + ) + } + } + Surface( + modifier = Modifier.weight(1f).height(36.dp).padding(horizontal = 4.dp), + shape = RoundedCornerShape(18.dp), + color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f), + border = BorderStroke(1.dp, Color.Gray.copy(alpha = 0.5f)) + ) { + BasicTextField( + value = state.lastLoadedUrl ?: "", + onValueChange = {}, // Read-only + readOnly = true, + singleLine = true, + textStyle = MaterialTheme.typography.bodyMedium.copy( + color = MaterialTheme.colorScheme.onSurface, + textAlign = TextAlign.Start + ), + modifier = Modifier.fillMaxWidth().padding(horizontal = 12.dp) + .wrapContentHeight(Alignment.CenterVertically) + ) + } + IconButton( + onClick = { + webViewController.closeWebview() + }) { + Icon(FeatherIcons.X, contentDescription = "Close WebView") + } + } + }) { innerPadding -> + WebView( + state = state, + modifier = Modifier.padding(innerPadding).fillMaxSize(), + navigator = navigator, + webViewJsBridge = webViewBridge, + onCreated = { webView -> + navigator.evaluateJavaScript(bridgeBootstrapScript) + + }, + factory = null + ) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/BuiltInPluginService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/BuiltInPluginService.kt new file mode 100644 index 00000000..3d9b19f6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/BuiltInPluginService.kt @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import app.cash.zipline.ZiplineService +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.core.zipline.host_apis.RealPersistedStorageAPI +import dev.krtirtho.spotube.core.zipline.plugin_apis.common.RealCoreAPI +import dev.krtirtho.spotube.core.zipline.plugin_apis.lrclib.RealLRCLibLyricsAPI +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.createMusicbrainzListenbrainzPluginAPIs +import dev.krtirtho.spotube.core.zipline.plugin_apis.newpipe_yt.RealNewPipeAudioAPI +import dev.krtirtho.spotube.modules.plugin.LRCLIB_BUILT_IN_PLUGIN +import dev.krtirtho.spotube.modules.plugin.MUSICBRAINZ_LISTENBRAINZ_BUILT_IN_PLUGIN +import dev.krtirtho.spotube.modules.plugin.NEWPIPE_YOUTUBE_BUILT_IN_PLUGIN +import dev.krtirtho.spotube.modules.plugin.PluginEntry +import io.ktor.client.HttpClient +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject +import kotlin.reflect.KClass + +class BuiltInPluginService( + private val pluginInfo: PluginEntry, +) : PluginService, KoinComponent { + + private val loggedInStateFlow = MutableStateFlow(false) + override val loggedInFlow = loggedInStateFlow.asStateFlow() + val servicesRegistry = mutableMapOf, ZiplineService>() + + val webViewController: WebViewController by inject() + + val scope = CoroutineScope(Dispatchers.IO + SupervisorJob()) + val persistedStorage by lazy { RealPersistedStorageAPI(pluginInfo) } + + private fun runLogInFlowObservers() = scope.launch { + val coreAPI = servicesRegistry[CoreAPI::class] as CoreAPI? + coreAPI?.loggedInFlow?.collect { isLoggedIn -> + loggedInStateFlow.value = isLoggedIn + } + } + + + override suspend fun start() { + when (pluginInfo) { + NEWPIPE_YOUTUBE_BUILT_IN_PLUGIN -> { + servicesRegistry[CoreAPI::class] = RealCoreAPI() + servicesRegistry[AudioAPI::class] = RealNewPipeAudioAPI() + } + + MUSICBRAINZ_LISTENBRAINZ_BUILT_IN_PLUGIN -> { + servicesRegistry.putAll( + createMusicbrainzListenbrainzPluginAPIs( + scope = scope, + httpClient = HttpClient(), + webViewController = webViewController, + persistedStorage = persistedStorage + ) + ) + } + + LRCLIB_BUILT_IN_PLUGIN -> { + servicesRegistry[CoreAPI::class] = RealCoreAPI() + servicesRegistry[LyricsAPI::class] = RealLRCLibLyricsAPI() + } + } + runLogInFlowObservers() + } + + override suspend fun stop() { + for (service in servicesRegistry.values) { + service.close() + } + servicesRegistry.clear() + } + + override suspend fun use(block: suspend PluginServiceScope.() -> T): T { + //Since built-in plugins don't require any special setup, we can just execute the block with an empty scope + return block(PluginServiceScope(servicesRegistry)) + } + +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/FileSystemHTTPClient.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/FileSystemHTTPClient.kt new file mode 100644 index 00000000..784fae2e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/FileSystemHTTPClient.kt @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import app.cash.zipline.loader.ZiplineHttpClient +import dev.krtirtho.spotube.core.di.injectLogger +import io.ktor.http.URLBuilder +import io.ktor.http.decodeURLQueryComponent +import okio.ByteString +import okio.FileSystem +import okio.Path +import okio.Path.Companion.toPath +import okio.SYSTEM +import org.koin.core.component.KoinComponent + +class FileSystemHTTPClient(private val baseDir: Path) : ZiplineHttpClient(), KoinComponent { + private val logger by injectLogger() + private val okio = FileSystem.SYSTEM + + override suspend fun download( + url: String, + requestHeaders: List> + ): ByteString { + try { + val parsedUrl = URLBuilder(url) + var fullPath = parsedUrl.encodedParameters["path"]?.decodeURLQueryComponent()?.toPath() + + if (fullPath == null && parsedUrl.encodedPathSegments.isNotEmpty()) { + fullPath = baseDir / parsedUrl.encodedPathSegments.last() + logger.d { "Constructed full path from URL path: $fullPath" } + } + + if (fullPath == null) { + throw IllegalArgumentException("[FileSystemHTTPClient] Invalid URL: $url. Expected a 'path' query parameter or a simple path in the URL.") + } + + logger.d { "Reading: $fullPath" } + return okio.read(fullPath) { + val str = readByteString() + // Print the length of the content being read for debugging + logger.d { "Read ${str.size / 1024.0} KB from $fullPath" } + // Print the sha256 hash of the content for verification + val hash = str.sha256().hex() + logger.d { "SHA-256 hash of content: $hash" } + str + } + } catch (e: Exception) { + logger.e(e) { "Error reading file for URL: $url. Exception: ${e.message}" } + throw e + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/PluginService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/PluginService.kt new file mode 100644 index 00000000..36e1ac7d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/PluginService.kt @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import app.cash.zipline.ZiplineService +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleAPI +import kotlinx.coroutines.flow.StateFlow +import kotlin.reflect.KClass + +class PluginServiceScope(private val registry: Map, ZiplineService>) { + val coreAPI: CoreAPI get() = getService() + val metadataUserAPI: MetadataUserAPI get() = getService() + val metadataTrackAPI: MetadataTrackAPI get() = getService() + val metadataAlbumAPI: MetadataAlbumAPI get() = getService() + val metadataArtistAPI: MetadataArtistAPI get() = getService() + val metadataPlaylistAPI: MetadataPlaylistAPI get() = getService() + val metadataBrowseAPI: MetadataBrowseAPI get() = getService() + val metadataSearchAPI: MetadataSearchAPI get() = getService() + val audioAPI: AudioAPI get() = getService() + val lyricsAPI: LyricsAPI get() = getService() + val scrobbleAPI: ScrobbleAPI get() = getService() + + private inline fun getService(): T { + return registry[T::class] as? T + ?: error("${T::class.simpleName} is not initialized or loaded.") + } +} + +interface PluginService { + val loggedInFlow: StateFlow + + suspend fun start() + suspend fun stop() + suspend fun use(block: suspend PluginServiceScope.() -> T): T +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.kt new file mode 100644 index 00000000..14282692 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.kt @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import kotlinx.coroutines.CoroutineDispatcher + +/** + * A coroutine dispatcher that can be closed/shut down. + */ +class ZiplineDispatcher( + val dispatcher: CoroutineDispatcher, + private val onClose: () -> Unit = {} +) { + fun close() { + onClose() + } +} + +/** + * Creates a single-threaded coroutine dispatcher suitable for running Zipline/QuickJS. + * + * QuickJS's compile() uses deep C-level recursion on the native thread stack. + * Zipline.create() sets maxStackSize to 6 MiB and expects the calling thread + * to have at least 8 MiB of stack. On JVM/Android, the default thread stack + * size is ~1 MiB, which causes native stack overflow when compiling large + * JS modules like kotlin-stdlib (~491 KB). + * + * This expect/actual ensures the backing thread has a sufficiently large stack. + */ +expect fun createZiplineDispatcher(): ZiplineDispatcher + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplinePluginService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplinePluginService.kt new file mode 100644 index 00000000..a8e3ab38 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplinePluginService.kt @@ -0,0 +1,332 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import app.cash.zipline.Zipline +import app.cash.zipline.ZiplineService +import app.cash.zipline.loader.DefaultFreshnessCheckerNotFresh +import app.cash.zipline.loader.LoadResult +import app.cash.zipline.loader.ManifestVerifier +import app.cash.zipline.loader.ZiplineLoader +import dev.krtirtho.plugin_interfaces.core.Initializer +import dev.krtirtho.plugin_interfaces.core.Initializer_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.CryptoAPI +import dev.krtirtho.plugin_interfaces.host_apis.CryptoAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.HttpClientAPI +import dev.krtirtho.plugin_interfaces.host_apis.HttpClientAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.SystemInformationAPI +import dev.krtirtho.plugin_interfaces.host_apis.SystemInformationAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.WebViewAPI +import dev.krtirtho.plugin_interfaces.host_apis.WebViewAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleAPI_SERVICE_NAME +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.core.zipline.host_apis.RealCryptoAPI +import dev.krtirtho.spotube.core.zipline.host_apis.RealHttpClientAPI +import dev.krtirtho.spotube.core.zipline.host_apis.RealPersistedStorageAPI +import dev.krtirtho.spotube.core.zipline.host_apis.RealSystemInformationAPI +import dev.krtirtho.spotube.core.zipline.host_apis.RealWebViewAPI +import dev.krtirtho.spotube.modules.plugin.PluginAbility +import dev.krtirtho.spotube.modules.plugin.PluginCapability +import dev.krtirtho.spotube.modules.plugin.PluginEntry +import io.ktor.http.URLBuilder +import io.ktor.http.decodeURLQueryComponent +import kotlinx.coroutines.CoroutineExceptionHandler +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.withContext +import okio.Path.Companion.toPath +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject +import kotlin.reflect.KClass + + +/** + * Manages the lifecycle of a Zipline plugin. + * It runs everything on its own dispatcher (different thread) as per Zipline's requirements. + * Anything it provides, must be called within that dispatcher context. + * The [use] function must be used. + * + * The host bindings are called by plugins in the supplied [ZiplineDispatcher] as well, + * so if they are calling something on [Dispatchers.Main], those calls should be wrapped in + * `withContext(Dispatchers.Main)` to avoid blocking the zipline thread. It can cause stack-overflows. + * + * The plugin is loaded lazily when [start] is called, and all services are closed when [stop] is called. + */ +open class ZiplinePluginService( + val applicationName: String, + private val manifestUrl: String, + private val pluginInfo: PluginEntry, +) : PluginService, KoinComponent { + + // QuickJS compile() uses deep C-level recursion on the native thread stack. + // Zipline.create() sets maxStackSize to only 6 MiB, but compiling large JS modules + // (e.g. kotlin-stdlib at ~491 KB) can exceed that during AST parsing. + // We use a custom EventListener to increase maxStackSize right after the Zipline + // instance is created, before any modules are loaded. + private val ziplineDispatcher = createZiplineDispatcher() + + private fun trace(event: String) { + logger.d { "[$applicationName] $event" } + } + + private val logger by injectLogger() + private val webViewController: WebViewController by inject() + + private val scope = CoroutineScope(SupervisorJob() + ziplineDispatcher.dispatcher) + private val ziplineExceptionHandler = CoroutineExceptionHandler { _, throwable -> + logger.e(throwable) { "Zipline Engine Error" } + } + private val lifecycleMutex = Mutex() + private var ziplineLoader: ZiplineLoader + private val serviceRegistry = mutableMapOf, ZiplineService>() + + init { + val manifestPath = URLBuilder(manifestUrl) + val baseDir = + manifestPath.encodedParameters["path"]?.decodeURLQueryComponent()?.toPath()?.parent + ?: throw IllegalArgumentException("Invalid manifest URL: $manifestUrl. Expected a 'path' query parameter pointing to the manifest file.") + ziplineLoader = ZiplineLoader( + dispatcher = ziplineDispatcher.dispatcher, + manifestVerifier = ManifestVerifier.NO_SIGNATURE_CHECKS, + httpClient = FileSystemHTTPClient(baseDir) + ) + } + + private val realHttpClientAPI = RealHttpClientAPI() + private val realWebViewAPI = RealWebViewAPI(scope, webViewController) + + private val persistedStorageAPI = RealPersistedStorageAPI(pluginInfo) + private val cryptoAPI = RealCryptoAPI(scope.coroutineContext) + private val systemInformationAPI = RealSystemInformationAPI() + + private val loggedInStateFlow = MutableStateFlow(false) + override val loggedInFlow: StateFlow = loggedInStateFlow.asStateFlow() + + private fun bindHostServices(zipline: Zipline) { + trace("initializer(): binding host APIs") + logger.d { "[$applicationName] Binding host APIs in initializer" } + try { + // Basic APIs + zipline.bind(CryptoAPI_SERVICE_NAME, cryptoAPI) + zipline.bind( + SystemInformationAPI_SERVICE_NAME, + systemInformationAPI + ) + + // Conditional APIs based on plugin capabilities + if (PluginCapability.NETWORK_REQUESTS in pluginInfo.capabilities) { + zipline.bind( + HttpClientAPI_SERVICE_NAME, + realHttpClientAPI + ) + } + if (PluginCapability.WEBVIEW in pluginInfo.capabilities) { + zipline.bind(WebViewAPI_SERVICE_NAME, realWebViewAPI) + } + if (PluginCapability.PERSISTENT_STORAGE in pluginInfo.capabilities) { + zipline.bind( + PersistedStorageAPI_SERVICE_NAME, + persistedStorageAPI + ) + } + } catch (e: Exception) { + logger.e(e) { "[$applicationName] Failed to bind host APIs: ${e.message}" } + throw e + } + } + + private fun consumePluginServices(result: LoadResult.Success) { + trace("start(): loadOnce success") + val apiMap = + buildMap, ZiplineService> { + put(CoreAPI::class, result.zipline.take(CoreAPI_SERVICE_NAME)) + + if (PluginAbility.METADATA in pluginInfo.abilities) { + put( + MetadataUserAPI::class, + result.zipline.take( + MetadataUserAPI_SERVICE_NAME + ) + ) + put( + MetadataTrackAPI::class, + result.zipline.take( + MetadataTrackAPI_SERVICE_NAME + ) + ) + put( + MetadataAlbumAPI::class, + result.zipline.take( + MetadataAlbumAPI_SERVICE_NAME + ) + ) + put( + MetadataArtistAPI::class, + result.zipline.take( + MetadataArtistAPI_SERVICE_NAME + ) + ) + put( + MetadataPlaylistAPI::class, + result.zipline.take( + MetadataPlaylistAPI_SERVICE_NAME + ) + ) + put( + MetadataBrowseAPI::class, + result.zipline.take( + MetadataBrowseAPI_SERVICE_NAME + ) + ) + put( + MetadataSearchAPI::class, + result.zipline.take( + MetadataSearchAPI_SERVICE_NAME + ) + ) + } + if (PluginAbility.AUDIO in pluginInfo.abilities) { + put( + AudioAPI::class, + result.zipline.take(AudioAPI_SERVICE_NAME) + ) + } + if (PluginAbility.LYRICS in pluginInfo.abilities) { + put( + LyricsAPI::class, + result.zipline.take(LyricsAPI_SERVICE_NAME) + ) + } + if (PluginAbility.SCROBBLE in pluginInfo.abilities) { + put( + ScrobbleAPI::class, + result.zipline.take(ScrobbleAPI_SERVICE_NAME) + ) + } + } + + serviceRegistry.putAll(apiMap) + trace("start(): API ready") + } + + private fun runLogInFlowObservers() = scope.launch { + val coreAPI = serviceRegistry[CoreAPI::class] as CoreAPI + coreAPI.loggedInFlow.collect { isLoggedIn -> + loggedInStateFlow.value = isLoggedIn + } + } + + override suspend fun start() { + lifecycleMutex.withLock { + trace("start(): entered") + if (serviceRegistry.isNotEmpty()) { + trace("start(): already started, skipping") + return + } + + withContext(ziplineDispatcher.dispatcher) { + trace("start(): inside zipline dispatcher before loadOnce") + val result = ziplineLoader.loadOnce( + applicationName = applicationName, + manifestUrl = manifestUrl, + freshnessChecker = DefaultFreshnessCheckerNotFresh, + ) + when (result) { + is LoadResult.Success -> { + // Now we consume the initializer + val initializer = result.zipline.take(Initializer_SERVICE_NAME) + // Bind host services before initialization, so plugins can use them in their initializer + bindHostServices(result.zipline) + trace("start(): calling initializer.initialize()") + runCatching { initializer.initialize() } + .onSuccess { + consumePluginServices(result) + runLogInFlowObservers() + } + .onFailure { e -> + logger.e(e) { "[$applicationName] Initializer failed: ${e.message}" } + throw e + } + } + + is LoadResult.Failure -> { + trace("start(): loadOnce failure: ${result.exception}") + logger.e(result.exception) { "[$applicationName] Failed to load plugin: ${result.exception.message}" } + throw result.exception + } + } + } + + } + } + + override suspend fun stop() { + lifecycleMutex.withLock { + trace("stop(): entered") + for (service in serviceRegistry.values) { + trace("stop(): closing service ${service::class.simpleName}") + service.close() + } + scope.cancel() + loggedInStateFlow.value = false + ziplineDispatcher.close() + trace("stop(): completed") + } + } + + override suspend fun use(block: suspend PluginServiceScope.() -> T): T { + return withContext(ziplineDispatcher.dispatcher + ziplineExceptionHandler) { + // Create the scope with the current registry + val scope = PluginServiceScope(serviceRegistry) + // Execute the block with 'scope' as 'this' + scope.block() + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealCryptoAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealCryptoAPI.kt new file mode 100644 index 00000000..2c0fc64b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealCryptoAPI.kt @@ -0,0 +1,510 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis + +import dev.krtirtho.plugin_interfaces.host_apis.AESEncodingFormats +import dev.krtirtho.plugin_interfaces.host_apis.AESKeySize +import dev.krtirtho.plugin_interfaces.host_apis.AESKeySize.B128 +import dev.krtirtho.plugin_interfaces.host_apis.AESKeySize.B192 +import dev.krtirtho.plugin_interfaces.host_apis.AESKeySize.B256 +import dev.krtirtho.plugin_interfaces.host_apis.CryptoAPI +import dev.krtirtho.plugin_interfaces.host_apis.GenerateKeyPairAlgorithms +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.P256 +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.P384 +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.P521 +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.brainpoolP256r1 +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.brainpoolP384r1 +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.brainpoolP512r1 +import dev.krtirtho.plugin_interfaces.host_apis.ECCurves.secp256k1 +import dev.krtirtho.plugin_interfaces.host_apis.ECDSASignatureFormats +import dev.krtirtho.plugin_interfaces.host_apis.ECEncodingFormats +import dev.krtirtho.plugin_interfaces.host_apis.EdDSACurves +import dev.krtirtho.plugin_interfaces.host_apis.EdDSACurves.Ed25519 +import dev.krtirtho.plugin_interfaces.host_apis.EdDSACurves.Ed448 +import dev.krtirtho.plugin_interfaces.host_apis.EdDSAEncodingFormats +import dev.krtirtho.plugin_interfaces.host_apis.MACKeyGeneratorAlgorithms +import dev.krtirtho.plugin_interfaces.host_apis.HMACEncodingFormats +import dev.krtirtho.plugin_interfaces.host_apis.HashAlgorithms +import dev.krtirtho.plugin_interfaces.host_apis.LegacyCipherAlgorithms +import dev.krtirtho.plugin_interfaces.host_apis.RSAEncodingFormats +import dev.krtirtho.plugin_interfaces.host_apis.RSAEncodingFormats.JWK +import dev.krtirtho.plugin_interfaces.host_apis.RSAEncodingFormats.PEM +import dev.krtirtho.plugin_interfaces.host_apis.SignAlgorithms +import dev.krtirtho.plugin_interfaces.host_apis.MACSignatureAlgorithms +import dev.krtirtho.spotube.core.zipline.host_apis.additionals.DES +import dev.whyoleg.cryptography.BinarySize +import dev.whyoleg.cryptography.BinarySize.Companion.bits +import dev.whyoleg.cryptography.CryptographyAlgorithmId +import dev.whyoleg.cryptography.CryptographyProvider +import dev.whyoleg.cryptography.DelicateCryptographyApi +import dev.whyoleg.cryptography.algorithms.AES +import dev.whyoleg.cryptography.algorithms.Digest +import dev.whyoleg.cryptography.algorithms.EC +import dev.whyoleg.cryptography.algorithms.ECDSA +import dev.whyoleg.cryptography.algorithms.EdDSA +import dev.whyoleg.cryptography.algorithms.HMAC +import dev.whyoleg.cryptography.algorithms.MD5 +import dev.whyoleg.cryptography.algorithms.RIPEMD160 +import dev.whyoleg.cryptography.algorithms.RSA +import dev.whyoleg.cryptography.algorithms.SHA1 +import dev.whyoleg.cryptography.algorithms.SHA224 +import dev.whyoleg.cryptography.algorithms.SHA256 +import dev.whyoleg.cryptography.algorithms.SHA384 +import dev.whyoleg.cryptography.algorithms.SHA512 +import dev.whyoleg.cryptography.bigint.toBigInt +import dev.whyoleg.cryptography.random.CryptographyRandom +import kotlinx.coroutines.runBlocking +import kotlin.coroutines.CoroutineContext + +@OptIn(DelicateCryptographyApi::class) +fun HashAlgorithms.algorithm(): CryptographyAlgorithmId { + return when (this) { + HashAlgorithms.SHA224 -> SHA224 + HashAlgorithms.SHA256 -> SHA256 + HashAlgorithms.SHA384 -> SHA384 + HashAlgorithms.SHA512 -> SHA512 + HashAlgorithms.SHA1 -> SHA1 + HashAlgorithms.MD5 -> MD5 + HashAlgorithms.RIPEMD160 -> RIPEMD160 + } +} + +fun AESKeySize.size(): BinarySize { + return when (this) { + B128 -> AES.Key.Size.B128 + B192 -> AES.Key.Size.B192 + B256 -> AES.Key.Size.B256 + } +} + +fun ECCurves.curve(): EC.Curve { + return when (this) { + P256 -> EC.Curve.P256 + P384 -> EC.Curve.P384 + P521 -> EC.Curve.P521 + secp256k1 -> EC.Curve.secp256k1 + brainpoolP256r1 -> EC.Curve.brainpoolP256r1 + brainpoolP384r1 -> EC.Curve.brainpoolP384r1 + brainpoolP512r1 -> EC.Curve.brainpoolP512r1 + } +} + +fun EdDSACurves.curve(): EdDSA.Curve { + return when (this) { + Ed25519 -> EdDSA.Curve.Ed25519 + Ed448 -> EdDSA.Curve.Ed448 + } +} + +fun ECEncodingFormats.privateKeyFormat(): EC.PrivateKey.Format { + return when (this) { + ECEncodingFormats.DER -> EC.PrivateKey.Format.DER + ECEncodingFormats.RAW -> EC.PrivateKey.Format.RAW + ECEncodingFormats.PEM -> EC.PrivateKey.Format.PEM + ECEncodingFormats.JWK -> EC.PrivateKey.Format.JWK + } +} + +fun ECEncodingFormats.publicKeyFormat(): EC.PublicKey.Format { + return when (this) { + ECEncodingFormats.DER -> EC.PublicKey.Format.DER + ECEncodingFormats.RAW -> EC.PublicKey.Format.RAW + ECEncodingFormats.PEM -> EC.PublicKey.Format.PEM + ECEncodingFormats.JWK -> EC.PublicKey.Format.JWK + } +} + +fun RSAEncodingFormats.privateKeyFormat(): RSA.PrivateKey.Format { + return when (this) { + RSAEncodingFormats.DER -> RSA.PrivateKey.Format.DER + PEM -> RSA.PrivateKey.Format.PEM + JWK -> RSA.PrivateKey.Format.JWK + } +} + +fun RSAEncodingFormats.publicKeyFormat(): RSA.PublicKey.Format { + return when (this) { + RSAEncodingFormats.DER -> RSA.PublicKey.Format.DER + PEM -> RSA.PublicKey.Format.PEM + JWK -> RSA.PublicKey.Format.JWK + } +} + +fun EdDSAEncodingFormats.privateKeyFormat(): EdDSA.PrivateKey.Format { + return when (this) { + EdDSAEncodingFormats.DER -> EdDSA.PrivateKey.Format.DER + EdDSAEncodingFormats.PEM -> EdDSA.PrivateKey.Format.PEM + EdDSAEncodingFormats.JWK -> EdDSA.PrivateKey.Format.JWK + EdDSAEncodingFormats.RAW -> EdDSA.PrivateKey.Format.RAW + } +} + +fun EdDSAEncodingFormats.publicKeyFormat(): EdDSA.PublicKey.Format { + return when (this) { + EdDSAEncodingFormats.DER -> EdDSA.PublicKey.Format.DER + EdDSAEncodingFormats.PEM -> EdDSA.PublicKey.Format.PEM + EdDSAEncodingFormats.JWK -> EdDSA.PublicKey.Format.JWK + EdDSAEncodingFormats.RAW -> EdDSA.PublicKey.Format.RAW + } +} + +fun ECDSASignatureFormats.signatureFormat(): ECDSA.SignatureFormat { + return when (this) { + ECDSASignatureFormats.DER -> ECDSA.SignatureFormat.DER + ECDSASignatureFormats.RAW -> ECDSA.SignatureFormat.RAW + } +} + +fun HMACEncodingFormats.format(): HMAC.Key.Format { + return when (this) { + HMACEncodingFormats.RAW -> HMAC.Key.Format.RAW + HMACEncodingFormats.JWK -> HMAC.Key.Format.JWK + } +} + +fun AESEncodingFormats.format(): AES.Key.Format { + return when (this) { + AESEncodingFormats.RAW -> AES.Key.Format.RAW + AESEncodingFormats.JWK -> AES.Key.Format.JWK + } +} + + +class RealCryptoAPI(private val scope: CoroutineContext) : CryptoAPI { + private val provider = CryptographyProvider.Default + + override suspend fun generateRandomBytes(size: Int): ByteArray { + return CryptographyRandom.nextBytes(size) + } + + + override suspend fun hash(algorithm: HashAlgorithms, data: ByteArray): ByteArray { + val hasher = provider.get(algorithm.algorithm()).hasher() + return hasher.hash(data) + } + + override fun hashBlocking(algorithm: HashAlgorithms, data: ByteArray): ByteArray { + return runBlocking(scope) { + hash(algorithm, data) + } + } + + override suspend fun generateMACKey(algorithm: MACKeyGeneratorAlgorithms): ByteArray { + return when (algorithm) { + is MACKeyGeneratorAlgorithms.HMAC -> + provider.get(HMAC).keyGenerator(algorithm.hashAlgorithm.algorithm()).generateKey() + .encodeToByteArray(algorithm.format.format()) + + is MACKeyGeneratorAlgorithms.AES_CMAC -> provider.get(AES.CMAC) + .keyGenerator(algorithm.keySize.size()).generateKey() + .encodeToByteArray(algorithm.format.format()) + } + } + + override fun generateMACKeyBlocking(algorithm: MACKeyGeneratorAlgorithms): ByteArray { + return runBlocking(scope) { + generateMACKey(algorithm) + } + } + + override suspend fun signWithMACKey( + algorithm: MACSignatureAlgorithms, + key: ByteArray, + data: ByteArray + ): ByteArray { + return when (algorithm) { + is MACSignatureAlgorithms.HMAC -> + provider.get(HMAC).keyDecoder(algorithm.hashAlgorithm.algorithm()) + .decodeFromByteArray(algorithm.format.format(), key) + .signatureGenerator().generateSignature(data) + + is MACSignatureAlgorithms.AES_CMAC -> provider.get(AES.CMAC) + .keyDecoder() + .decodeFromByteArray(algorithm.format.format(), key) + .signatureGenerator().generateSignature(data) + } + } + + override fun signWithMACKeyBlocking( + algorithm: MACSignatureAlgorithms, + key: ByteArray, + data: ByteArray + ): ByteArray { + return runBlocking(scope) { + signWithMACKey(algorithm, key, data) + } + } + + override suspend fun verifyMACSignatureWithKey( + algorithm: MACSignatureAlgorithms, + key: ByteArray, + signature: ByteArray, + data: ByteArray + ): Boolean { + try { + when (algorithm) { + is MACSignatureAlgorithms.HMAC -> + provider.get(HMAC).keyDecoder(algorithm.hashAlgorithm.algorithm()) + .decodeFromByteArray( + algorithm.format.format(), + key + ) + .signatureVerifier().verifySignature( + data, + signature + ) + + is MACSignatureAlgorithms.AES_CMAC -> provider.get(AES.CMAC) + .keyDecoder() + .decodeFromByteArray(algorithm.format.format(), key) + .signatureVerifier().verifySignature( + data, + signature + ) + } + return true + } catch (_: Exception) { + return false + } + } + + override fun verifyMACSignatureWithKeyBlocking( + algorithm: MACSignatureAlgorithms, + key: ByteArray, + signature: ByteArray, + data: ByteArray + ): Boolean { + return runBlocking(scope) { + verifyMACSignatureWithKey(algorithm, key, signature, data) + } + } + + override suspend fun generateKeyPair(algorithm: GenerateKeyPairAlgorithms): Pair { + return when (algorithm) { + is GenerateKeyPairAlgorithms.RSA_PSS -> { + val keyPair = provider.get(RSA.PSS).keyPairGenerator( + algorithm.keySizeBits.bits, + algorithm.hashAlgorithm.algorithm(), + algorithm.publicExponent.toBigInt(), + ).generateKey() + + Pair( + keyPair.publicKey.encodeToByteArray(algorithm.format.publicKeyFormat()), + keyPair.privateKey.encodeToByteArray(algorithm.format.privateKeyFormat()) + ) + } + + is GenerateKeyPairAlgorithms.ECDSA -> { + val keyPair = provider.get(ECDSA) + .keyPairGenerator(algorithm.curve.curve()) + .generateKey() + Pair( + keyPair.publicKey.encodeToByteArray(algorithm.format.publicKeyFormat()), + keyPair.privateKey.encodeToByteArray(algorithm.format.privateKeyFormat()) + ) + } + + is GenerateKeyPairAlgorithms.EdDSA -> { + val keyPair = provider.get(EdDSA) + .keyPairGenerator(algorithm.curve.curve()) + .generateKey() + Pair( + keyPair.publicKey.encodeToByteArray(algorithm.format.publicKeyFormat()), + keyPair.privateKey.encodeToByteArray(algorithm.format.privateKeyFormat()) + ) + } + + is GenerateKeyPairAlgorithms.RSA_PKCS1 -> { + val keyPair = provider.get(RSA.PKCS1) + .keyPairGenerator( + algorithm.keySizeBits.bits, + algorithm.hashAlgorithm.algorithm() + ) + .generateKey() + Pair( + keyPair.publicKey.encodeToByteArray(algorithm.format.publicKeyFormat()), + keyPair.privateKey.encodeToByteArray(algorithm.format.privateKeyFormat()) + ) + } + } + } + + override fun generateKeyPairBlocking(algorithm: GenerateKeyPairAlgorithms): Pair { + return runBlocking(scope) { + generateKeyPair(algorithm) + } + } + + override suspend fun signWithPrivateKey( + algorithm: SignAlgorithms, + data: ByteArray, + privateKey: ByteArray + ): ByteArray { + return when (algorithm) { + is SignAlgorithms.RSA_PSS -> + provider.get(RSA.PSS).privateKeyDecoder(algorithm.hashAlgorithm.algorithm()) + .decodeFromByteArray( + algorithm.format.privateKeyFormat(), + privateKey + ).signatureGenerator().generateSignature(data) + + is SignAlgorithms.ECDSA -> + provider.get(ECDSA).privateKeyDecoder( + algorithm.curve.curve(), + ).decodeFromByteArray( + algorithm.format.privateKeyFormat(), + privateKey + ).signatureGenerator( + algorithm.hashAlgorithm.algorithm(), + algorithm.signatureFormat.signatureFormat() + ).generateSignature(data) + + is SignAlgorithms.EdDSA -> + provider.get(EdDSA).privateKeyDecoder( + algorithm.curve.curve(), + ).decodeFromByteArray( + algorithm.format.privateKeyFormat(), + privateKey + ).signatureGenerator().generateSignature(data) + + is SignAlgorithms.RSA_PKCS1 -> + provider.get(RSA.PKCS1).privateKeyDecoder(algorithm.hashAlgorithm.algorithm()) + .decodeFromByteArray( + algorithm.format.privateKeyFormat(), + privateKey + ).signatureGenerator().generateSignature(data) + } + } + + override fun signWithPrivateKeyBlocking( + algorithm: SignAlgorithms, + data: ByteArray, + privateKey: ByteArray + ): ByteArray { + return runBlocking(scope) { + signWithPrivateKey(algorithm, data, privateKey) + } + } + + override suspend fun verifySignatureWithPublicKey( + algorithm: SignAlgorithms, + data: ByteArray, + signature: ByteArray, + publicKey: ByteArray + ): Boolean { + return try { + when (algorithm) { + is SignAlgorithms.RSA_PSS -> + provider.get(RSA.PSS).publicKeyDecoder(algorithm.hashAlgorithm.algorithm()) + .decodeFromByteArray( + algorithm.format.publicKeyFormat(), + publicKey + ).signatureVerifier().verifySignature( + data, + signature + ) + + is SignAlgorithms.ECDSA -> + provider.get(ECDSA).publicKeyDecoder( + algorithm.curve.curve(), + ).decodeFromByteArray( + algorithm.format.publicKeyFormat(), + publicKey + ).signatureVerifier( + algorithm.hashAlgorithm.algorithm(), + algorithm.signatureFormat.signatureFormat() + ).verifySignature( + data, + signature + ) + + is SignAlgorithms.EdDSA -> + provider.get(EdDSA).publicKeyDecoder( + algorithm.curve.curve(), + ).decodeFromByteArray( + algorithm.format.publicKeyFormat(), + publicKey + ).signatureVerifier().verifySignature( + data, + signature + ) + + is SignAlgorithms.RSA_PKCS1 -> + provider.get(RSA.PKCS1).publicKeyDecoder(algorithm.hashAlgorithm.algorithm()) + .decodeFromByteArray( + algorithm.format.publicKeyFormat(), + publicKey + ).signatureVerifier().verifySignature( + data, + signature + ) + } + true + } catch (_: Exception) { + false + } + } + + override fun verifySignatureWithPublicKeyBlocking( + algorithm: SignAlgorithms, + data: ByteArray, + signature: ByteArray, + publicKey: ByteArray + ): Boolean { + return runBlocking(scope) { + verifySignatureWithPublicKey(algorithm, data, signature, publicKey) + } + } + + override suspend fun encryptLegacy( + algorithm: LegacyCipherAlgorithms, + key: ByteArray, + data: ByteArray, + iv: ByteArray? + ): ByteArray { + return when (algorithm) { + is LegacyCipherAlgorithms.DES -> DES.encrypt( + data, + key, + mode = algorithm.mode, + padding = algorithm.padding + ) + +// else -> throw IllegalArgumentException("Unsupported legacy cipher algorithm: $algorithm") + } + } + + override suspend fun decryptLegacy( + algorithm: LegacyCipherAlgorithms, + key: ByteArray, + cipherText: ByteArray, + iv: ByteArray? + ): ByteArray { + return when (algorithm) { + is LegacyCipherAlgorithms.DES -> DES.decrypt( + cipherText, + key, + mode = algorithm.mode, + padding = algorithm.padding + ) +// else -> throw IllegalArgumentException("Unsupported legacy cipher algorithm: $algorithm") + } + } + +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealHttpClientAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealHttpClientAPI.kt new file mode 100644 index 00000000..db09738a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealHttpClientAPI.kt @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis + +import dev.krtirtho.plugin_interfaces.host_apis.HttpClientAPI +import dev.krtirtho.plugin_interfaces.host_apis.HttpMethod +import dev.krtirtho.plugin_interfaces.host_apis.HttpResponse +import dev.krtirtho.spotube.core.di.injectLogger +import io.ktor.client.HttpClient +import io.ktor.client.request.request +import io.ktor.client.request.setBody +import io.ktor.client.statement.bodyAsText +import io.ktor.http.takeFrom +import org.koin.core.component.KoinComponent + + +class RealHttpClientAPI : HttpClientAPI, KoinComponent { + val logger by injectLogger() + val httpClient = HttpClient() + + override suspend fun request( + method: HttpMethod, + url: String, + requestHeaders: Map?, + body: String? + ): HttpResponse { + logger.i { + buildString { + append("[${method.name.uppercase()}] $url\n") + append("Headers:\n") + requestHeaders?.forEach { (key, value) -> + append(" $key: $value\n") + } + body?.let { + append("Body: $it\n") + } + } + } + val res = httpClient.request { + this.method = when (method) { + HttpMethod.Get -> io.ktor.http.HttpMethod.Get + HttpMethod.Post -> io.ktor.http.HttpMethod.Post + HttpMethod.Put -> io.ktor.http.HttpMethod.Put + HttpMethod.Delete -> io.ktor.http.HttpMethod.Delete + HttpMethod.Patch -> io.ktor.http.HttpMethod.Patch + HttpMethod.Head -> io.ktor.http.HttpMethod.Head + HttpMethod.Options -> io.ktor.http.HttpMethod.Options + } + this.url { + takeFrom(url) + } + requestHeaders?.forEach { (key, value) -> + headers.append(key, value) + } + body?.let { setBody(it) } + } + + return HttpResponse( + statusCode = res.status.value, + headers = res.headers.entries().associate { it.key to it.value.joinToString(",") }, + body = res.bodyAsText() + ) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealPersistedStorageAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealPersistedStorageAPI.kt new file mode 100644 index 00000000..35148f46 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealPersistedStorageAPI.kt @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis + +import androidx.datastore.preferences.core.stringPreferencesKey +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.spotube.core.db.Database +import dev.krtirtho.spotube.modules.plugin.PluginEntry +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.withContext +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject + +class RealPersistedStorageAPI( + private val pluginInfo: PluginEntry +) : PersistedStorageAPI, KoinComponent { + val database: Database by inject() + + override suspend fun putString(key: String, value: String) { + return withContext(Dispatchers.IO) { + database.pluginsDataStore.updateData { prefs -> + prefs.toMutablePreferences().apply { + this[stringPreferencesKey("${pluginInfo.id}:$key")] = value + } + } + } + } + + override suspend fun getString(key: String): String? { + return withContext(Dispatchers.IO) { + val prefs = database.pluginsDataStore.data.first() + prefs[stringPreferencesKey("${pluginInfo.id}:$key")] + } + } + + override suspend fun remove(key: String) { + return withContext(Dispatchers.IO) { + database.pluginsDataStore.updateData { prefs -> + prefs.toMutablePreferences().apply { + remove(stringPreferencesKey("${pluginInfo.id}:$key")) + } + } + } + } + + override suspend fun getKeys(): List { + return withContext(Dispatchers.IO) { + val prefs = database.pluginsDataStore.data.first() + prefs.asMap().keys.mapNotNull { prefKey -> + val keyString = prefKey.name + if (keyString.startsWith("${pluginInfo.id}:")) { + keyString.removePrefix("${pluginInfo.id}:") + } else null + } + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealSystemInformationAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealSystemInformationAPI.kt new file mode 100644 index 00000000..7fc8c10b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealSystemInformationAPI.kt @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis + +import dev.krtirtho.plugin_interfaces.host_apis.SystemInformationAPI +import dev.krtirtho.spotube.getPlatform +import kotlinx.datetime.TimeZone + +class RealSystemInformationAPI: SystemInformationAPI { + override fun getTimeZone(): String { + val tz = TimeZone.currentSystemDefault() + return tz.id + } + + override fun getLocale(): String { + return "en-US" // TODO: Implement locale retrieval + } + + override fun getOperatingSystem(): String { + val platform = getPlatform() + return platform.name + } + + override fun getAppVersion(): String { + return "1.0.0" + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealWebViewAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealWebViewAPI.kt new file mode 100644 index 00000000..48e28b4b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/RealWebViewAPI.kt @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis + +import dev.krtirtho.plugin_interfaces.host_apis.Cookie +import dev.krtirtho.plugin_interfaces.host_apis.WebViewAPI +import dev.krtirtho.spotube.core.webview.WebViewController +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.async +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.SharedFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext + +class RealWebViewAPI( + private val scope: CoroutineScope, + private val webViewController: WebViewController, +) : WebViewAPI { + override fun navigateTo(url: String) { + scope.launch(Dispatchers.Main) { + webViewController.navigateTo(url) + } + } + + override fun navigateToHTML(html: String) { + scope.launch { + webViewController.navigateToHTML(html) + } + } + + override suspend fun getCookies(url: String): List { + return withContext(Dispatchers.Main) { + webViewController.getCookies(url) + } + } + + override suspend fun evaluateJavaScript(script: String): String? { + return withContext(Dispatchers.Main) { + webViewController.evaluateJavascript(script) + } + } + + override fun urlChangeFlow(): Flow { + return webViewController.urlChangedFlow + } + override fun webviewCreatedFlow(): Flow { + return webViewController.webviewCreatedFlow + } + override fun postMessagesFlow(): Flow { + return webViewController.postMessagesFlow + } + + override fun exitWebView() { + scope.launch(Dispatchers.Main) { + webViewController.closeWebview() + } + } + +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/additionals/DES.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/additionals/DES.kt new file mode 100644 index 00000000..d5cc1cef --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/additionals/DES.kt @@ -0,0 +1,204 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis.additionals + +import dev.krtirtho.plugin_interfaces.host_apis.PaddingTypes +import dev.krtirtho.plugin_interfaces.host_apis.SymmetricModes +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext + +object DES { + + // --- 1. Tables & Matrices (Keep these identical to the previous implementation) --- + private val IP = intArrayOf(58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7) + private val FP = intArrayOf(40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31, 38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29, 36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27, 34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25) + private val PC1 = intArrayOf(57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4) + private val PC2 = intArrayOf(14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32) + private val SHIFTS = intArrayOf(1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1) + private val E = intArrayOf(32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1) + private val P = intArrayOf(16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10, 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25) + private val S_BOXES = arrayOf( + intArrayOf(14,4,13,1,2,15,11,8,3,10,6,12,5,9,0,7, 0,15,7,4,14,2,13,1,10,6,12,11,9,5,3,8, 4,1,14,8,13,6,2,11,15,12,9,7,3,10,5,0, 15,12,8,2,4,9,1,7,5,11,3,14,10,0,6,13), + intArrayOf(15,1,8,14,6,11,3,4,9,7,2,13,12,0,5,10, 3,13,4,7,15,2,8,14,12,0,1,10,6,9,11,5, 0,14,7,11,10,4,13,1,5,8,12,6,9,3,2,15, 13,8,10,1,3,15,4,2,11,6,7,12,0,5,14,9), + intArrayOf(10,0,9,14,6,3,15,5,1,13,12,7,11,4,2,8, 13,7,0,9,3,4,6,10,2,8,5,14,12,11,15,1, 13,6,4,9,8,15,3,0,11,1,2,12,5,10,14,7, 1,10,13,0,6,9,8,7,4,15,14,3,11,5,2,12), + intArrayOf(7,13,14,3,0,6,9,10,1,2,8,5,11,12,4,15, 13,8,11,5,6,15,0,3,4,7,2,12,1,10,14,9, 10,6,9,0,12,11,7,13,15,1,3,14,5,2,8,4, 3,15,0,6,10,1,13,8,9,4,5,11,12,7,2,14), + intArrayOf(2,12,4,1,7,10,11,6,8,5,3,15,13,0,14,9, 14,11,2,12,4,7,13,1,5,0,15,10,3,9,8,6, 4,2,1,11,10,13,7,8,15,9,12,5,6,3,0,14, 11,8,12,7,1,14,2,13,6,15,0,9,10,4,5,3), + intArrayOf(12,1,10,15,9,2,6,8,0,13,3,4,14,7,5,11, 10,15,4,2,7,12,9,5,6,1,13,14,0,11,3,8, 9,14,15,5,2,8,12,3,7,0,4,10,1,13,11,6, 4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13), + intArrayOf(4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1, 13,0,11,7,4,9,1,10,14,3,5,12,2,15,8,6, 1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2, 6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12), + intArrayOf(13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7, 1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2, 7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8, 2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11) + ) + + // --- 2. Bitwise Mechanics Engine --- + private fun permute(input: Long, table: IntArray, inputLen: Int): Long { + var output = 0L + for (i in table.indices) { + val bitPos = inputLen - table[i] + val bit = (input shr bitPos) and 1L + output = (output shl 1) or bit + } + return output + } + + private fun generateSubkeys(key64: Long): LongArray { + val subkeys = LongArray(16) + val permutedKey = permute(key64, PC1, 64) + var c = (permutedKey shr 28) and 0x0FFFFFFFUL.toLong() + var d = permutedKey and 0x0FFFFFFFUL.toLong() + + for (i in 0 until 16) { + val shift = SHIFTS[i] + c = ((c shl shift) or (c shr (28 - shift))) and 0x0FFFFFFFUL.toLong() + d = ((d shl shift) or (d shr (28 - shift))) and 0x0FFFFFFFUL.toLong() + val combined = (c shl 28) or d + subkeys[i] = permute(combined, PC2, 56) + } + return subkeys + } + + private fun feistel(right32: Long, subkey48: Long): Long { + val expanded = permute(right32, E, 32) + val xored = expanded xor subkey48 + var sBoxOutput = 0L + + for (i in 0 until 8) { + val chunk = (xored shr (42 - i * 6)) and 0x3F + val row = (((chunk shr 5) and 1) shl 1) or (chunk and 1) + val col = (chunk shr 1) and 0x0F + val sValue = S_BOXES[i][(row.toInt() shl 4) or col.toInt()] + sBoxOutput = (sBoxOutput shl 4) or sValue.toLong() + } + return permute(sBoxOutput, P, 32) + } + + private fun processBlock(block64: Long, subkeys: LongArray, encrypt: Boolean): Long { + val permutedBlock = permute(block64, IP, 64) + var left = (permutedBlock shr 32) and 0xFFFFFFFFUL.toLong() + var right = permutedBlock and 0xFFFFFFFFUL.toLong() + + for (i in 0 until 16) { + val roundKey = if (encrypt) subkeys[i] else subkeys[15 - i] + val nextLeft = right + val nextRight = left xor feistel(right, roundKey) + left = nextLeft + right = nextRight + } + + val preOutput = (right shl 32) or left + return permute(preOutput, FP, 64) + } + + private fun bytesToLong(bytes: ByteArray, offset: Int): Long { + var value = 0L + for (i in 0 until 8) { + value = (value shl 8) or (bytes[offset + i].toLong() and 0xFFL) + } + return value + } + + private fun longToBytes(value: Long, out: ByteArray, offset: Int) { + for (i in 7 downTo 0) { + out[offset + i] = (value shr (8 * (7 - i))).toByte() + } + } + + // --- 3. Public Configurable Interface APIs --- + + /** + * Configuration parameters: + * mode: Currently handles DESMode.ECB + * padding: Can be PaddingTypes.NONE or PaddingTypes.PKCS7 + */ + suspend fun encrypt( + data: ByteArray, + key: ByteArray, + mode: SymmetricModes = SymmetricModes.ECB, + padding: PaddingTypes = PaddingTypes.PKCS7 + ): ByteArray = withContext(Dispatchers.Default) { + require(key.size == 8) { "DES key must be exactly 8 bytes (64 bits)" } + require(mode == SymmetricModes.ECB) { "Only ECB mode is currently supported natively" } + + // 1. Process Padding Types Strategy + val workingBuffer = when (padding) { + PaddingTypes.NONE -> { + require(data.size % 8 == 0) { "Data size must be a multiple of 8 when using PaddingTypes.NONE" } + data + } + PaddingTypes.PKCS7 -> { + val paddingLen = 8 - (data.size % 8) + val padded = ByteArray(data.size + paddingLen) + data.copyInto(padded, destinationOffset = 0, startIndex = 0, endIndex = data.size) + for (i in data.size until padded.size) { + padded[i] = paddingLen.toByte() + } + padded + } + } + + val key64 = bytesToLong(key, 0) + val subkeys = generateSubkeys(key64) + val output = ByteArray(workingBuffer.size) + + // 2. Loop blocks independently (ECB Specification mechanics) + for (i in workingBuffer.indices step 8) { + val block = bytesToLong(workingBuffer, i) + val cipherBlock = processBlock(block, subkeys, encrypt = true) + longToBytes(cipherBlock, output, i) + } + output + } + + suspend fun decrypt( + cipherText: ByteArray, + key: ByteArray, + mode: SymmetricModes = SymmetricModes.ECB, + padding: PaddingTypes = PaddingTypes.PKCS7 + ): ByteArray = withContext(Dispatchers.Default) { + require(key.size == 8) { "DES key must be exactly 8 bytes" } + require(cipherText.size % 8 == 0) { "Cipher text block array size must be a multiple of 8" } + require(mode == SymmetricModes.ECB) { "Only ECB mode is supported" } + + val key64 = bytesToLong(key, 0) + val subkeys = generateSubkeys(key64) + val decryptedBuffer = ByteArray(cipherText.size) + + for (i in cipherText.indices step 8) { + val block = bytesToLong(cipherText, i) + val plainBlock = processBlock(block, subkeys, encrypt = false) + longToBytes(plainBlock, decryptedBuffer, i) + } + + // 3. Process Padding Removal Strategy + when (padding) { + PaddingTypes.NONE -> decryptedBuffer + PaddingTypes.PKCS7 -> { + val paddingLen = decryptedBuffer.last().toInt() and 0xFF + require(paddingLen in 1..8) { "Invalid PKCS7 padding formatting encountered" } + + // Ensure padding values are mathematically consistent + for (i in (decryptedBuffer.size - paddingLen) until decryptedBuffer.size) { + require(decryptedBuffer[i].toInt() == paddingLen) { "Corrupted PKCS7 padding byte structural layout" } + } + + val outputLen = decryptedBuffer.size - paddingLen + val output = ByteArray(outputLen) + decryptedBuffer.copyInto(output, destinationOffset = 0, startIndex = 0, endIndex = outputLen) + output + } + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/common/RealCoreAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/common/RealCoreAPI.kt new file mode 100644 index 00000000..ba8c7097 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/common/RealCoreAPI.kt @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.common + +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.PluginUpdateInfo +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import net.swiftzer.semver.SemVer + +class RealCoreAPI : CoreAPI { + override suspend fun checkPluginUpdates(currentVersion: SemVer): PluginUpdateInfo? { + return null + } + + override fun supportMarkdownText(currentVersion: SemVer): String { + return "Keep supporting Spotube!" + } + + override val requiresAuthentication = false + + private val loggedInState = MutableStateFlow(false) + override val loggedInFlow = loggedInState.asStateFlow() + + override suspend fun login() { + // No-op + } + + override suspend fun logout() { + // No-op + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/lrclib/RealLRCLibLyricsAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/lrclib/RealLRCLibLyricsAPI.kt new file mode 100644 index 00000000..d3c8e92e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/lrclib/RealLRCLibLyricsAPI.kt @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.lrclib + +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsLine +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsResponse +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import io.ktor.client.HttpClient +import io.ktor.client.call.body +import io.ktor.client.plugins.contentnegotiation.ContentNegotiation +import io.ktor.client.plugins.defaultRequest +import io.ktor.client.plugins.logging.LogLevel +import io.ktor.client.plugins.logging.Logger +import io.ktor.client.plugins.logging.Logging +import io.ktor.client.plugins.logging.SIMPLE +import io.ktor.client.request.get +import io.ktor.http.userAgent +import io.ktor.serialization.kotlinx.json.json +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.withContext +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json + +@Serializable +data class LRCLibResponse( + val id: Long, + val trackName: String, + val artistName: String, + val albumName: String, + val plainLyrics: String?, + val syncedLyrics: String?, +) + +class RealLRCLibLyricsAPI : LyricsAPI { + private val httpClient = HttpClient { + install(Logging) { + level = LogLevel.ALL + logger = Logger.SIMPLE + } + install(ContentNegotiation) { + json(Json { ignoreUnknownKeys = true }) + } + defaultRequest { + url("https://lrclib.net/api/get") + // TODO: Add the actual version of Spotube instead of hardcoding it + userAgent("Spotube/v6.0.0 LRCLib Lyric Plugin") + } + } + + private suspend fun getLRCLibLyrics(track: MetadataTrack): LRCLibResponse? = + withContext(Dispatchers.IO) { + try { + httpClient.get { + url { + parameters.append("track_name", track.title) + track.artists.firstOrNull() + ?.let { parameters.append("artist_name", it.name) } + track.album?.let { parameters.append("album_name", it.title) } + if (track.durationMs > 0) parameters.append( + "duration", + (track.durationMs / 1000).toString() + ) // Convert ms to seconds + } + }.body() + } catch (e: Exception) { + null + } + } + + override suspend fun getLyrics(track: MetadataTrack): LyricsResponse? { + val response = getLRCLibLyrics(track) ?: return null + return LyricsResponse( + syncedLyrics = response.syncedLyrics?.lines()?.mapNotNull { line -> + val match = Regex("\\[(\\d{2}):(\\d{2}\\.\\d{2})]").find(line) ?: return@mapNotNull null + val minutes = match.groupValues[1].toLongOrNull() ?: return@mapNotNull null + val seconds = match.groupValues[2].toDoubleOrNull() ?: return@mapNotNull null + val timeMs = (minutes * 60 * 1000 + (seconds * 1000)).toLong() + val text = line.substring(match.range.last + 1).trim() + LyricsLine(time = timeMs, text = text) + }, + plainLyrics = response.plainLyrics, + ) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/EmulatedAlbumArtist.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/EmulatedAlbumArtist.kt new file mode 100644 index 00000000..1a18bf2b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/EmulatedAlbumArtist.kt @@ -0,0 +1,469 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import arrow.core.Either +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository +import dev.krtirtho.spotube.listenbrainz.Api +import dev.krtirtho.spotube.listenbrainz.Auth +import dev.krtirtho.spotube.listenbrainz.api.LbCoreApi +import dev.krtirtho.spotube.listenbrainz.api.LbPlaylistsApi +import dev.krtirtho.spotube.listenbrainz.models.CreatePlaylistRequest +import dev.krtirtho.spotube.listenbrainz.models.ItemDeleteRequest +import dev.krtirtho.spotube.listenbrainz.models.Playlist +import dev.krtirtho.spotube.listenbrainz.models.PlaylistExtension +import dev.krtirtho.spotube.listenbrainz.models.PlaylistExtensionPayload +import dev.krtirtho.spotube.listenbrainz.models.PlaylistTrackInner +import kotlin.uuid.Uuid + +class EmulatedAlbumArtist( + private val musicbrainzRepository: MusicbrainzRepository, + private val persistedStorage: PersistedStorageAPI, +) { + private val playlistCache = mutableMapOf>() + private var cachedUsername: String? = null + + suspend fun savedAlbums( + pagination: PaginationStrategy?, + filterIds: List + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username) + val tracks = getPlaylistTracks(playlistId, fetchMetadata = true) + val albums = tracks.toAlbums() + + val filtered = if (filterIds.isNotEmpty()) { + albums.filter { filterIds.contains(it.id) } + } else albums + + val slice = filtered.drop(paging.offset).take(paging.limit) + val nextOffset = if (paging.offset + paging.limit < filtered.size) { + paging.offset + paging.limit + } else null + + cacheSavedAlbumIdsFromAlbumsDetailed(albums) + + return PaginationResult( + items = slice, + totalCount = filtered.size, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } + + suspend fun isSavedAlbums(ids: List): List { + val cached = persistedStorage.getString("saved_album_ids")?.takeIf { it.isNotBlank() } + ?.split(",") + ?.filter { it.isNotBlank() } + val savedIds = cached ?: loadSavedAlbumIds() + return ids.map { savedIds.contains(it) } + } + + suspend fun saveAlbums(ids: List) { + if (ids.isEmpty()) return + val alreadySaved = isSavedAlbums(ids) + if (alreadySaved.any { it }) { + throw IllegalStateException("Some albums are already saved") + } + + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username) + + val recordingIds = ids.mapNotNull { albumId -> + musicbrainzRepository.searchRecordings(query = "rgid:$albumId", limit = 1, offset = 0) + .recordings + .firstOrNull()?.id + } + + if (recordingIds.isEmpty()) return + + val body = Playlist( + track = recordingIds.map { recId -> + PlaylistTrackInner( + identifier = listOf("https://musicbrainz.org/recording/$recId") + ) + } + ) + + val tracks = getPlaylistTracks(playlistId, false) + val offset = tracks.size.toLong() + + LbPlaylistsApi.appendRecordings(Uuid.parse(playlistId), offset, body) + + playlistCache.remove(playlistId) + cacheSavedAlbumIds(loadSavedAlbumIds().plus(ids).distinct()) + } + + suspend fun removeSavedAlbums(ids: List) { + if (ids.isEmpty()) return + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username) + val tracks = getPlaylistTracks(playlistId, fetchMetadata = true) + + val releaseIds = tracks.mapNotNull { it.extractReleaseId() } + val releaseGroups = musicbrainzRepository.searchReleases( + query = releaseIds.joinToString(" OR ") { "reid:$it" }, + limit = releaseIds.size, + offset = 0 + ).releases + + val releaseIdToGroup = releaseGroups.associate { release -> + val releaseId = release.id + val groupId = release.releaseGroup?.id ?: release.id + releaseId to groupId + } + + val indexes = tracks.mapIndexedNotNull { idx, track -> + val releaseId = track.extractReleaseId() + val groupId = releaseIdToGroup[releaseId] + if (groupId != null && ids.contains(groupId)) idx else null + } + + if (indexes.isEmpty()) return + + indexes.forEach { index -> + LbPlaylistsApi.itemDelete( + Uuid.parse(playlistId), + ItemDeleteRequest( + index = index.toLong(), + count = 1 + ) + ) + } + + playlistCache.remove(playlistId) + cacheSavedAlbumIds(loadSavedAlbumIds().filterNot { ids.contains(it) }) + } + + private suspend fun loadSavedAlbumIds(): List { + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username) + val tracks = getPlaylistTracks(playlistId, fetchMetadata = true) + val releaseIds = tracks.mapNotNull { it.extractReleaseId() } + if (releaseIds.isEmpty()) return emptyList() + + val releases = musicbrainzRepository.searchReleases( + query = releaseIds.joinToString(" OR ") { "reid:$it" }, + limit = releaseIds.size, + offset = 0 + ).releases + + val albumIds = releases.map { it.releaseGroup?.id ?: it.id } + cacheSavedAlbumIds(albumIds) + return albumIds + } + + private suspend fun getOrCreatePlaylistId(username: String, type: String = "album"): String { + val key = "saved_${type}_playlist_id" + persistedStorage.getString(key)?.takeIf { it.isNotBlank() }?.let { return it } + + val playlistName = "$username saved ${type}s by Spotube" + val existing = searchPlaylist(username, playlistName) + val playlistId = existing ?: createPlaylist(playlistName, type) + persistedStorage.putString(key, playlistId) + return playlistId + } + + private suspend fun searchPlaylist(username: String, name: String): String? { + val response = LbCoreApi.searchPlaylistForUser( + playlistUserName = username, + query = name, + count = 1, + offset = 0 + ) + + val playlists = response.getOrNull()?.data?.playlists + val match = playlists?.firstOrNull { element -> + val playlist = element.playlist + val creator = playlist?.creator + val title = playlist?.title + creator == username && title == name + } + + return match?.playlist?.identifier?.substringAfterLast('/') + } + + private suspend fun createPlaylist(name: String, type: String): String { + val body = CreatePlaylistRequest( + playlist = Playlist( + title = name, + annotation = "This playlist contains all ${type}s saved by Spotube. Autogenerated. Do not edit.", + extension = PlaylistExtension( + httpsMusicbrainzOrgDocJspfPlaylist = PlaylistExtensionPayload( + collaborators = emptyList(), + public = false + ) + ) + ) + ) + + val response = LbPlaylistsApi.createPlaylist(body) + + val bodyJson = response.getOrNull()?.data + return bodyJson?.playlistMbid?.toString() + ?: throw IllegalStateException("Unable to create playlist") + } + + private suspend fun getPlaylistTracks( + playlistId: String, + fetchMetadata: Boolean + ): List { + playlistCache[playlistId]?.let { return it } + + val response = LbPlaylistsApi.fetchPlaylist( + playlistMbid = Uuid.parse(playlistId), + fetchMetadata = fetchMetadata + ) + + val tracks = response.getOrNull()?.data?.playlist?.track + ?: emptyList() + + playlistCache[playlistId] = tracks + return tracks + } + + private suspend fun requireUsername(): String { + cachedUsername?.let { return it } + + // Setup auth provider globally + val auth = Auth.ApiKeyAuth { + val token = + persistedStorage.getString("listenbrainz_auth_token") ?: return@ApiKeyAuth null + if (token.startsWith("Token ", ignoreCase = true)) token else "Token $token" + } + Api.setAuthProvider(auth) + + val username = when (val res = LbCoreApi.validateToken()) { + is Either.Left -> throw IllegalStateException("Unable to resolve ListenBrainz username: ${res.value}") + is Either.Right -> res.value.data.userName + } + cachedUsername = username!! + return username + } + + private fun PlaylistTrackInner.extractReleaseId(): String? { + val extension = this.extension?.httpsMusicbrainzOrgDocJspfTrack + ?: return null + val additional = extension.additionalMetadata ?: return null + return additional.caaReleaseMbid?.toString() + } + + private suspend fun List.toAlbums(): List { + val releaseIds = mapNotNull { it.extractReleaseId() } + if (releaseIds.isEmpty()) return emptyList() + + val releases = try { + musicbrainzRepository.searchReleases( + query = releaseIds.joinToString(" OR ") { "reid:$it" }, + limit = releaseIds.size, + offset = 0 + ).releases + } catch (_: Throwable) { + emptyList() + } + + return releases + .groupBy { it.releaseGroup?.id ?: it.id } + .values + .mapNotNull { group -> + val release = group.firstOrNull() ?: return@mapNotNull null + val releaseGroupId = release.releaseGroup?.id ?: release.id + release.toMetadataAlbumDetailed(releaseGroupId) + } + } + + private suspend fun cacheSavedAlbumIdsFromAlbumsDetailed(albums: List) { + cacheSavedAlbumIds(albums.map { it.id }) + } + + private suspend fun cacheSavedAlbumIds(ids: List) { + persistedStorage.putString("saved_album_ids", ids.distinct().joinToString(",")) + } + + suspend fun savedArtists( + pagination: PaginationStrategy, + filterIds: List + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username, "artist") + val tracks = getPlaylistTracks(playlistId, fetchMetadata = true) + val artists = tracks.toArtists() + + val filtered = if (filterIds.isNotEmpty()) { + artists.filter { filterIds.contains(it.id) } + } else artists + + val slice = filtered.drop(paging.offset).take(paging.limit) + val nextOffset = if (paging.offset + paging.limit < filtered.size) { + paging.offset + paging.limit + } else null + + cacheSavedArtistIdsFromArtistsDetailed(artists) + + return PaginationResult( + items = slice, + totalCount = filtered.size, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } + + suspend fun isSavedArtists(ids: List): List { + val cached = persistedStorage.getString("saved_artist_ids")?.takeIf { it.isNotBlank() } + ?.split(",") + ?.filter { it.isNotBlank() } + val savedIds = cached ?: loadSavedArtistIds() + return ids.map { savedIds.contains(it) } + } + + suspend fun saveArtists(ids: List) { + if (ids.isEmpty()) return + val alreadySaved = isSavedArtists(ids) + if (alreadySaved.any { it }) { + throw IllegalStateException("Some artists are already saved") + } + + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username, "artist") + + val recordingIds = ids.mapNotNull { artistId -> + musicbrainzRepository.searchRecordings(query = "arid:$artistId", limit = 1, offset = 0) + .recordings + .firstOrNull()?.id + } + + if (recordingIds.isEmpty()) return + + val body = Playlist( + track = recordingIds.map { recId -> + PlaylistTrackInner( + identifier = listOf("https://musicbrainz.org/recording/$recId") + ) + } + ) + + val tracks = getPlaylistTracks(playlistId, false) + val offset = tracks.size.toLong() + + LbPlaylistsApi.appendRecordings(Uuid.parse(playlistId), offset, body) + + playlistCache.remove(playlistId) + cacheSavedArtistIds(loadSavedArtistIds().plus(ids).distinct()) + } + + suspend fun removeSavedArtists(ids: List) { + if (ids.isEmpty()) return + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username, "artist") + val tracks = getPlaylistTracks(playlistId, fetchMetadata = true) + + val trackArtistPairs = tracks.mapIndexedNotNull { index, track -> + track.extractArtistId(musicbrainzRepository)?.let { artistId -> + index to artistId + } + } + + val indexes = trackArtistPairs.filter { (_, artistId) -> ids.contains(artistId) } + .map { it.first } + + if (indexes.isEmpty()) return + + indexes.forEach { index -> + LbPlaylistsApi.itemDelete( + Uuid.parse(playlistId), + ItemDeleteRequest( + index = index.toLong(), + count = 1 + ) + ) + } + + playlistCache.remove(playlistId) + cacheSavedArtistIds(loadSavedArtistIds().filterNot { ids.contains(it) }) + } + + private suspend fun loadSavedArtistIds(): List { + val username = requireUsername() + val playlistId = getOrCreatePlaylistId(username, "artist") + val tracks = getPlaylistTracks(playlistId, fetchMetadata = true) + + val artists = tracks.toArtists() + val ids = artists.map { it.id } + cacheSavedArtistIds(ids) + return ids + } + + private suspend fun cacheSavedArtistIdsFromArtistsDetailed(artists: List) { + cacheSavedArtistIds(artists.map { it.id }) + } + + private suspend fun cacheSavedArtistIds(ids: List) { + persistedStorage.putString("saved_artist_ids", ids.distinct().joinToString(",")) + } + + private suspend fun PlaylistTrackInner.extractArtistId(repository: MusicbrainzRepository): String? { + val idUrl = identifier?.firstOrNull() ?: return null + val recordingId = idUrl.substringAfterLast("/") + if (recordingId.isBlank()) return null + + return try { + val recording = + repository.getRecordingByMbid(recordingId, includes = listOf("artist-credits")) + recording.artistCredit.firstOrNull()?.artist?.id + } catch (_: Exception) { + null + } + } + + private suspend fun List.toArtists(): List { + val recordingIds = mapNotNull { + val idUrl = it.identifier?.firstOrNull() ?: return@mapNotNull null + idUrl.substringAfterLast("/").takeIf { it.isNotBlank() } + } + + if (recordingIds.isEmpty()) return emptyList() + + val chunks = recordingIds.chunked(20) + val artists = mutableListOf() + + chunks.forEach { chunk -> + try { + val query = chunk.joinToString(" OR ") { "rid:$it" } + val response = + musicbrainzRepository.searchRecordings(query, limit = chunk.size, offset = 0) + + response.recordings.forEach { rec -> + val artist = rec.artistCredit.firstOrNull()?.artist + if (artist != null) { + artists.add(artist.toMetadataArtistDetailed()) + } + } + } catch (_: Exception) { + // ignore + } + } + + return artists + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/MusicbrainzListenbrainzEnrich.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/MusicbrainzListenbrainzEnrich.kt new file mode 100644 index 00000000..8455b03c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/MusicbrainzListenbrainzEnrich.kt @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzArtist +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRecording +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRelease + +fun MusicbrainzRelease.toMetadataAlbum(groupId: String): MetadataAlbum.Detailed { + val releaseGroupId = releaseGroup?.id ?: groupId + val type = releaseGroup?.primaryType?.lowercase()?.let { + when (it) { + "single" -> MetadataAlbumType.Single + "album" -> MetadataAlbumType.Album + else -> MetadataAlbumType.Collection + } + } ?: MetadataAlbumType.Collection + + return MetadataAlbum.Detailed( + releaseDate = date, + genres = emptyList(), + trackCount = trackCount ?: 0, + id = releaseGroupId, + title = releaseGroup?.title ?: title, + description = null, + thumbnails = listOf( + Thumbnail( + url = "https://coverartarchive.org/release-group/${releaseGroupId}/front-250.jpg", + width = 250, + height = 250 + ), + Thumbnail( + url = "https://coverartarchive.org/release-group/${releaseGroupId}/front-500.jpg", + width = 500, + height = 500 + ), + ), + albumType = type, + artists = artistCredit.mapNotNull { credit -> + credit.artist?.let { + MetadataArtist.Basic( + id = it.id, + name = it.name, + thumbnails = emptyList(), + externalUri = "https://musicbrainz.org/artist/${it.id}" + ) + } + }, + externalUri = "https://musicbrainz.org/release-group/${releaseGroupId}" + ) +} + +fun List.pickOfficialRelease(): MusicbrainzRelease? { + return firstOrNull { release -> + release.status == "Official" && release.country == "US" && + release.artistCredit.none { it.artist?.name == "Various Artists" } + } +} + +fun MusicbrainzRecording.toMetadataTrack(album: MetadataAlbum.Detailed): MetadataTrack { + val explicit = disambiguation?.lowercase() == "explicit" + return MetadataTrack( + id = id, + title = title, + durationMs = (length ?: 0).toLong(), + trackNumber = null, + discNumber = null, + artists = artistCredit.mapNotNull { credit -> + credit.artist?.let { + MetadataArtist.Basic( + id = it.id, + name = it.name, + thumbnails = emptyList(), + externalUri = "https://musicbrainz.org/artist/${it.id}" + ) + } + }, + album = album, + explicit = explicit, + popularity = null, + isrcCode = isrcs.firstOrNull(), + externalUri = "https://musicbrainz.org/recording/${id}", + thumbnails = null, + ) +} + +fun MusicbrainzRelease.toMetadataAlbumDetailed(groupId: String): MetadataAlbum.Detailed { + val releaseGroupId = releaseGroup?.id ?: groupId + val type = releaseGroup?.primaryType?.lowercase()?.let { + when (it) { + "single" -> MetadataAlbumType.Single + "album" -> MetadataAlbumType.Album + else -> MetadataAlbumType.Collection + } + } ?: MetadataAlbumType.Collection + + return MetadataAlbum.Detailed( + releaseDate = date, + genres = emptyList(), + trackCount = trackCount ?: 0, + id = releaseGroupId, + title = releaseGroup?.title ?: title, + description = null, + thumbnails = listOf( + Thumbnail( + url = "https://coverartarchive.org/release-group/${releaseGroupId}/front-250.jpg", + width = 250, + height = 250 + ), + Thumbnail( + url = "https://coverartarchive.org/release-group/${releaseGroupId}/front-500.jpg", + width = 500, + height = 500 + ), + ), + albumType = type, + artists = artistCredit.mapNotNull { credit -> + credit.artist?.let { + MetadataArtist.Basic( + id = it.id, + name = it.name, + thumbnails = emptyList(), + externalUri = "https://musicbrainz.org/artist/${it.id}" + ) + } + }, + externalUri = "https://musicbrainz.org/release-group/${releaseGroupId}" + ) +} + +fun MusicbrainzArtist.toMetadataArtistDetailed(): MetadataArtist.Detailed { + return MetadataArtist.Detailed( + id = id, + name = name, + thumbnails = emptyList(), + externalUri = "https://musicbrainz.org/artist/$id", + genres = tags.map { it.name }, + biography = disambiguation, + followersCount = null + ) +} + +fun MusicbrainzArtist.toMetadataArtistBasic(): MetadataArtist.Basic { + return MetadataArtist.Basic( + id = id, + name = name, + thumbnails = emptyList(), + externalUri = "https://musicbrainz.org/artist/$id" + ) +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/MusicbrainzListenbrainzPlugin.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/MusicbrainzListenbrainzPlugin.kt new file mode 100644 index 00000000..9fcf6c6e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/MusicbrainzListenbrainzPlugin.kt @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import app.cash.zipline.ZiplineService +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.KtorMusicbrainzRepository +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzArtistEnricher +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.wikidata.WikidataRepository +import io.ktor.client.HttpClient +import kotlinx.coroutines.CoroutineScope +import kotlin.reflect.KClass + +fun createMusicbrainzListenbrainzPluginAPIs( + scope: CoroutineScope, + httpClient: HttpClient, + webViewController: WebViewController, + persistedStorage: PersistedStorageAPI +): Map, ZiplineService> { + val repository = KtorMusicbrainzRepository(httpClient) + val wikidataRepository = WikidataRepository(httpClient) + val artistEnricher = MusicbrainzArtistEnricher(repository, wikidataRepository) + + return mapOf( + CoreAPI::class to RealMusicbrainzListenbrainzCoreAPI(scope, webViewController, persistedStorage), + MetadataBrowseAPI::class to RealMusicbrainzListenbrainzMetadataBrowseAPI(persistedStorage), + MetadataPlaylistAPI::class to RealMusicbrainzListenbrainzMetadataPlaylistAPI(repository, persistedStorage), + MetadataTrackAPI::class to RealMusicbrainzListenbrainzMetadataTrackAPI(repository, persistedStorage), + MetadataAlbumAPI::class to RealMusicbrainzListenbrainzMetadataAlbumAPI(repository, persistedStorage), + MetadataArtistAPI::class to RealMusicbrainzListenbrainzMetadataArtistAPI(repository, persistedStorage), + MetadataSearchAPI::class to RealMusicbrainzListenbrainzMetadataSearchAPI(repository, artistEnricher, httpClient), + MetadataUserAPI::class to RealMusicbrainsListenbrainzMetadataUserAPI(repository, persistedStorage) + ) +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainsListenbrainzMetadataUserAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainsListenbrainzMetadataUserAPI.kt new file mode 100644 index 00000000..f4715d2e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainsListenbrainzMetadataUserAPI.kt @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import arrow.core.Either +import com.kroegerama.openapi.kmp.gen.companion.appendSerializedQueryParameter +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI +import dev.krtirtho.spotube.core.zipline.host_apis.RealPersistedStorageAPI +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository +import dev.krtirtho.spotube.listenbrainz.Auth +import dev.krtirtho.spotube.listenbrainz.api.LbCoreApi + +class RealMusicbrainsListenbrainzMetadataUserAPI( + private val musicbrainzRepository: MusicbrainzRepository, + private val persistedStorage: PersistedStorageAPI +) : MetadataUserAPI { + override suspend fun getUser(id: String): MetadataUser? { + val token = persistedStorage.getString("listenbrainz_auth_token") ?: return null + if(token.isEmpty()) return null + when (val res = LbCoreApi.validateToken { + appendSerializedQueryParameter("token", token) + }) { + is Either.Left -> { + println("Error validating token: ${res.value}") + return null + } + + is Either.Right -> { + val user = res.value.data + return MetadataUser( + id = user.userName as String, + username = user.userName, + displayName = user.userName, + thumbnails = emptyList(), + externalUri = "https://listenbrainz.org/user/${user.userName}", + ) + } + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzCoreAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzCoreAPI.kt new file mode 100644 index 00000000..db6914de --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzCoreAPI.kt @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import arrow.core.Either +import com.kroegerama.openapi.kmp.gen.companion.appendSerializedQueryParameter +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.PluginUpdateInfo +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.listenbrainz.Api +import dev.krtirtho.spotube.listenbrainz.Auth +import dev.krtirtho.spotube.listenbrainz.api.LbCoreApi +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.onEach +import kotlinx.coroutines.launch +import net.swiftzer.semver.SemVer + +class RealMusicbrainzListenbrainzCoreAPI( + private val scope: CoroutineScope, + private val webViewController: WebViewController, + private val persistedStorage: PersistedStorageAPI +) : CoreAPI { + init { + scope.launch { + val token = persistedStorage.getString("listenbrainz_auth_token") + if (token != null) { + auth = Auth.ApiKeyAuth { token } + Api.setAuthProvider(auth!!) + loggedInState.value = true + } else { + loggedInState.value = false + } + } + } + + override suspend fun checkPluginUpdates(currentVersion: SemVer): PluginUpdateInfo? { + return null + } + + override fun supportMarkdownText(currentVersion: SemVer): String { + return "Keep supporting Spotube!" + } + + override val requiresAuthentication = true + + private val loggedInState = MutableStateFlow(false) + override val loggedInFlow = loggedInState.asStateFlow() + + private var auth: Auth? = null + + override suspend fun login() { + webViewController.navigateToHTML( + """ + + + + Login to Listenbrainz + + +

Login to Listenbrainz

+
+ + +
+ Mirror: + + + + """.trimIndent() + ) + + println("[RealMusicbrainzListenbrainzCoreAPI.login] Waiting for postMessagesFlow message") + val actualCreds = webViewController.postMessagesFlow + .onEach { + println("[postMessagesFlow.onEach] Received token from WebView: $it") + } + .filter { it.isNotBlank() } + .first() + println("Received token from WebView: $actualCreds") + auth = Auth.ApiKeyAuth { + actualCreds + } + Api.setAuthProvider(auth = auth!!) + when (val res = LbCoreApi.validateToken { + appendSerializedQueryParameter("token", actualCreds) + }) { + is Either.Left -> { + webViewController.closeWebview() + throw res.value + } + + is Either.Right -> { + if (!res.value.data.valid) { + webViewController.closeWebview() + throw Exception("Invalid token") + } + persistedStorage.putString("listenbrainz_auth_token", actualCreds) + loggedInState.value = true + webViewController.closeWebview() + } + } + } + + override suspend fun logout() { + if (auth == null) return + Api.clearAuthProvider(auth!!) + auth = null + persistedStorage.remove("listenbrainz_auth_token") + loggedInState.value = false + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataAlbumAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataAlbumAPI.kt new file mode 100644 index 00000000..2c0711a5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataAlbumAPI.kt @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository + + +class RealMusicbrainzListenbrainzMetadataAlbumAPI( + private val musicbrainzRepository: MusicbrainzRepository, + private val persistedStorage: PersistedStorageAPI +) : MetadataAlbumAPI { + private val emulator by lazy { + EmulatedAlbumArtist(musicbrainzRepository, persistedStorage) + } + + override suspend fun getAlbum(id: String): MetadataAlbum.Detailed { + val release = musicbrainzRepository + .searchReleases(query = "rgid:$id", limit = 1, offset = 0) + .releases + .firstOrNull() + ?: throw IllegalArgumentException("Album $id not found") + + return release.toMetadataAlbumDetailed(id) + } + + override suspend fun getTrackAlbum(track: MetadataTrack): MetadataAlbum.Detailed { + TODO("Not yet implemented") + } + + override suspend fun getAlbumTracks( + id: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging: PaginationStrategy.Offset = + pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + + val releases = musicbrainzRepository.searchReleases( + query = "rgid:$id", + limit = 10, + offset = 0 + ).releases + + val officialRelease = releases.pickOfficialRelease() + ?: releases.firstOrNull() + ?: throw IllegalArgumentException("Album $id not found") + + val recordings = musicbrainzRepository.searchRecordings( + query = "reid:${officialRelease.id}", + limit = paging.limit, + offset = paging.offset, + ) + + val album = officialRelease.toMetadataAlbumDetailed(id) + val items = recordings.recordings.map { it.toMetadataTrack(album) } + + val nextOffset = if (paging.offset + paging.limit < recordings.count) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = items, + totalCount = recordings.count, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) } + ) + } + + override suspend fun savedAlbums( + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + return emulator.savedAlbums(paging, emptyList()) + } + + override suspend fun isSavedAlbums(ids: List): List { + return emulator.isSavedAlbums(ids) + } + + override suspend fun saveAlbums(ids: List) { + emulator.saveAlbums(ids) + } + + override suspend fun removeSavedAlbums(ids: List) { + emulator.removeSavedAlbums(ids) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataArtistAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataArtistAPI.kt new file mode 100644 index 00000000..3650cf0e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataArtistAPI.kt @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + + +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository + +class RealMusicbrainzListenbrainzMetadataArtistAPI( + private val musicbrainzRepository: MusicbrainzRepository, + private val persistedStorage: PersistedStorageAPI +) : MetadataArtistAPI { + + private val emulator by lazy { + EmulatedAlbumArtist(musicbrainzRepository, persistedStorage) + } + + override suspend fun getArtist(id: String): MetadataArtist.Detailed { + val artist = musicbrainzRepository.getArtistByMbid(id, includes = listOf("url-rels")) + return artist.toMetadataArtistDetailed() + } + + override suspend fun getArtistTop10Tracks(id: String): List { + val recordings = musicbrainzRepository.searchRecordings( + query = "arid:$id", + limit = 10, + offset = 0 + ).recordings + + return recordings.mapNotNull { recording -> + val release = recording.releases.pickOfficialRelease() + ?: recording.releases.firstOrNull() + + release?.let { + val groupId = it.releaseGroup?.id ?: it.id + val album = it.toMetadataAlbumDetailed(groupId) + recording.toMetadataTrack(album) + } + } + } + + override suspend fun getArtistAlbums( + id: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + val releases = musicbrainzRepository.searchReleases( + query = "arid:$id", + limit = paging.limit, + offset = paging.offset + ) + + val items = releases.releases.map { release -> + val groupId = release.releaseGroup?.id ?: release.id + release.toMetadataAlbumDetailed(groupId) + } + + val nextOffset = if (paging.offset + paging.limit < releases.count) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = items, + totalCount = releases.count, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) } + ) + } + + override suspend fun savedArtists( + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + return emulator.savedArtists(paging, emptyList()) + } + + override suspend fun isSavedArtists(ids: List): List { + return emulator.isSavedArtists(ids) + } + + override suspend fun saveArtists(ids: List) { + emulator.saveArtists(ids) + } + + override suspend fun removeSavedArtists(ids: List) { + emulator.removeSavedArtists(ids) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataBrowseAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataBrowseAPI.kt new file mode 100644 index 00000000..d8910d38 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataBrowseAPI.kt @@ -0,0 +1,566 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import arrow.core.Either +import com.kroegerama.openapi.kmp.gen.companion.AuthPlugin.Plugin.authKeys +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseSection +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.listenbrainz.Api +import dev.krtirtho.spotube.listenbrainz.Auth +import dev.krtirtho.spotube.listenbrainz.api.LbCoreApi +import dev.krtirtho.spotube.listenbrainz.api.LbMiscApi +import dev.krtirtho.spotube.listenbrainz.api.LbPlaylistsApi +import dev.krtirtho.spotube.listenbrainz.api.LbStatsApi +import dev.krtirtho.spotube.listenbrainz.models.AllowedStatisticsRange +import dev.krtirtho.spotube.listenbrainz.models.Mode +import dev.krtirtho.spotube.listenbrainz.models.Playlist +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json +import kotlin.time.Clock +import org.koin.core.component.KoinComponent + +class RealMusicbrainzListenbrainzMetadataBrowseAPI( + private val persistedStorage: PersistedStorageAPI, +) : MetadataBrowseAPI, KoinComponent { + private val logger by injectLogger() + private var cachedUsername: String? = null + + @Serializable + private data class LbRadioPlaylistCacheEntry( + val cachedAtEpochMs: Long, + val playlist: MetadataPlaylist, + ) + + @Serializable + private data class BrowseSectionsCacheEntry( + val cachedAtEpochMs: Long, + val sections: List, + ) + + private val cacheJson = Json { + ignoreUnknownKeys = true + encodeDefaults = true + } + + @Serializable + private data class BrowseSectionData( + val id: String, + val title: String, + val description: String? = null, + val moreLink: String? = null, + val items: List, + ) + + private data class MoodSeed( + val key: String, + val tag: String, + val title: String, + val annotation: String, + ) + + companion object { + private const val SECTION_TOP_ARTIST_RADIOS = "top-artist-radios" + private const val SECTION_MOOD_PLAYLISTS = "mood-playlists" + private const val SECTION_CREATED_FOR = "created-for-playlists" + private const val LB_RADIO_CACHE_TTL_MS = 3L * 24 * 60 * 60 * 1000 + private const val LB_RADIO_CACHE_KEY_PREFIX = "lb_radio_playlist_cache" + private const val BROWSE_SECTIONS_CACHE_KEY_PREFIX = "lb_browse_sections_cache" + + private val moodSeeds = listOf( + MoodSeed("chill", "ambient", "Chill playlist", "Yo chill my friend!"), + MoodSeed("energetic", "energetic", "Pump it up!", "Get ready to move!"), + MoodSeed("happy", "upbeat", "Happy Vibes", "Feel good tunes to brighten your day!"), + MoodSeed("sad", "melancholy", "Melancholy Moments", "For those reflective times."), + MoodSeed("focus", "instrumental", "Focus Beats", "Concentration is key."), + MoodSeed("workout", "electronic", "Workout Jams", "Get pumped with these beats!"), + MoodSeed("party", "dance", "Party Anthems", "Let's get this party started!"), + MoodSeed("romantic", "romantic", "Romantic Evenings", "For those special moments."), + ) + } + + override suspend fun featured(): List { + logger.i("featured(): Starting to build featured items") + try { + val sections = buildSections() + logger.d("featured(): Built ${sections.size} sections") + val result = sections.flatMap { it.items }.take(12) + logger.i("featured(): Returning ${result.size} featured items") + return result + } catch (e: Exception) { + logger.e(e) { "featured(): Error building featured items" } + return emptyList() + } + } + + override suspend fun list(pagination: PaginationStrategy?): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + logger.i("list(): Starting with offset=${paging.offset}, pageSize=${paging.limit}") + try { + val sections = buildSections() + logger.d("list(): Built ${sections.size} total sections") + val items = sections + .drop(paging.offset) + .take(paging.limit) + .map { + MetadataBrowseSection( + title = it.title, + description = it.description, + items = it.items, + moreLink = it.moreLink, + ) + } + + val nextOffset = if (paging.offset + items.size < sections.size) { + paging.offset + paging.limit + } else { + null + } + + logger.d("list(): Returning ${items.size} items, nextOffset=$nextOffset") + return PaginationResult( + items = items, + totalCount = sections.size, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } catch (e: Exception) { + logger.e(e) { "list(): Error fetching paginated sections" } + return PaginationResult( + items = emptyList(), + totalCount = 0, + nextPagination = null, + ) + } + } + + override suspend fun sublist( + sectionId: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + logger.i("sublist(): Fetching section=$sectionId with offset=${paging.offset}, pageSize=${paging.limit}") + try { + val allSections = buildSections() + logger.d("sublist(): Built ${allSections.size} total sections") + val sectionItems = allSections.firstOrNull { it.id == sectionId }?.items ?: emptyList() + logger.d("sublist(): Found ${sectionItems.size} items in section $sectionId") + + val items = sectionItems.drop(paging.offset).take(paging.limit) + val nextOffset = if (paging.offset + items.size < sectionItems.size) { + paging.offset + paging.limit + } else { + null + } + + logger.d("sublist(): Returning ${items.size} paginated items, nextOffset=$nextOffset") + return PaginationResult( + items = items, + totalCount = sectionItems.size, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } catch (e: Exception) { + logger.e(e) { "sublist(): Error fetching sublist for section=$sectionId" } + return PaginationResult( + items = emptyList(), + totalCount = 0, + nextPagination = null, + ) + } + } + + private suspend fun buildSections(): List { + logger.d("buildSections(): Starting section building process") + val username = try { + val user = requireUsername() + logger.d("buildSections(): Successfully resolved username: $user") + user + } catch (e: Exception) { + logger.w(e) { "buildSections(): Failed to retrieve username, returning empty sections" } + return emptyList() + } + + val nowEpochMs = Clock.System.now().toEpochMilliseconds() + val sectionsCacheKey = buildBrowseSectionsCacheKey(username) + val cachedSections = readCachedBrowseSections(sectionsCacheKey) + if (cachedSections != null) { + val ageMs = nowEpochMs - cachedSections.cachedAtEpochMs + if (ageMs <= LB_RADIO_CACHE_TTL_MS) { + logger.d("buildSections(): Returning cached sections for key=$sectionsCacheKey (ageMs=$ageMs)") + return cachedSections.sections + } + logger.d("buildSections(): Cached sections stale for key=$sectionsCacheKey (ageMs=$ageMs), rebuilding") + } + + return try { + logger.d("buildSections(): Building Top Artist Radios section...") + val topArtistRadios = buildTopArtistRadiosSection(username) + logger.d("buildSections(): Built Top Artist Radios with ${topArtistRadios.items.size} items") + + logger.d("buildSections(): Building Mood Playlists section...") + val moodPlaylists = buildMoodPlaylistsSection(username) + logger.d("buildSections(): Built Mood Playlists with ${moodPlaylists.items.size} items") + + logger.d("buildSections(): Building Created For section...") + val createdFor = buildCreatedForSection(username) + logger.d("buildSections(): Built Created For with ${createdFor.items.size} items") + + val sections = listOf(topArtistRadios, moodPlaylists, createdFor) + writeCachedBrowseSections( + key = sectionsCacheKey, + entry = BrowseSectionsCacheEntry( + cachedAtEpochMs = nowEpochMs, + sections = sections, + ) + ) + logger.i("buildSections(): Successfully built ${sections.size} sections with ${sections.sumOf { it.items.size }} total items") + sections + } catch (e: Exception) { + logger.e(e) { "buildSections(): Failed to build fresh sections" } + if (cachedSections != null) { + logger.w("buildSections(): Returning stale cached sections for key=$sectionsCacheKey") + cachedSections.sections + } else { + emptyList() + } + } + } + + private suspend fun buildTopArtistRadiosSection(username: String): BrowseSectionData { + logger.d("buildTopArtistRadiosSection(): Fetching top artists for user: $username") + try { + val artistsResult = LbStatsApi.topArtistsForUser( + userName = username, + count = 10, + offset = 0, + range = AllowedStatisticsRange.QUARTER, + ) + val artists = when (artistsResult) { + is Either.Left -> { + val error = artistsResult.value + logger.e("buildTopArtistRadiosSection(): Failed to fetch top artists: $error") + throw error + } + + is Either.Right -> artistsResult.value.data.payload.artists + } + logger.d("buildTopArtistRadiosSection(): Retrieved ${artists.size} top artists") + + val playlists = artists.mapNotNull { artist -> + val mbid = artist.artistMbid?.toString() ?: return@mapNotNull null + val name = artist.artistName ?: return@mapNotNull null + logger.d("buildTopArtistRadiosSection(): Generating radio playlist for artist: $name (mbid: $mbid)") + + generateLbRadioPlaylist( + prompt = "artist:($mbid)", + mode = Mode.EASY, + title = "$name Radio", + annotation = "A radio playlist based on $name's music", + imageUrl = null, + ) + } + logger.d("buildTopArtistRadiosSection(): Generated ${playlists.size} radio playlists") + + return BrowseSectionData( + id = SECTION_TOP_ARTIST_RADIOS, + title = "Top Artist Radios", + moreLink = "https://listenbrainz.org/explore/lb-radio", + items = playlists.map { MetadataBrowseItem.Playlist(it) }, + ) + } catch (e: Exception) { + logger.e(e) { "buildTopArtistRadiosSection(): Error building top artist radios section" } + return BrowseSectionData( + id = SECTION_TOP_ARTIST_RADIOS, + title = "Top Artist Radios", + items = emptyList(), + ) + } + } + + private suspend fun buildMoodPlaylistsSection(username: String): BrowseSectionData { + logger.d("buildMoodPlaylistsSection(): Starting to build mood playlists (count: ${moodSeeds.size})") + try { + val playlists = moodSeeds.mapNotNull { mood -> + logger.d("buildMoodPlaylistsSection(): Generating playlist for mood: ${mood.title} (tag: ${mood.tag})") + generateLbRadioPlaylist( + prompt = "tag:(${mood.tag}) stats:$username::all_time", + mode = Mode.HARD, + title = mood.title, + annotation = mood.annotation, + imageUrl = "https://res.cloudinary.com/dszpk1pk9/image/upload/t_media_lib_thumb/spotube-plugin-musicbrainz-listenbrainz/moods/${mood.key}.webp", + ) + } + logger.d("buildMoodPlaylistsSection(): Successfully generated ${playlists.size} mood playlists") + + return BrowseSectionData( + id = SECTION_MOOD_PLAYLISTS, + title = "Based on your mood", + moreLink = "https://listenbrainz.org/explore/lb-radio", + items = playlists.map { MetadataBrowseItem.Playlist(it) }, + ) + } catch (e: Exception) { + logger.e(e) { "buildMoodPlaylistsSection(): Error building mood playlists section" } + return BrowseSectionData( + id = SECTION_MOOD_PLAYLISTS, + title = "Based on your mood", + items = emptyList(), + ) + } + } + + private suspend fun buildCreatedForSection(username: String): BrowseSectionData { + logger.d("buildCreatedForSection(): Fetching playlists created for user: $username") + try { + val playlistsResult = LbPlaylistsApi.playlistsCreatedForUser( + playlistUserName = username, + count = 25, + offset = 0, + ) + val playlists = when (playlistsResult) { + is Either.Left -> { + val error = playlistsResult.value + logger.e("buildCreatedForSection(): Failed to fetch created playlists: $error") + throw error + } + + is Either.Right -> playlistsResult.value.data.playlists.orEmpty() + } + logger.d("buildCreatedForSection(): Retrieved ${playlists.size} playlists") + + val items = playlists.mapNotNull { wrapper -> + val playlist = wrapper.playlist ?: return@mapNotNull null + val title = playlist.title.orEmpty() + val imageName = if (title.contains("Weekly Exploration", ignoreCase = true)) { + "weekly-exploration" + } else { + "weekly-jams" + } + logger.d("buildCreatedForSection(): Processing playlist: $title (imageName: $imageName)") + val imageUrl = + "https://res.cloudinary.com/dszpk1pk9/image/upload/t_media_lib_thumb/spotube-plugin-musicbrainz-listenbrainz/created_for/${imageName}.webp" + playlist.toMetadataPlaylist(thumbnailOverride = imageUrl) + } + logger.d("buildCreatedForSection(): Successfully processed ${items.size} playlists") + + return BrowseSectionData( + id = SECTION_CREATED_FOR, + title = "Created for you", + moreLink = "https://listenbrainz.org/user/$username/recommendations/", + items = items.map { MetadataBrowseItem.Playlist(it) }, + ) + } catch (e: Exception) { + logger.e(e) { "buildCreatedForSection(): Error building created for section" } + return BrowseSectionData( + id = SECTION_CREATED_FOR, + title = "Created for you", + items = emptyList(), + ) + } + } + + private suspend fun generateLbRadioPlaylist( + prompt: String, + mode: Mode, + title: String, + annotation: String?, + imageUrl: String?, + ): MetadataPlaylist? { + logger.d("generateLbRadioPlaylist(): Generating playlist with prompt='$prompt', mode=$mode, title='$title'") + val nowEpochMs = Clock.System.now().toEpochMilliseconds() + val cacheKey = buildLbRadioCacheKey(prompt = prompt, mode = mode) + val cachedEntry = readCachedLbRadioPlaylist(cacheKey) + if (cachedEntry != null) { + val ageMs = nowEpochMs - cachedEntry.cachedAtEpochMs + if (ageMs <= LB_RADIO_CACHE_TTL_MS) { + logger.d("generateLbRadioPlaylist(): Cache hit for key=$cacheKey (ageMs=$ageMs)") + return cachedEntry.playlist + } + logger.d("generateLbRadioPlaylist(): Cache stale for key=$cacheKey (ageMs=$ageMs), refreshing") + } + + try { + val lbRadioResult = LbMiscApi.lbRadio(prompt = prompt, mode = mode) { + authKeys( + Auth.ApiKeyAuth.ID, + ) + } + val lbRadio = when (lbRadioResult) { + is Either.Left -> { + val error = lbRadioResult.value + logger.e("generateLbRadioPlaylist(): API call failed with error: $error") + throw error + } + + is Either.Right -> lbRadioResult.value.data + } + val playlist = lbRadio.payload.jspf.playlist ?: run { + logger.w("generateLbRadioPlaylist(): No playlist data in response for prompt='$prompt'") + return null + } + val modeId = mode.name.lowercase() + val syntheticId = "lb-radio-playlist-$prompt-$modeId" + + val normalizedPlaylist = playlist.copy( + identifier = "https://listenbrainz.org/playlist/$syntheticId", + title = title, + annotation = annotation ?: playlist.annotation, + ) + + val result = normalizedPlaylist.toMetadataPlaylist(thumbnailOverride = imageUrl) + if (result != null) { + writeCachedLbRadioPlaylist( + key = cacheKey, + entry = LbRadioPlaylistCacheEntry( + cachedAtEpochMs = nowEpochMs, + playlist = result, + ) + ) + } + logger.d("generateLbRadioPlaylist(): Successfully generated playlist: $title") + return result + } catch (e: Exception) { + logger.e(e) { "generateLbRadioPlaylist(): Error generating playlist for prompt='$prompt'" } + if (cachedEntry != null) { + logger.w("generateLbRadioPlaylist(): Returning stale cache for key=$cacheKey due to API failure") + return cachedEntry.playlist + } + return null + } + } + + private fun buildLbRadioCacheKey(prompt: String, mode: Mode): String { + val promptHash = prompt.hashCode().toUInt().toString(16) + return "$LB_RADIO_CACHE_KEY_PREFIX:${mode.name.lowercase()}:$promptHash" + } + + private fun buildBrowseSectionsCacheKey(username: String): String { + val usernameHash = username.lowercase().hashCode().toUInt().toString(16) + return "$BROWSE_SECTIONS_CACHE_KEY_PREFIX:$usernameHash" + } + + private suspend fun readCachedLbRadioPlaylist(key: String): LbRadioPlaylistCacheEntry? { + val raw = persistedStorage.getString(key) ?: return null + return runCatching { + cacheJson.decodeFromString(raw) + }.onFailure { throwable -> + logger.w(throwable) { "readCachedLbRadioPlaylist(): Corrupt cache entry for key=$key, removing" } + persistedStorage.remove(key) + }.getOrNull() + } + + private suspend fun writeCachedLbRadioPlaylist(key: String, entry: LbRadioPlaylistCacheEntry) { + runCatching { + persistedStorage.putString(key, cacheJson.encodeToString(entry)) + }.onFailure { throwable -> + logger.w(throwable) { "writeCachedLbRadioPlaylist(): Failed to persist cache for key=$key" } + } + } + + private suspend fun readCachedBrowseSections(key: String): BrowseSectionsCacheEntry? { + val raw = persistedStorage.getString(key) ?: return null + return runCatching { + cacheJson.decodeFromString(raw) + }.onFailure { throwable -> + logger.w(throwable) { "readCachedBrowseSections(): Corrupt cache entry for key=$key, removing" } + persistedStorage.remove(key) + }.getOrNull() + } + + private suspend fun writeCachedBrowseSections(key: String, entry: BrowseSectionsCacheEntry) { + runCatching { + persistedStorage.putString(key, cacheJson.encodeToString(entry)) + }.onFailure { throwable -> + logger.w(throwable) { "writeCachedBrowseSections(): Failed to persist cache for key=$key" } + } + } + + private fun Playlist.toMetadataPlaylist(thumbnailOverride: String? = null): MetadataPlaylist? { + val identifier = identifier ?: return null + val id = identifier.substringAfterLast('/').takeIf { it.isNotBlank() } ?: return null + val creator = creator ?: "Unknown" + + return MetadataPlaylist( + id = id, + title = title ?: "Untitled", + description = annotation, + thumbnails = listOf( + Thumbnail( + url = thumbnailOverride + ?: "https://ui-avatars.com/api/?name=${title ?: "Playlist"}&background=random", + width = 300, + height = 300 + ) + ), + trackCount = track?.size ?: 0, + externalUri = identifier, + owner = MetadataUser( + id = creator, + username = creator, + displayName = creator, + thumbnails = emptyList(), + externalUri = "https://listenbrainz.org/user/$creator/", + ), + ) + } + + private suspend fun requireUsername(): String { + logger.d("requireUsername(): Checking for cached username") + cachedUsername?.let { + logger.d("requireUsername(): Using cached username: $it") + return it + } + + logger.d("requireUsername(): Retrieving auth token from persistent storage") + val auth = Auth.ApiKeyAuth { + val token = + persistedStorage.getString("listenbrainz_auth_token") ?: run { + logger.w("requireUsername(): No auth token found in persistent storage") + return@ApiKeyAuth null + } + logger.d("requireUsername(): Auth token retrieved, length: ${token.length}") + if (token.startsWith("Token ", ignoreCase = true)) token else "Token $token" + } + Api.setAuthProvider(auth) + + logger.i("requireUsername(): Validating token with ListenBrainz API") + val username = when (val res = LbCoreApi.validateToken()) { + is Either.Left -> { + val error = res.value + logger.e("requireUsername(): Token validation failed with error: $error") + throw error + } + + is Either.Right -> { + val user = res.value.data.userName + logger.i("requireUsername(): Token validation successful, username: $user") + user + } + } + cachedUsername = username + logger.d("requireUsername(): Caching username: $username") + return username!! + } + +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataPlaylistAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataPlaylistAPI.kt new file mode 100644 index 00000000..7db28b5a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataPlaylistAPI.kt @@ -0,0 +1,414 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import arrow.core.Either +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository +import dev.krtirtho.spotube.listenbrainz.Api +import dev.krtirtho.spotube.listenbrainz.Auth +import dev.krtirtho.spotube.listenbrainz.api.LbCoreApi +import dev.krtirtho.spotube.listenbrainz.api.LbPlaylistsApi +import dev.krtirtho.spotube.listenbrainz.models.CreatePlaylistRequest +import dev.krtirtho.spotube.listenbrainz.models.Playlist +import dev.krtirtho.spotube.listenbrainz.models.PlaylistTrackInner +import kotlin.uuid.Uuid + +class RealMusicbrainzListenbrainzMetadataPlaylistAPI( + private val musicbrainzRepository: MusicbrainzRepository, + private val persistedStorage: PersistedStorageAPI +) : MetadataPlaylistAPI { + + private var cachedUsername: String? = null + + private suspend fun requireUsername(): String { + cachedUsername?.let { return it } + + // Setup auth provider globally + val auth = Auth.ApiKeyAuth { + val token = + persistedStorage.getString("listenbrainz_auth_token") ?: return@ApiKeyAuth null + if (token.startsWith("Token ", ignoreCase = true)) token else "Token $token" + } + Api.setAuthProvider(auth) + + val username = when (val res = LbCoreApi.validateToken()) { + is Either.Left -> throw IllegalStateException("Unable to resolve ListenBrainz username: ${res.value}") + is Either.Right -> res.value.data.userName + } + cachedUsername = username!! + return username + } + + override suspend fun getPlaylist(id: String): MetadataPlaylist { + // Ensure auth is set up if possible + try { + requireUsername() + } catch (_: Exception) { + } + + val response = LbPlaylistsApi.fetchPlaylist( + playlistMbid = Uuid.parse(id), + fetchMetadata = false + ) + + val playlist = response.getOrNull()?.data?.playlist + ?: throw IllegalStateException("Playlist not found") + + return playlistToMetadata(playlist, id) + ?: throw IllegalStateException("Invalid playlist data") + } + + override suspend fun getPlaylistTracks( + id: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + + try { + requireUsername() + } catch (_: Exception) { + } + + val tracks = try { + LbPlaylistsApi.fetchPlaylist( + playlistMbid = Uuid.parse(id), + fetchMetadata = false + ).getOrNull()?.data?.playlist?.track ?: emptyList() + } catch (_: Exception) { + return PaginationResult( + items = emptyList(), + totalCount = 0, + nextPagination = null + ) + } + + val slice = tracks.drop(paging.offset).take(paging.limit) + + val recordingIds = slice.mapNotNull { track -> + track.identifier?.firstOrNull()?.substringAfterLast("/")?.takeIf { it.isNotBlank() } + } + val nextOffset = if (paging.offset + paging.limit < tracks.size) paging.offset + paging.limit else null + if (recordingIds.isEmpty()) { + return PaginationResult( + items = emptyList(), + totalCount = tracks.size, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) } + ) + } + + val query = recordingIds.joinToString(" OR ") { "rid:$it" } + val mbResponse = musicbrainzRepository.searchRecordings( + query = query, + limit = recordingIds.size, + offset = 0 + ) + + val recordingsMap = mbResponse.recordings.associateBy { it.id } + + val metadataTracks = recordingIds.mapNotNull { rid -> + val recording = recordingsMap[rid] ?: return@mapNotNull null + // We pick the first release as the album. + val release = recording.releases.firstOrNull() ?: return@mapNotNull null + val releaseGroupId = release.releaseGroup?.id ?: release.id + val album = release.toMetadataAlbumDetailed(releaseGroupId) + + recording.toMetadataTrack(album) + } + + return PaginationResult( + items = metadataTracks, + totalCount = tracks.size, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) } + ) + } + + override suspend fun savedPlaylists( + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + // 1. Fetch User Playlists (Remote) + // 2. Fetch Saved Playlists (Local - from ids) + + var username: String? = null + try { + username = requireUsername() + } catch (_: Exception) { + // If no username, we can't fetch remote user playlists + } + + var remoteTotal = 0L + var remoteItems: List = emptyList() + + if (username != null) { + try { + val countRes = LbPlaylistsApi.playlistsForUser(username, count = 1, offset = 0) + remoteTotal = countRes.getOrNull()?.data?.playlistCount ?: 0L + + if (paging.offset < remoteTotal) { + val limit = (paging.limit).toLong() + val res = LbPlaylistsApi.playlistsForUser( + username, + count = limit, + offset = paging.offset.toLong() + ) + res.getOrNull()?.data?.let { data -> + // playlistCount might be updated + remoteTotal = data.playlistCount ?: remoteTotal + remoteItems = data.playlists?.mapNotNull { req -> + req.playlist?.let { + playlistToMetadata( + it, + req.playlist.identifier?.substringAfterLast("/") + .takeIf { id -> id != req.playlist.identifier } ?: "") + } + } ?: emptyList() + } + } + } catch (_: Exception) { + // e.printStackTrace() // Removed printStackTrace in KMP common code usually + } + } + + val ids = persistedStorage.getString(SAVED_PLAYLISTS_KEY) + ?.split(",") + ?.filter { it.isNotBlank() } + ?: emptyList() + val savedCount = ids.size + val savedItems = mutableListOf() + + // Calculate how many slots in pageSize are left to fill from Saved items + val remoteFetchedCount = remoteItems.size + val neededFromSaved = paging.limit - remoteFetchedCount + + if (neededFromSaved > 0) { + // We need checks: + // 1. Did we exhaust remote? (pagination.offset + remoteFetchedCount >= remoteTotal) + // 2. Or is pagination.offset already starting inside Saved list? (pagination.offset >= remoteTotal) + val startInSaved: Long = if (paging.offset >= remoteTotal) { + paging.offset - remoteTotal + } else { + // We were fetching from remote, and maybe it finished, so we append from start of saved + 0 + } + + if (startInSaved < savedCount) { + val endInSaved = (startInSaved + neededFromSaved).coerceAtMost(savedCount.toLong()) + val pageIds = ids.subList(startInSaved.toInt(), endInSaved.toInt()) + + val fetchedSaved = pageIds.mapNotNull { id -> + try { + getPlaylist(id) + } catch (_: Exception) { + null + } + } + savedItems.addAll(fetchedSaved) + } + } + + val allItems = remoteItems + savedItems + val totalCount = remoteTotal + savedCount + + val nextOffset = if (paging.offset + allItems.size < totalCount) paging.offset + allItems.size else null + + return PaginationResult( + items = allItems, + totalCount = totalCount.toInt(), + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) } + ) + } + + private fun playlistToMetadata(playlist: Playlist, id: String): MetadataPlaylist? { + // Identifier usually contains URL, we need to extract ID if not passed + val mbid = id.ifBlank { + playlist.identifier?.substringAfterLast("/") + ?.takeIf { it != playlist.identifier } ?: return null + } + + val creator = playlist.creator ?: "Unknown" + + return MetadataPlaylist( + id = mbid, + title = playlist.title ?: "Untitled", + description = playlist.annotation, + thumbnails = listOf( + Thumbnail( + url = "https://ui-avatars.com/api/?name=${playlist.title}&background=random", + width = 300, + height = 300 + ) + ), + trackCount = playlist.track?.size ?: 0, + externalUri = playlist.identifier ?: "https://listenbrainz.org/playlist/$mbid", + owner = MetadataUser( + id = creator, + username = creator, + displayName = creator, + thumbnails = emptyList(), // no avatar easily available + externalUri = "https://listenbrainz.org/user/$creator/" + ) + ) + } + + override suspend fun isSavedPlaylists(ids: List): List { + val savedIds = persistedStorage.getString(SAVED_PLAYLISTS_KEY) + ?.split(",") + ?.toSet() + ?: emptySet() + + return ids.map { savedIds.contains(it) } + } + + override suspend fun savePlaylists(ids: List) { + val savedIds = (persistedStorage.getString(SAVED_PLAYLISTS_KEY) + ?.split(",") + ?.filter { it.isNotBlank() } + ?.toMutableSet() + ?: mutableSetOf()).apply { + addAll(ids) + } + persistedStorage.putString(SAVED_PLAYLISTS_KEY, savedIds.joinToString(",")) + } + + override suspend fun removeSavedPlaylists(ids: List) { + val savedIds = (persistedStorage.getString(SAVED_PLAYLISTS_KEY) + ?.split(",") + ?.filter { it.isNotBlank() } + ?.toMutableSet() + ?: mutableSetOf()).apply { + removeAll(ids.toSet()) + } + persistedStorage.putString(SAVED_PLAYLISTS_KEY, savedIds.joinToString(",")) + } + + companion object { + private const val SAVED_PLAYLISTS_KEY = "saved_playlists" + } + + override suspend fun createPlaylist( + name: String, + description: String?, + isPublic: Boolean, + isCollaborating: Boolean, + imageBase64: String, + trackIds: List + ): MetadataPlaylist { + val username = requireUsername() + + val body = CreatePlaylistRequest( + playlist = Playlist( + title = name, + annotation = description, + track = trackIds.map { + PlaylistTrackInner( + identifier = listOf("https://musicbrainz.org/recording/$it") + ) + } + ) + ) + + val res = LbPlaylistsApi.createPlaylist(body) + val created = + res.getOrNull()?.data ?: throw IllegalStateException("Failed to create playlist") + + // The create response usually contains the MBID + val mbid = + created.playlistMbid?.toString() ?: throw IllegalStateException("No MBID returned") + + return MetadataPlaylist( + id = mbid, + title = name, + description = description, + thumbnails = listOf( + Thumbnail( + url = "https://ui-avatars.com/api/?name=$name&background=random", + width = 300, + height = 300 + ) + ), + trackCount = trackIds.size, + externalUri = "https://listenbrainz.org/playlist/$mbid", + owner = MetadataUser( + id = username, + username = username, + displayName = username, + thumbnails = emptyList(), + externalUri = "https://listenbrainz.org/user/$username/" + ) + ) + } + + override suspend fun updatePlaylist( + id: String, + name: String?, + description: String?, + isPublic: Boolean?, + isCollaborating: Boolean?, + imageBase64: String?, + trackIds: List? + ): MetadataPlaylist { + requireUsername() + // If we need to fetch first to get existing values? + // LB edit API usually replaces fields. + + val body = CreatePlaylistRequest( + playlist = Playlist( + title = name ?: "Untitled", + annotation = description, + track = trackIds?.map { + PlaylistTrackInner( + identifier = listOf("https://musicbrainz.org/recording/$it") + ) + } + ) + ) + + val res = LbPlaylistsApi.editPlaylist(Uuid.parse(id), body) + if (res.isLeft()) throw IllegalStateException("Failed to update playlist: ${res.leftOrNull()}") + + return getPlaylist(id) + } + + override suspend fun deletePlaylist(id: String) { + requireUsername() + LbPlaylistsApi.deletePlaylist(Uuid.parse(id)) + } + + override suspend fun addTracksToPlaylist( + playlistId: String, + trackIds: List + ) { + TODO("Not yet implemented") + } + + override suspend fun removeTracksFromPlaylist( + playlistId: String, + trackIds: List + ) { + TODO("Not yet implemented") + } + +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataSearchAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataSearchAPI.kt new file mode 100644 index 00000000..e99fe3e9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataSearchAPI.kt @@ -0,0 +1,279 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSupportedSearchType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.listenbrainz.LBPlaylistSearchResponse +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzArtistEnricher +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository +import io.ktor.client.HttpClient +import io.ktor.client.request.get +import io.ktor.client.request.parameter +import io.ktor.client.request.url +import io.ktor.client.statement.bodyAsText +import kotlinx.coroutines.async +import kotlinx.coroutines.coroutineScope +import kotlinx.serialization.json.Json + +class RealMusicbrainzListenbrainzMetadataSearchAPI( + private val musicbrainzRepository: MusicbrainzRepository, + private val artistEnricher: MusicbrainzArtistEnricher, + private val httpClient: HttpClient +): MetadataSearchAPI { + private val json = Json { ignoreUnknownKeys = true; isLenient = true } + + override val supportedSearchTypes: List = listOf( + MetadataSupportedSearchType.TRACK, + MetadataSupportedSearchType.ARTIST, + MetadataSupportedSearchType.ALBUM, + MetadataSupportedSearchType.PLAYLIST, + ) + + override suspend fun search(query: String): List = coroutineScope { + val playlists = async { searchPlaylists(query, PaginationStrategy.Offset(offset = 0, limit = 5)).items } + val tracks = async { searchTracks(query, PaginationStrategy.Offset(offset = 0, limit = 5)).items } + val artists = async { searchArtists(query, PaginationStrategy.Offset(offset = 0, limit = 5)).items } + val albums = async { searchAlbums(query, PaginationStrategy.Offset(offset = 0, limit = 5)).items } + + val results = mutableListOf() + results.addAll(playlists.await()) + results.addAll(tracks.await()) + results.addAll(artists.await()) + results.addAll(albums.await()) + results + } + + override suspend fun searchTracks( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + + val result = musicbrainzRepository.searchRecordings( + query = query, + limit = paging.limit, + offset = paging.offset + ) + val items = result.recordings.map { recording -> + val release = recording.releases.firstOrNull() + val releaseGroupId = release?.releaseGroup?.id ?: release?.id ?: recording.id + + val albumDetailed = MetadataAlbum.Detailed( + id = releaseGroupId, + title = release?.releaseGroup?.title ?: release?.title ?: recording.title, // Fallback + description = null, + thumbnails = listOf( + Thumbnail("https://coverartarchive.org/release-group/$releaseGroupId/front-250.jpg", 250, 250), + Thumbnail("https://coverartarchive.org/release-group/$releaseGroupId/front-500.jpg", 500, 500) + ), + albumType = MetadataAlbumType.Album, // Default + artists = emptyList(), // Can populate if needed + externalUri = "https://musicbrainz.org/release-group/$releaseGroupId", + releaseDate = release?.date, + genres = emptyList(), + trackCount = release?.trackCount ?: 0 + ) + + MetadataSearchResult.Track( + data = MetadataTrack( + id = recording.id, + title = recording.title, + durationMs = recording.length?.toLong() ?: 0L, + trackNumber = null, + discNumber = null, + artists = recording.artistCredit.mapNotNull { credit -> + credit.artist?.let { artist -> + MetadataArtist.Basic( + id = artist.id, + name = artist.name, + thumbnails = emptyList(), + externalUri = "https://musicbrainz.org/artist/${artist.id}" + ) + } + }, + album = albumDetailed, + explicit = recording.tags.any { it.name.contains("explicit", ignoreCase = true) }, + popularity = null, + isrcCode = recording.isrcs.firstOrNull(), + externalUri = "https://musicbrainz.org/recording/${recording.id}", + thumbnails = null, + ) + ) + } + + val nextOffset = if (paging.offset + paging.limit < result.count) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = items, + totalCount = result.count, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } + + override suspend fun searchArtists( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + val result = musicbrainzRepository.searchArtists( + query = query, + limit = paging.limit, + offset = paging.offset + ) + + val artistIds = result.artists.map { it.id } + val enriched = artistEnricher.getEnrichedArtists(artistIds) + + val items = enriched.map { (artist, images) -> + MetadataSearchResult.Artist( + data = MetadataArtist.Basic( + id = artist.id, + name = artist.name, + thumbnails = images.map { Thumbnail(it, 300, 300) }, + externalUri = "https://musicbrainz.org/artist/${artist.id}" + ) + ) + } + + val nextOffset = if (paging.offset + paging.limit < result.count) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = items, + totalCount = result.count, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } + + override suspend fun searchAlbums( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + val result = musicbrainzRepository.searchReleaseGroups( + query = query, + limit = paging.limit, + offset = paging.offset + ) + + val items = result.releaseGroups.map { group -> + MetadataSearchResult.Album( + data = MetadataAlbum.Basic( + id = group.id, + title = group.title, + description = null, + thumbnails = listOf( + Thumbnail("https://coverartarchive.org/release-group/${group.id}/front-250.jpg", 250, 250), + Thumbnail("https://coverartarchive.org/release-group/${group.id}/front-500.jpg", 500, 500) + ), + albumType = when (group.primaryType?.lowercase()) { + "album" -> MetadataAlbumType.Album + "single" -> MetadataAlbumType.Single + "compilation" -> MetadataAlbumType.Collection + else -> MetadataAlbumType.Album + }, + artists = emptyList(), // Populate? + externalUri = "https://musicbrainz.org/release-group/${group.id}" + ) + ) + } + + val nextOffset = if (paging.offset + paging.limit < result.count) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = items, + totalCount = result.count, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } + + override suspend fun searchPlaylists( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + try { + val responseText = httpClient.get { + url("https://api.listenbrainz.org/1/playlist/search") + parameter("query", query) + parameter("count", paging.limit) + parameter("offset", paging.offset) + }.bodyAsText() + + val response = json.decodeFromString(responseText) + + val items = response.playlists.map { it.playlist }.map { playlist -> + val id = playlist.identifier.substringAfterLast("/") + MetadataSearchResult.Playlist( + data = MetadataPlaylist( + id = id, + title = playlist.title, + description = playlist.annotation, + thumbnails = emptyList(), // Listenbrainz search doesn't return playlist covers usually + trackCount = 0, // Not available in search result + owner = MetadataUser( + id = playlist.creator, + username = playlist.creator, + displayName = playlist.creator, + thumbnails = emptyList(), + externalUri = "https://listenbrainz.org/user/${playlist.creator}" + ), + externalUri = "https://listenbrainz.org/playlist/$id" + ) + ) + } + + val nextOffset = if (paging.offset + paging.limit < response.count) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = items, + totalCount = response.count, + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) }, + ) + } catch (e: Exception) { + e.printStackTrace() + return PaginationResult(emptyList(), 0, null) + } + } + + override suspend fun searchUsers( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + return PaginationResult(emptyList(), 0, null) + } + +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataTrackAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataTrackAPI.kt new file mode 100644 index 00000000..1687af1b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/RealMusicbrainzListenbrainzMetadataTrackAPI.kt @@ -0,0 +1,237 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz + +import arrow.core.Either +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz.MusicbrainzRepository +import dev.krtirtho.spotube.listenbrainz.Api +import dev.krtirtho.spotube.listenbrainz.Auth +import dev.krtirtho.spotube.listenbrainz.api.LbCoreApi +import dev.krtirtho.spotube.listenbrainz.api.LbRecordingsApi +import dev.krtirtho.spotube.listenbrainz.models.RecordingFeedbackRequest +import io.ktor.client.request.get +import io.ktor.client.request.header +import io.ktor.client.request.parameter +import io.ktor.client.statement.bodyAsText +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.contentOrNull +import kotlinx.serialization.json.jsonArray +import kotlinx.serialization.json.jsonObject +import kotlinx.serialization.json.jsonPrimitive +import kotlin.uuid.Uuid + +class RealMusicbrainzListenbrainzMetadataTrackAPI( + private val musicbrainzRepository: MusicbrainzRepository, + private val persistedStorage: PersistedStorageAPI +) : MetadataTrackAPI { + + private var cachedUsername: String? = null + + private suspend fun requireUsername(): String { + cachedUsername?.let { return it } + + val auth = Auth.ApiKeyAuth { + val token = persistedStorage.getString("listenbrainz_auth_token") ?: return@ApiKeyAuth null + if (token.startsWith("Token ", ignoreCase = true)) token else "Token $token" + } + Api.setAuthProvider(auth) + + val username = when (val res = LbCoreApi.validateToken()) { + is Either.Left -> throw IllegalStateException("Unable to resolve ListenBrainz username: ${res.value}") + is Either.Right -> res.value.data.userName + } + cachedUsername = username!! + return username + } + + override suspend fun getTrack(id: String): MetadataTrack { + val recording = musicbrainzRepository.getRecordingByMbid( + mbid = id, + includes = listOf("artists", "releases", "artist-credits", "release-groups") + ) + val release = recording.releases.firstOrNull() + ?: throw IllegalStateException("No release found for track") + + val album = release.toMetadataAlbumDetailed(release.releaseGroup?.id ?: release.id) + + // This creates basic track metadata from MusicBrainz + return recording.toMetadataTrack(album) + } + + override suspend fun savedTracks( + pagination: PaginationStrategy? + ): PaginationResult { + val paging = pagination as? PaginationStrategy.Offset ?: PaginationStrategy.Offset(0, 20) + + val username = try { + requireUsername() + } catch (_: Exception) { + return PaginationResult( + items = emptyList(), + totalCount = 0, + nextPagination = null + ) + } + + val res = LbRecordingsApi.getFeedback( + userName = username, + score = 1, + count = paging.limit.toLong(), + offset = paging.offset.toLong() + ) + + val feedbackResponse = res.getOrNull()?.data ?: return PaginationResult( + items = emptyList(), + totalCount = 0, + nextPagination = null + ) + val feedbacks = feedbackResponse.feedback ?: emptyList() + val mbids = feedbacks.mapNotNull { it.recordingMbid?.toString() } + + if (mbids.isEmpty()) { + return PaginationResult( + items = emptyList(), + totalCount = (feedbackResponse.totalCount ?: 0).toInt(), + nextPagination = null + ) + } + + // Batch fetch metadata + val query = mbids.joinToString(" OR ") { "rid:$it" } + val searchRes = musicbrainzRepository.searchRecordings(query, limit = mbids.size) + val recordingMap = searchRes.recordings.associateBy { it.id } + + val tracks = mbids.mapNotNull { mbid -> + val recording = recordingMap[mbid] ?: return@mapNotNull null + val release = recording.releases.firstOrNull() ?: return@mapNotNull null + val album = release.toMetadataAlbumDetailed(release.releaseGroup?.id ?: release.id) + recording.toMetadataTrack(album) + } + + val nextOffset = if ((paging.offset + paging.limit) < (feedbackResponse.totalCount ?: 0)) { + paging.offset + paging.limit + } else null + + return PaginationResult( + items = tracks, + totalCount = (feedbackResponse.totalCount ?: 0).toInt(), + nextPagination = nextOffset?.let { PaginationStrategy.Offset(it, paging.limit) } + ) + } + + override suspend fun isSavedTracks(ids: List): List { + val username = try { + requireUsername() + } catch (_: Exception) { + return ids.map { false } + } + + val uuids = ids.mapNotNull { + try { Uuid.parse(it) } catch(_: Exception) { null } + } + if (uuids.isEmpty()) return ids.map { false } + + val res = LbRecordingsApi.getFeedbackForRecordings( + userName = username, + recordingMbids = uuids + ) + + val feedbackMap = res.getOrNull()?.data?.feedback?.associateBy { it.recordingMbid.toString() } ?: emptyMap() + + return ids.map { id -> + feedbackMap[id]?.score == 1L + } + } + + override suspend fun saveTracks(ids: List) { + requireUsername() + ids.forEach { id -> + try { + LbRecordingsApi.recordingFeedback( + RecordingFeedbackRequest( + recordingMbid = Uuid.parse(id), + score = 1 + ) + ) + } catch (_: Exception) {} + } + } + + override suspend fun removeSavedTracks(ids: List) { + requireUsername() + ids.forEach { id -> + try { + LbRecordingsApi.recordingFeedback( + RecordingFeedbackRequest( + recordingMbid = Uuid.parse(id), + score = 0 + ) + ) + } catch (_: Exception) {} + } + } + + override suspend fun recommendationsBasedOnTracks( + seedTrackIds: List, + limit: Int + ): List { + requireUsername() + val idsParam = seedTrackIds.joinToString(",") + + val jsonStr = try { + val response = Api.client.get("https://api.listenbrainz.org/1/recommendation/playground/recording_recommendations") { + parameter("recording_mbids", idsParam) + parameter("count", limit) + val token = persistedStorage.getString("listenbrainz_auth_token") + if (token != null) { + header("Authorization", "Token $token") + } + } + response.bodyAsText() + } catch (_: Exception) { + return emptyList() + } + + val json = Json { ignoreUnknownKeys = true } + val root = json.parseToJsonElement(jsonStr).jsonObject + val payload = root["payload"]?.jsonObject + val recordings = payload?.get("recordings")?.jsonArray ?: return emptyList() + + val mbids = recordings.mapNotNull { + it.jsonObject["recording_mbid"]?.jsonPrimitive?.contentOrNull + } + + if (mbids.isEmpty()) return emptyList() + + val query = mbids.joinToString(" OR ") { "rid:$it" } + val searchRes = musicbrainzRepository.searchRecordings(query, limit = mbids.size) + val recordingMap = searchRes.recordings.associateBy { it.id } + + return mbids.mapNotNull { mbid -> + val recording = recordingMap[mbid] ?: return@mapNotNull null + val release = recording.releases.firstOrNull() ?: return@mapNotNull null + val album = release.toMetadataAlbumDetailed(release.releaseGroup?.id ?: release.id) + recording.toMetadataTrack(album) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/listenbrainz/ListenbrainzModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/listenbrainz/ListenbrainzModels.kt new file mode 100644 index 00000000..fb7f7a2f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/listenbrainz/ListenbrainzModels.kt @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.listenbrainz + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.JsonElement + +@Serializable +data class LBPlaylistExtensionSpopf( + @SerialName("public") + val isPublic: Boolean? = null +) + +@Serializable +data class LBPlaylistExtension( + @SerialName("https://musicbrainz.org/doc/jspf#playlist") + val spopf: LBPlaylistExtensionSpopf? = null +) + +@Serializable +data class LBPlaylistUser( + val name: String +) + +@Serializable +data class LBPlaylist( + val identifier: String, + val title: String, + val annotation: String? = null, + val creator: String, // In search response it is string (username) + val extension: LBPlaylistExtension? = null, + val date: String? = null, +) + +@Serializable +data class LBPlaylistObject( + val playlist: LBPlaylist, +) + +@Serializable +data class LBPlaylistSearchResponse( + @SerialName("playlist_count") + val count: Int = 0, + val offset: Int = 0, + val playlists: List = emptyList(), +) + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicBrainzModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicBrainzModels.kt new file mode 100644 index 00000000..4d1a08dd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicBrainzModels.kt @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class MusicbrainzTag( + val name: String, + val count: Int? = null, +) + +@Serializable +data class MusicbrainzLifeSpan( + val begin: String? = null, + val end: String? = null, + val ended: Boolean? = null, +) + +@Serializable +data class MusicbrainzTextRepresentation( + val language: String? = null, + val script: String? = null, +) + +@Serializable +data class MusicbrainzArtist( + val id: String, + val name: String, + val score: String? = null, + @SerialName("sort-name") + val sortName: String? = null, + val country: String? = null, + val type: String? = null, + val gender: String? = null, + val disambiguation: String? = null, + @SerialName("life-span") + val lifeSpan: MusicbrainzLifeSpan? = null, + val tags: List = emptyList(), +) + +@Serializable +data class MusicbrainzArtistCredit( + val name: String? = null, + @SerialName("joinphrase") + val joinPhrase: String? = null, + val artist: MusicbrainzArtist? = null, +) + +@Serializable +data class MusicbrainzReleaseGroup( + val id: String, + val title: String, + @SerialName("primary-type") + val primaryType: String? = null, + @SerialName("secondary-types") + val secondaryTypes: List = emptyList(), + @SerialName("first-release-date") + val firstReleaseDate: String? = null, +) + +@Serializable +data class MusicbrainzRelease( + val id: String, + val title: String, + val score: String? = null, + val status: String? = null, + val quality: String? = null, + val date: String? = null, + val country: String? = null, + @SerialName("barcode") + val barCode: String? = null, + @SerialName("track-count") + val trackCount: Int? = null, + @SerialName("text-representation") + val textRepresentation: MusicbrainzTextRepresentation? = null, + @SerialName("artist-credit") + val artistCredit: List = emptyList(), + @SerialName("release-group") + val releaseGroup: MusicbrainzReleaseGroup? = null, +) + +@Serializable +data class MusicbrainzRecording( + val id: String, + val title: String, + val length: Int? = null, + val disambiguation: String? = null, + val video: Boolean? = null, + val score: String? = null, + @SerialName("first-release-date") + val firstReleaseDate: String? = null, + @SerialName("artist-credit") + val artistCredit: List = emptyList(), + val releases: List = emptyList(), + val tags: List = emptyList(), + val isrcs: List = emptyList(), +) + +@Serializable +data class MusicbrainzRecordingSearchResponse( + val created: String? = null, + val count: Int = 0, + val offset: Int = 0, + val recordings: List = emptyList(), +) + +@Serializable +data class MusicbrainzArtistSearchResponse( + val created: String? = null, + val count: Int = 0, + val offset: Int = 0, + val artists: List = emptyList(), +) + +@Serializable +data class MusicbrainzReleaseSearchResponse( + val created: String? = null, + val count: Int = 0, + val offset: Int = 0, + val releases: List = emptyList(), +) + +@Serializable +data class MusicbrainzReleaseGroupSearchResponse( + val created: String? = null, + val count: Int = 0, + val offset: Int = 0, + @SerialName("release-groups") + val releaseGroups: List = emptyList(), +) + +@Serializable +data class MusicbrainzUrlRelation( + val artist: MusicbrainzArtist? = null, +) + +@Serializable +data class MusicbrainzUrlRelationList( + val relations: List = emptyList(), +) + +@Serializable +data class MusicbrainzUrl( + val resource: String, + @SerialName("relation-list") + val relationList: List = emptyList(), +) + +@Serializable +data class MusicbrainzUrlResponse( + val urls: List = emptyList(), +) + +@Serializable +data class MusicbrainzIsrcLookupResponse( + val isrc: String, + val recordings: List = emptyList(), +) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicbrainzArtistEnricher.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicbrainzArtistEnricher.kt new file mode 100644 index 00000000..8ad20857 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicbrainzArtistEnricher.kt @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz + +import dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.wikidata.WikidataRepository + +class MusicbrainzArtistEnricher( + private val musicbrainzRepository: MusicbrainzRepository, + private val wikidataRepository: WikidataRepository +) { + suspend fun getArtistsWithImages(artistIds: List): List { + if (artistIds.isEmpty()) return emptyList() + + // 1. Find Wikidata URLs for these artists + val idsQuery = artistIds.joinToString(" OR ") { "targetid:$it" } + val query = "relationtype:wikidata AND targettype:artist AND ($idsQuery)" + + val urlResponse = musicbrainzRepository.searchUrls( + query = query, + limit = artistIds.size + ) + + val urls = urlResponse.urls + val wikidataIds = urls.map { it.resource.substringAfterLast("/") } + + // Map MBID to Wikidata ID based on response + // The response structure for /url search is a bit complex. + // It returns URLs, and each URL has relation-list -> relations -> artist -> id + + val mbidToWikidataId = mutableMapOf() + + urls.forEach { url -> + val wikidataId = url.resource.substringAfterLast("/") + val artistId = url.relationList.firstOrNull()?.relations?.firstOrNull()?.artist?.id + if (artistId != null) { + mbidToWikidataId[artistId] = wikidataId + } + } + + // 2. Fetch images for Wikidata IDs + val imagesMap = wikidataRepository.getArtistImages(wikidataIds) + + // 3. Construct result + // We need to return MusicbrainzArtist objects. We might need to fetch details if we don't have them. + // But here we are enriching. + // Logic in search.ht: + // - Get wikidata IDs + // - Fetch images + // - Fetch artist details for artists WITHOUT wikidata link (using /artist search or lookup) + // - Combine + + // Let's search/fetch artist details for all IDs using their MBIDs + // Optimally we can batch fetch if possible, but MB API usually requires individual lookups or search. + // search.ht uses search endpoint with "arid:ID OR arid:ID..." + + val artistsResponse = musicbrainzRepository.searchArtists( + query = artistIds.joinToString(" OR ") { "arid:$it" }, + limit = artistIds.size + ) + + val artists = artistsResponse.artists.map { artist -> + // Check if we have an image for this artist + // We need to know which wikidata ID corresponds to this artist + val wikidataId = mbidToWikidataId[artist.id] + val imageUrl = wikidataId?.let { imagesMap[it] } + + // We don't have a field for 'images' in MusicbrainzArtist model yet. + // We should probably return a Pair or a new model, or just rely on the fact that we can't modify MusicbrainzArtist easily if it's data class. + // But wait, search.ht returns list of items which are maps. + + // I'll return MusicbrainzArtist, but I need to attach the image somehow. + // I'll assume passing the image URL up is handled by the caller or I'll wrap it. + // But MusicbrainzArtist is a data class. + + // Wait, Kotlin data classes are immutable. + // references used in search.ht: + // return { id: ..., name: ..., images: [url, ...] } + + // So this Enricher should probably return a data structure that holds Artist + Image list. + EnrichedArtist(artist, imageUrl?.let { listOf(it) } ?: emptyList()) + } + + return artists.map { it.artist } // Wait, how to attach image? + } + + data class EnrichedArtist( + val artist: MusicbrainzArtist, + val images: List + ) + + suspend fun getEnrichedArtists(artistIds: List): List { + if (artistIds.isEmpty()) return emptyList() + + // 1. Find Wikidata URLs for these artists + val idsQuery = artistIds.joinToString(" OR ") { "targetid:$it" } + val query = "relationtype:wikidata AND targettype:artist AND ($idsQuery)" + + val urlResponse = musicbrainzRepository.searchUrls( + query = query, + limit = artistIds.size + ) + + val urls = urlResponse.urls + + val mbidToWikidataId = mutableMapOf() + urls.forEach { url -> + val wikidataId = url.resource.substringAfterLast("/") + val artistId = url.relationList.firstOrNull()?.relations?.firstOrNull()?.artist?.id + if (artistId != null) { + mbidToWikidataId[artistId] = wikidataId + } + } + + val wikidataIds = mbidToWikidataId.values.toList() + + // 2. Fetch images for Wikidata IDs + val imagesMap = if (wikidataIds.isNotEmpty()) { + wikidataRepository.getArtistImages(wikidataIds) + } else { + emptyMap() + } + + // 3. Fetch artist details + // search.ht fetches "missingArtistIds" (artists without wikidata link) separately. + // But here we can just fetch ALL artists using one query (arid:...) because we need details for all of them anyway. + // search.ht fetches "artistWithImages" from wikidata info (it gets artist object from /url response relation), + // and "artistWithoutImages" from /artist search. + // The /url response relation includes the artist object! + + // Let's follow search.ht optimization: + // Use artists from /url response for those that have wikidata. + // Use /artist search for those that don't. + + val artistsFromUrl = urls.mapNotNull { url -> + val artist = url.relationList.firstOrNull()?.relations?.firstOrNull()?.artist + val wikidataId = url.resource.substringAfterLast("/") + val imageUrl = imagesMap[wikidataId] + + if (artist != null) { + EnrichedArtist(artist, imageUrl?.let { listOf(it) } ?: emptyList()) + } else null + } + + val foundArtistIds = artistsFromUrl.map { it.artist.id }.toSet() + val missingRequestIds = artistIds.filter { !foundArtistIds.contains(it) } + + val artistsFromSearch = if (missingRequestIds.isNotEmpty()) { + val artistsResponse = musicbrainzRepository.searchArtists( + query = missingRequestIds.joinToString(" OR ") { "arid:$it" }, + limit = missingRequestIds.size + ) + artistsResponse.artists.map { EnrichedArtist(it, emptyList()) } + } else { + emptyList() + } + + return artistsFromUrl + artistsFromSearch + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicbrainzRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicbrainzRepository.kt new file mode 100644 index 00000000..752f6e7c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/musicbrainz/MusicbrainzRepository.kt @@ -0,0 +1,234 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.musicbrainz + +import io.ktor.client.HttpClient +import io.ktor.client.request.get +import io.ktor.client.request.header +import io.ktor.client.request.parameter +import io.ktor.client.request.url +import io.ktor.client.statement.bodyAsText +import io.ktor.client.statement.request +import io.ktor.client.statement.HttpResponse +import io.ktor.http.HttpHeaders +import io.ktor.http.isSuccess +import kotlinx.serialization.json.Json + +interface MusicbrainzRepository { + suspend fun searchRecordings( + query: String, + limit: Int = 25, + offset: Int = 0, + ): MusicbrainzRecordingSearchResponse + + suspend fun searchArtists( + query: String, + limit: Int = 25, + offset: Int = 0, + ): MusicbrainzArtistSearchResponse + + suspend fun searchReleases( + query: String, + limit: Int = 25, + offset: Int = 0, + ): MusicbrainzReleaseSearchResponse + + suspend fun searchReleaseGroups( + query: String, + limit: Int = 25, + offset: Int = 0, + ): MusicbrainzReleaseGroupSearchResponse + + suspend fun searchUrls( + query: String, + limit: Int = 25, + ): MusicbrainzUrlResponse + + suspend fun getRecordingByMbid( + mbid: String, + includes: List = emptyList(), + ): MusicbrainzRecording + + suspend fun getArtistByMbid( + mbid: String, + includes: List = emptyList(), + ): MusicbrainzArtist + + suspend fun getReleaseByMbid( + mbid: String, + includes: List = emptyList(), + ): MusicbrainzRelease + + suspend fun lookupIsrc( + isrc: String, + includes: List = emptyList(), + ): MusicbrainzIsrcLookupResponse +} + +class KtorMusicbrainzRepository( + private val httpClient: HttpClient, + private val baseUrl: String = "https://musicbrainz.org", + private val userAgent: String = "Spotube/0.1 (https://github.com/KRTirtho/spotube)", +) : MusicbrainzRepository { + private val json = Json { + ignoreUnknownKeys = true + isLenient = true + } + + override suspend fun searchRecordings( + query: String, + limit: Int, + offset: Int, + ): MusicbrainzRecordingSearchResponse { + val payload = fetch( + endpoint = "recording", + query = query, + limit = limit, + offset = offset, + ) + return json.decodeFromString(payload) + } + + override suspend fun searchArtists( + query: String, + limit: Int, + offset: Int, + ): MusicbrainzArtistSearchResponse { + val payload = fetch( + endpoint = "artist", + query = query, + limit = limit, + offset = offset, + ) + return json.decodeFromString(payload) + } + + override suspend fun searchReleases( + query: String, + limit: Int, + offset: Int, + ): MusicbrainzReleaseSearchResponse { + val payload = fetch( + endpoint = "release", + query = query, + limit = limit, + offset = offset, + ) + return json.decodeFromString(payload) + } + + override suspend fun searchReleaseGroups( + query: String, + limit: Int, + offset: Int, + ): MusicbrainzReleaseGroupSearchResponse { + val payload = fetch( + endpoint = "release-group", + query = query, + limit = limit, + offset = offset, + ) + return json.decodeFromString(payload) + } + + override suspend fun searchUrls( + query: String, + limit: Int, + ): MusicbrainzUrlResponse { + val payload = fetch( + endpoint = "url", + query = query, + limit = limit, + ) + return json.decodeFromString(payload) + } + + override suspend fun getRecordingByMbid( + mbid: String, + includes: List, + ): MusicbrainzRecording { + val payload = fetch(endpoint = "recording/${mbid.trim()}", inc = includes) + return json.decodeFromString(payload) + } + + override suspend fun getArtistByMbid( + mbid: String, + includes: List, + ): MusicbrainzArtist { + val payload = fetch(endpoint = "artist/${mbid.trim()}", inc = includes) + return json.decodeFromString(payload) + } + + override suspend fun getReleaseByMbid( + mbid: String, + includes: List, + ): MusicbrainzRelease { + val payload = fetch(endpoint = "release/${mbid.trim()}", inc = includes) + return json.decodeFromString(payload) + } + + override suspend fun lookupIsrc( + isrc: String, + includes: List, + ): MusicbrainzIsrcLookupResponse { + val payload = fetch(endpoint = "isrc/${isrc.trim()}", inc = includes) + return json.decodeFromString(payload) + } + + private suspend fun fetch( + endpoint: String, + query: String? = null, + limit: Int? = null, + offset: Int? = null, + inc: List = emptyList(), + ): String { + val response = httpClient.get { + url("${baseUrl.trimEnd('/')}/ws/2/$endpoint") + header(HttpHeaders.Accept, "application/json") + header(HttpHeaders.UserAgent, userAgent) + parameter("fmt", "json") + query?.takeIf { it.isNotBlank() }?.let { parameter("query", it) } + limit?.let { parameter("limit", it) } + offset?.let { parameter("offset", it) } + inc.toMusicbrainzInc()?.let { parameter("inc", it) } + } + + return response.requireBody() + } +} + +class MusicbrainzApiException( + val statusCode: Int, + message: String, +) : RuntimeException(message) + +private suspend fun HttpResponse.requireBody(): String { + val text = bodyAsText() + if (status.isSuccess()) return text + + throw MusicbrainzApiException( + statusCode = status.value, + message = "MusicBrainz request failed (${status.value}) for ${request.url}. Response: ${text.take(512)}" + ) +} + +private fun List.toMusicbrainzInc(): String? { + val cleaned = map { it.trim() }.filter { it.isNotBlank() } + if (cleaned.isEmpty()) return null + return cleaned.joinToString(separator = "+") +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/wikidata/WikidataModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/wikidata/WikidataModels.kt new file mode 100644 index 00000000..4f256aa6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/wikidata/WikidataModels.kt @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.wikidata + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.JsonElement + +@Serializable +data class WikidataEntityValue( + val value: String? = null +) + +@Serializable +data class WikidataEntityDataValue( + val value: String? = null // It can be object but for P18 (image) it is string (filename) +) + +@Serializable +data class WikidataEntitySnak( + val datavalue: WikidataEntityDataValue? = null +) + +@Serializable +data class WikidataEntityClaim( + val mainsnak: WikidataEntitySnak? = null +) + +@Serializable +data class WikidataEntity( + val id: String, + val claims: Map>? = null +) + +@Serializable +data class WikidataEntitiesResponse( + val entities: Map = emptyMap() +) + +@Serializable +data class WikimediaImageInfo( + val thumburl: String? = null, + val thumbwidth: Int? = null, + val thumbheight: Int? = null, + val url: String? = null, + val width: Int? = null, + val height: Int? = null +) + +@Serializable +data class WikimediaPage( + val pageid: Long, + val title: String, + val imageinfo: List? = null +) + +@Serializable +data class WikimediaQuery( + val pages: Map = emptyMap() +) + +@Serializable +data class WikimediaResponse( + val query: WikimediaQuery? = null +) + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/wikidata/WikidataRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/wikidata/WikidataRepository.kt new file mode 100644 index 00000000..fad7f7bc --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/musicbrainz_listenbrainz/wikidata/WikidataRepository.kt @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.musicbrainz_listenbrainz.wikidata + +import io.ktor.client.HttpClient +import io.ktor.client.request.get +import io.ktor.client.request.parameter +import io.ktor.client.request.url +import io.ktor.client.statement.bodyAsText +import kotlinx.serialization.json.Json + +class WikidataRepository(private val httpClient: HttpClient) { + private val json = Json { + ignoreUnknownKeys = true + isLenient = true + } + + suspend fun getArtistImages(wikidataIds: List): Map { + if (wikidataIds.isEmpty()) return emptyMap() + + try { + // 1. Get image filenames from Wikidata + val wikidataResponseText = httpClient.get { + url("https://www.wikidata.org/w/api.php") + parameter("format", "json") + parameter("props", "claims") + parameter("ids", wikidataIds.joinToString("|")) + parameter("action", "wbgetentities") + }.bodyAsText() + + val wikidataResponse = json.decodeFromString(wikidataResponseText) + + val idsWithImageNames = wikidataIds.map { id -> + val imageName = wikidataResponse.entities[id]?.claims?.get("P18")?.firstOrNull()?.mainsnak?.datavalue?.value + id to imageName + } + + val imageNames = idsWithImageNames.mapNotNull { it.second } + if (imageNames.isEmpty()) return wikidataIds.associateWith { null } + + val titles = imageNames.map { "File:$it" }.joinToString("|") + + // 2. Get image URLs from Wikimedia Commons + val commonsResponseText = httpClient.get { + url("https://commons.wikimedia.org/w/api.php") + parameter("prop", "imageinfo") + parameter("action", "query") + parameter("iiprop", "url|size") + parameter("iiurlheight", 300) + parameter("iiurlwidth", 300) + parameter("format", "json") + parameter("titles", titles) + }.bodyAsText() + + val commonsResponse = json.decodeFromString(commonsResponseText) + val pages = commonsResponse.query?.pages?.values ?: emptyList() + + val imagesMap = mutableMapOf() + + // Initialize all with null + wikidataIds.forEach { imagesMap[it] = null } + + for (page in pages) { + val imageName = page.title.removePrefix("File:") + val imageUrl = page.imageinfo?.firstOrNull()?.thumburl ?: page.imageinfo?.firstOrNull()?.url + + // Find original Wikidata ID for this image name + val wikidataId = idsWithImageNames.firstOrNull { it.second == imageName }?.first + if (wikidataId != null) { + imagesMap[wikidataId] = imageUrl + } + } + + return imagesMap + } catch (e: Exception) { + e.printStackTrace() + return wikidataIds.associateWith { null } + } + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/ISRCModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/ISRCModels.kt new file mode 100644 index 00000000..e1268ef1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/ISRCModels.kt @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.newpipe_yt + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class IFPISessionResponse( + val token: String, + val response: String +) + +/** + * { + * "searchFields": { + * "recordingArtistName": { + * "value": "Justin Bieber" + * }, + * "recordingTitle": { + * "value": "Peaches" + * }, + * "releaseName": { + * "value": "Justice" + * } + * }, + * "start": 0, + * "number": 10, + * "showReleases": false + * } + */ +@Serializable +data class IFPIRecordingRequestInput( + val searchFields: SearchFields, + val start: Int = 0, + val number: Int = 10, + val showReleases: Boolean = false +) { + @Serializable + data class SearchFields( + val recordingArtistName: FieldValue? = null, + val recordingTitle: FieldValue? = null, + val releaseName: FieldValue? = null + ) { + @Serializable + data class FieldValue(val value: String) + } +} + +/** + * { + * "numberOfRecordings": 1, + * "show_releases": false, + * "recordings": [ + * { + * "duration": "3:18", + * "recordingVersion": null, + * "isValidIsrc": "True", + * "recordingYear": "2021", + * "recordingArtistName": "Daniel Caesar ♦ Giveon ♦ Justin Bieber", + * "isrcFailureCode": null, + * "isExplicit": "False", + * "isrc": "USUM72102647", + * "recordingTitle": "Peaches", + * "id": "USUM72102647" + * } + * ] + * } + */ +@Serializable +data class IFPIRecordingResponse( + val numberOfRecordings: Int, + @SerialName("show_releases") + val showReleases: Boolean, + val recordings: List +) { + @Serializable + data class Recording( + val duration: String?, + val recordingVersion: String?, + val isValidIsrc: String?, + val recordingYear: String?, + val recordingArtistName: String?, + val isrcFailureCode: String?, + val isExplicit: String?, + val isrc: String, + val recordingTitle: String?, + val id: String + ) +} + +@Serializable +data class MusicGatewayResponse( + val result: Result +) { + @Serializable + data class Result( + val tracks: Tracks + ) { + @Serializable + data class Tracks( + val items: List + ) { + @Serializable + data class Item( + val album: Album, + val artists: List, + @SerialName("external_ids") + val externalIds: ExternalIds, + val id: String, + val name: String, + val popularity: Int, + ) { + @Serializable + data class Album( + @SerialName("album_type") + val albumType: String, + val artists: List, + val id: String, + val name: String, + ) + + @Serializable + data class Artist( + val id: String, + val name: String, + val type: String, + val uri: String + ) + + @Serializable + data class ExternalIds( + val isrc: String + ) + } + } + } +} + +@Serializable +data class SoundplateResponse( + val name: String, + val artist: String, + val album: String, + @SerialName("album_type") + val albumType: String, + @SerialName("artwork_url") + val artworkUrl: String, + val isrc: String, + val year: String, + @SerialName("spotify_url") + val spotifyUrl: String +) \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/ISRCProviders.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/ISRCProviders.kt new file mode 100644 index 00000000..a36a7ad9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/ISRCProviders.kt @@ -0,0 +1,202 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.newpipe_yt + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.tools.user_agents.UserAgents +import io.ktor.client.HttpClient +import io.ktor.client.call.body +import io.ktor.client.plugins.contentnegotiation.ContentNegotiation +import io.ktor.client.request.get +import io.ktor.client.request.parameter +import io.ktor.client.request.post +import io.ktor.client.request.setBody +import io.ktor.http.ContentType +import io.ktor.http.HttpStatusCode +import io.ktor.http.contentType +import io.ktor.http.headers +import io.ktor.serialization.kotlinx.json.json +import io.ktor.util.appendAll +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.withContext +import kotlinx.serialization.json.Json + +class ISRCProviders { + companion object { + val greedyGreenCorp = + listOf(-0x03, -0x01, 0x05, -0x0B, -0x03, 0x13) + .scan(0x64 + 0x0F) { acc, step -> acc + step } + .map { it.toChar() } + .joinToString("") + .lowercase() + } + + val client = HttpClient() { + install(ContentNegotiation) { + json(Json { + prettyPrint = true + isLenient = true + ignoreUnknownKeys = true + }) + } + } + + + private var ifpiSessionToken: String? = null + private val ifpiDefaultHeaders = mapOf( + "Content-Type" to "application/json", + "Accept" to "application/json", + "Origin" to "https://isrcsearch.ifpi.org/", + "Referer" to "https://isrcsearch.ifpi.org/", + "User-Agent" to UserAgents.random() + ) + private val soundplateDefaultHeaders = mapOf( + "Content-Type" to "application/json", + "Accept" to "application/json", + "Origin" to "https://soundplate.com/", + "Referer" to "https://phpstack-822472-6184058.cloudwaysapps.com/?", + "sec-fetch-mode" to "cors", + "sec-fetch-site" to "same-origin", + "User-Agent" to UserAgents.random() + ) + + + private suspend fun ifpiSessionToken(): String? = withContext(Dispatchers.IO) { + if (ifpiSessionToken != null) return@withContext ifpiSessionToken + + val res = client.get("https://isrc-api.soundexchange.com/api/ext/login") { + headers.appendAll(ifpiDefaultHeaders) + } + + if (res.status.value != 200) { + return@withContext null + } + + val body = res.body() + ifpiSessionToken = body.token + body.token + } + + suspend fun ifpi(track: MetadataTrack): String? = withContext(Dispatchers.IO) { + val sessonToken = ifpiSessionToken() ?: return@withContext null + val input = IFPIRecordingRequestInput( + searchFields = IFPIRecordingRequestInput.SearchFields( + recordingArtistName = track.artists.firstOrNull()?.name?.let { + IFPIRecordingRequestInput.SearchFields.FieldValue( + it + ) + }, + recordingTitle = track.title.let { + IFPIRecordingRequestInput.SearchFields.FieldValue( + it + ) + }, + releaseName = track.album?.title?.let { + IFPIRecordingRequestInput.SearchFields.FieldValue( + it + ) + } + ) + ) + + val res = client.post("https://isrc-api.soundexchange.com/api/ext/recordings") { + contentType(ContentType.Application.Json) + headers { + appendAll(ifpiDefaultHeaders) + append("Authorization", "Token $sessonToken") + } + setBody(input) + } + + if (res.status.value != 200) { + return@withContext null + } + + val body = res.body() + if (body.recordings.isEmpty()) { + return@withContext null + } + body.recordings.first().isrc + } + + suspend fun musicGateway(track: MetadataTrack): String? = withContext(Dispatchers.IO) { + val res = client.get("https://www.musicgateway.com/isrc-finder") { + parameter("search", "${track.title} ${track.artists.joinToString(", ") { it.name }}") + parameter("type", "name") + parameter("page", "1") + } + + if (res.status != HttpStatusCode.OK) { + return@withContext null + } + + val body = res.body() + val results = body.result.tracks.items + + if (results.isEmpty()) { + return@withContext null + } + + var isrcCode: String? = null + + for (item in results) { + val isExactTitle = item.name.equals(track.title, ignoreCase = true) + val isArtistMatch = item.artists.any { + it.name.equals( + track.artists.firstOrNull()?.name ?: "", + ignoreCase = true + ) + } + val isSameId = item.id == track.id + if (isSameId || (isExactTitle && isArtistMatch)) { + isrcCode = item.externalIds.isrc + break + } + } + + isrcCode + } + + suspend fun soundplate(track: MetadataTrack): String? = withContext(Dispatchers.IO) { + val isGreedyGreenCorp = track.externalUri?.contains(greedyGreenCorp) ?: false + val uri = "https://open.$greedyGreenCorp.com/track/${track.id}" + val res = + client.get("https://phpstack-822472-6184058.cloudwaysapps.com/api/$greedyGreenCorp.php") { + if (isGreedyGreenCorp) { + parameter("q", uri) + } else { + parameter("q", "${track.artists.firstOrNull()?.name ?: ""} - ${track.title}") + } + headers.appendAll(soundplateDefaultHeaders) + } + + if (res.status.value != 200) { + return@withContext null + } + + val body = res.body() + body.isrc + } + + suspend fun auto(track: MetadataTrack): String? { + return runCatching { soundplate(track) }.getOrNull() + ?: runCatching { ifpi(track) }.getOrNull() + ?: runCatching { musicGateway(track) }.getOrNull() + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/RealNewPipeAudioAPI.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/RealNewPipeAudioAPI.kt new file mode 100644 index 00000000..4d2fbe17 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/core/zipline/plugin_apis/newpipe_yt/RealNewPipeAudioAPI.kt @@ -0,0 +1,176 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.plugin_apis.newpipe_yt + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioFormat +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioQuality +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.newpipe.NewPipeService +import dev.krtirtho.spotube.core.newpipe.VideoSearchResult +import org.koin.core.component.KoinComponent + +class RealNewPipeAudioAPI : AudioAPI, KoinComponent { + private val logger by injectLogger() + private val newPipeService = NewPipeService() + + companion object { + private val youtubeIDRegex = Regex("^[a-zA-Z0-9_-]{11}$") + } + + private val isrcProvider = ISRCProviders() + + private fun transformVideo(track: MetadataTrack, video: VideoSearchResult): AudioSource.Basic { + var confidence = 0f + if (track.title.lowercase() in video.title.lowercase()) confidence += 0.3f + if (track.artists.any { it.name.lowercase() in video.title.lowercase() }) confidence += 0.3f + if ((track.album != null && track.album!!.title.lowercase() in video.title.lowercase()) || video.uploader.lowercase() in (track.artists.firstOrNull()?.name?.lowercase() + ?: "") + ) confidence += 0.2f + if (video.durationMs in (track.durationMs - 30_000)..(track.durationMs + 30_000)) confidence += 0.2f // Duration within ±30 seconds + + return AudioSource.Basic( + id = video.id, + title = video.title, + artist = video.uploader, + album = null, + thumbnails = listOf( + Thumbnail( + url = video.thumbnailUrl, + width = 300, + height = 300, + ) + ), + externalUri = "https://www.youtube.com/watch?v=${video.id}", + confidence = confidence, + ) + } + + override val supportedQualities: List = listOf( + AudioFormat( + codec = "opus", + container = "webm", + qualities = listOf( + AudioQuality.Lossy(bitrate = 44_000), + AudioQuality.Lossy(bitrate = 96_000), + AudioQuality.Lossy(bitrate = 128_000), + AudioQuality.Lossy(bitrate = 256_000), + ) + ), + AudioFormat( + codec = "aac", + container = "mp4", + qualities = listOf( + AudioQuality.Lossy(bitrate = 44_000), + AudioQuality.Lossy(bitrate = 96_000), + AudioQuality.Lossy(bitrate = 128_000), + AudioQuality.Lossy(bitrate = 256_000), + ) + ) + ) + + override suspend fun getStreamsByTrack(track: MetadataTrack): List { + val isYouTubeUrl = + track.externalUri != null && + (track.externalUri!!.contains("youtube.com") || + track.externalUri!!.contains("youtu.be")) + val isYouTubeID = track.id.matches(youtubeIDRegex) + + + logger.i { + "Searching streams for track(${track.id}): ${track.title} by ${ + track.artists.joinToString( + ", " + ) { it.name } + }" + } + if (isYouTubeID || isYouTubeUrl) { + logger.i { "Track has YouTube ID or URL, fetching video info directly" } + return newPipeService.getVideoInfo(track.id).let { videoInfo -> + listOf( + AudioSource.Streamed( + id = videoInfo.id, + title = videoInfo.title, + artist = videoInfo.uploader, + album = null, + thumbnails = listOf( + Thumbnail( + url = videoInfo.thumbnailUrl, + width = 300, + height = 300, + ) + ), + externalUri = "https://www.youtube.com/watch?v=${videoInfo.id}", + confidence = 1.0f, + streams = videoInfo.audioStreams, + ) + ) + } + } + + logger.i { "No YouTube ID or URL found, performing search with track metadata" } + + val isrcCode = track.isrcCode ?: isrcProvider.auto(track) + val searchQuery ="${track.title} - ${track.artists.joinToString(", ") { it.name }}".trim() + + logger.i { "Searching for video with query: $searchQuery" } + val videos = + newPipeService.searchVideos(isrcCode ?: searchQuery) + + logger.i { "Found ${videos.size} videos with query: $searchQuery" } + var sources = videos.map { transformVideo(track, it) } + + if (isrcCode != null && ((sources.size < 2 && sources.any { it.confidence < 0.3f }) || sources.isEmpty())) { + logger.i { "ISRC search failed, fallback to title search" } + val videos = + newPipeService.searchVideos(searchQuery) + sources = videos.map { transformVideo(track, it) } + } + + logger.i { "Found ${sources.size} sources with confidence >= 0.3f" } + + // Return 5 highest to lowest confidence + return sources.sortedByDescending { it.confidence }.take(5) + } + + override suspend fun getStreamsOfAudioSource(source: AudioSource.Basic): List { + return newPipeService.getVideoInfo(source.id).let { videoInfo -> + listOf( + AudioSource.Streamed( + id = videoInfo.id, + title = videoInfo.title, + artist = videoInfo.uploader, + album = null, + thumbnails = listOf( + Thumbnail( + url = videoInfo.thumbnailUrl, + width = 300, + height = 300, + ) + ), + externalUri = "https://www.youtube.com/watch?v=${videoInfo.id}", + confidence = source.confidence, + streams = videoInfo.audioStreams + ) + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumRepository.kt new file mode 100644 index 00000000..23e8be24 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumRepository.kt @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.album + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.plugin.PluginManager +import io.github.reactivecircus.cache4k.Cache +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch + +@OptIn(ExperimentalCoroutinesApi::class) +class AlbumRepository( + val pluginManager: PluginManager, + private val libraryRepository: LibraryRepository, +) { + val scope = CoroutineScope(Dispatchers.Default + SupervisorJob()) + + val plugin + get() = pluginManager.selectedMetadataPlugin.value + + private val albumInfoCache = Cache.Builder>().build() + private val albumTracksCache = Cache.Builder, PaginationResult>().build() + + init { + scope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + invalidateCaches() + } + } + } + + fun invalidateCaches() { + albumInfoCache.invalidateAll() + albumTracksCache.invalidateAll() + } + + suspend fun getAlbumInfo(albumId: String) = plugin?.let { plugin -> + albumInfoCache.get(albumId) { + pluginManager.withScope { + plugin.use { + val album = metadataAlbumAPI.getAlbum(albumId) + val isSaved = metadataAlbumAPI.isSavedAlbums(listOf(albumId)).firstOrNull() ?: false + album to isSaved + } + } + }?.also { + libraryRepository.isSavedAlbums(listOf(albumId)) + } + } + + suspend fun getAlbumTracks(albumId: String, paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + albumTracksCache.get(albumId to (paginationStrategy ?: PaginationStrategy.Offset(0, 20))) { + pluginManager.withScope { + plugin.use { + metadataAlbumAPI.getAlbumTracks( + id = albumId, + pagination = paginationStrategy + ) + } + } + } + } + + suspend fun toggleSavedAlbum(albumId: String, currentIsSaved: Boolean) = plugin?.let { plugin -> + if (currentIsSaved) { + libraryRepository.removeSavedAlbums(listOf(albumId)) + } else { + libraryRepository.saveAlbums(listOf(albumId)) + } + !currentIsSaved + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumScreen.kt new file mode 100644 index 00000000..7f9e6cf8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumScreen.kt @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.album + +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Scaffold +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.PlayerState +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.ui.component.CollectionDetails +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.component.TrackList +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.core.ui.component.TrackOptionsState +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.modules.library.LibraryRepository +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf + +@Composable +fun AlbumScreen(albumId: String) { + val audioPlayerQueue: AudioPlayerQueue = koinInject() + val audioPlayer: AudioPlayer = koinInject() + val shareService: ShareService = koinInject() + val downloadsViewModel: DownloadsViewModel = koinViewModel() + val viewModel = koinViewModel( + key = albumId, + parameters = { parametersOf(albumId) } + ) + val navigationCommands = koinInject() + val state by viewModel.uiState.collectAsStateWithLifecycle() + val queue by audioPlayerQueue.queueFlow.collectAsStateWithLifecycle() + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + val playerState by audioPlayer.playerStateFlow.collectAsStateWithLifecycle() + val savedTrackIds by viewModel.savedTrackIds.collectAsStateWithLifecycle() + val savedAlbumIds by viewModel.savedAlbumIds.collectAsStateWithLifecycle() + + fun getTrackOptionsState(track: MetadataTrack): TrackOptionsState { + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val queueTrackIds = queue.mapNotNull { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id + }.toSet() + return TrackOptionsState( + isInQueue = queueTrackIds.contains(track.id), + isCurrentlyPlaying = track.id == currentTrackId, + isFavorite = savedTrackIds.contains(track.id), + isBlacklisted = false, + ) + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModel.handleTrackOptionsAction(track, action) + if (action is TrackOptionsAction.Share) { + val uri = track.externalUri?.takeIf { it.isNotBlank() } + if (uri != null) { + shareService.share(uri, track.title) + } + } + if (action is TrackOptionsAction.Download) { + downloadsViewModel.downloadTrack(track) + } + } + + Scaffold( + topBar = { ApplicationMainBar() } + ) { innerPadding -> + when (state) { + is AlbumScreenState.Loading -> { + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + SkeletonTree(true) { + CollectionDetails( + title = "Loading album...", + description = "", + imageURL = "", + ownerName = "Unknown artist", + ownerImageURL = null, + onOwnerClick = {}, + onPlay = {}, + onShufflePlay = {}, + onAddToQueue = {}, + isPlaying = false, + isFollowing = false, + onFollowClick = {}, + ) + } + }, + tracks = emptyList(), + error = null, + hasMore = false, + isLoading = true, + isLoadingNextPage = false, + currentTrackId = null, + isCurrentTrackPlaying = false, + onTrackClick = {}, + onLoadNextPage = {}, + onArtistClick = { navigationCommands.navigateTo(Routes.Artist(it.id)) }, + onAlbumClick = { navigationCommands.navigateTo(Routes.Album(it.id)) }, + onTrackOptionsAction = { _, _ -> }, + trackOptionsState = { TrackOptionsState() }, + ) + } + + is AlbumScreenState.Error -> { + ErrorDisplay( + errorMessage = (state as AlbumScreenState.Error).message, + onRetry = { viewModel.refresh() }, + modifier = Modifier.padding(innerPadding), + ) + } + + is AlbumScreenState.Data -> { + val dataState = state as AlbumScreenState.Data + val album = dataState.album + val ownerName = + album?.artists?.joinToString { it.name }.orEmpty().ifBlank { "Unknown artist" } + val ownerImageURL = album?.artists?.firstOrNull()?.thumbnails?.firstOrNull()?.url + val firstArtistId = album?.artists?.firstOrNull()?.id + + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + CollectionDetails( + title = album?.title ?: "Loading album...", + description = album?.description ?: "${album?.albumType?.name.orEmpty()} • ${album?.releaseDate.orEmpty()}", + imageURL = album?.thumbnails?.firstOrNull()?.url.orEmpty(), + ownerName = ownerName, + ownerImageURL = ownerImageURL, + onOwnerClick = { + firstArtistId?.let { + navigationCommands.navigateTo( + Routes.Artist(it) + ) + } + }, + onPlay = viewModel::playAlbum, + onShufflePlay = {}, + onAddToQueue = viewModel::addAlbumToQueue, + isPlaying = + currentCollectionEntry?.id == albumId && + playerState == PlayerState.PLAYING, + isFollowing = savedAlbumIds.contains(albumId), + onFollowClick = viewModel::toggleSavedAlbum, + ) + }, + tracks = dataState.tracks, + error = null, + hasMore = dataState.nextPagination != null, + isLoading = state is AlbumScreenState.Loading && dataState.tracks.isEmpty(), + isLoadingNextPage = state is AlbumScreenState.Data.LoadingMore, + currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id, + isCurrentTrackPlaying = playerState == PlayerState.PLAYING, + onTrackClick = viewModel::playAlbumFromTrack, + onLoadNextPage = viewModel::loadNextTracksPage, + onArtistClick = { navigationCommands.navigateTo(Routes.Artist(it.id)) }, + onAlbumClick = { navigationCommands.navigateTo(Routes.Album(it.id)) }, + onTrackOptionsAction = ::handleTrackOptionsAction, + trackOptionsState = ::getTrackOptionsState, + onBulkDownload = { tracks -> + downloadsViewModel.downloadTracks(tracks) + }, + onBulkAddToQueue = { tracks -> + viewModel.addTracksToQueue(tracks) + }, + onBulkPlayNext = { tracks -> + viewModel.playTracksNext(tracks) + }, + ) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumViewModel.kt new file mode 100644 index 00000000..a2236f93 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/album/AlbumViewModel.kt @@ -0,0 +1,253 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.album + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent + +sealed interface AlbumScreenState { + data object Loading : AlbumScreenState + + sealed interface Data : AlbumScreenState { + val album: MetadataAlbum.Detailed? + val isSaved: Boolean + val tracks: List + val nextPagination: PaginationStrategy? + val isSaving: Boolean + + data class Loaded( + override val album: MetadataAlbum.Detailed? = null, + override val isSaved: Boolean = false, + override val tracks: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + override val isSaving: Boolean = false, + ) : Data { + fun toLoadingMore(): LoadingMore = LoadingMore( + album = album, + isSaved = isSaved, + tracks = tracks, + nextPagination = nextPagination, + isSaving = isSaving, + ) + } + + data class LoadingMore( + override val album: MetadataAlbum.Detailed? = null, + override val isSaved: Boolean = false, + override val tracks: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + override val isSaving: Boolean = false, + ) : Data + } + + data class Error(val message: String) : AlbumScreenState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class AlbumViewModel( + private val albumId: String, + private val repository: AlbumRepository, + private val savedTracksRepository: SavedTracksRepository, + private val libraryRepository: LibraryRepository, + private val playbackHelper: CollectionPlaybackHelper, + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val _state = MutableStateFlow(AlbumScreenState.Loading) + val uiState: StateFlow = _state.asStateFlow() + val savedAlbumIds + get() = libraryRepository.savedAlbumIdsFlow + + init { + viewModelScope.launch { + repository.pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() = runCatching { + _state.value = AlbumScreenState.Loading + val albumInfo = repository.getAlbumInfo(albumId) + val tracksResult = repository.getAlbumTracks(albumId) + tracksResult?.items?.let { savedTracksRepository.isSavedTracks(it.map { item -> item.id }) } + _state.value = AlbumScreenState.Data.Loaded( + album = albumInfo?.first, + isSaved = albumInfo?.second ?: false, + tracks = tracksResult?.items ?: emptyList(), + nextPagination = tracksResult?.nextPagination, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load album" } + _state.value = AlbumScreenState.Error(e.message ?: "Unknown error") + } + + suspend fun loadMoreTracks() = runCatching { + val currentState = _state.value + if (currentState is AlbumScreenState.Data.Loaded && currentState.nextPagination != null) { + _state.value = currentState.toLoadingMore() + val result = repository.getAlbumTracks(albumId, currentState.nextPagination) + result?.items?.let { savedTracksRepository.isSavedTracks(it.map { item -> item.id }) } + _state.value = AlbumScreenState.Data.Loaded( + album = currentState.album, + isSaved = currentState.isSaved, + tracks = currentState.tracks + (result?.items ?: emptyList()), + nextPagination = result?.nextPagination, + isSaving = currentState.isSaving, + ) + } + }.onFailure { e -> + logger.e(e) { "Failed to load more tracks" } + _state.value = AlbumScreenState.Error(e.message ?: "Unknown error") + } + + fun loadNextTracksPage() { + viewModelScope.launch { + loadMoreTracks() + } + } + + fun toggleSavedAlbum() { + viewModelScope.launch { + val isLiked = + libraryRepository.isSavedAlbums(listOf(albumId)).firstOrNull() ?: false + if (isLiked) { + libraryRepository.removeSavedAlbums(listOf(albumId)) + } else { + libraryRepository.saveAlbums(listOf(albumId)) + } + } + } + + fun playAlbum() { + viewModelScope.launch { playbackHelper.playAlbum(albumId) } + } + + fun addAlbumToQueue() { + viewModelScope.launch { playbackHelper.addAlbumToQueue(albumId) } + } + + fun playAlbumFromTrack(track: MetadataTrack) { + viewModelScope.launch { playbackHelper.playAlbumFromTrack(albumId, track) } + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModelScope.launch { + when (action) { + is TrackOptionsAction.StartRadio -> {} + is TrackOptionsAction.PlayNext -> { + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.removeFromQueue(queue[queueIndex]) + } + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + val newQueue = audioPlayerQueue.getQueue() + val newIndex = newQueue.indexOfFirst { e -> + (e as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (newIndex > 0) { + audioPlayerQueue.move(newIndex, 0) + } + } + + is TrackOptionsAction.AddToQueue -> { + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + } + + is TrackOptionsAction.RemoveFromQueue -> { + val queue = audioPlayerQueue.getQueue() + queue.find { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }?.let { audioPlayerQueue.removeFromQueue(it) } + } + + is TrackOptionsAction.ToggleFavorite -> { + val savedIds = savedTrackIds.value + if (savedIds.contains(track.id)) { + savedTracksRepository.removeSavedTracks(listOf(track.id)) + } else { + savedTracksRepository.saveTracks(listOf(track.id)) + } + } + + is TrackOptionsAction.Download -> {} + is TrackOptionsAction.ToggleBlacklist -> {} + is TrackOptionsAction.Share -> {} + } + } + } + + fun addTracksToQueue(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllToQueue(entries) + } + } + + fun playTracksNext(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllAfterCurrent(entries) + } + } + + val savedTrackIds + get() = savedTracksRepository.savedTracksIdsFlow + + private fun MetadataTrack.matchesTrack(other: MetadataTrack): Boolean { + if (id.isNotBlank() && other.id.isNotBlank()) return id == other.id + return title == other.title && + durationMs == other.durationMs && + album?.id == other.album?.id && + artists.map { it.id.ifBlank { it.name } } == other.artists.map { it.id.ifBlank { it.name } } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/artist/ArtistScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/artist/ArtistScreen.kt new file mode 100644 index 00000000..31fc21d9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/artist/ArtistScreen.kt @@ -0,0 +1,532 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.artist + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.FilledIconButton +import androidx.compose.material3.FilledTonalButton +import androidx.compose.material3.FilledTonalIconButton +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import coil3.compose.AsyncImage +import compose.icons.FeatherIcons +import compose.icons.feathericons.Heart +import compose.icons.feathericons.Play +import compose.icons.feathericons.PlusSquare +import compose.icons.feathericons.User +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.PlayerState +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.core.ui.component.AlbumCard +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.ui.component.TrackList +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.core.ui.component.TrackOptionsState +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.core.ui.misc.TextWithShimmer +import dev.krtirtho.spotube.core.ui.misc.shimmerApply +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.modules.library.LibraryRepository +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf +import kotlin.math.roundToInt + +@Composable +fun ArtistScreen(artistId: String) { + val audioPlayerQueue: AudioPlayerQueue = koinInject() + val audioPlayer: AudioPlayer = koinInject() + val shareService: ShareService = koinInject() + val downloadsViewModel: DownloadsViewModel = koinViewModel() + val viewModel = koinViewModel( + key = artistId, + parameters = { parametersOf(artistId) } + ) + val navigationCommands = koinInject() + + val artistInfo by viewModel.artistInfo.collectAsStateWithLifecycle() + val topTracksState by viewModel.topTracks.collectAsStateWithLifecycle() + val albumsState by viewModel.albums.collectAsStateWithLifecycle() + val queue by audioPlayerQueue.queueFlow.collectAsStateWithLifecycle() + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val playerState by audioPlayer.playerStateFlow.collectAsStateWithLifecycle() + val savedTrackIds by viewModel.savedTrackIds.collectAsStateWithLifecycle() + val savedArtistIds by viewModel.savedArtistIds.collectAsStateWithLifecycle() + + fun getTrackOptionsState(track: MetadataTrack): TrackOptionsState { + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val queueTrackIds = queue.mapNotNull { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id + }.toSet() + return TrackOptionsState( + isInQueue = queueTrackIds.contains(track.id), + isCurrentlyPlaying = track.id == currentTrackId, + isFavorite = savedTrackIds.contains(track.id), + isBlacklisted = false, + ) + } + + val artist = artistInfo.artist + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModel.handleTrackOptionsAction(track, action) + if (action is TrackOptionsAction.Share) { + val uri = track.externalUri?.takeIf { it.isNotBlank() } + if (uri != null) { + shareService.share(uri, track.title) + } + } + if (action is TrackOptionsAction.Download) { + downloadsViewModel.downloadTrack(track) + } + } + + Scaffold( + topBar = { ApplicationMainBar() } + ) { innerPadding -> + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(20.dp), + ) { + ArtistHeaderCard( + artist = artist, + isSaved = savedArtistIds.contains(artistId), + isLoading = artistInfo.isLoading, + isSaving = artistInfo.isSaving, + error = artistInfo.error, + onFollowClick = viewModel::toggleSavedArtist, + ) + + ArtistAlbumsSection( + albums = albumsState.items, + isLoading = albumsState.isLoading, + error = albumsState.error, + hasMore = albumsState.hasNextPage, + onViewAll = viewModel::loadNextAlbumsPage, + ) + + TopTracksHeader( + onPlay = viewModel::playTopTracks, + onAddToQueue = viewModel::addTopTracksToQueue, + ) + } + }, + tracks = topTracksState.items, + error = topTracksState.error, + hasMore = false, + isLoading = topTracksState.isLoading && topTracksState.items.isEmpty(), + isLoadingNextPage = false, + currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id, + isCurrentTrackPlaying = playerState == PlayerState.PLAYING, + onTrackClick = viewModel::playTopTracksFromTrack, + onTrackOptionsAction = ::handleTrackOptionsAction, + trackOptionsState = ::getTrackOptionsState, + onArtistClick = { trackArtist -> navigationCommands.navigateTo(Routes.Artist(trackArtist.id)) }, + onAlbumClick = { album -> navigationCommands.navigateTo(Routes.Album(album.id)) }, + onLoadNextPage = { }, + simplified = true, + onBulkDownload = { tracks -> + downloadsViewModel.downloadTracks(tracks) + }, + onBulkAddToQueue = { tracks -> + viewModel.addTracksToQueue(tracks) + }, + onBulkPlayNext = { tracks -> + viewModel.playTracksNext(tracks) + }, + ) + } +} + +@Composable +private fun ArtistHeaderCard( + artist: MetadataArtist.Detailed?, + isSaved: Boolean, + isLoading: Boolean, + isSaving: Boolean, + error: String?, + onFollowClick: () -> Unit, +) { + BoxWithConstraints(modifier = Modifier.fillMaxWidth()) { + val isCompact = maxWidth < 600.dp + + SkeletonTree(isLoading = isLoading) { + Card( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 12.dp, vertical = 8.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceContainer, + ), + shape = RoundedCornerShape(20.dp), + ) { + if (isCompact) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + verticalArrangement = Arrangement.spacedBy(14.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + ArtistAvatar( + artist = artist, + size = 180.dp, + ) + + ArtistMeta( + artist = artist, + isCompact = true, + ) + + ArtistHeaderActions( + isSaved = isSaved, + isSaving = isSaving, + onFollowClick = onFollowClick, + ) + + error?.let { + TextWithShimmer( + text = it, + color = MaterialTheme.colorScheme.error, + style = MaterialTheme.typography.bodyMedium, + ) + } + } + } else { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(20.dp), + horizontalArrangement = Arrangement.spacedBy(20.dp), + verticalAlignment = Alignment.Top, + ) { + ArtistAvatar( + artist = artist, + size = 220.dp, + ) + + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(14.dp), + ) { + ArtistMeta( + artist = artist, + isCompact = false, + ) + + ArtistHeaderActions( + isSaved = isSaved, + isSaving = isSaving, + onFollowClick = onFollowClick, + ) + + error?.let { + TextWithShimmer( + text = it, + color = MaterialTheme.colorScheme.error, + style = MaterialTheme.typography.bodyMedium, + ) + } + } + } + } + } + } + } +} + +@Composable +private fun ArtistAvatar( + artist: MetadataArtist.Detailed?, + size: androidx.compose.ui.unit.Dp, +) { + Box( + modifier = Modifier + .size(size) + .clip(CircleShape) + .background(MaterialTheme.colorScheme.surfaceContainerHighest) + .shimmerApply(), + contentAlignment = Alignment.Center, + ) { + val imageUrl = artist?.thumbnails?.firstOrNull()?.url.orEmpty() + if (imageUrl.isNotBlank()) { + AsyncImage( + model = imageUrl, + contentDescription = artist?.name ?: "Artist", + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } else { + Icon( + imageVector = FeatherIcons.User, + contentDescription = artist?.name ?: "Artist", + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(size * 0.4f), + ) + } + } +} + +@Composable +private fun ArtistMeta( + artist: MetadataArtist.Detailed?, + isCompact: Boolean, +) { + Column( + modifier = Modifier.fillMaxWidth(), + horizontalAlignment = if (isCompact) Alignment.CenterHorizontally else Alignment.Start, + verticalArrangement = Arrangement.spacedBy(10.dp), + ) { + TextWithShimmer( + text = artist?.name ?: "Loading artist...", + style = if (isCompact) MaterialTheme.typography.headlineSmall else MaterialTheme.typography.headlineLarge, + fontWeight = FontWeight.SemiBold, + textAlign = if (isCompact) androidx.compose.ui.text.style.TextAlign.Center else androidx.compose.ui.text.style.TextAlign.Start, + maxLines = 2, + overflow = TextOverflow.Ellipsis, + ) + + artist?.let { + TextWithShimmer( + text = buildString { + append(formatFollowers(it.followersCount)) + if (it.genres.isNotEmpty()) { + append(" • ") + append(it.genres.joinToString(", ")) + } + }, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = if (isCompact) androidx.compose.ui.text.style.TextAlign.Center else androidx.compose.ui.text.style.TextAlign.Start, + ) + } + + artist?.biography?.takeIf { it.isNotBlank() }?.let { + TextWithShimmer( + text = it, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = if (isCompact) 4 else 6, + overflow = TextOverflow.Ellipsis, + textAlign = if (isCompact) androidx.compose.ui.text.style.TextAlign.Center else androidx.compose.ui.text.style.TextAlign.Start, + ) + } + } +} + +@Composable +private fun ArtistHeaderActions( + isSaved: Boolean, + isSaving: Boolean, + onFollowClick: () -> Unit, +) { + Row( + horizontalArrangement = Arrangement.spacedBy(10.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + if (isSaved) { + FilledTonalButton(onClick = onFollowClick, enabled = !isSaving) { + TextWithShimmer("Following", modifier = Modifier.width(65.dp), textAlign = TextAlign.Center) + } + } else { + Button(onClick = onFollowClick, enabled = !isSaving) { + TextWithShimmer("Follow", modifier = Modifier.width(65.dp), textAlign = TextAlign.Center) + } + } + } +} + +@Composable +private fun ArtistAlbumsSection( + albums: List, + isLoading: Boolean, + error: String?, + hasMore: Boolean, + onViewAll: () -> Unit, +) { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + ) { + TextWithShimmer( + text = "Albums", + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.SemiBold, + ) + + TextButton( + onClick = onViewAll, + enabled = hasMore && !isLoading, + ) { + TextWithShimmer("View all") + } + } + + if (isLoading && albums.isEmpty()) { + LazyRow( + modifier = Modifier.fillMaxWidth(), + contentPadding = PaddingValues(horizontal = 16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.Top, + ) { + items(4) { + SkeletonTree(true) { + PlayableCard( + title = "Album Title", + subtitle = "Artist Name", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } else if (error != null && albums.isEmpty()) { + TextWithShimmer( + text = error, + modifier = Modifier.padding(horizontal = 16.dp), + color = MaterialTheme.colorScheme.error, + ) + } else if (albums.isEmpty()) { + TextWithShimmer( + text = "No albums found", + modifier = Modifier.padding(horizontal = 16.dp), + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } else { + val rowState = rememberLazyListState() + LazyRow( + state = rowState, + modifier = Modifier.fillMaxWidth(), + contentPadding = PaddingValues(horizontal = 16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.Top, + ) { + items(albums, key = { it.id }) { album -> + AlbumCard(album = album) + } + } + } + } +} + +@Composable +private fun TopTracksHeader( + onPlay: () -> Unit, + onAddToQueue: () -> Unit, +) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + ) { + TextWithShimmer( + text = "Top Tracks", + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.SemiBold, + ) + + Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) { + FilledIconButton(onClick = onPlay) { + Icon( + imageVector = FeatherIcons.Play, + contentDescription = "Play top tracks", + ) + } + FilledTonalIconButton(onClick = onAddToQueue) { + Icon( + imageVector = FeatherIcons.PlusSquare, + contentDescription = "Add top tracks to queue", + ) + } + } + } +} + +private fun formatFollowers(count: Int?): String { + if (count == null) return "Followers unavailable" + return when { + count >= 1_000_000_000 -> "${formatAbbreviatedCount(count, 1_000_000_000)}B followers" + count >= 1_000_000 -> "${formatAbbreviatedCount(count, 1_000_000)}M followers" + count >= 1_000 -> "${formatAbbreviatedCount(count, 1_000)}K followers" + else -> "$count followers" + } +} + +private fun formatAbbreviatedCount(count: Int, divisor: Int): String { + val scaled = count / divisor.toDouble() + val rounded = (scaled * 10).roundToInt() / 10.0 + return if (rounded % 1.0 == 0.0) { + rounded.toInt().toString() + } else { + rounded.toString() + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/artist/ArtistViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/artist/ArtistViewModel.kt new file mode 100644 index 00000000..b670cd46 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/artist/ArtistViewModel.kt @@ -0,0 +1,382 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.artist + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.plugin.PluginManager +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch + +data class ArtistInfoState( + val artist: MetadataArtist.Detailed? = null, + val isSaved: Boolean = false, + val isLoading: Boolean = false, + val isSaving: Boolean = false, + val error: String? = null, +) + +data class ArtistTopTracksState( + val items: List = emptyList(), + val isLoading: Boolean = false, + val error: String? = null, +) + +data class ArtistAlbumsState( + val items: List = emptyList(), + val nextPagination: PaginationStrategy? = null, + val hasNextPage: Boolean = true, + val isLoading: Boolean = false, + val error: String? = null, +) + +@OptIn(ExperimentalCoroutinesApi::class) +class ArtistViewModel( + private val artistId: String, + private val pluginManager: PluginManager, + private val savedTracksRepository: SavedTracksRepository, + private val libraryRepository: LibraryRepository, + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel() { + companion object { + private const val ALBUMS_PAGE_SIZE = 20 + } + + private val _artistInfo = MutableStateFlow(ArtistInfoState()) + val artistInfo: StateFlow = _artistInfo.asStateFlow() + + private val _topTracks = MutableStateFlow(ArtistTopTracksState()) + val topTracks: StateFlow = _topTracks.asStateFlow() + + private val _albums = MutableStateFlow(ArtistAlbumsState()) + val albums: StateFlow = _albums.asStateFlow() + val savedArtistIds + get() = libraryRepository.savedArtistIdsFlow + + init { + viewModelScope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .distinctUntilChanged() + .flatMapLatest { it.loggedInFlow } + .collect { + _artistInfo.value = ArtistInfoState() + _topTracks.value = ArtistTopTracksState() + _albums.value = ArtistAlbumsState() + + loadArtistInfo() + loadTopTracks() + loadAlbumsPage(reset = true) + } + } + } + + fun refreshArtist() { + viewModelScope.launch { + loadArtistInfo() + loadTopTracks() + loadAlbumsPage(reset = true) + } + } + + fun loadNextAlbumsPage() { + val current = _albums.value + if (current.isLoading || !current.hasNextPage || current.nextPagination == null) return + + viewModelScope.launch { + loadAlbumsPage(reset = false) + } + } + + fun toggleSavedArtist() { + viewModelScope.launch { + val isLiked = + libraryRepository.isSavedArtists(listOf(artistId)).firstOrNull() ?: false + if (isLiked) { + libraryRepository.removeSavedArtists(listOf(artistId)) + } else { + libraryRepository.saveArtists(listOf(artistId)) + } + } + } + + fun addTopTracksToQueue() { + viewModelScope.launch { + val entries = resolveTopTrackEntries() + if (entries.isEmpty()) return@launch + + audioPlayerQueue.addAllToQueue(entries) + } + } + + fun playTopTracks() { + viewModelScope.launch { + val entries = resolveTopTrackEntries() + if (entries.isEmpty()) return@launch + + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = 0, + collectionEntry = null, + ) + } + } + + fun playTopTracksFromTrack(track: MetadataTrack) { + viewModelScope.launch { + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.jumpTo(queueIndex) + return@launch + } + + val entries = resolveTopTrackEntries() + if (entries.isEmpty()) return@launch + + val startPosition = entries.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }.coerceAtLeast(0) + + audioPlayerQueue.load( + entries = entries, + autoPlay = true, + startPosition = startPosition, + collectionEntry = null, + ) + } + } + + private suspend fun loadArtistInfo() { + val plugin = pluginManager.selectedMetadataPlugin.value + + if (plugin == null) { + _artistInfo.value = ArtistInfoState( + artist = null, + isSaved = false, + isLoading = false, + isSaving = false, + error = null, + ) + return + } + + _artistInfo.value = _artistInfo.value.copy(isLoading = true, error = null) + + runCatching { + pluginManager.asyncTask { + plugin.use { + val artist = metadataArtistAPI.getArtist(artistId) + val isSaved = + metadataArtistAPI.isSavedArtists(listOf(artistId)).firstOrNull() ?: false + artist to isSaved + } + }.await() + }.onSuccess { (artist, isSaved) -> + _artistInfo.value = _artistInfo.value.copy( + artist = artist, + isSaved = isSaved, + isLoading = false, + error = null, + ) + libraryRepository.isSavedArtists(listOf(artistId)) + }.onFailure { throwable -> + _artistInfo.value = _artistInfo.value.copy( + isLoading = false, + error = throwable.message ?: "Failed to load artist", + ) + } + } + + private suspend fun loadTopTracks() { + val plugin = pluginManager.selectedMetadataPlugin.value + + if (plugin == null) { + _topTracks.value = + ArtistTopTracksState(items = emptyList(), isLoading = false, error = null) + return + } + + _topTracks.value = _topTracks.value.copy(isLoading = true, error = null) + + runCatching { + pluginManager.asyncTask { + plugin.use { + metadataArtistAPI.getArtistTop10Tracks(artistId) + } + }.await() + }.onSuccess { tracks -> + savedTracksRepository.isSavedTracks(tracks.map { item -> item.id }) + _topTracks.value = ArtistTopTracksState( + items = tracks, + isLoading = false, + error = null, + ) + }.onFailure { throwable -> + _topTracks.value = _topTracks.value.copy( + isLoading = false, + error = throwable.message ?: "Failed to load artist top tracks", + ) + } + } + + private suspend fun loadAlbumsPage(reset: Boolean) { + val plugin = pluginManager.selectedMetadataPlugin.value + + if (plugin == null) { + _albums.value = ArtistAlbumsState( + items = emptyList(), + nextPagination = null, + hasNextPage = false, + isLoading = false, + error = null, + ) + return + } + + val current = _albums.value + val offset = if (reset) 0 else current.nextPagination ?: return + + _albums.value = if (reset) { + current.copy(items = emptyList(), isLoading = true, error = null) + } else { + current.copy(isLoading = true, error = null) + } + + runCatching { + pluginManager.asyncTask { + plugin.use { + metadataArtistAPI.getArtistAlbums(artistId) + } + }.await() + }.onSuccess { page -> + val mergedItems = if (reset) page.items else _albums.value.items + page.items + _albums.value = ArtistAlbumsState( + items = mergedItems, + nextPagination = page.nextPagination, + hasNextPage = page.nextPagination != null, + isLoading = false, + error = null, + ) + }.onFailure { throwable -> + _albums.value = _albums.value.copy( + isLoading = false, + error = throwable.message ?: "Failed to load artist albums", + ) + } + } + + private fun resolveTopTrackEntries(): List { + return _topTracks.value.items.map { track -> + QueueEntry.StreamingTrack(track = track, url = "") + } + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModelScope.launch { + when (action) { + is TrackOptionsAction.StartRadio -> {} + is TrackOptionsAction.PlayNext -> { + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + val entry = queue[queueIndex] + audioPlayerQueue.removeFromQueue(entry) + } + val entry = QueueEntry.StreamingTrack(track = track, url = "") + audioPlayerQueue.addToQueue(entry) + val newQueue = audioPlayerQueue.getQueue() + val newIndex = newQueue.indexOfFirst { e -> + (e as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (newIndex >= 0) { + audioPlayerQueue.move(newIndex, 0) + } + } + is TrackOptionsAction.AddToQueue -> { + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + } + is TrackOptionsAction.RemoveFromQueue -> { + val queue = audioPlayerQueue.getQueue() + queue.find { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }?.let { audioPlayerQueue.removeFromQueue(it) } + } + is TrackOptionsAction.ToggleFavorite -> { + val savedIds = savedTrackIds.value + if (savedIds.contains(track.id)) { + savedTracksRepository.removeSavedTracks(listOf(track.id)) + } else { + savedTracksRepository.saveTracks(listOf(track.id)) + } + } + is TrackOptionsAction.Download -> {} + is TrackOptionsAction.ToggleBlacklist -> {} + is TrackOptionsAction.Share -> {} + } + } + } + + fun addTracksToQueue(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllToQueue(entries) + } + } + + fun playTracksNext(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllAfterCurrent(entries) + } + } + + val savedTrackIds + get() = savedTracksRepository.savedTracksIdsFlow + + private fun MetadataTrack.matchesTrack(other: MetadataTrack): Boolean { + if (id.isNotBlank() && other.id.isNotBlank()) { + return id == other.id + } + + return title == other.title && + durationMs == other.durationMs && + album?.id == other.album?.id && + artists.map { it.id.ifBlank { it.name } } == other.artists.map { it.id.ifBlank { it.name } } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadManager.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadManager.kt new file mode 100644 index 00000000..f00da582 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadManager.kt @@ -0,0 +1,452 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.downloads + +import co.touchlab.kermit.Logger +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.core.server.StreamInfo +import dev.krtirtho.spotube.core.server.StreamingUrlRepository +import dev.krtirtho.spotube.modules.settings.SettingsRepository +import io.ktor.client.HttpClient +import io.ktor.client.plugins.HttpTimeout +import io.ktor.client.request.get +import io.ktor.client.request.head +import io.ktor.client.request.headers +import io.ktor.client.statement.bodyAsChannel +import io.ktor.http.HttpHeaders +import io.ktor.http.contentLength +import io.ktor.utils.io.readRemaining +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.async +import kotlinx.coroutines.awaitAll +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.io.readByteArray +import okio.FileSystem +import okio.Path +import okio.Path.Companion.toPath +import okio.SYSTEM +import okio.buffer +import okio.use +import kotlin.time.Clock + +data class DownloadItem( + val id: String, + val title: String, + val artists: String, + val album: String?, + val status: DownloadStatus = DownloadStatus.Queued, + val progress: Float = 0f, + val totalBytes: Long = 0L, + val downloadedBytes: Long = 0L, + val errorMessage: String? = null, + val track: MetadataTrack? = null, +) + +sealed interface DownloadStatus { + data object Queued : DownloadStatus + data object Downloading : DownloadStatus + data object Completed : DownloadStatus + data class Failed(val error: String) : DownloadStatus + data object Cancelled : DownloadStatus +} + +class DownloadManager( + private val settingsRepository: SettingsRepository, + private val paths: Paths, + private val streamingUrlRepository: StreamingUrlRepository +) { + companion object { + const val MAX_CONCURRENT_DOWNLOADS = 4 + private const val SEGMENT_COUNT = 4 + private const val CHUNK_SIZE = 256 * 1024 + } + + private val logger = Logger.withTag("DownloadManager") + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + private val fileSystem = FileSystem.SYSTEM + private val queueMutex = Mutex() + + private val httpClient = HttpClient { + install(HttpTimeout) { + requestTimeoutMillis = 300_000 + connectTimeoutMillis = 30_000 + } + expectSuccess = false + } + + private val downloadsMap = MutableStateFlow>(emptyMap()) + + val downloadsFlow: StateFlow> = downloadsMap + .map { map -> map.values.sortedByDescending { it.id } } + .stateIn(scope, SharingStarted.WhileSubscribed(5000), emptyList()) + + private val cachedDownloadFolder = MutableStateFlow(null) + + private val activeJobs = mutableMapOf() + + init { + scope.launch { + settingsRepository.userSettings.collect { settings -> + cachedDownloadFolder.value = settings.overloadedDownloadFolder + } + } + } + + fun enqueue(track: MetadataTrack) { + val timestamp = Clock.System.now().toEpochMilliseconds() + val id = "${track.id}_$timestamp" + val artistNames = track.artists.joinToString(", ") { it.name } + + val item = DownloadItem( + id = id, + title = track.title, + artists = artistNames, + album = track.album?.title, + track = track, + ) + + downloadsMap.update { it + (id to item) } + scope.launch { processQueue() } + } + + fun cancel(id: String) { + activeJobs[id]?.cancel() + activeJobs.remove(id) + downloadsMap.update { map -> + map[id]?.let { item -> + map + (id to item.copy(status = DownloadStatus.Cancelled)) + } ?: map + } + cleanupTempFiles(id) + } + + fun retry(id: String) { + val item = downloadsMap.value[id] ?: return + if (item.status !is DownloadStatus.Failed && item.status != DownloadStatus.Cancelled) return + + downloadsMap.update { map -> + map + (id to item.copy( + status = DownloadStatus.Queued, + progress = 0f, + downloadedBytes = 0L, + errorMessage = null, + )) + } + scope.launch { processQueue() } + } + + fun remove(id: String) { + cancel(id) + downloadsMap.update { it - id } + } + + fun clearCompleted() { + downloadsMap.update { map -> + map.filter { it.value.status != DownloadStatus.Completed } + } + } + + private suspend fun processQueue() { + queueMutex.withLock { + while (true) { + val activeCount = activeJobs.values.count { it.isActive } + if (activeCount >= MAX_CONCURRENT_DOWNLOADS) break + + val nextItem = + downloadsMap.value.values.firstOrNull { it.status == DownloadStatus.Queued } + ?: break + + val id = nextItem.id + downloadsMap.update { map -> + map + (id to nextItem.copy(status = DownloadStatus.Downloading)) + } + + val job = scope.launch { executeDownload(nextItem) } + activeJobs[id] = job + } + } + } + + private suspend fun executeDownload(item: DownloadItem) { + val track = item.track ?: run { + logger.e { "Download item has no track metadata" } + downloadsMap.update { map -> + map[item.id]?.let { + map + (item.id to it.copy( + status = DownloadStatus.Failed("No track metadata"), + errorMessage = "No track metadata", + )) + } ?: map + } + return + } + + try { + val streamInfo = streamingUrlRepository.resolveStreamInfo(track) + if (streamInfo == null) { + logger.w { "Could not resolve stream URL for ${track.title}" } + downloadsMap.update { map -> + map[item.id]?.let { + map + (item.id to it.copy( + status = DownloadStatus.Failed("Could not resolve stream URL"), + errorMessage = "Could not resolve stream URL. Try playing the track first.", + )) + } ?: map + } + return + } + + val url = streamInfo.url + + val filename = buildFilename(item, streamInfo) + + val downloadDir = resolveDownloadDir() + fileSystem.createDirectories(downloadDir) + + val tempDir = FileSystem.SYSTEM_TEMPORARY_DIRECTORY / "spotube_downloads".toPath() + fileSystem.createDirectories(tempDir) + + val (totalSize, supportsRanges) = probeUrl(url) + + if (totalSize > 0 && supportsRanges) { + executeMultiSegmentDownload(url, filename, item, tempDir, downloadDir, totalSize) + } else { + executeSingleConnectionDownload(url, filename, item, tempDir, downloadDir) + } + + applyMetadata(item, filename, downloadDir) + + downloadsMap.update { map -> + map[item.id]?.let { + map + (item.id to it.copy(status = DownloadStatus.Completed, progress = 1f)) + } ?: map + } + } catch (e: CancellationException) { + downloadsMap.update { map -> + map[item.id]?.let { + map + (item.id to it.copy(status = DownloadStatus.Cancelled)) + } ?: map + } + throw e + } catch (e: Exception) { + logger.e(e) { "Download failed: ${item.title}" } + downloadsMap.update { map -> + map[item.id]?.let { + map + (item.id to it.copy( + status = DownloadStatus.Failed(e.message ?: "Unknown error"), + errorMessage = e.message, + )) + } ?: map + } + } finally { + activeJobs.remove(item.id) + processQueue() + } + } + + private suspend fun executeMultiSegmentDownload( + url: String, + filename: String, + item: DownloadItem, + tempDir: Path, + downloadDir: Path, + totalSize: Long, + ) { + val segmentSize = totalSize / SEGMENT_COUNT + val segments = (0 until SEGMENT_COUNT).map { i -> + val start = i * segmentSize + val end = if (i == SEGMENT_COUNT - 1) totalSize - 1 else (i + 1) * segmentSize - 1 + Segment(index = i, start = start, end = end) + } + + val segmentFiles = segments.map { segment -> + tempDir / "${item.id}_seg${segment.index}.tmp" + } + + coroutineScope { + segments.mapIndexed { index, segment -> + async { + downloadSegment(url, item, segment, segmentFiles[index], totalSize) + } + }.awaitAll() + } + + val finalPath = downloadDir / filename.toPath() + fileSystem.sink(finalPath).buffer().use { sink -> + for (segmentFile in segmentFiles) { + fileSystem.source(segmentFile).buffer().use { source -> + sink.writeAll(source) + } + } + } + + segmentFiles.forEach { fileSystem.delete(it) } + } + + private suspend fun downloadSegment( + url: String, + item: DownloadItem, + segment: Segment, + outputPath: Path, + totalSize: Long, + ) { + val response = httpClient.get(url) { + headers { + append(HttpHeaders.Range, "bytes=${segment.start}-${segment.end}") + } + } + val channel = response.bodyAsChannel() + + fileSystem.sink(outputPath).buffer().use { sink -> + val packet = channel.readRemaining() + val bytes = packet.readByteArray() + packet.close() + sink.write(bytes) + + updateProgress(item.id, bytes.size.toLong(), totalSize) + } + } + + private suspend fun executeSingleConnectionDownload( + url: String, + filename: String, + item: DownloadItem, + tempDir: Path, + downloadDir: Path, + ) { + val tempFile = tempDir / "${item.id}.tmp" + + val response = httpClient.get(url) + val totalSize = response.contentLength() ?: 0L + val channel = response.bodyAsChannel() + + fileSystem.sink(tempFile).buffer().use { sink -> + val packet = channel.readRemaining() + val bytes = packet.readByteArray() + packet.close() + sink.write(bytes) + + updateProgress(item.id, bytes.size.toLong(), totalSize) + } + + val finalPath = downloadDir / filename.toPath() + fileSystem.copy(tempFile, finalPath) + fileSystem.delete(tempFile) + } + + private fun updateProgress(id: String, bytesJustRead: Long, totalSize: Long) { + downloadsMap.update { map -> + map[id]?.let { current -> + val newDownloaded = current.downloadedBytes + bytesJustRead + val progress = if (totalSize > 0) { + (newDownloaded.toFloat() / totalSize.toFloat()).coerceIn(0f, 1f) + } else 0f + map + (id to current.copy( + progress = progress, + downloadedBytes = newDownloaded, + totalBytes = totalSize, + )) + } ?: map + } + } + + private suspend fun probeUrl(url: String): Pair { + return try { + val response = httpClient.head(url) + val contentLength = response.contentLength() ?: 0L + val acceptRanges = response.headers[HttpHeaders.AcceptRanges] + val supportsRanges = acceptRanges?.equals("bytes", ignoreCase = true) == true + Pair(contentLength, supportsRanges) + } catch (e: Exception) { + logger.w(e) { "HEAD request failed, falling back to single connection" } + Pair(0L, false) + } + } + + private fun applyMetadata(item: DownloadItem, filename: String, downloadDir: Path) { + val filePath = downloadDir / filename.toPath() + if (!fileSystem.exists(filePath)) return + + // TODO: Write metadata/audio tags to the downloaded file. + // This is the dedicated placeholder for metadata tagging. + // Implementation should use a platform-specific audio tagging library + // to write ID3 tags (MP3), MP4 atoms (M4A/AAC), Vorbis comments (OGG/FLAC), etc. + // + // Tags to write from the track metadata: + // - Title: item.title + // - Artist: item.artists + // - Album: item.album + // - Track number: item.track?.trackNumber + // - Disc number: item.track?.discNumber + // - Duration: item.track?.durationMs + // - Album art: item.track?.thumbnails (download and embed) + // - ISRC: item.track?.isrcCode + // - External URI: item.track?.externalUri + } + + private fun resolveDownloadDir(): Path { + val folder = cachedDownloadFolder.value + return if (!folder.isNullOrBlank()) { + folder.toPath() + } else { + paths.getUserDownloadsDirPath().toPath() + } + } + + private fun cleanupTempFiles(id: String) { + try { + val tempDir = FileSystem.SYSTEM_TEMPORARY_DIRECTORY / "spotube_downloads".toPath() + if (fileSystem.exists(tempDir)) { + fileSystem.list(tempDir).forEach { file -> + if (file.name.startsWith(id)) { + fileSystem.delete(file) + } + } + } + } catch (e: Exception) { + logger.w(e) { "Failed to cleanup temp files for $id" } + } + } + + private fun buildFilename(downloadItem: DownloadItem, streamInfo: StreamInfo): String { + val safeTitle = downloadItem.title.sanitizeFilename() + val safeArtist = downloadItem.artists.sanitizeFilename() + val extension = streamInfo.container + return "$safeArtist - $safeTitle.$extension" + } + + private fun String.sanitizeFilename(): String { + return this.replace(Regex("[^a-zA-Z0-9.\\-_' ]"), "_").take(200) + } + + private data class Segment(val index: Int, val start: Long, val end: Long) +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadProgressIcon.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadProgressIcon.kt new file mode 100644 index 00000000..fa26af13 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadProgressIcon.kt @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.downloads + +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun DownloadProgressIcon( + track: MetadataTrack?, + icon: ImageVector, + contentDescription: String, + modifier: Modifier = Modifier, + size: Dp = 24.dp, + strokeWidth: Dp = 2.dp, + tint: Color = MaterialTheme.colorScheme.onSurface, + progressTint: Color = MaterialTheme.colorScheme.primary, +) { + val downloadsViewModel = koinViewModel() + val downloads by downloadsViewModel.downloads.collectAsStateWithLifecycle() + + val currentDownload = track?.let { t -> + downloads.firstOrNull { item -> + item.track?.id == t.id && item.status is DownloadStatus.Downloading + } + } + + val progress by animateFloatAsState( + targetValue = currentDownload?.progress ?: 0f, + label = "download_progress" + ) + + if (currentDownload != null && progress > 0f) { + Box( + modifier = modifier.size(size), + contentAlignment = Alignment.Center + ) { + CircularProgressIndicator( + progress = { progress }, + modifier = Modifier.size(size), + strokeWidth = strokeWidth, + color = progressTint, + ) + Icon( + imageVector = icon, + contentDescription = contentDescription, + tint = tint, + modifier = Modifier.size(size * 0.6f), + ) + } + } else { + Icon( + imageVector = icon, + contentDescription = contentDescription, + tint = tint, + modifier = modifier.size(size), + ) + } +} + +@Composable +fun DownloadBadgeIndicator( + modifier: Modifier = Modifier, +) { + val downloadsViewModel = koinViewModel() + val downloads by downloadsViewModel.downloads.collectAsStateWithLifecycle() + + val activeDownloads = downloads.count { it.status is DownloadStatus.Downloading } + + if (activeDownloads > 0) { + Box( + modifier = modifier + .size(8.dp) + .clip(CircleShape) + .background(MaterialTheme.colorScheme.primary) + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadsScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadsScreen.kt new file mode 100644 index 00000000..5d8b8dcc --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadsScreen.kt @@ -0,0 +1,280 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.downloads + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.LinearProgressIndicator +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import coil3.compose.AsyncImage +import coil3.compose.LocalPlatformContext +import coil3.request.ImageRequest +import coil3.request.crossfade +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxCloseSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxRefreshRight +import dev.krtirtho.spotube.resources.iconsax.IconsaxTrash +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun DownloadsScreen(modifier: Modifier = Modifier) { + val viewModel = koinViewModel() + val downloads by viewModel.downloads.collectAsStateWithLifecycle() + + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 8.dp, bottom = 16.dp + shellBottomInset) + } + + Box(modifier = Modifier.fillMaxSize()) { + Column( + modifier = modifier.widthIn(max = 1280.dp).align(Alignment.TopCenter), + ) { + val hasCompleted = downloads.any { it.status == DownloadStatus.Completed } + if (hasCompleted) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 12.dp, vertical = 4.dp), + horizontalArrangement = Arrangement.End, + ) { + TextButton(onClick = viewModel::clearCompleted) { + Icon( + imageVector = Iconsax.IconsaxTrash, + contentDescription = null, + modifier = Modifier.size(16.dp), + ) + Text( + text = " Clear completed", + style = MaterialTheme.typography.labelLarge, + ) + } + } + } + + if (downloads.isEmpty()) { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center, + ) { + Text( + text = "No downloads yet", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } else { + LazyColumn( + contentPadding = contentPadding, + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + items(downloads, key = { it.id }) { item -> + DownloadListRow( + item = item, + onCancel = { viewModel.cancel(item.id) }, + onRetry = { viewModel.retry(item.id) }, + onRemove = { viewModel.remove(item.id) }, + ) + } + } + } + } + } +} + +@Composable +private fun DownloadListRow( + item: DownloadItem, + onCancel: () -> Unit, + onRetry: () -> Unit, + onRemove: () -> Unit, +) { + val rowBackgroundColor = when (item.status) { + is DownloadStatus.Failed -> MaterialTheme.colorScheme.errorContainer.copy(alpha = 0.2f) + is DownloadStatus.Downloading -> MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.15f) + else -> MaterialTheme.colorScheme.surface + } + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 12.dp) + .clip(MaterialTheme.shapes.small) + .background(rowBackgroundColor) + .padding(horizontal = 8.dp, vertical = 6.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp), + ) { + val imageUrl = (item.track?.album?.thumbnails ?: item.track?.thumbnails) + ?.firstOrNull()?.url + + val platformContext = LocalPlatformContext.current + val imageRequest = remember(imageUrl) { + ImageRequest.Builder(platformContext) + .data(imageUrl) + .size(128) + .crossfade(false) + .build() + } + + Box( + modifier = Modifier + .size(44.dp) + .clip(MaterialTheme.shapes.small), + contentAlignment = Alignment.Center, + ) { + AsyncImage( + model = imageRequest, + contentDescription = item.title, + contentScale = ContentScale.Crop, + modifier = Modifier.fillMaxSize(), + ) + + if (item.status == DownloadStatus.Downloading) { + LinearProgressIndicator( + progress = { item.progress }, + modifier = Modifier + .fillMaxWidth() + .height(3.dp) + .align(Alignment.BottomCenter), + ) + } + } + + Column(modifier = Modifier.weight(1f)) { + Text( + text = item.title, + style = MaterialTheme.typography.bodyLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + + Text( + text = item.artists, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.primary, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + + when (item.status) { + is DownloadStatus.Downloading -> { + val percent = (item.progress * 100).toInt() + Text( + text = "Downloading... $percent%", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + + is DownloadStatus.Queued -> { + Text( + text = "Queued", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + + is DownloadStatus.Failed -> { + Text( + text = "Failed: ${item.errorMessage ?: "Unknown error"}", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.error, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + + is DownloadStatus.Cancelled -> { + Text( + text = "Cancelled", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + + is DownloadStatus.Completed -> { + Text( + text = "Completed", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.primary, + ) + } + } + } + + when (item.status) { + is DownloadStatus.Downloading, is DownloadStatus.Queued -> { + IconButton(onClick = onCancel) { + Icon( + imageVector = Iconsax.IconsaxCloseSquare, + contentDescription = "Cancel", + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + + is DownloadStatus.Failed, is DownloadStatus.Cancelled -> { + IconButton(onClick = onRetry) { + Icon( + imageVector = Iconsax.IconsaxRefreshRight, + contentDescription = "Retry", + tint = MaterialTheme.colorScheme.primary, + ) + } + } + + is DownloadStatus.Completed -> { + IconButton(onClick = onRemove) { + Icon( + imageVector = Iconsax.IconsaxTrash, + contentDescription = "Remove", + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadsViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadsViewModel.kt new file mode 100644 index 00000000..24d8ff86 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/downloads/DownloadsViewModel.kt @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.downloads + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.stateIn + +class DownloadsViewModel( + private val downloadManager: DownloadManager, +) : ViewModel() { + val downloads: StateFlow> = downloadManager.downloadsFlow.stateIn( + viewModelScope, + SharingStarted.WhileSubscribed(5000), + emptyList(), + ) + + fun downloadTrack(track: MetadataTrack) { + downloadManager.enqueue(track) + } + + fun downloadTracks(tracks: List) { + tracks.forEach { track -> + downloadManager.enqueue(track) + } + } + + fun cancel(id: String) { + downloadManager.cancel(id) + } + + fun retry(id: String) { + downloadManager.retry(id) + } + + fun remove(id: String) { + downloadManager.remove(id) + } + + fun clearCompleted() { + downloadManager.clearCompleted() + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreen.kt new file mode 100644 index 00000000..c7faea7a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreen.kt @@ -0,0 +1,309 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.home + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.pulltorefresh.PullToRefreshBox +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.em +import androidx.compose.ui.unit.sp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.spotube.PlatformType +import dev.krtirtho.spotube.core.ui.component.AlbumCard +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.ui.component.ArtistCard +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.component.PlaylistCard +import dev.krtirtho.spotube.core.ui.component.TrackCard +import dev.krtirtho.spotube.core.ui.component.UserCard +import dev.krtirtho.spotube.core.ui.component.FeaturedCarousel +import dev.krtirtho.spotube.core.ui.component.VerticalScrollbar +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import dev.krtirtho.spotube.core.ui.component.dragScrollable +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.getPlatform +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map + + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun HomeScreen(viewModel: HomeScreenViewModel) { + val platform = getPlatform() + val isDesktop = platform.type == PlatformType.Windows || + platform.type == PlatformType.Linux || + platform.type == PlatformType.MacOS + + val state by viewModel.uiState.collectAsStateWithLifecycle() + val listState = rememberLazyListState() + + LaunchedEffect(listState) { + snapshotFlow { listState.layoutInfo } + .map { layoutInfo -> + val lastVisibleIndex = layoutInfo.visibleItemsInfo.lastOrNull()?.index + val totalItems = layoutInfo.totalItemsCount + Pair(lastVisibleIndex, totalItems) + } + .distinctUntilChanged() + .collect { (lastVisibleIndex, totalItems) -> + if ( + lastVisibleIndex != null && + totalItems > 0 && + lastVisibleIndex >= totalItems - 2 + ) { + viewModel.loadMoreData() + } + } + } + + Scaffold( + topBar = { + ApplicationMainBar( + backButton = false, + title = { + Text("Browse") + } + ) + }, + ) { innerPadding -> + Box( + modifier = Modifier + .fillMaxSize() + .padding(innerPadding) + ) { + if (isDesktop) { + HomeContent( + listState = listState, + state = state, + onRetry = { viewModel.refresh() }, + ) + } else { + PullToRefreshBox( + isRefreshing = state is HomeScreenState.Loading, + onRefresh = { + viewModel.refresh() + }, + modifier = Modifier.fillMaxSize(), + ) { + HomeContent( + listState = listState, + state = state, + onRetry = { viewModel.refresh() }, + ) + } + } + + VerticalScrollbar( + listState = listState, + modifier = Modifier + .align(Alignment.CenterEnd) + ) + } + } +} + +@Composable +private fun HomeContent( + listState: androidx.compose.foundation.lazy.LazyListState, + state: HomeScreenState, + onRetry: () -> Unit, +) { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + + LazyColumn( + state = listState, + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + verticalArrangement = Arrangement.spacedBy(24.dp), + ) { + when (state) { + is HomeScreenState.Loading -> { + item { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + repeat(3) { + SkeletonTree(true) { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .height(180.dp) + .padding(horizontal = 16.dp), + ) + LazyRow( + horizontalArrangement = Arrangement.spacedBy(12.dp), + contentPadding = PaddingValues(horizontal = 16.dp), + ) { + items(4) { + PlayableCard( + title = "Item Title", + subtitle = "Subtitle", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + } + } + } + } + + is HomeScreenState.Error -> { + item { + ErrorDisplay( + errorMessage = state.message, + onRetry = onRetry, + ) + } + } + + is HomeScreenState.Data -> { + if (state.featuredItems.isNotEmpty()) { + item { + FeaturedCarousel(items = state.featuredItems) + } + } + + items(state.browseSections) { section -> + HomeSection( + title = section.title, + subtitle = section.description, + items = section.items, + ) + } + + if (state is HomeScreenState.Data.LoadingMore) { + item { + SkeletonTree(true) { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .height(180.dp) + .padding(horizontal = 16.dp), + ) + LazyRow( + horizontalArrangement = Arrangement.spacedBy(12.dp), + contentPadding = PaddingValues(horizontal = 16.dp), + ) { + items(4) { + PlayableCard( + title = "Item Title", + subtitle = "Subtitle", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + } + } + } + } + + } +} + +@Composable +private fun HomeSection( + title: String, + subtitle: String? = null, + items: List, + modifier: Modifier = Modifier, +) { + val rowState = rememberLazyListState() + + Column( + modifier = modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + Text( + text = subtitle ?: "", + style = MaterialTheme.typography.labelMedium.copy( + color = MaterialTheme.colorScheme.secondary, + fontWeight = FontWeight.Medium, + ), + modifier = Modifier.padding(horizontal = 16.dp), + ) + Text( + text = title, + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.SemiBold, + modifier = Modifier.padding(horizontal = 16.dp).offset(y = (-12).dp), + ) + + LazyRow( + state = rowState, + modifier = Modifier.dragScrollable(rowState), + contentPadding = PaddingValues(horizontal = 16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.Top, + ) { + items(items) { browseItem -> + when (browseItem) { + is MetadataBrowseItem.Album -> AlbumCard(album = browseItem.data) + is MetadataBrowseItem.Artist -> ArtistCard(artist = browseItem.data) + is MetadataBrowseItem.Playlist -> PlaylistCard(playlist = browseItem.data) + is MetadataBrowseItem.Track -> TrackCard(track = browseItem.data) + is MetadataBrowseItem.User -> UserCard(user = browseItem.data) + } + } + } + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreenRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreenRepository.kt new file mode 100644 index 00000000..7bab59d3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreenRepository.kt @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.home + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseSection +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.spotube.modules.plugin.PluginManager +import io.github.reactivecircus.cache4k.Cache +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.launch + + +@OptIn(ExperimentalCoroutinesApi::class) +class HomeScreenRepository( + private val pluginManager: PluginManager +) { + val scope = CoroutineScope(Dispatchers.Default + SupervisorJob()) + + val plugin + get() = pluginManager.selectedMetadataPlugin.value + + private val featuredItemCache = Cache.Builder>().build() + private val browseItemCache = + Cache.Builder>().build() + private val sublistItemCache = + Cache.Builder, PaginationResult>() + .build() + + init { + scope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + invalidateCaches() + } + } + } + + fun invalidateCaches() { + featuredItemCache.invalidateAll() + browseItemCache.invalidateAll() + sublistItemCache.invalidateAll() + } + + suspend fun featuredItems() = plugin?.let { plugin -> + featuredItemCache.get("featured_items") { + pluginManager.withScope { + plugin.use { + metadataBrowseAPI.featured() + } + } + } + } + + suspend fun list(paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + browseItemCache.get( + key = paginationStrategy ?: PaginationStrategy.Offset(0, 20) + ) { + pluginManager.withScope { + plugin.use { + metadataBrowseAPI.list(paginationStrategy) + } + } + } + } + + suspend fun sublist( + parentId: String, + paginationStrategy: PaginationStrategy? = null + ) = plugin?.let { plugin -> + sublistItemCache.get( + parentId to (paginationStrategy ?: PaginationStrategy.Offset( + 0, + 20 + )) + ) { + pluginManager.withScope { + plugin.use { + metadataBrowseAPI.sublist(parentId, paginationStrategy) + } + } + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreenViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreenViewModel.kt new file mode 100644 index 00000000..2140b11e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/home/HomeScreenViewModel.kt @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.home + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseSection +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.plugin.PluginManager +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.catch +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.mapNotNull +import kotlinx.coroutines.flow.onStart +import kotlinx.coroutines.flow.scan +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent + +sealed interface HomeScreenState { + data object Loading : HomeScreenState + + sealed interface Data : HomeScreenState { + val featuredItems: List + val browseSections: List + val paginationStrategy: PaginationStrategy? + val totalItems: Int + + data class Loaded( + override val featuredItems: List, + override val browseSections: List, + override val paginationStrategy: PaginationStrategy?, + override val totalItems: Int, + ) : Data { + fun toLoadingMore(): LoadingMore = LoadingMore( + featuredItems = featuredItems, + browseSections = browseSections, + paginationStrategy = paginationStrategy, + totalItems = totalItems, + ) + } + + data class LoadingMore( + override val featuredItems: List, + override val browseSections: List, + override val paginationStrategy: PaginationStrategy?, + override val totalItems: Int, + ) : Data + } + + data class Error(val message: String) : HomeScreenState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class HomeScreenViewModel( + private val repository: HomeScreenRepository, private val pluginManager: PluginManager +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val state = MutableStateFlow(HomeScreenState.Loading) + val uiState = state.asStateFlow() + + init { + viewModelScope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged().collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() = runCatching { + state.value = HomeScreenState.Loading + val featuredItems = repository.featuredItems() + val browseSections = repository.list() + state.value = HomeScreenState.Data.Loaded( + featuredItems = featuredItems ?: emptyList(), + browseSections = browseSections?.items ?: emptyList(), + paginationStrategy = browseSections?.nextPagination, + totalItems = browseSections?.items?.size ?: 0, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load home screen data" } + state.value = HomeScreenState.Error(e.message ?: "Unknown error") + } + + suspend fun loadMoreData() = runCatching { + val currentState = state.value + if (currentState is HomeScreenState.Data.Loaded && currentState.paginationStrategy != null) { + state.value = currentState.toLoadingMore() + val browseSectionsResult = repository.list(currentState.paginationStrategy) + state.value = HomeScreenState.Data.Loaded( + featuredItems = currentState.featuredItems, + browseSections = currentState.browseSections + (browseSectionsResult?.items + ?: emptyList()), + paginationStrategy = browseSectionsResult?.nextPagination, + totalItems = currentState.totalItems, + ) + } + }.onFailure { e -> + logger.e(e) { "Failed to load more home screen data" } + state.value = HomeScreenState.Error(e.message ?: "Unknown error") + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryRepository.kt new file mode 100644 index 00000000..78f0de0b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryRepository.kt @@ -0,0 +1,279 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.spotube.modules.plugin.PluginManager +import io.github.reactivecircus.cache4k.Cache +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch + +@OptIn(ExperimentalCoroutinesApi::class) +class LibraryRepository( + val pluginManager: PluginManager +) { + val scope = CoroutineScope(Dispatchers.Default + SupervisorJob()) + + val plugin + get() = pluginManager.selectedMetadataPlugin.value + + private val playlistCache = + Cache.Builder>().build() + private val albumCache = + Cache.Builder>().build() + private val artistCache = + Cache.Builder>().build() + + private val savedPlaylistIds = MutableStateFlow>(emptySet()) + val savedPlaylistIdsFlow: StateFlow> = savedPlaylistIds.asStateFlow() + + private val savedAlbumIds = MutableStateFlow>(emptySet()) + val savedAlbumIdsFlow: StateFlow> = savedAlbumIds.asStateFlow() + + private val savedArtistIds = MutableStateFlow>(emptySet()) + val savedArtistIdsFlow: StateFlow> = savedArtistIds.asStateFlow() + + init { + scope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + invalidateCaches() + } + } + } + + fun invalidateCaches() { + playlistCache.invalidateAll() + albumCache.invalidateAll() + artistCache.invalidateAll() + savedPlaylistIds.value = emptySet() + savedAlbumIds.value = emptySet() + savedArtistIds.value = emptySet() + } + + suspend fun savedPlaylists(paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + playlistCache.get( + key = paginationStrategy ?: PaginationStrategy.Offset(0, 20) + ) { + pluginManager.withScope { + plugin.use { + val result = metadataPlaylistAPI.savedPlaylists(paginationStrategy) + savedPlaylistIds.value += result.items.map { it.id }.toSet() + result + } + } + } + } + + suspend fun savedAlbums(paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + albumCache.get( + key = paginationStrategy ?: PaginationStrategy.Offset(0, 20) + ) { + pluginManager.withScope { + plugin.use { + val result = metadataAlbumAPI.savedAlbums(paginationStrategy) + savedAlbumIds.value += result.items.map { it.id }.toSet() + result + } + } + } + } + + suspend fun savedArtists(paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + artistCache.get( + key = paginationStrategy ?: PaginationStrategy.Offset(0, 20) + ) { + pluginManager.withScope { + plugin.use { + val result = metadataArtistAPI.savedArtists(paginationStrategy) + savedArtistIds.value += result.items.map { it.id }.toSet() + result + } + } + } + } + + suspend fun isSavedPlaylists(ids: List): List { + val unknownIds = ids.filterNot { savedPlaylistIds.value.contains(it) } + + if(unknownIds.isEmpty()) { + return ids.map { true } + } + + val unknownStates = plugin?.let { plugin -> + val savedStates = pluginManager.withScope { + plugin.use { + metadataPlaylistAPI.isSavedPlaylists(unknownIds) + } + } + val savedIds = unknownIds.filterIndexed { index, id -> + savedStates.getOrNull(index) == true + }.toSet() + savedPlaylistIds.value += savedIds + savedStates + } ?: unknownIds.map { false } + + return ids.map { id -> + savedPlaylistIds.value.contains(id) || + unknownStates.getOrNull(unknownIds.indexOf(id)) ?: false + } + } + + suspend fun savePlaylists(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataPlaylistAPI.savePlaylists(ids) + } + } + playlistCache.invalidateAll() + savedPlaylistIds.value += ids.toSet() + } + } + + suspend fun removeSavedPlaylists(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataPlaylistAPI.removeSavedPlaylists(ids) + } + } + playlistCache.invalidateAll() + savedPlaylistIds.value -= ids.toSet() + } + } + + suspend fun isSavedAlbums(ids: List): List { + val unknownIds = ids.filterNot { savedAlbumIds.value.contains(it) } + + if(unknownIds.isEmpty()) { + return ids.map { true } + } + + val unknownStates = plugin?.let { plugin -> + val savedStates = pluginManager.withScope { + plugin.use { + metadataAlbumAPI.isSavedAlbums(unknownIds) + } + } + val savedIds = unknownIds.filterIndexed { index, id -> + savedStates.getOrNull(index) == true + }.toSet() + savedAlbumIds.value += savedIds + savedStates + } ?: unknownIds.map { false } + + return ids.map { id -> + savedAlbumIds.value.contains(id) || + unknownStates.getOrNull(unknownIds.indexOf(id)) ?: false + } + } + + suspend fun saveAlbums(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataAlbumAPI.saveAlbums(ids) + } + } + albumCache.invalidateAll() + savedAlbumIds.value += ids.toSet() + } + } + + suspend fun removeSavedAlbums(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataAlbumAPI.removeSavedAlbums(ids) + } + } + albumCache.invalidateAll() + savedAlbumIds.value -= ids.toSet() + } + } + + suspend fun isSavedArtists(ids: List): List { + val unknownIds = ids.filterNot { savedArtistIds.value.contains(it) } + + if(unknownIds.isEmpty()) { + return ids.map { true } + } + + val unknownStates = plugin?.let { plugin -> + val savedStates = pluginManager.withScope { + plugin.use { + metadataArtistAPI.isSavedArtists(unknownIds) + } + } + val savedIds = unknownIds.filterIndexed { index, id -> + savedStates.getOrNull(index) == true + }.toSet() + savedArtistIds.value += savedIds + savedStates + } ?: unknownIds.map { false } + + return ids.map { id -> + savedArtistIds.value.contains(id) || + unknownStates.getOrNull(unknownIds.indexOf(id)) ?: false + } + } + + suspend fun saveArtists(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataArtistAPI.saveArtists(ids) + } + } + artistCache.invalidateAll() + savedArtistIds.value += ids.toSet() + } + } + + suspend fun removeSavedArtists(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataArtistAPI.removeSavedArtists(ids) + } + } + artistCache.invalidateAll() + savedArtistIds.value -= ids.toSet() + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryScreen.kt new file mode 100644 index 00000000..306f5282 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryScreen.kt @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FilterChip +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.modules.library.album.LibraryAlbumsScreen +import dev.krtirtho.spotube.modules.library.artist.LibraryArtistsScreen +import dev.krtirtho.spotube.modules.library.local_tracks.LibraryLocalTracksScreen +import dev.krtirtho.spotube.modules.library.playlist.LibraryPlaylistsScreen +import dev.krtirtho.spotube.modules.downloads.DownloadsScreen +import dev.krtirtho.spotube.modules.shell.AppShellViewModel +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import dev.krtirtho.spotube.resources.iconsax.IconsaxSearchBroken +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun LibraryScreen( + libraryState: LibraryState = koinInject(), + appShellViewModel: AppShellViewModel = koinViewModel() +) { + val currentTab by libraryState.currentTab.collectAsState() + val searchMode by libraryState.searchMode.collectAsState() + val isLargeScreen = appShellViewModel.useSidebar() + + Scaffold( + topBar = { + Column { + ApplicationMainBar( + backButton = false, + title = { + if (!isLargeScreen) Text("Your Library") + }, + actions = { + if (!isLargeScreen) { + IconButton( + onClick = { + libraryState.setSearchMode(!searchMode) + }, + ) { + Icon( + imageVector = Iconsax.IconsaxSearchBroken, + contentDescription = "Search", + ) + } + } + } + ) + if (!isLargeScreen) + Column( + modifier = Modifier.padding(horizontal = 12.dp) + ) { + Spacer(modifier = Modifier.height(4.dp)) + LazyRow( + horizontalArrangement = Arrangement.spacedBy(8.dp), + ) { + items(LibraryTab.entries.size) { index -> + val tab = LibraryTab.entries[index] + FilterChip( + label = { Text(tab.title) }, + selected = currentTab == tab, + onClick = { libraryState.onTabSelected(tab) }, + ) + } + } + Spacer(modifier = Modifier.height(12.dp)) + } + } + + + } + ) { innerPadding -> + Column( + modifier = Modifier + .padding(innerPadding) + .padding(horizontal = 12.dp) + ) { + when (currentTab) { + LibraryTab.Playlists -> LibraryPlaylistsScreen(searchMode = isLargeScreen || searchMode) + LibraryTab.Albums -> LibraryAlbumsScreen(searchMode = isLargeScreen || searchMode) + LibraryTab.Artists -> LibraryArtistsScreen(searchMode = isLargeScreen || searchMode) + LibraryTab.LocalTracks -> LibraryLocalTracksScreen(searchMode = isLargeScreen || searchMode) + LibraryTab.Downloads -> DownloadsScreen() + } + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryState.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryState.kt new file mode 100644 index 00000000..56de67de --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryState.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library + +import kotlinx.coroutines.flow.MutableStateFlow + +class LibraryState { + val searchMode = MutableStateFlow(false) + val currentTab = MutableStateFlow(LibraryTab.Playlists) + + fun onTabSelected(tab: LibraryTab) { + currentTab.value = tab + } + + fun setSearchMode(enabled: Boolean) { + searchMode.value = enabled + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryTab.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryTab.kt new file mode 100644 index 00000000..a64ebe96 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/LibraryTab.kt @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library + +import androidx.compose.ui.graphics.vector.ImageVector +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxCd +import dev.krtirtho.spotube.resources.iconsax.IconsaxDirectboxReceive +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicDashboard +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicLibrary +import dev.krtirtho.spotube.resources.iconsax.User + +enum class LibraryTab(val title: String, val icon: ImageVector) { + Playlists("Playlists", Iconsax.IconsaxMusicDashboard), + Albums("Albums", Iconsax.IconsaxCd), + Artists("Artists", Iconsax.User), + LocalTracks("Local Tracks", Iconsax.IconsaxMusicLibrary), + Downloads("Downloads", Iconsax.IconsaxDirectboxReceive), +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/album/LibraryAlbumsScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/album/LibraryAlbumsScreen.kt new file mode 100644 index 00000000..106e4e8e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/album/LibraryAlbumsScreen.kt @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.album + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.items +import androidx.compose.foundation.lazy.grid.rememberLazyGridState +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.core.ui.component.AlbumCard +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun LibraryAlbumsScreen( + modifier: Modifier = Modifier, + searchMode: Boolean = false, + viewModel: LibraryAlbumsViewModel = koinViewModel() +) { + val state by viewModel.uiState.collectAsStateWithLifecycle() + val gridState = rememberLazyGridState() + + LaunchedEffect(gridState) { + snapshotFlow { gridState.layoutInfo } + .map { layoutInfo -> + val lastVisibleIndex = layoutInfo.visibleItemsInfo.lastOrNull()?.index + val totalItems = layoutInfo.totalItemsCount + Pair(lastVisibleIndex, totalItems) + } + .distinctUntilChanged() + .collect { (lastVisibleIndex, totalItems) -> + if ( + lastVisibleIndex != null && + totalItems > 0 && + lastVisibleIndex >= totalItems - 4 + ) { + viewModel.loadMoreData() + } + } + } + + Column(modifier = modifier) { + AnimatedVisibility(searchMode){ + TextField( + value = (state as? LibraryAlbumsState.Data)?.query ?: "", + onValueChange = viewModel::onQueryChange, + modifier = Modifier.fillMaxWidth(), + placeholder = { Text("Search saved albums...") }, + singleLine = true, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Search" + ) + } + ) + } + Spacer(modifier = Modifier.height(12.dp)) + when (state) { + is LibraryAlbumsState.Loading -> { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + LazyVerticalGrid( + columns = GridCells.Adaptive(160.dp), + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + items(8) { + SkeletonTree(true) { + PlayableCard( + title = "Album Title", + subtitle = "Artist Name", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + + is LibraryAlbumsState.Error -> { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + ErrorDisplay( + errorMessage = (state as LibraryAlbumsState.Error).message, + onRetry = { viewModel.refresh() }, + ) + } + } + + is LibraryAlbumsState.Data -> { + val dataState = state as LibraryAlbumsState.Data + if (dataState.items.isEmpty() && state !is LibraryAlbumsState.Data.LoadingMore) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + when { + dataState.query.isNotBlank() -> Text("No albums found for '${dataState.query}'") + else -> Text("No saved albums") + } + } + } else { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + LazyVerticalGrid( + columns = GridCells.Adaptive(160.dp), + state = gridState, + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + items(dataState.items, key = { it.id }) { album -> + AlbumCard( + album = album, + modifier = Modifier.fillMaxWidth() + ) + } + + if (state is LibraryAlbumsState.Data.LoadingMore) { + items(4) { + SkeletonTree(true) { + PlayableCard( + title = "Album Title", + subtitle = "Artist Name", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/album/LibraryAlbumsViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/album/LibraryAlbumsViewModel.kt new file mode 100644 index 00000000..42534e03 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/album/LibraryAlbumsViewModel.kt @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.album + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.library.LibraryRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent + +sealed interface LibraryAlbumsState { + data object Loading : LibraryAlbumsState + + sealed interface Data : LibraryAlbumsState { + val query: String + val allItems: List + val items: List + val nextPagination: PaginationStrategy? + + data class Loaded( + override val query: String = "", + override val allItems: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + ) : Data { + override val items: List + get() = if (query.isNotBlank()) { + allItems.filter { album -> + album.title.contains(query, ignoreCase = true) || + album.artists.any { artist -> + artist.name.contains(query, ignoreCase = true) + } + } + } else { + allItems + } + + fun toLoadingMore(): LoadingMore = LoadingMore( + query = query, + allItems = allItems, + nextPagination = nextPagination, + ) + } + + data class LoadingMore( + override val query: String = "", + override val allItems: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + ) : Data { + override val items: List + get() = if (query.isNotBlank()) { + allItems.filter { album -> + album.title.contains(query, ignoreCase = true) || + album.artists.any { artist -> + artist.name.contains(query, ignoreCase = true) + } + } + } else { + allItems + } + } + } + + data class Error(val message: String) : LibraryAlbumsState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class LibraryAlbumsViewModel( + private val repository: LibraryRepository, +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val _state = MutableStateFlow(LibraryAlbumsState.Loading) + val uiState: StateFlow = _state.asStateFlow() + + init { + viewModelScope.launch { + combine( + repository.pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged(), + repository.savedAlbumIdsFlow + ) { _, _ -> }.collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() = runCatching { + _state.value = LibraryAlbumsState.Loading + val result = repository.savedAlbums() + _state.value = LibraryAlbumsState.Data.Loaded( + allItems = result?.items ?: emptyList(), + nextPagination = result?.nextPagination, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load albums" } + _state.value = LibraryAlbumsState.Error(e.message ?: "Unknown error") + } + + suspend fun loadMoreData() = runCatching { + val currentState = _state.value + if (currentState is LibraryAlbumsState.Data.Loaded && currentState.nextPagination != null) { + _state.value = currentState.toLoadingMore() + val result = repository.savedAlbums(currentState.nextPagination) + _state.value = LibraryAlbumsState.Data.Loaded( + query = currentState.query, + allItems = currentState.allItems + (result?.items ?: emptyList()), + nextPagination = result?.nextPagination, + ) + } + }.onFailure { e -> + logger.e(e) { "Failed to load more albums" } + _state.value = LibraryAlbumsState.Error(e.message ?: "Unknown error") + } + + fun onQueryChange(query: String) { + val currentState = _state.value + if (currentState is LibraryAlbumsState.Data) { + _state.value = when (currentState) { + is LibraryAlbumsState.Data.Loaded -> currentState.copy(query = query) + is LibraryAlbumsState.Data.LoadingMore -> currentState.copy(query = query) + } + } + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/artist/LibraryArtistsScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/artist/LibraryArtistsScreen.kt new file mode 100644 index 00000000..fc9b0714 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/artist/LibraryArtistsScreen.kt @@ -0,0 +1,181 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.artist + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.items +import androidx.compose.foundation.lazy.grid.rememberLazyGridState +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.core.ui.component.ArtistCard +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.core.ui.component.cards.AvatarCard +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun LibraryArtistsScreen( + modifier: Modifier = Modifier, + searchMode: Boolean = false, + viewModel: LibraryArtistsViewModel = koinViewModel(), +) { + val state by viewModel.uiState.collectAsStateWithLifecycle() + val gridState = rememberLazyGridState() + + LaunchedEffect(gridState) { + snapshotFlow { gridState.layoutInfo } + .map { layoutInfo -> + val lastVisibleIndex = layoutInfo.visibleItemsInfo.lastOrNull()?.index + val totalItems = layoutInfo.totalItemsCount + Pair(lastVisibleIndex, totalItems) + } + .distinctUntilChanged() + .collect { (lastVisibleIndex, totalItems) -> + if ( + lastVisibleIndex != null && + totalItems > 0 && + lastVisibleIndex >= totalItems - 4 + ) { + viewModel.loadMoreData() + } + } + } + + Column(modifier = modifier) { + AnimatedVisibility(searchMode){ + TextField( + value = (state as? LibraryArtistsState.Data)?.query ?: "", + onValueChange = viewModel::onQueryChange, + modifier = Modifier.fillMaxWidth(), + placeholder = { Text("Search saved artists...") }, + singleLine = true, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Search", + ) + }, + ) + } + Spacer(modifier = Modifier.height(12.dp)) + when (state) { + is LibraryArtistsState.Loading -> { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + LazyVerticalGrid( + columns = GridCells.Adaptive(160.dp), + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + items(8) { + SkeletonTree(true) { + AvatarCard( + title = "Artist Name", + subtitle = "Artist", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + + is LibraryArtistsState.Error -> { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + ErrorDisplay( + errorMessage = (state as LibraryArtistsState.Error).message, + onRetry = { viewModel.refresh() }, + ) + } + } + + is LibraryArtistsState.Data -> { + val dataState = state as LibraryArtistsState.Data + if (dataState.items.isEmpty() && state !is LibraryArtistsState.Data.LoadingMore) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + when { + dataState.query.isNotBlank() -> Text("No artists found for '${dataState.query}'") + else -> Text("No saved artists") + } + } + } else { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + + LazyVerticalGrid( + columns = GridCells.Adaptive(160.dp), + state = gridState, + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + items(dataState.items, key = { it.id }) { artist -> + ArtistCard( + artist = artist, + modifier = Modifier.fillMaxWidth(), + ) + } + +// if (state is LibraryArtistsState.Data.LoadingMore) { + items(4) { + SkeletonTree(true) { + AvatarCard( + title = "Artist Name", + subtitle = "Artist", + imageURL = "https://placehold.co/400x400", + ) + } + } +// } + } + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/artist/LibraryArtistsViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/artist/LibraryArtistsViewModel.kt new file mode 100644 index 00000000..aeb1564c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/artist/LibraryArtistsViewModel.kt @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.artist + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.library.LibraryRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent + +sealed interface LibraryArtistsState { + data object Loading : LibraryArtistsState + + sealed interface Data : LibraryArtistsState { + val query: String + val allItems: List + val items: List + val nextPagination: PaginationStrategy? + + data class Loaded( + override val query: String = "", + override val allItems: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + ) : Data { + override val items: List + get() = if (query.isNotBlank()) { + allItems.filter { artist -> + artist.name.contains(query, ignoreCase = true) + } + } else { + allItems + } + + fun toLoadingMore(): LoadingMore = LoadingMore( + query = query, + allItems = allItems, + nextPagination = nextPagination, + ) + } + + data class LoadingMore( + override val query: String = "", + override val allItems: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + ) : Data { + override val items: List + get() = if (query.isNotBlank()) { + allItems.filter { artist -> + artist.name.contains(query, ignoreCase = true) + } + } else { + allItems + } + } + } + + data class Error(val message: String) : LibraryArtistsState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class LibraryArtistsViewModel( + private val repository: LibraryRepository, +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val _state = MutableStateFlow(LibraryArtistsState.Loading) + val uiState: StateFlow = _state.asStateFlow() + + init { + viewModelScope.launch { + combine( + repository.pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged(), + repository.savedArtistIdsFlow + ) { _, _ -> }.collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() = runCatching { + _state.value = LibraryArtistsState.Loading + val result = repository.savedArtists() + _state.value = LibraryArtistsState.Data.Loaded( + allItems = result?.items?.map { + MetadataArtist.Basic( + id = it.id, + name = it.name, + thumbnails = it.thumbnails, + externalUri = it.externalUri, + ) + } ?: emptyList(), + nextPagination = result?.nextPagination, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load artists" } + _state.value = LibraryArtistsState.Error(e.message ?: "Unknown error") + } + + suspend fun loadMoreData() = runCatching { + val currentState = _state.value + if (currentState is LibraryArtistsState.Data.Loaded && currentState.nextPagination != null) { + _state.value = currentState.toLoadingMore() + val result = repository.savedArtists(currentState.nextPagination) + val newItems = result?.items?.map { + MetadataArtist.Basic( + id = it.id, + name = it.name, + thumbnails = it.thumbnails, + externalUri = it.externalUri, + ) + } ?: emptyList() + _state.value = LibraryArtistsState.Data.Loaded( + query = currentState.query, + allItems = currentState.allItems + newItems, + nextPagination = result?.nextPagination, + ) + } + }.onFailure { e -> + logger.e(e) { "Failed to load more artists" } + _state.value = LibraryArtistsState.Error(e.message ?: "Unknown error") + } + + fun onQueryChange(query: String) { + val currentState = _state.value + if (currentState is LibraryArtistsState.Data) { + _state.value = when (currentState) { + is LibraryArtistsState.Data.Loaded -> currentState.copy(query = query) + is LibraryArtistsState.Data.LoadingMore -> currentState.copy(query = query) + } + } + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/LibraryLocalTracksScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/LibraryLocalTracksScreen.kt new file mode 100644 index 00000000..d3a93160 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/LibraryLocalTracksScreen.kt @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.ListItem +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.PlatformType +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.getPlatform +import dev.krtirtho.spotube.modules.library.local_tracks.media.rememberLocalMediaPermissionState +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.ArrowLeft3 +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import dev.krtirtho.spotube.resources.iconsax.IconsaxFolderOpen +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicCircle +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlayCircle2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxRefreshRight +import dev.krtirtho.spotube.resources.iconsax.Play +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun LibraryLocalTracksScreen(modifier: Modifier = Modifier, searchMode: Boolean = false) { + val viewModel = koinViewModel() + val state by viewModel.state.collectAsStateWithLifecycle() + val permissionState = rememberLocalMediaPermissionState() + val platformType = remember { getPlatform().type } + val isAndroid = platformType == PlatformType.Android + + LaunchedEffect(permissionState.isGranted, isAndroid) { + if (!isAndroid || permissionState.isGranted) { + viewModel.refresh() + } + } + + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + + Box(modifier = modifier.fillMaxWidth()) { + Column( + modifier = modifier.widthIn(max = 1280.dp).align(Alignment.TopCenter), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + AnimatedVisibility(searchMode) { + TextField( + value = state.query, + onValueChange = viewModel::onQueryChange, + modifier = Modifier + .fillMaxWidth(), + placeholder = { + Text( + if (state.currentFolderPath == null) { + "Search folders or tracks" + } else { + "Search tracks in folder" + } + ) + }, + singleLine = true, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Search" + ) + }, + trailingIcon = { + Icon( + imageVector = Iconsax.IconsaxRefreshRight, + contentDescription = "Refresh", + modifier = Modifier.clickable { viewModel.refresh() } + ) + } + ) + } + + if (state.currentFolderPath != null) { + Row( + modifier = Modifier.fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + ) { + Row(verticalAlignment = Alignment.CenterVertically) { + IconButton(onClick = viewModel::navigateUp) { + Icon(imageVector = Iconsax.ArrowLeft3, contentDescription = "Back") + } + Text(viewModel.currentFolder()?.name ?: "Folder") + } + IconButton(onClick = { + viewModel.currentFolder()?.let { viewModel.playFolder(it.path) } + }) { + Icon( + imageVector = Iconsax.IconsaxPlayCircle2, + contentDescription = "Play folder" + ) + } + } + } + + val folders = viewModel.visibleFolders() + val tracks = viewModel.visibleTracks() + + if (isAndroid && !permissionState.isGranted) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(10.dp), + ) { + Text("Allow audio permission to show local tracks") + TextButton(onClick = permissionState.requestPermission) { + Text("Grant access") + } + } + } + } else if (state.isRefreshing && folders.isEmpty() && tracks.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + CircularProgressIndicator() + } + } else if (state.currentFolderPath == null) { + if (folders.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text(state.error ?: "No local folders found") + } + } else { + LazyColumn(contentPadding = contentPadding) { + items(folders, key = { it.path }) { folder -> + ListItem( + headlineContent = { Text(folder.name) }, + supportingContent = { Text("${folder.trackCount} track(s)") }, + leadingContent = { + Icon( + imageVector = Iconsax.IconsaxFolderOpen, + contentDescription = null + ) + }, + modifier = Modifier.clickable { viewModel.openFolder(folder.path) }, + ) + } + } + } + } else { + if (tracks.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text("No tracks in this folder") + } + } else { + LazyColumn(modifier = Modifier.fillMaxSize(), contentPadding = contentPadding) { + items(tracks, key = { it.path }) { track -> + ListItem( + headlineContent = { Text(track.name) }, + supportingContent = { + val artists = + track.artists.joinToString().ifBlank { "Unknown artist" } + val album = track.album?.takeIf { it.isNotBlank() } + Text(if (album == null) artists else "$artists - $album") + }, + leadingContent = { + Icon( + imageVector = Iconsax.IconsaxMusicCircle, + contentDescription = null + ) + }, + trailingContent = { + IconButton(onClick = { viewModel.playTrack(track.path) }) { + Icon( + imageVector = Iconsax.Play, + contentDescription = "Play" + ) + } + }, + modifier = Modifier.clickable { viewModel.playTrack(track.path) }, + ) + } + } + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/LibraryLocalTracksViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/LibraryLocalTracksViewModel.kt new file mode 100644 index 00000000..0987ff7b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/LibraryLocalTracksViewModel.kt @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaFolder +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaLibraryCoordinator +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaTrack +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch + +data class LibraryLocalTracksState( + val isRefreshing: Boolean = false, + val folders: List = emptyList(), + val currentFolderPath: String? = null, + val query: String = "", + val error: String? = null, +) + +class LibraryLocalTracksViewModel( + private val coordinator: LocalMediaLibraryCoordinator, + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel() { + private val _state = MutableStateFlow(LibraryLocalTracksState()) + val state: StateFlow = _state.asStateFlow() + + init { + viewModelScope.launch { + coordinator.cacheState + .collect { cache -> + _state.update { + it.copy( + folders = cache.folders, + error = null, + ) + } + } + } + + refreshIfEmpty() + refreshIfStale() + } + + fun onQueryChange(query: String) { + _state.update { it.copy(query = query) } + } + + fun openFolder(folderPath: String) { + _state.update { it.copy(currentFolderPath = folderPath) } + } + + fun navigateUp() { + _state.update { it.copy(currentFolderPath = null) } + } + + fun refresh() { + viewModelScope.launch { + _state.update { it.copy(isRefreshing = true, error = null) } + runCatching { + coordinator.refreshNow("manual") + }.onFailure { throwable -> + _state.update { + it.copy(error = throwable.message ?: "Failed to refresh local media") + } + } + _state.update { it.copy(isRefreshing = false) } + } + } + + fun playFolder(folderPath: String) { + val folder = _state.value.folders.firstOrNull { it.path == folderPath } ?: return + val tracks = filterTracks(folder.tracks, _state.value.query) + if (tracks.isEmpty()) return + + viewModelScope.launch { + audioPlayerQueue.load( + entries = tracks.map { it.toQueueEntry() }, + autoPlay = true, + startPosition = 0, + collectionEntry = null, + ) + } + } + + fun playTrack(trackPath: String) { + val folder = currentFolder() ?: return + val tracks = filterTracks(folder.tracks, _state.value.query) + val selectedIndex = tracks.indexOfFirst { it.path == trackPath } + if (selectedIndex < 0) return + + viewModelScope.launch { + audioPlayerQueue.load( + entries = tracks.map { it.toQueueEntry() }, + autoPlay = true, + startPosition = selectedIndex, + collectionEntry = null, + ) + } + } + + fun visibleFolders(): List { + val query = state.value.query.trim() + if (query.isBlank()) return state.value.folders + + return state.value.folders.filter { folder -> + folder.name.contains(query, ignoreCase = true) || + folder.tracks.any { track -> + track.name.contains(query, ignoreCase = true) || + track.artists.any { it.contains(query, ignoreCase = true) } + } + } + } + + fun visibleTracks(): List { + val folder = currentFolder() ?: return emptyList() + return filterTracks(folder.tracks, state.value.query) + } + + fun currentFolder(): LocalMediaFolder? { + val path = state.value.currentFolderPath ?: return null + return state.value.folders.firstOrNull { it.path == path } + } + + private fun refreshIfEmpty() { + if (_state.value.folders.isNotEmpty()) return + refresh() + } + + private fun refreshIfStale() { + viewModelScope.launch { + runCatching { + coordinator.refreshIfStale() + } + } + } + + private fun filterTracks(tracks: List, query: String): List { + val normalizedQuery = query.trim() + if (normalizedQuery.isBlank()) return tracks + + return tracks.filter { track -> + track.name.contains(normalizedQuery, ignoreCase = true) || + track.album?.contains(normalizedQuery, ignoreCase = true) == true || + track.artists.any { it.contains(normalizedQuery, ignoreCase = true) } + } + } + + private fun LocalMediaTrack.toQueueEntry(): QueueEntry.LocalTrack { + return QueueEntry.LocalTrack( + name = name, + artists = artists, + duration = durationMs, + album = album, + coverBytes = coverBytes, + url = path, + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaCacheRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaCacheRepository.kt new file mode 100644 index 00000000..3442d69a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaCacheRepository.kt @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import androidx.datastore.preferences.core.edit +import dev.krtirtho.spotube.core.db.Database +import dev.krtirtho.spotube.core.db.DatabaseKeys +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.map +import kotlinx.serialization.json.Json + +class LocalMediaCacheRepository(private val database: Database) { + private val json = Json { + ignoreUnknownKeys = true + } + + val cacheFlow: Flow = database.localMediaDataStore.data.map { prefs -> + prefs[DatabaseKeys.LOCAL_MEDIA_CACHE_STATE_KEY]?.let { raw -> + runCatching { + json.decodeFromString(raw) + }.getOrDefault(LocalMediaCache()) + } ?: LocalMediaCache() + } + + suspend fun save(cache: LocalMediaCache) { + database.localMediaDataStore.edit { prefs -> + prefs[DatabaseKeys.LOCAL_MEDIA_CACHE_STATE_KEY] = json.encodeToString(cache) + prefs[DatabaseKeys.LOCAL_MEDIA_LAST_SCAN_AT_KEY] = cache.indexedAtEpochMs + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaDiscoveryService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaDiscoveryService.kt new file mode 100644 index 00000000..ecf551f9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaDiscoveryService.kt @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +typealias LocalMediaChangeCallback = () -> Unit + +fun interface LocalMediaObservation { + fun stop() +} + +interface LocalMediaDiscoveryService { + suspend fun discoverFolders(roots: List): List + suspend fun ensureInitialized() {} + fun observeChanges(roots: List, onChanged: LocalMediaChangeCallback): LocalMediaObservation? +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaFoldersConfig.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaFoldersConfig.kt new file mode 100644 index 00000000..882c5cd5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaFoldersConfig.kt @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.modules.settings.SettingsRepository +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.map + +class LocalMediaFoldersConfig( + private val settingsRepository: SettingsRepository, + private val paths: Paths, +) { + val configuredRootsFlow: Flow> = settingsRepository.userSettings.map { settings -> + val cacheRoot = if (settings.enableMusicCaching) { + listOf(settings.cacheFolder ?: paths.getMusicCacheDirPath()) + } else { + emptyList() + } + (listOfNotNull(settings.overloadedDownloadFolder) + settings.localMediaFolders + cacheRoot) + .map { it.trim() } + .filter { it.isNotBlank() } + .distinct() + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaLibraryCoordinator.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaLibraryCoordinator.kt new file mode 100644 index 00000000..60b03e58 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaLibraryCoordinator.kt @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import dev.krtirtho.spotube.core.di.injectLogger +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlin.time.Clock +import org.koin.core.component.KoinComponent + +class LocalMediaLibraryCoordinator( + private val discoveryService: LocalMediaDiscoveryService, + private val cacheRepository: LocalMediaCacheRepository, + private val foldersConfig: LocalMediaFoldersConfig, +) : KoinComponent { + private val logger by injectLogger() + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + + private val _cacheState = MutableStateFlow(LocalMediaCache()) + val cacheState: StateFlow = _cacheState.asStateFlow() + + private var observation: LocalMediaObservation? = null + private var periodicJob: Job? = null + private var configuredRoots: List = emptyList() + private val refreshMutex = Mutex() + + init { + scope.launch { + cacheRepository.cacheFlow.collect { cache -> + _cacheState.value = cache + } + } + + scope.launch { + discoveryService.ensureInitialized() + foldersConfig.configuredRootsFlow.collect { roots -> + configuredRoots = roots + observation?.stop() + observation = discoveryService.observeChanges(roots) { + scheduleRefresh(reason = "filesystem_change") + } + scheduleRefresh(reason = "roots_changed") + } + } + + periodicJob = scope.launch { + while (true) { + delay(PERIODIC_REFRESH_MS) + refreshIfStale() + } + } + } + + fun scheduleRefresh(reason: String) { + scope.launch { + runCatching { refreshNow(reason) } + .onFailure { throwable -> + logger.w(throwable) { "Local media refresh failed. reason=$reason" } + } + } + } + + suspend fun refreshIfStale() { + val lastIndexedAt = _cacheState.value.indexedAtEpochMs + val now = Clock.System.now().toEpochMilliseconds() + if (now - lastIndexedAt >= STALE_AFTER_MS) { + refreshNow("stale") + } + } + + suspend fun refreshNow(reason: String) { + refreshMutex.withLock { + logger.i { "Refreshing local media cache. reason=$reason" } + runCatching { + discoveryService.discoverFolders(configuredRoots) + }.onSuccess { folders -> + val cache = LocalMediaCache( + folders = folders, + indexedAtEpochMs = Clock.System.now().toEpochMilliseconds(), + ) + cacheRepository.save(cache) + _cacheState.value = cache + }.onFailure { throwable -> + logger.w(throwable) { "Failed to discover local media. reason=$reason" } + } + } + } + + companion object { + private const val PERIODIC_REFRESH_MS = 15 * 60 * 1000L + private const val STALE_AFTER_MS = 30 * 60 * 1000L + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaModels.kt new file mode 100644 index 00000000..d8264f6a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaModels.kt @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import kotlinx.serialization.Serializable + +@Serializable +data class LocalMediaTrack( + val path: String, + val name: String, + val artists: List, + val durationMs: Long, + val album: String? = null, + val coverBytes: ByteArray? = null, +) + +@Serializable +data class LocalMediaFolder( + val path: String, + val name: String, + val tracks: List, +) { + val trackCount: Int + get() = tracks.size +} + +@Serializable +data class LocalMediaCache( + val folders: List = emptyList(), + val indexedAtEpochMs: Long = 0, +) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.kt new file mode 100644 index 00000000..b9fef9c4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.kt @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import androidx.compose.runtime.Composable + +data class LocalMediaPermissionState( + val isGranted: Boolean, + val requestPermission: () -> Unit, +) + +@Composable +expect fun rememberLocalMediaPermissionState(): LocalMediaPermissionState diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/NoopLocalMediaDiscoveryService.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/NoopLocalMediaDiscoveryService.kt new file mode 100644 index 00000000..0ad5288a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/NoopLocalMediaDiscoveryService.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +class NoopLocalMediaDiscoveryService : LocalMediaDiscoveryService { + override suspend fun discoverFolders(roots: List): List { + return emptyList() + } + + override fun observeChanges( + roots: List, + onChanged: LocalMediaChangeCallback, + ): LocalMediaObservation? { + return null + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/playlist/LibraryPlaylistsScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/playlist/LibraryPlaylistsScreen.kt new file mode 100644 index 00000000..57743baf --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/playlist/LibraryPlaylistsScreen.kt @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.playlist + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.items +import androidx.compose.foundation.lazy.grid.rememberLazyGridState +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.core.ui.component.LikedTracksCard +import dev.krtirtho.spotube.core.ui.component.PlaylistCard +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun LibraryPlaylistsScreen( + modifier: Modifier = Modifier, + searchMode: Boolean = false, + viewModel: LibraryPlaylistsViewModel = koinViewModel(), +) { + val state by viewModel.uiState.collectAsStateWithLifecycle() + val gridState = rememberLazyGridState() + + + LaunchedEffect(gridState) { + snapshotFlow { gridState.layoutInfo } + .map { layoutInfo -> + val lastVisibleIndex = layoutInfo.visibleItemsInfo.lastOrNull()?.index + val totalItems = layoutInfo.totalItemsCount + Pair(lastVisibleIndex, totalItems) + } + .distinctUntilChanged() + .collect { (lastVisibleIndex, totalItems) -> + if ( + lastVisibleIndex != null && + totalItems > 0 && + lastVisibleIndex >= totalItems - 4 + ) { + viewModel.loadMoreData() + } + } + } + + Column(modifier = modifier) { + AnimatedVisibility( + visible = searchMode, + ) { + TextField( + value = (state as? LibraryPlaylistsState.Data)?.query ?: "", + onValueChange = viewModel::onQueryChange, + modifier = Modifier.fillMaxWidth(), + placeholder = { Text("Search saved playlists...") }, + singleLine = true, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxFilterSearch, + contentDescription = "Search" + ) + } + ) + } + Spacer(modifier = Modifier.height(12.dp)) + when (state) { + is LibraryPlaylistsState.Loading -> { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + LazyVerticalGrid( + columns = GridCells.Adaptive(160.dp), + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + items(8) { + SkeletonTree(true) { + PlayableCard( + title = "Playlist Name", + subtitle = "By Artist", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + + is LibraryPlaylistsState.Error -> { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + ErrorDisplay( + errorMessage = (state as LibraryPlaylistsState.Error).message, + onRetry = { viewModel.refresh() }, + ) + } + } + + is LibraryPlaylistsState.Data -> { + val dataState = state as LibraryPlaylistsState.Data + if (dataState.items.isEmpty() && state !is LibraryPlaylistsState.Data.LoadingMore) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + when { + dataState.query.isNotEmpty() -> Text("No playlists found for '${dataState.query}'") + else -> Text("No saved playlists") + } + } + } else { + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + + LazyVerticalGrid( + columns = GridCells.Adaptive(160.dp), + state = gridState, + modifier = Modifier.fillMaxSize(), + contentPadding = contentPadding, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + item { + LikedTracksCard( + modifier = Modifier.fillMaxWidth() + ) + } + + items(dataState.items, key = { it.id }) { playlist -> + PlaylistCard( + playlist = playlist, + modifier = Modifier.fillMaxWidth() + ) + } + + if (state is LibraryPlaylistsState.Data.LoadingMore) { + items(4) { + SkeletonTree(true) { + PlayableCard( + title = "Playlist Name", + subtitle = "By Artist", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/playlist/LibraryPlaylistsViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/playlist/LibraryPlaylistsViewModel.kt new file mode 100644 index 00000000..645479a1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/library/playlist/LibraryPlaylistsViewModel.kt @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.playlist + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.modules.library.LibraryRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent + +sealed interface LibraryPlaylistsState { + data object Loading : LibraryPlaylistsState + + sealed interface Data : LibraryPlaylistsState { + val query: String + val allItems: List + val items: List + val nextPagination: PaginationStrategy? + + data class Loaded( + override val query: String = "", + override val allItems: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + ) : Data { + override val items: List + get() = if (query.isNotBlank()) { + allItems.filter { + it.title.contains(query, ignoreCase = true) || + (it.description?.contains(query, ignoreCase = true) == true) + } + } else { + allItems + } + + fun toLoadingMore(): LoadingMore = LoadingMore( + query = query, + allItems = allItems, + nextPagination = nextPagination, + ) + } + + data class LoadingMore( + override val query: String = "", + override val allItems: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + ) : Data { + override val items: List + get() = if (query.isNotBlank()) { + allItems.filter { + it.title.contains(query, ignoreCase = true) || + (it.description?.contains(query, ignoreCase = true) == true) + } + } else { + allItems + } + } + } + + data class Error(val message: String) : LibraryPlaylistsState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class LibraryPlaylistsViewModel( + private val repository: LibraryRepository, +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val _state = MutableStateFlow(LibraryPlaylistsState.Loading) + val uiState: StateFlow = _state.asStateFlow() + + init { + viewModelScope.launch { + combine( + repository.pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged(), + repository.savedPlaylistIdsFlow + ) { _, _ -> }.collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() = runCatching { + _state.value = LibraryPlaylistsState.Loading + val result = repository.savedPlaylists() + _state.value = LibraryPlaylistsState.Data.Loaded( + allItems = result?.items ?: emptyList(), + nextPagination = result?.nextPagination, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load playlists" } + _state.value = LibraryPlaylistsState.Error(e.message ?: "Unknown error") + } + + suspend fun loadMoreData() = runCatching { + val currentState = _state.value + if (currentState is LibraryPlaylistsState.Data.Loaded && currentState.nextPagination != null) { + _state.value = currentState.toLoadingMore() + val result = repository.savedPlaylists(currentState.nextPagination) + _state.value = LibraryPlaylistsState.Data.Loaded( + query = currentState.query, + allItems = currentState.allItems + (result?.items ?: emptyList()), + nextPagination = result?.nextPagination, + ) + } + }.onFailure { e -> + logger.e(e) { "Failed to load more playlists" } + _state.value = LibraryPlaylistsState.Error(e.message ?: "Unknown error") + } + + fun onQueryChange(query: String) { + val currentState = _state.value + if (currentState is LibraryPlaylistsState.Data) { + _state.value = when (currentState) { + is LibraryPlaylistsState.Data.Loaded -> currentState.copy(query = query) + is LibraryPlaylistsState.Data.LoadingMore -> currentState.copy(query = query) + } + } + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/lyrics/LyricsScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/lyrics/LyricsScreen.kt new file mode 100644 index 00000000..f93008e2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/lyrics/LyricsScreen.kt @@ -0,0 +1,284 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.lyrics + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import compose.icons.FeatherIcons +import compose.icons.feathericons.X +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsLine +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxArrowDown4 +import kotlinx.coroutines.launch +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun LyricsScreen( + viewModel: LyricsViewModel = koinViewModel(), + modifier: Modifier = Modifier, + onClose: (() -> Unit)? = null, +) { + val uiState by viewModel.uiState.collectAsState() + val positionMillis by viewModel.positionMillisFlow.collectAsState() + val scope = rememberCoroutineScope() + + Scaffold( + modifier = modifier, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .padding(innerPadding) + .padding(horizontal = 16.dp) + ) { + Spacer(modifier = Modifier.height(16.dp)) + + Box( + modifier = Modifier.fillMaxWidth(), + ) { + if (onClose != null) { + IconButton( + onClick = onClose, + modifier = Modifier.align(Alignment.CenterStart) + ) { + Icon( + imageVector = Iconsax.IconsaxArrowDown4, + contentDescription = "Close" + ) + } + } + Row( + modifier = Modifier + .align(Alignment.Center) + .clip(RoundedCornerShape(50.dp)) + .background(MaterialTheme.colorScheme.surfaceContainerHighest) + .padding(10.dp, 4.dp), + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + LyricsModeTab( + label = "Synced", + isSelected = uiState.mode == LyricType.SYNCED, + onClick = { viewModel.setMode(LyricType.SYNCED) } + ) + LyricsModeTab( + label = "Plain", + isSelected = uiState.mode == LyricType.STATIC, + onClick = { viewModel.setMode(LyricType.STATIC) } + ) + } + } + + Spacer(modifier = Modifier.height(24.dp)) + + when { + uiState.isLoading -> { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + CircularProgressIndicator() + } + } + + uiState.error != null -> { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Text( + text = uiState.error ?: "Unknown error", + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.error, + textAlign = TextAlign.Center + ) + } + } + + uiState.mode == LyricType.SYNCED -> { + SyncedLyricsContent( + syncedLyrics = uiState.syncedLyrics ?: emptyList(), + currentIndex = viewModel.currentLyricIndex(positionMillis), + onScrollToIndex = { index -> + scope.launch { + // scroll will be handled by LazyColumn + } + } + ) + } + + uiState.mode == LyricType.STATIC -> { + PlainLyricsContent(plainLyrics = uiState.plainLyrics ?: "") + } + } + } + } +} + +@Composable +private fun LyricsModeTab( + label: String, + isSelected: Boolean, + onClick: () -> Unit, +) { + Surface( + onClick = onClick, + shape = RoundedCornerShape(20.dp), + color = if (isSelected) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.surface + }, + contentColor = if (isSelected) { + MaterialTheme.colorScheme.onPrimary + } else { + MaterialTheme.colorScheme.onSurface + } + ) { + Text( + text = label, + modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp), + style = MaterialTheme.typography.labelLarge, + fontWeight = FontWeight.SemiBold + ) + } +} + +@Composable +private fun SyncedLyricsContent( + syncedLyrics: List, + currentIndex: Int, + onScrollToIndex: (Int) -> Unit, +) { + if (syncedLyrics.isEmpty()) { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Text( + text = "No synced lyrics available", + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.Center + ) + } + return + } + + val listState = rememberLazyListState() + + LaunchedEffect(currentIndex) { + if (currentIndex >= 0) { + listState.animateScrollToItem( + index = currentIndex.coerceIn(0, syncedLyrics.lastIndex), + scrollOffset = -100 + ) + } + } + + LazyColumn( + state = listState, + modifier = Modifier.fillMaxSize(), + contentPadding = PaddingValues(vertical = 16.dp), + verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + itemsIndexed(syncedLyrics) { index, line -> + val isCurrentLine = index == currentIndex + Text( + text = line.text.ifBlank { "..." }, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 6.dp), + style = MaterialTheme.typography.bodyLarge.copy( + fontWeight = if (isCurrentLine) FontWeight.Bold else FontWeight.Normal, + color = if (isCurrentLine) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + ), + textAlign = TextAlign.Center + ) + } + } +} + +@Composable +private fun PlainLyricsContent( + plainLyrics: String, +) { + if (plainLyrics.isBlank()) { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Text( + text = "No plain lyrics available", + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.Center + ) + } + return + } + + LazyColumn { + item { + Text( + text = plainLyrics, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp), + style = MaterialTheme.typography.bodyLarge.copy(lineHeight = 30.sp), + color = MaterialTheme.colorScheme.onSurface, + textAlign = TextAlign.Center + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/lyrics/LyricsViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/lyrics/LyricsViewModel.kt new file mode 100644 index 00000000..516c8b7e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/lyrics/LyricsViewModel.kt @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.lyrics + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsLine +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.modules.plugin.PluginManager +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import kotlinx.serialization.Serializable + +@Serializable +enum class LyricType { + STATIC, + SYNCED +} + + +data class LyricsUiState( + val mode: LyricType = LyricType.SYNCED, + val syncedLyrics: List? = null, + val plainLyrics: String? = null, + val isLoading: Boolean = false, + val error: String? = null, +) + +class LyricsViewModel( + private val pluginManager: PluginManager, + audioPlayer: AudioPlayer, + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel() { + + private val _uiState = MutableStateFlow(LyricsUiState()) + val uiState: StateFlow = _uiState.asStateFlow() + + private var currentTrackId: String? = null + + val positionMillisFlow: StateFlow = audioPlayer.positionFlow + .map { it.inWholeMilliseconds } + .stateIn(viewModelScope, kotlinx.coroutines.flow.SharingStarted.WhileSubscribed(5000), 0L) + + fun setMode(mode: LyricType) { + _uiState.update { it.copy(mode = mode) } + } + + fun loadLyrics(forceReload: Boolean = false) { + viewModelScope.launch { + val entry = audioPlayerQueue.currentQueueEntryFlow.value ?: return@launch + val track = when (entry) { + is QueueEntry.StreamingTrack -> entry.track + is QueueEntry.LocalTrack -> return@launch + } + + if (!forceReload && currentTrackId == track.id && _uiState.value.syncedLyrics != null) { + return@launch + } + + currentTrackId = track.id + _uiState.update { it.copy(isLoading = true, error = null) } + try { + pluginManager.selectedLyricsPlugin.value?.let { pluginService -> + pluginService.use { + val lyrics = lyricsAPI.getLyrics(track) + + _uiState.update { + it.copy( + syncedLyrics = lyrics?.syncedLyrics, + plainLyrics = lyrics?.plainLyrics, + isLoading = false, + ) + } + } + } ?: run { + _uiState.update { it.copy(isLoading = false) } + } + } catch (e: Exception) { + _uiState.update { it.copy(isLoading = false, error = e.message) } + } + } + } + + init { + viewModelScope.launch { + audioPlayerQueue.currentQueueEntryFlow.collect { entry -> + val trackId = when (entry) { + is QueueEntry.StreamingTrack -> entry.track.id + else -> null + } + if (trackId != null && trackId != currentTrackId) { + loadLyrics() + } + } + } + } + + fun currentLyricIndex(positionMillis: Long): Int { + val lyrics = _uiState.value.syncedLyrics ?: emptyList() + if (lyrics.isEmpty()) return -1 + var lastIndex = 0 + for (i in lyrics.indices) { + if (lyrics[i].time <= positionMillis) { + lastIndex = i + } else { + break + } + } + return lastIndex + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistRepository.kt new file mode 100644 index 00000000..bdaf3860 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistRepository.kt @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.playlist + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.plugin.PluginManager +import io.github.reactivecircus.cache4k.Cache +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.launch + +@OptIn(ExperimentalCoroutinesApi::class) +class PlaylistRepository( + val pluginManager: PluginManager, + private val libraryRepository: LibraryRepository, +) { + val scope = CoroutineScope(Dispatchers.Default + SupervisorJob()) + + val plugin + get() = pluginManager.selectedMetadataPlugin.value + + private val playlistInfoCache = Cache.Builder>().build() + private val playlistTracksCache = Cache.Builder, PaginationResult>().build() + + init { + scope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + invalidateCaches() + } + } + } + + fun invalidateCaches() { + playlistInfoCache.invalidateAll() + playlistTracksCache.invalidateAll() + } + + suspend fun getPlaylistInfo(playlistId: String) = plugin?.let { plugin -> + playlistInfoCache.get(playlistId) { + pluginManager.withScope { + plugin.use { + val playlist = metadataPlaylistAPI.getPlaylist(playlistId) + val isSaved = metadataPlaylistAPI.isSavedPlaylists(listOf(playlistId)).firstOrNull() ?: false + playlist to isSaved + } + } + }.also { + libraryRepository.isSavedPlaylists(listOf(playlistId)) + } + } + + suspend fun getPlaylistTracks(playlistId: String, paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + playlistTracksCache.get(playlistId to (paginationStrategy ?: PaginationStrategy.Offset(0, 20))) { + pluginManager.withScope { + plugin.use { + metadataPlaylistAPI.getPlaylistTracks( + id = playlistId, + pagination = paginationStrategy + ) + } + } + } + } + + suspend fun toggleSavedPlaylist(playlistId: String, currentIsSaved: Boolean) = plugin?.let { plugin -> + if (currentIsSaved) { + libraryRepository.removeSavedPlaylists(listOf(playlistId)) + } else { + libraryRepository.savePlaylists(listOf(playlistId)) + } + !currentIsSaved + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistScreen.kt new file mode 100644 index 00000000..b960d7e2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistScreen.kt @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.playlist + +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Scaffold +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.PlayerState +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.ui.component.CollectionDetails +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.component.TrackList +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.core.ui.component.TrackOptionsState +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.modules.library.LibraryRepository +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf + +@Composable +fun PlaylistScreen(playlistId: String) { + val audioPlayerQueue: AudioPlayerQueue = koinInject() + val audioPlayer: AudioPlayer = koinInject() + val shareService: ShareService = koinInject() + val downloadsViewModel: DownloadsViewModel = koinViewModel() + val viewModel = koinViewModel( + key = playlistId, + parameters = { parametersOf(playlistId) } + ) + val navigationCommands = koinInject() + val state by viewModel.uiState.collectAsStateWithLifecycle() + val queue by audioPlayerQueue.queueFlow.collectAsStateWithLifecycle() + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + val playerState by audioPlayer.playerStateFlow.collectAsStateWithLifecycle() + val savedPlaylistIds by viewModel.savedPlaylistIds.collectAsStateWithLifecycle() + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModel.handleTrackOptionsAction(track, action) + if (action is TrackOptionsAction.Share) { + val uri = track.externalUri?.takeIf { it.isNotBlank() } + if (uri != null) { + shareService.share(uri, track.title) + } + } + if (action is TrackOptionsAction.Download) { + downloadsViewModel.downloadTrack(track) + } + } + + Scaffold( + topBar = { ApplicationMainBar() } + ) { innerPadding -> + when (state) { + is PlaylistScreenState.Loading -> { + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + SkeletonTree(true){ + CollectionDetails( + title = "Loading playlist...", + description = "", + imageURL = "", + ownerName = "Unknown", + ownerImageURL = null, + onOwnerClick = {}, + onPlay = {}, + onShufflePlay = {}, + onAddToQueue = {}, + isPlaying = false, + isFollowing = false, + onFollowClick = {}, + ) + } + }, + tracks = emptyList(), + error = null, + hasMore = false, + isLoading = true, + isLoadingNextPage = false, + currentTrackId = null, + isCurrentTrackPlaying = false, + onTrackClick = {}, + onLoadNextPage = {}, + onArtistClick = { navigationCommands.navigateTo(Routes.Artist(it.id)) }, + onAlbumClick = { navigationCommands.navigateTo(Routes.Album(it.id)) }, + onTrackOptionsAction = { _, _ -> }, + trackOptionsState = { TrackOptionsState() }, + ) + } + + is PlaylistScreenState.Error -> { + ErrorDisplay( + errorMessage = (state as PlaylistScreenState.Error).message, + onRetry = { viewModel.refresh() }, + modifier = Modifier.padding(innerPadding), + ) + } + + is PlaylistScreenState.Data -> { + val dataState = state as PlaylistScreenState.Data + val playlist = dataState.playlist + val owner = playlist?.owner + val ownerName = owner?.displayName ?: owner?.username ?: "Unknown" + val ownerImageURL = owner?.thumbnails?.firstOrNull()?.url + + val savedTrackIds by viewModel.savedTrackIds.collectAsStateWithLifecycle() + + + fun getTrackOptionsState(track: MetadataTrack): TrackOptionsState { + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val queueTrackIds = queue.mapNotNull { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id + }.toSet() + return TrackOptionsState( + isInQueue = queueTrackIds.contains(track.id), + isCurrentlyPlaying = track.id == currentTrackId, + isFavorite = savedTrackIds.contains(track.id), + isBlacklisted = false, + ) + } + + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + CollectionDetails( + title = playlist?.title ?: "Loading playlist...", + description = playlist?.description.orEmpty(), + imageURL = playlist?.thumbnails?.firstOrNull()?.url.orEmpty(), + ownerName = ownerName, + ownerImageURL = ownerImageURL, + onOwnerClick = {}, + onPlay = viewModel::playPlaylist, + onShufflePlay = {}, + onAddToQueue = viewModel::addPlaylistToQueue, + isPlaying = + currentCollectionEntry?.id == playlistId && + playerState == PlayerState.PLAYING, + isFollowing = savedPlaylistIds.contains(playlistId), + onFollowClick = viewModel::toggleSavedPlaylist, + showFollowButton = playlistId != "saved_tracks", + ) + }, + tracks = dataState.tracks, + error = null, + hasMore = dataState.nextPagination != null, + isLoading = state is PlaylistScreenState.Loading && dataState.tracks.isEmpty(), + isLoadingNextPage = state is PlaylistScreenState.Data.LoadingMore, + currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id, + isCurrentTrackPlaying = playerState == PlayerState.PLAYING, + onTrackClick = viewModel::playPlaylistFromTrack, + onLoadNextPage = viewModel::loadNextTracksPage, + onArtistClick = { navigationCommands.navigateTo(Routes.Artist(it.id)) }, + onAlbumClick = { navigationCommands.navigateTo(Routes.Album(it.id)) }, + onTrackOptionsAction = ::handleTrackOptionsAction, + trackOptionsState = ::getTrackOptionsState, + onBulkDownload = { tracks -> + downloadsViewModel.downloadTracks(tracks) + }, + onBulkAddToQueue = { tracks -> + viewModel.addTracksToQueue(tracks) + }, + onBulkPlayNext = { tracks -> + viewModel.playTracksNext(tracks) + }, + ) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistViewModel.kt new file mode 100644 index 00000000..f406982a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/playlist/PlaylistViewModel.kt @@ -0,0 +1,254 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.playlist + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.core.ui.component.TrackOptionsState +import dev.krtirtho.spotube.modules.library.LibraryRepository +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent + +sealed interface PlaylistScreenState { + data object Loading : PlaylistScreenState + + sealed interface Data : PlaylistScreenState { + val playlist: MetadataPlaylist? + val isSaved: Boolean + val tracks: List + val nextPagination: PaginationStrategy? + val isSaving: Boolean + + data class Loaded( + override val playlist: MetadataPlaylist? = null, + override val isSaved: Boolean = false, + override val tracks: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + override val isSaving: Boolean = false, + ) : Data { + fun toLoadingMore(): LoadingMore = LoadingMore( + playlist = playlist, + isSaved = isSaved, + tracks = tracks, + nextPagination = nextPagination, + isSaving = isSaving, + ) + } + + data class LoadingMore( + override val playlist: MetadataPlaylist? = null, + override val isSaved: Boolean = false, + override val tracks: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + override val isSaving: Boolean = false, + ) : Data + } + + data class Error(val message: String) : PlaylistScreenState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class PlaylistViewModel( + private val playlistId: String, + private val repository: PlaylistRepository, + private val libraryRepository: LibraryRepository, + private val savedTracksRepository: SavedTracksRepository, + private val playbackHelper: CollectionPlaybackHelper, + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val _state = MutableStateFlow(PlaylistScreenState.Loading) + val uiState: StateFlow = _state.asStateFlow() + val savedPlaylistIds + get() = libraryRepository.savedPlaylistIdsFlow + + init { + viewModelScope.launch { + repository.pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() = runCatching { + _state.value = PlaylistScreenState.Loading + val playlistInfo = repository.getPlaylistInfo(playlistId) + val tracksResult = repository.getPlaylistTracks(playlistId) + + tracksResult?.items?.let { savedTracksRepository.isSavedTracks(it.map { item -> item.id }) } + _state.value = PlaylistScreenState.Data.Loaded( + playlist = playlistInfo?.first, + isSaved = playlistInfo?.second ?: false, + tracks = tracksResult?.items ?: emptyList(), + nextPagination = tracksResult?.nextPagination, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load playlist" } + _state.value = PlaylistScreenState.Error(e.message ?: "Unknown error") + } + + suspend fun loadMoreTracks() = runCatching { + val currentState = _state.value + if (currentState is PlaylistScreenState.Data.Loaded && currentState.nextPagination != null) { + _state.value = currentState.toLoadingMore() + val result = repository.getPlaylistTracks(playlistId, currentState.nextPagination) + + result?.items?.let { savedTracksRepository.isSavedTracks(it.map { item -> item.id }) } + _state.value = PlaylistScreenState.Data.Loaded( + playlist = currentState.playlist, + isSaved = currentState.isSaved, + tracks = currentState.tracks + (result?.items ?: emptyList()), + nextPagination = result?.nextPagination, + isSaving = currentState.isSaving, + ) + } + }.onFailure { e -> + logger.e(e) { "Failed to load more tracks" } + _state.value = PlaylistScreenState.Error(e.message ?: "Unknown error") + } + + fun loadNextTracksPage() { + viewModelScope.launch { + loadMoreTracks() + } + } + + fun toggleSavedPlaylist() { + viewModelScope.launch { + val isLiked = libraryRepository.isSavedPlaylists(listOf(playlistId)).firstOrNull() ?: false + if (isLiked) { + libraryRepository.removeSavedPlaylists(listOf(playlistId)) + } else { + libraryRepository.savePlaylists(listOf(playlistId)) + } + } + } + + fun playPlaylist() { + viewModelScope.launch { playbackHelper.playPlaylist(playlistId) } + } + + fun addPlaylistToQueue() { + viewModelScope.launch { playbackHelper.addPlaylistToQueue(playlistId) } + } + + fun playPlaylistFromTrack(track: MetadataTrack) { + viewModelScope.launch { playbackHelper.playPlaylistFromTrack(playlistId, track) } + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModelScope.launch { + when (action) { + is TrackOptionsAction.StartRadio -> {} + is TrackOptionsAction.PlayNext -> { + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.removeFromQueue(queue[queueIndex]) + } + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + val newQueue = audioPlayerQueue.getQueue() + val newIndex = newQueue.indexOfFirst { e -> + (e as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (newIndex > 0) { + audioPlayerQueue.move(newIndex, 0) + } + } + + is TrackOptionsAction.AddToQueue -> { + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + } + + is TrackOptionsAction.RemoveFromQueue -> { + val queue = audioPlayerQueue.getQueue() + queue.find { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }?.let { audioPlayerQueue.removeFromQueue(it) } + } + + is TrackOptionsAction.ToggleFavorite -> { + val savedIds = savedTrackIds.value + if (savedIds.contains(track.id)) { + savedTracksRepository.removeSavedTracks(listOf(track.id)) + } else { + savedTracksRepository.saveTracks(listOf(track.id)) + } + } + + is TrackOptionsAction.Download -> {} + is TrackOptionsAction.ToggleBlacklist -> {} + is TrackOptionsAction.Share -> {} + } + } + } + + fun addTracksToQueue(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllToQueue(entries) + } + } + + fun playTracksNext(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllAfterCurrent(entries) + } + } + + val savedTrackIds + get() = savedTracksRepository.savedTracksIdsFlow + private fun MetadataTrack.matchesTrack(other: MetadataTrack): Boolean { + if (id.isNotBlank() && other.id.isNotBlank()) return id == other.id + return title == other.title && + durationMs == other.durationMs && + album?.id == other.album?.id && + artists.map { it.id.ifBlank { it.name } } == other.artists.map { it.id.ifBlank { it.name } } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/BuiltInPlugins.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/BuiltInPlugins.kt new file mode 100644 index 00000000..a78069cf --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/BuiltInPlugins.kt @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin + +val NEWPIPE_YOUTUBE_BUILT_IN_PLUGIN = PluginEntry( + name = "NewPipe YouTube", + version = "0.1.0", + apiVersion = PLUGIN_API_VERSION, + description = "NewPipe's YouTube plugin for fetching audio streams.", + author = "Spotube Team", + capabilities = listOf( + PluginCapability.NETWORK_REQUESTS, + PluginCapability.PERSISTENT_STORAGE + ), + abilities = listOf(PluginAbility.AUDIO) +) +val MUSICBRAINZ_LISTENBRAINZ_BUILT_IN_PLUGIN = PluginEntry( + name = "MusicBrainz ListenBrainz", + version = "0.1.0", + apiVersion = PLUGIN_API_VERSION, + description = "MusicBrainz ListenBrainz plugin for scrobbling tracks and fetching metadata.", + author = "Spotube Team", + capabilities = listOf( + PluginCapability.NETWORK_REQUESTS, + PluginCapability.PERSISTENT_STORAGE, + PluginCapability.WEBVIEW, + ), + abilities = listOf(PluginAbility.METADATA, PluginAbility.SCROBBLE) +) + +val LRCLIB_BUILT_IN_PLUGIN = PluginEntry( + name = "LRCLib Lyrics", + version = "0.1.0", + apiVersion = PLUGIN_API_VERSION, + description = "LRCLib Lyrics plugin for fetching lyrics.", + author = "Spotube Team", + capabilities = listOf( + PluginCapability.NETWORK_REQUESTS, + ), + abilities = listOf(PluginAbility.LYRICS) +) +val BUILT_IN_PLUGINS = listOf( + MUSICBRAINZ_LISTENBRAINZ_BUILT_IN_PLUGIN, + NEWPIPE_YOUTUBE_BUILT_IN_PLUGIN, + LRCLIB_BUILT_IN_PLUGIN, +) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginManager.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginManager.kt new file mode 100644 index 00000000..39087d0b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginManager.kt @@ -0,0 +1,657 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin + +import dev.krtirtho.spotube.core.db.Database +import dev.krtirtho.spotube.core.db.DatabaseKeys +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.core.zipline.BuiltInPluginService +import dev.krtirtho.spotube.core.zipline.PluginService +import dev.krtirtho.spotube.core.zipline.ZiplinePluginService +import io.ktor.client.HttpClient +import io.ktor.client.request.get +import io.ktor.client.statement.bodyAsChannel +import io.ktor.utils.io.readRemaining +import kotlinx.coroutines.CoroutineExceptionHandler +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.IO +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.async +import kotlinx.coroutines.awaitCancellation +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterIsInstance +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.mapNotNull +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import kotlinx.io.readByteArray +import kotlinx.serialization.json.Json +import net.swiftzer.semver.SemVer +import no.synth.kmpzip.okio.ZipInputStream +import okio.ByteString.Companion.toByteString +import okio.FileSystem +import okio.Path +import okio.Path.Companion.toPath +import okio.SYSTEM +import okio.buffer +import okio.use +import org.koin.core.component.KoinComponent +import kotlin.collections.set +import kotlin.getValue + +const val PLUGIN_API_VERSION = "0.0.1" + +class PluginManager( + val database: Database, + val paths: Paths, +) : KoinComponent { + private val logger by injectLogger() + private val pluginExceptionHandler = CoroutineExceptionHandler { _, exception -> + logger.e(exception) { "Plugin runtime threw an unhandled exception. Intercepted safely." } + } + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate + pluginExceptionHandler) + private val pluginsDir = "${paths.getApplicationDataDirPath()}/plugins".toPath() + private val httpClient = HttpClient() + + + enum class InstallPromptKind { + INSTALL, + UPDATE, + REPLACE, + INFO, + } + + // Holds a parsed plugin awaiting user confirmation or acknowledgement. + class PendingPlugin( + val entry: PluginEntry, + val kind: InstallPromptKind, + val title: String, + val message: String, + val bytes: ByteArray? = null, + val existingEntry: PluginEntry? = null, + val confirmLabel: String? = null, + ) + + val pendingPlugin = MutableStateFlow(null) + + val state: StateFlow = database.settingsDataStore.data + .map { p -> + val json = p[DatabaseKeys.PLUGINS_STATE_KEY] + val defaultSelectedPlugins = mapOf( + PluginAbility.METADATA to MUSICBRAINZ_LISTENBRAINZ_BUILT_IN_PLUGIN, + PluginAbility.AUDIO to NEWPIPE_YOUTUBE_BUILT_IN_PLUGIN, + ) + if (json == null) { + PluginManagerStates.Data( + plugins = BUILT_IN_PLUGINS, + selectedPlugins = defaultSelectedPlugins + ) + } else { + try { + val res = Json.decodeFromString(json) + val plugins = res.plugins.map { + // Replace plugins that match built-in plugin IDs with the built-in + // plugin entries. This ensures that any updates to built-in plugins + // are reflected in the UI, while still allowing user-installed plugins + // to be loaded from disk. + if (it in BUILT_IN_PLUGINS) { + BUILT_IN_PLUGINS.first { builtIn -> builtIn.id == it.id } + } else it + }.toSet() + + res.copy( + plugins = (plugins union BUILT_IN_PLUGINS).toList(), + selectedPlugins = res.selectedPlugins.ifEmpty { + defaultSelectedPlugins + } + ) + } catch (_: Exception) { + PluginManagerStates.Data( + BUILT_IN_PLUGINS, + selectedPlugins = defaultSelectedPlugins + ) // Fallback on error + } + } + } + .stateIn( + scope = scope, + started = SharingStarted.Eagerly, + initialValue = PluginManagerStates.Loading + ) + + @OptIn(ExperimentalCoroutinesApi::class) + val ziplineServices = state + .filterIsInstance() + .map { it.selectedPlugins } + .distinctUntilChanged() + .flatMapLatest { plugins -> + flow { + val ziplineServices: MutableMap = + mutableMapOf() + val ziplineServicesByPluginID = mutableMapOf() + try { + for (ability in PluginAbility.entries) { + val plugin = plugins[ability] ?: continue + + if (ziplineServicesByPluginID.containsKey(plugin.id)) { + ziplineServices[ability] = ziplineServicesByPluginID[plugin.id] + } else if (plugin in BUILT_IN_PLUGINS) { + val service = BuiltInPluginService(plugin) + ziplineServices[ability] = service + ziplineServicesByPluginID[plugin.id] = service + service.start() + } else { + val service = ZiplinePluginService( + applicationName = plugin.name, + manifestUrl = "http://localhost?path=${(pluginsDir / plugin.id.toPath() / "manifest.zipline.json")}", + pluginInfo = plugin, + ) + ziplineServices[ability] = service + ziplineServicesByPluginID[plugin.id] = service + service.start() + } + } + emit(ziplineServices) + // Keep the flow alive until the next plugin is selected. + awaitCancellation() + } finally { + // Stop services that are no longer selected + val selectedPluginIDs = plugins.values.map { it.id }.toSet() + ziplineServicesByPluginID.forEach { (pluginID, service) -> + if (!selectedPluginIDs.contains(pluginID)) { + service.stop() + } + } + } + } + } + .stateIn( + scope = scope, + // Keep plugin runtime alive across screen/navigation transitions. + started = SharingStarted.Eagerly, + initialValue = null + ) + + private fun filterPluginByType(ability: PluginAbility): StateFlow> { + return state + .filterIsInstance() + .map { state -> + state.plugins.filter { + it.abilities.contains(ability) + } + } + .stateIn( + scope = scope, + started = SharingStarted.Eagerly, + initialValue = emptyList() + ) + } + + private fun filterSelectedPluginByType(ability: PluginAbility): StateFlow { + return ziplineServices + .mapNotNull { state -> + state?.get(ability) + } + .stateIn( + scope = scope, + started = SharingStarted.Eagerly, + initialValue = null + ) + } + + val metadataPlugins: StateFlow> = filterPluginByType(PluginAbility.METADATA) + val audioPlugins = filterPluginByType(PluginAbility.AUDIO) + val lyricsPlugins = filterPluginByType(PluginAbility.LYRICS) + val scrobblePlugins = filterPluginByType(PluginAbility.SCROBBLE) + + val selectedMetadataPlugin = + filterSelectedPluginByType(PluginAbility.METADATA) + val selectedAudioPlugin = + filterSelectedPluginByType(PluginAbility.AUDIO) + val selectedLyricsPlugin = + filterSelectedPluginByType(PluginAbility.LYRICS) + val selectedScrobblePlugin = + filterSelectedPluginByType(PluginAbility.SCROBBLE) + + + fun launchTask(block: suspend CoroutineScope.() -> Unit): Job { + return scope.launch(block = block) + } + + fun asyncTask(block: suspend CoroutineScope.() -> T) = + scope.async(context = Dispatchers.IO, block = block) + suspend fun withScope(block: suspend CoroutineScope.() -> T) = withContext( + scope.coroutineContext.minusKey(Job) + Dispatchers.IO + ) { + block() + } + + + private suspend fun updatePluginsState(newState: PluginManagerStates.Data) { + database.settingsDataStore.updateData { preferences -> + preferences.toMutablePreferences().apply { + this[DatabaseKeys.PLUGINS_STATE_KEY] = Json.encodeToString(newState) + } + } + } + + suspend fun addPluginFromURL(url: String) { + withContext(Dispatchers.IO) { + val response = httpClient.get(url) + val bytes = response.bodyAsChannel().readRemaining().readByteArray() + preparePlugin(bytes) + } + } + + /** Parses the zip, reads plugin.json, then surfaces a PendingPlugin for the UI to confirm. */ + suspend fun preparePlugin(bytes: ByteArray) { + withContext(Dispatchers.IO) { + val tempDir = "${paths.getApplicationCacheDirPath()}/temp-plugin-preview".toPath() + try { + if (FileSystem.SYSTEM.exists(tempDir)) FileSystem.SYSTEM.deleteRecursively(tempDir) + FileSystem.SYSTEM.createDirectories(tempDir) + + val okioBuffer = okio.Buffer().apply { write(bytes) } + okioBuffer.use { bufferedSource -> + val zipIn = ZipInputStream(bufferedSource) + var entry = zipIn.nextEntry + while (entry != null) { + val entryPath = tempDir / entry.name.toPath() + if (entry.isDirectory) { + FileSystem.SYSTEM.createDirectories(entryPath) + } else { + entryPath.parent?.let { + if (!FileSystem.SYSTEM.exists(it)) FileSystem.SYSTEM.createDirectories( + it + ) + } + FileSystem.SYSTEM.sink(entryPath).buffer().use { sink -> + sink.write(zipIn.readBytes()) + } + } + entry = zipIn.nextEntry + } + } + + val pluginJsonPath = tempDir / "plugin.json".toPath() + if (!FileSystem.SYSTEM.exists(pluginJsonPath)) { + throw IllegalArgumentException("plugin.json not found in the zip file") + } + + val pluginJson = + FileSystem.SYSTEM.source(pluginJsonPath).buffer().use { it.readUtf8() } + val pluginEntry = try { + Json.decodeFromString(pluginJson) + } catch (e: Exception) { + throw IllegalArgumentException("Invalid plugin.json format: ${e.message}") + } + + pendingPlugin.value = buildPendingPlugin(pluginEntry, bytes) + } catch (e: Exception) { + throw Exception("Failed to read plugin: ${e.message}", e) + } finally { + if (FileSystem.SYSTEM.exists(tempDir)) { + try { + FileSystem.SYSTEM.deleteRecursively(tempDir) + } catch (_: Exception) { + } + } + } + } + } + + /** Called when the user confirms installation/update/replacement in the dialog. */ + fun confirmInstall() { + val pending = pendingPlugin.value ?: return + val bytes = pending.bytes ?: return dismissInstall() + val allowReplacingInstalled = when (pending.kind) { + InstallPromptKind.INSTALL -> false + InstallPromptKind.UPDATE, InstallPromptKind.REPLACE -> true + InstallPromptKind.INFO -> return dismissInstall() + InstallPromptKind.REPLACE -> true + } + pendingPlugin.value = null + scope.launch { + addPluginFromByteArray( + bytes = bytes, + allowReplacingInstalled = allowReplacingInstalled + ) + } + } + + /** Called when the user closes or denies the dialog. */ + fun dismissInstall() { + pendingPlugin.value = null + } + + suspend fun addPluginFromByteArray( + bytes: ByteArray, + allowReplacingInstalled: Boolean = false, + ) { + withContext(Dispatchers.IO) { + if (!FileSystem.SYSTEM.exists(pluginsDir)) { + FileSystem.SYSTEM.createDirectories(pluginsDir) + } + + val tempDir = "${paths.getApplicationCacheDirPath()}/temp-plugin".toPath() + + try { + if (FileSystem.SYSTEM.exists(tempDir)) { + FileSystem.SYSTEM.deleteRecursively(tempDir) + } + FileSystem.SYSTEM.createDirectories(tempDir) + + val okioBuffer = okio.Buffer() + okioBuffer.write(bytes) + + okioBuffer.use { bufferedSource -> + val zipIn = ZipInputStream(bufferedSource) + var entry = zipIn.nextEntry + + while (entry != null) { + val entryPath = tempDir / entry.name.toPath() + + if (entry.isDirectory) { + FileSystem.SYSTEM.createDirectories(entryPath) + } else { + entryPath.parent?.let { parent -> + if (!FileSystem.SYSTEM.exists(parent)) { + FileSystem.SYSTEM.createDirectories(parent) + } + } + + FileSystem.SYSTEM.sink(entryPath).buffer().use { sink -> + val entryBytes = zipIn.readBytes() + val hash = entryBytes.toByteString().sha256().hex() + logger.d { "Extracting ${entry.name} (${entryBytes.size / 1024.0} KB, SHA-256: $hash)" } + sink.write(entryBytes) + sink.flush() + } + } + + entry = zipIn.nextEntry + } + } + + val pluginJsonPath = tempDir / "plugin.json".toPath() + if (!FileSystem.SYSTEM.exists(pluginJsonPath)) { + throw IllegalArgumentException("plugin.json not found in the zip file") + } + val pluginManifestPath = tempDir / "manifest.zipline.json".toPath() + if (!FileSystem.SYSTEM.exists(pluginManifestPath)) { + throw IllegalArgumentException("manifest.zipline.json not found in the zip file") + } + + val pluginJson = FileSystem.SYSTEM.source(pluginJsonPath).buffer().use { source -> + source.readUtf8() + } + + val pluginEntry = try { + Json.decodeFromString(pluginJson) + } catch (e: Exception) { + throw IllegalArgumentException("Invalid plugin.json format: ${e.message}") + } + + ensurePluginApiCompatible(pluginEntry) + + val installedPlugin = findInstalledPlugin(pluginEntry.id) + if (installedPlugin != null && !allowReplacingInstalled) { + throw IllegalArgumentException( + when (compareVersions(installedPlugin, pluginEntry)) { + VersionRelation.Update -> "A newer version of ${pluginEntry.name} is available. Confirm the update before installing." + VersionRelation.Replace -> "${pluginEntry.name} is already installed. Confirm replacing it before installing." + } + ) + } + + val finalPluginDir = pluginsDir / pluginEntry.id.toPath() + if (FileSystem.SYSTEM.exists(finalPluginDir)) { + FileSystem.SYSTEM.deleteRecursively(finalPluginDir) + } + FileSystem.SYSTEM.createDirectories(finalPluginDir) + + FileSystem.SYSTEM.list(tempDir).forEach { sourcePath -> + val relativePath = + sourcePath.toString().removePrefix(tempDir.toString()).trimStart('/', '\\') + val targetPath = finalPluginDir / relativePath.toPath() + + if (FileSystem.SYSTEM.metadata(sourcePath).isDirectory) { + copyDirectory(sourcePath, targetPath) + } else { + targetPath.parent?.let { parent -> + if (!FileSystem.SYSTEM.exists(parent)) { + FileSystem.SYSTEM.createDirectories(parent) + } + } + FileSystem.SYSTEM.copy(sourcePath, targetPath) + } + } + + addPlugin(pluginEntry) + } catch (e: Exception) { + throw Exception("Failed to install plugin: ${e.message}", e) + } finally { + if (FileSystem.SYSTEM.exists(tempDir)) { + try { + FileSystem.SYSTEM.deleteRecursively(tempDir) + } catch (_: Exception) { + } + } + } + } + } + + private fun copyDirectory(source: Path, target: Path) { + if (!FileSystem.SYSTEM.exists(target)) { + FileSystem.SYSTEM.createDirectories(target) + } + + FileSystem.SYSTEM.list(source).forEach { sourcePath -> + val fileName = sourcePath.name + val targetPath = target / fileName.toPath() + + if (FileSystem.SYSTEM.metadata(sourcePath).isDirectory) { + copyDirectory(sourcePath, targetPath) + } else { + FileSystem.SYSTEM.copy(sourcePath, targetPath) + } + } + } + + private suspend fun addPlugin(plugin: PluginEntry) { + if (plugin in BUILT_IN_PLUGINS) { + throw IllegalArgumentException("Built-in plugins are already included and can't be added again.") + } + + val currentState = state.value + if (currentState is PluginManagerStates.Data) { + val updatedPlugins = currentState.plugins.filterNot { it.id == plugin.id } + plugin + val updatedSelectedPlugins = + currentState.selectedPlugins.mapValues { (_, selectedPlugin) -> + if (selectedPlugin.id == plugin.id) plugin else selectedPlugin + } + val newState = PluginManagerStates.Data(updatedPlugins, updatedSelectedPlugins) + updatePluginsState(newState) + } + } + + suspend fun removePlugin(plugin: PluginEntry) { + if (plugin in BUILT_IN_PLUGINS) { + throw IllegalArgumentException("Built-in plugins can't be removed.") + } + + val currentState = state.value + if (currentState is PluginManagerStates.Data) { + val updatedPlugins = currentState.plugins.filterNot { it.id == plugin.id } + val updatedSelectedPlugins = + currentState.selectedPlugins.filterValues { it.id != plugin.id } + val newState = PluginManagerStates.Data(updatedPlugins, updatedSelectedPlugins) + + withContext(Dispatchers.IO) { + val pluginDir = pluginsDir / plugin.id.toPath() + if (FileSystem.SYSTEM.exists(pluginDir)) { + FileSystem.SYSTEM.deleteRecursively(pluginDir) + } + } + + updatePluginsState(newState) + } + } + + fun setSelectedPlugin(ability: PluginAbility, plugin: PluginEntry?) { + val currentState = state.value + if (currentState is PluginManagerStates.Data) { + val newState = currentState.copy( + selectedPlugins = if (plugin == null) { + currentState.selectedPlugins - ability + } else { + currentState.selectedPlugins + (ability to plugin) + } + ) + scope.launch { + updatePluginsState(newState) + } + } + } + + private enum class VersionRelation { + Update, + Replace, + } + + private fun buildPendingPlugin(pluginEntry: PluginEntry, bytes: ByteArray): PendingPlugin { + val apiError = getPluginApiCompatibilityError(pluginEntry) + if (apiError != null) { + return PendingPlugin( + entry = pluginEntry, + kind = InstallPromptKind.INFO, + title = "Plugin API not compatible", + message = apiError, + ) + } + + val installedPlugin = findInstalledPlugin(pluginEntry.id) ?: return PendingPlugin( + entry = pluginEntry, + kind = InstallPromptKind.INSTALL, + title = "Install plugin?", + message = "${pluginEntry.name} will be added to your installed plugins.", + bytes = bytes, + confirmLabel = "Install", + ) + + return when (compareVersions(installedPlugin, pluginEntry)) { + VersionRelation.Update -> PendingPlugin( + entry = pluginEntry, + kind = InstallPromptKind.UPDATE, + title = "Update plugin?", + message = "An older version is installed (${installedPlugin.version}). Update to ${pluginEntry.version}?", + bytes = bytes, + existingEntry = installedPlugin, + confirmLabel = "Update", + ) + + VersionRelation.Replace -> PendingPlugin( + entry = pluginEntry, + kind = InstallPromptKind.REPLACE, + title = "Replace installed plugin?", + message = buildReplaceMessage(installedPlugin, pluginEntry), + bytes = bytes, + existingEntry = installedPlugin, + confirmLabel = "Replace", + ) + } + } + + private fun buildReplaceMessage( + installedPlugin: PluginEntry, + incomingPlugin: PluginEntry + ): String { + val incomingVersion = parseSemVerOrNull(incomingPlugin.version) + val installedVersion = parseSemVerOrNull(installedPlugin.version) + + return when { + incomingVersion == null -> "${incomingPlugin.name} uses an invalid semantic version (${incomingPlugin.version}) and can't be compared as an update. Replace the installed plugin anyway?" + installedVersion == null -> "The installed version (${installedPlugin.version}) can't be compared using semantic versioning. Replace it with ${incomingPlugin.version}?" + incomingVersion == installedVersion -> "Version ${incomingPlugin.version} is already installed. Replace the existing plugin with the supplied copy?" + incomingVersion < installedVersion -> "Installed version ${installedPlugin.version} is newer than the supplied version ${incomingPlugin.version}. Replace it anyway?" + else -> "Replace the installed plugin with the supplied copy?" + } + } + + private fun compareVersions( + installedPlugin: PluginEntry, + incomingPlugin: PluginEntry + ): VersionRelation { + val installedVersion = parseSemVerOrNull(installedPlugin.version) + val incomingVersion = parseSemVerOrNull(incomingPlugin.version) + + return if (installedVersion != null && incomingVersion != null && incomingVersion > installedVersion) { + VersionRelation.Update + } else { + VersionRelation.Replace + } + } + + private fun findInstalledPlugin(id: String): PluginEntry? { + val currentState = state.value as? PluginManagerStates.Data + return currentState?.plugins?.find { it.id == id } + } + + private fun parseSemVerOrNull(version: String): SemVer? { + return try { + SemVer.parse(version) + } catch (_: Exception) { + null + } + } + + private fun ensurePluginApiCompatible(pluginEntry: PluginEntry) { + getPluginApiCompatibilityError(pluginEntry)?.let { error -> + throw IllegalArgumentException(error) + } + } + + private fun getPluginApiCompatibilityError(pluginEntry: PluginEntry): String? { + val pluginApiVersion = parseSemVerOrNull(pluginEntry.apiVersion) + ?: return "${pluginEntry.name} declares an invalid apiVersion (${pluginEntry.apiVersion}). Expected semantic versioning compatible with $PLUGIN_API_VERSION." + val appApiVersion = parseSemVerOrNull(PLUGIN_API_VERSION) + ?: return "Spotube plugin API version $PLUGIN_API_VERSION is invalid." + + val compatible = if (pluginApiVersion.major == 0 || appApiVersion.major == 0) { + pluginApiVersion.major == appApiVersion.major && pluginApiVersion.minor == appApiVersion.minor + } else { + pluginApiVersion.major == appApiVersion.major + } + + return if (compatible) { + null + } else { + "${pluginEntry.name} targets plugin API ${pluginEntry.apiVersion}, but Spotube supports breaking plugin API $PLUGIN_API_VERSION. Install a plugin built for the same breaking API version." + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginModels.kt new file mode 100644 index 00000000..e9d4cd33 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginModels.kt @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin + +import com.goncalossilva.murmurhash.MurmurHash3 +import kotlinx.serialization.Serializable + +enum class PluginCapability { + PERSISTENT_STORAGE, + NETWORK_REQUESTS, + WEBVIEW +} + +//Set naming strategy to snake_case for better interoperability with JavaScript plugins +@Serializable +enum class PluginAbility { + METADATA, + AUDIO, + LYRICS, + SCROBBLE, +} + +@Serializable +data class PluginEntry( + val name: String, + val version: String, + val apiVersion: String, + val description: String, + val author: String, + val capabilities: List, + val abilities: List +) { + @Suppress("REDUNDANT_CALL_OF_CONVERSION_METHOD") + val id: String = MurmurHash3().hash32x86("$name:$author".encodeToByteArray()) + .toUInt() + .toString(16) +} + +sealed class PluginManagerStates { + @Serializable + data class Data( + val plugins: List, + val selectedPlugins: Map = emptyMap() + ) : PluginManagerStates() + + data object Loading : PluginManagerStates() +// data class Error(val message: String) : PluginViewModelStates() +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginScreen.kt new file mode 100644 index 00000000..d58e3444 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/PluginScreen.kt @@ -0,0 +1,316 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import compose.icons.FeatherIcons +import compose.icons.feathericons.Package +import dev.krtirtho.spotube.PlatformType +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.getPlatform +import dev.krtirtho.spotube.modules.plugin.components.InstallSection +import dev.krtirtho.spotube.modules.plugin.components.PluginCard +import dev.krtirtho.spotube.modules.plugin.components.PluginPermissionDialog +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import io.github.vinceglb.filekit.dialogs.FileKitType +import io.github.vinceglb.filekit.dialogs.compose.rememberFilePickerLauncher +import io.github.vinceglb.filekit.readBytes +import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.stringResource +import org.koin.compose.koinInject +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.plugin_empty_subtitle +import spotube.composeapp.generated.resources.plugin_empty_title +import spotube.composeapp.generated.resources.plugin_error_download_failed +import spotube.composeapp.generated.resources.plugin_error_enter_url +import spotube.composeapp.generated.resources.plugin_error_url_scheme +import spotube.composeapp.generated.resources.plugin_installed_count +import spotube.composeapp.generated.resources.plugin_installed_plural +import spotube.composeapp.generated.resources.plugin_installed_singular +import spotube.composeapp.generated.resources.plugin_screen_title + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun PluginScreen( + pluginManager: PluginManager, + webviewController: WebViewController = koinInject() +) { + val scope = rememberCoroutineScope() + val platform = remember { getPlatform() } + val pendingPlugin by pluginManager.pendingPlugin.collectAsStateWithLifecycle() + val pluginsState by pluginManager.state.collectAsStateWithLifecycle() + val activeServices by pluginManager.ziplineServices.collectAsStateWithLifecycle() + val shellBottomInset = LocalAppShellBottomInset.current + + var urlInput by remember { mutableStateOf("") } + var urlError by remember { mutableStateOf(null) } + var isLoadingUrl by remember { mutableStateOf(false) } + + val pleaseEnterUrl = stringResource(Res.string.plugin_error_enter_url) + val urlSchemeError = stringResource(Res.string.plugin_error_url_scheme) + val downloadFailed = stringResource(Res.string.plugin_error_download_failed) + + val launcher = rememberFilePickerLauncher( + type = FileKitType.File( + extensions = if (platform.type == PlatformType.Android) listOf() else listOf("smplug") + ) + ) { file -> + if (file != null) { + scope.launch { pluginManager.preparePlugin(file.readBytes()) } + } + } + + fun submitUrl() { + val url = urlInput.trim() + if (url.isBlank()) { + urlError = pleaseEnterUrl + return + } + if (!url.startsWith("http://") && !url.startsWith("https://")) { + urlError = urlSchemeError + return + } + urlError = null + isLoadingUrl = true + scope.launch { + try { + pluginManager.addPluginFromURL(url) + urlInput = "" + } catch (e: Exception) { + urlError = e.message ?: downloadFailed + } finally { + isLoadingUrl = false + } + } + } + + pendingPlugin?.let { pending -> + PluginPermissionDialog( + pluginInfo = pending.entry, + title = pending.title, + message = pending.message, + confirmLabel = pending.confirmLabel, + existingPlugin = pending.existingEntry, + onConfirm = if (pending.kind != PluginManager.InstallPromptKind.INFO && pending.confirmLabel != null) { + { pluginManager.confirmInstall() } + } else { + null + }, + onDismiss = { pluginManager.dismissInstall() } + ) + } + + Scaffold( + topBar = { + ApplicationMainBar(title = { Text(stringResource(Res.string.plugin_screen_title)) }) + } + ) { innerPadding -> + when (val state = pluginsState) { + is PluginManagerStates.Loading -> { + Box( + modifier = Modifier.fillMaxSize().padding(innerPadding), + contentAlignment = Alignment.Center + ) { CircularProgressIndicator() } + } + + is PluginManagerStates.Data -> { + Box( + modifier = Modifier + .fillMaxSize() + .padding(innerPadding) + ) { + LazyColumn( + modifier = Modifier.widthIn(max = 1280.dp).align(Alignment.TopCenter), + contentPadding = PaddingValues( + start = 12.dp, + end = 12.dp, + top = 8.dp, + bottom = 24.dp + shellBottomInset + ), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) + { + // ── Install section ─────────────────────────────────── + item { + InstallSection( + urlInput = urlInput, + onUrlChange = { urlInput = it; urlError = null }, + urlError = urlError, + isLoadingUrl = isLoadingUrl, + onSubmitUrl = { submitUrl() }, + onPickFile = { launcher.launch() } + ) + } + + if (state.plugins.isEmpty()) { + item { + Box( + modifier = Modifier.fillMaxWidth().padding(vertical = 48.dp), + contentAlignment = Alignment.Center + ) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + Surface( + modifier = Modifier.size(72.dp) + .clip(RoundedCornerShape(18.dp)), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.1f) + ) { + Box(contentAlignment = Alignment.Center) { + Icon( + FeatherIcons.Package, + contentDescription = null, + modifier = Modifier.size(32.dp), + tint = MaterialTheme.colorScheme.primary + ) + } + } + Text( + stringResource(Res.string.plugin_empty_title), + style = MaterialTheme.typography.titleSmall, + fontWeight = FontWeight.SemiBold + ) + Text( + stringResource(Res.string.plugin_empty_subtitle), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + } + } else { + // ── Plugin list ─────────────────────────────────── + item { + val noun = if (state.plugins.size == 1) { + stringResource(Res.string.plugin_installed_singular) + } else { + stringResource(Res.string.plugin_installed_plural) + } + Text( + stringResource( + Res.string.plugin_installed_count, + state.plugins.size, + noun + ), + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(horizontal = 4.dp, vertical = 4.dp) + ) + } + items(state.plugins) { plugin -> + val isSelected = state.selectedPlugins.containsValue(plugin) + val selectedAbility = state.selectedPlugins + .entries + .firstOrNull { (_, selectedPlugin) -> selectedPlugin.id == plugin.id } + ?.key + val selectedService = selectedAbility?.let { ability -> + activeServices?.get(ability) + } + + var requiresAuth by remember(plugin.id, selectedService) { + mutableStateOf(false) + } + var isLoggedIn by remember(plugin.id, selectedService) { + mutableStateOf(false) + } + + LaunchedEffect(plugin.id, selectedService) { + requiresAuth = false + isLoggedIn = false + val service = selectedService ?: return@LaunchedEffect + + + service.use { + val pluginRequiresAuth = coreAPI.requiresAuthentication + requiresAuth = pluginRequiresAuth + if (!pluginRequiresAuth) return@use + + coreAPI.loggedInFlow.collect { loggedIn -> + isLoggedIn = loggedIn + } + } + } + + PluginCard( + plugin = plugin, + isSelected = isSelected, + onRemove = { scope.launch { pluginManager.removePlugin(plugin) } }, + isLoggedIn = isLoggedIn, + onLogin = if (requiresAuth && selectedService != null) { + { + pluginManager.launchTask { + selectedService.use { coreAPI.login() } + } + } + } else { + null + }, + onLogout = if (requiresAuth && selectedService != null) { + { + pluginManager.launchTask { + selectedService.use { coreAPI.logout() } + } + // should clear webview data after logout + scope.launch { webviewController.clearData() } + } + } else { + null + } + ) + } + } + } + } + } + } + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/InstallSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/InstallSection.kt new file mode 100644 index 00000000..6da2529f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/InstallSection.kt @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedButton +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import compose.icons.FeatherIcons +import compose.icons.feathericons.Download +import compose.icons.feathericons.Link +import compose.icons.feathericons.Upload +import org.jetbrains.compose.resources.stringResource +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.plugin_action_download +import spotube.composeapp.generated.resources.plugin_action_install_from_file +import spotube.composeapp.generated.resources.plugin_install_section_title +import spotube.composeapp.generated.resources.plugin_url_placeholder + +@Composable +internal fun InstallSection( + urlInput: String, + onUrlChange: (String) -> Unit, + urlError: String?, + isLoadingUrl: Boolean, + onSubmitUrl: () -> Unit, + onPickFile: () -> Unit, +) { + Card( + modifier = Modifier.fillMaxWidth(), + shape = RoundedCornerShape(14.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f) + ), + border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant) + ) { + Column( + modifier = Modifier.padding(16.dp), + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + Icon( + FeatherIcons.Download, + contentDescription = null, + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.primary + ) + Text( + stringResource(Res.string.plugin_install_section_title), + style = MaterialTheme.typography.titleSmall, + fontWeight = FontWeight.SemiBold + ) + } + + // URL row + Row( + modifier = Modifier.fillMaxWidth(), + verticalAlignment = Alignment.Top, + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + OutlinedTextField( + value = urlInput, + onValueChange = onUrlChange, + modifier = Modifier.weight(1f), + placeholder = { + Text( + stringResource(Res.string.plugin_url_placeholder), + style = MaterialTheme.typography.bodySmall + ) + }, + leadingIcon = { + Icon( + FeatherIcons.Link, + contentDescription = null, + modifier = Modifier.size(16.dp) + ) + }, + isError = urlError != null, + supportingText = urlError?.let { { Text(it) } }, + singleLine = true, + shape = RoundedCornerShape(10.dp), + textStyle = MaterialTheme.typography.bodySmall + ) + Button( + onClick = onSubmitUrl, + enabled = !isLoadingUrl, + shape = RoundedCornerShape(10.dp), + modifier = Modifier.height(56.dp) + ) { + if (isLoadingUrl) { + CircularProgressIndicator( + modifier = Modifier.size(16.dp), + strokeWidth = 2.dp, + color = MaterialTheme.colorScheme.onPrimary + ) + } else { + Icon( + FeatherIcons.Download, + contentDescription = stringResource(Res.string.plugin_action_download), + modifier = Modifier.size(16.dp) + ) + } + } + } + + HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.5f)) + + // File picker + OutlinedButton( + onClick = onPickFile, + modifier = Modifier.fillMaxWidth(), + shape = RoundedCornerShape(10.dp) + ) { + Icon( + FeatherIcons.Upload, + contentDescription = null, + modifier = Modifier.size(16.dp) + ) + Spacer(Modifier.width(8.dp)) + Text(stringResource(Res.string.plugin_action_install_from_file)) + } + } + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/PluginCard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/PluginCard.kt new file mode 100644 index 00000000..e9b58dd2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/PluginCard.kt @@ -0,0 +1,287 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.TextButton +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import compose.icons.FeatherIcons +import compose.icons.feathericons.Check +import compose.icons.feathericons.Package +import compose.icons.feathericons.Tag +import compose.icons.feathericons.Trash2 +import compose.icons.feathericons.User +import dev.krtirtho.spotube.modules.plugin.BUILT_IN_PLUGINS +import dev.krtirtho.spotube.modules.plugin.PluginAbility +import dev.krtirtho.spotube.modules.plugin.PluginEntry +import org.jetbrains.compose.resources.stringResource +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.plugin_action_remove +import spotube.composeapp.generated.resources.plugin_action_login +import spotube.composeapp.generated.resources.plugin_action_logout +import spotube.composeapp.generated.resources.plugin_state_active +import spotube.composeapp.generated.resources.plugin_state_builtin +import spotube.composeapp.generated.resources.plugin_version_label +import spotube.composeapp.generated.resources.settings_plugins_ability_audio +import spotube.composeapp.generated.resources.settings_plugins_ability_lyrics +import spotube.composeapp.generated.resources.settings_plugins_ability_metadata +import spotube.composeapp.generated.resources.settings_plugins_ability_scrobble + +@Composable +internal fun PluginCard( + plugin: PluginEntry, + isSelected: Boolean, + onRemove: () -> Unit, + isLoggedIn: Boolean, + onLogin: (() -> Unit)? = null, + onLogout: (() -> Unit)? = null, +) { + Card( + modifier = Modifier.fillMaxWidth(), + shape = RoundedCornerShape(14.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f) + ), + border = BorderStroke( + width = 1.dp, + color = if (isSelected) + MaterialTheme.colorScheme.primary.copy(alpha = 0.4f) + else + MaterialTheme.colorScheme.outlineVariant + ) + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(14.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(14.dp) + ) { + // Plugin icon + Surface( + modifier = Modifier + .size(44.dp) + .clip(RoundedCornerShape(10.dp)), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.1f) + ) { + Box(contentAlignment = Alignment.Center) { + Icon( + FeatherIcons.Package, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(22.dp) + ) + } + } + + // Text content + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + Text( + plugin.name, + style = MaterialTheme.typography.bodyLarge, + fontWeight = FontWeight.SemiBold, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.weight(1f, fill = false) + ) + // "Active" chip + if (isSelected) { + Surface( + shape = RoundedCornerShape(6.dp), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.15f) + ) { + Row( + modifier = Modifier.padding(horizontal = 6.dp, vertical = 2.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(3.dp) + ) { + Icon( + FeatherIcons.Check, + contentDescription = null, + modifier = Modifier.size(10.dp), + tint = MaterialTheme.colorScheme.primary + ) + Text( + stringResource(Res.string.plugin_state_active), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.primary + ) + } + } + } + } + + if (plugin.description.isNotBlank()) { + Text( + plugin.description, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 2, + overflow = TextOverflow.Ellipsis + ) + } + + // Meta chips row + Row( + horizontalArrangement = Arrangement.spacedBy(10.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(3.dp) + ) { + Icon( + FeatherIcons.User, + contentDescription = null, + modifier = Modifier.size(11.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + Text( + plugin.author, + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + if (plugin !in BUILT_IN_PLUGINS) + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(3.dp) + ) { + Icon( + FeatherIcons.Tag, + contentDescription = null, + modifier = Modifier.size(11.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + Text( + stringResource(Res.string.plugin_version_label, plugin.version), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + + // Ability chips + if (plugin.abilities.isNotEmpty()) { + Row(horizontalArrangement = Arrangement.spacedBy(4.dp)) { + plugin.abilities.forEach { ability -> + Surface( + shape = RoundedCornerShape(4.dp), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.6f) + ) { + Text( + ability.displayLabel(), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSecondaryContainer, + modifier = Modifier.padding( + horizontal = 6.dp, + vertical = 2.dp + ) + ) + } + } + } + } + } + + Column( + modifier = Modifier.align(Alignment.Bottom), + horizontalAlignment = Alignment.End, + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + if (plugin in BUILT_IN_PLUGINS) { + // Built-in plugins cannot be removed + Text( + stringResource(Res.string.plugin_state_builtin), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp) + .border( + BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), + shape = RoundedCornerShape(6.dp) + ) + .padding(horizontal = 6.dp, vertical = 2.dp) + ) + } else { + IconButton(onClick = onRemove) { + Icon( + FeatherIcons.Trash2, + contentDescription = stringResource(Res.string.plugin_action_remove), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(18.dp) + ) + } + } + + val authAction = when { + isLoggedIn && onLogout != null -> onLogout to Res.string.plugin_action_logout + !isLoggedIn && onLogin != null -> onLogin to Res.string.plugin_action_login + else -> null + } + authAction?.let { (action, label) -> + TextButton(onClick = action) { + Text( + text = stringResource(label), + style = MaterialTheme.typography.labelLarge + ) + } + } + } + } + } +} + +@Composable +private fun PluginAbility.displayLabel(): String { + return when (this) { + PluginAbility.METADATA -> stringResource(Res.string.settings_plugins_ability_metadata) + PluginAbility.AUDIO -> stringResource(Res.string.settings_plugins_ability_audio) + PluginAbility.LYRICS -> stringResource(Res.string.settings_plugins_ability_lyrics) + PluginAbility.SCROBBLE -> stringResource(Res.string.settings_plugins_ability_scrobble) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/PluginPermissionsDialog.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/PluginPermissionsDialog.kt new file mode 100644 index 00000000..9bb14fb4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/plugin/components/PluginPermissionsDialog.kt @@ -0,0 +1,383 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.plugin.components + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedButton +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Dialog +import androidx.compose.ui.window.DialogProperties +import compose.icons.FeatherIcons +import compose.icons.feathericons.Database +import compose.icons.feathericons.Eye +import compose.icons.feathericons.Package +import compose.icons.feathericons.User +import compose.icons.feathericons.Wifi +import dev.krtirtho.spotube.modules.plugin.PluginCapability +import dev.krtirtho.spotube.modules.plugin.PluginEntry +import org.jetbrains.compose.resources.stringResource +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.plugin_permissions_api_diff +import spotube.composeapp.generated.resources.plugin_permissions_author_version +import spotube.composeapp.generated.resources.plugin_permissions_capability_network_desc +import spotube.composeapp.generated.resources.plugin_permissions_capability_network_title +import spotube.composeapp.generated.resources.plugin_permissions_capability_storage_desc +import spotube.composeapp.generated.resources.plugin_permissions_capability_storage_title +import spotube.composeapp.generated.resources.plugin_permissions_capability_webview_desc +import spotube.composeapp.generated.resources.plugin_permissions_capability_webview_title +import spotube.composeapp.generated.resources.plugin_permissions_compare_title +import spotube.composeapp.generated.resources.plugin_permissions_installed_label +import spotube.composeapp.generated.resources.plugin_permissions_none +import spotube.composeapp.generated.resources.plugin_permissions_requested_title +import spotube.composeapp.generated.resources.plugin_permissions_supplied_label +import spotube.composeapp.generated.resources.plugin_version_label +import spotube.composeapp.generated.resources.settings_action_cancel +import spotube.composeapp.generated.resources.settings_action_close + +@Composable +fun PluginPermissionDialog( + pluginInfo: PluginEntry, + title: String, + message: String, + confirmLabel: String?, + existingPlugin: PluginEntry? = null, + onConfirm: (() -> Unit)? = null, + onDismiss: () -> Unit, +) { + Dialog( + onDismissRequest = onDismiss, + properties = DialogProperties(usePlatformDefaultWidth = false) + ) { + Card( + modifier = Modifier + .widthIn(min = 320.dp, max = 480.dp) + .padding(horizontal = 16.dp), + shape = RoundedCornerShape(20.dp), + elevation = CardDefaults.cardElevation(defaultElevation = 6.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surface + ) + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Box( + modifier = Modifier + .fillMaxWidth() + .background(MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.4f)) + .padding(24.dp) + ) { + Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(14.dp) + ) { + Surface( + modifier = Modifier + .size(48.dp) + .clip(RoundedCornerShape(12.dp)), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.15f) + ) { + Box(contentAlignment = Alignment.Center) { + Icon( + imageVector = FeatherIcons.Package, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(24.dp) + ) + } + } + Column { + Text( + title, + style = MaterialTheme.typography.titleMedium, + fontWeight = FontWeight.SemiBold, + ) + Text( + pluginInfo.name, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + } + } + + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(6.dp) + ) { + Icon( + FeatherIcons.User, + contentDescription = null, + modifier = Modifier.size(13.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + Text( + pluginInfo.author, + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + Text( + stringResource( + Res.string.plugin_permissions_author_version, + stringResource(Res.string.plugin_version_label, pluginInfo.version) + ), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + + if (pluginInfo.description.isNotBlank()) { + Text( + pluginInfo.description, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 3, + overflow = TextOverflow.Ellipsis + ) + } + } + } + + HorizontalDivider() + + Column( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 20.dp, vertical = 16.dp), + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + Surface( + modifier = Modifier.fillMaxWidth(), + shape = RoundedCornerShape(12.dp), + color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.55f) + ) { + Text( + message, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.padding(14.dp) + ) + } + + existingPlugin?.let { + InstalledComparisonCard( + installedPlugin = it, + incomingPlugin = pluginInfo + ) + } + + Text( + stringResource(Res.string.plugin_permissions_requested_title), + style = MaterialTheme.typography.labelMedium, + fontWeight = FontWeight.SemiBold, + color = MaterialTheme.colorScheme.onSurface + ) + + if (pluginInfo.capabilities.isEmpty()) { + Text( + stringResource(Res.string.plugin_permissions_none), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } else { + pluginInfo.capabilities.forEach { capability -> + CapabilityRow(capability) + } + } + } + + HorizontalDivider() + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 20.dp, vertical = 16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp, Alignment.End) + ) { + OutlinedButton( + onClick = onDismiss, + shape = RoundedCornerShape(10.dp) + ) { + Text( + if (confirmLabel == null) { + stringResource(Res.string.settings_action_close) + } else { + stringResource(Res.string.settings_action_cancel) + } + ) + } + if (confirmLabel != null && onConfirm != null) { + Button( + onClick = onConfirm, + shape = RoundedCornerShape(10.dp), + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.primary + ) + ) { + Text(confirmLabel) + } + } + } + } + } + } +} + +@Composable +private fun InstalledComparisonCard( + installedPlugin: PluginEntry, + incomingPlugin: PluginEntry, +) { + Surface( + modifier = Modifier.fillMaxWidth(), + shape = RoundedCornerShape(12.dp), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.45f) + ) { + Column( + modifier = Modifier.padding(14.dp), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + Text( + stringResource(Res.string.plugin_permissions_compare_title), + style = MaterialTheme.typography.labelMedium, + fontWeight = FontWeight.SemiBold, + ) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + VersionStat( + label = stringResource(Res.string.plugin_permissions_installed_label), + value = installedPlugin.version, + ) + VersionStat( + label = stringResource(Res.string.plugin_permissions_supplied_label), + value = incomingPlugin.version, + ) + } + Text( + stringResource( + Res.string.plugin_permissions_api_diff, + installedPlugin.apiVersion, + incomingPlugin.apiVersion + ), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } +} + +@Composable +private fun VersionStat(label: String, value: String) { + Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { + Text( + label, + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + Text( + stringResource(Res.string.plugin_version_label, value), + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.Medium + ) + } +} + +@Composable +private fun CapabilityRow(capability: PluginCapability) { + val (icon, label, description) = when (capability) { + PluginCapability.PERSISTENT_STORAGE -> Triple( + FeatherIcons.Database, + stringResource(Res.string.plugin_permissions_capability_storage_title), + stringResource(Res.string.plugin_permissions_capability_storage_desc) + ) + PluginCapability.NETWORK_REQUESTS -> Triple( + FeatherIcons.Wifi, + stringResource(Res.string.plugin_permissions_capability_network_title), + stringResource(Res.string.plugin_permissions_capability_network_desc) + ) + PluginCapability.WEBVIEW -> Triple( + FeatherIcons.Eye, + stringResource(Res.string.plugin_permissions_capability_webview_title), + stringResource(Res.string.plugin_permissions_capability_webview_desc) + ) + } + + Row( + modifier = Modifier + .fillMaxWidth() + .clip(RoundedCornerShape(10.dp)) + .background(MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f)) + .padding(horizontal = 14.dp, vertical = 10.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(14.dp) + ) { + Box( + modifier = Modifier + .size(34.dp) + .clip(CircleShape) + .background(MaterialTheme.colorScheme.errorContainer.copy(alpha = 0.6f)), + contentAlignment = Alignment.Center + ) { + Icon( + imageVector = icon, + contentDescription = null, + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.error + ) + } + Column { + Text( + label, + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.Medium + ) + Text( + description, + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksRepository.kt new file mode 100644 index 00000000..c538d6df --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksRepository.kt @@ -0,0 +1,149 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.saved_tracks + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.modules.plugin.PluginManager +import io.github.reactivecircus.cache4k.Cache +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch + +@OptIn(ExperimentalCoroutinesApi::class) +class SavedTracksRepository( + val pluginManager: PluginManager +) { + val scope = CoroutineScope(Dispatchers.Default + SupervisorJob()) + + val plugin + get() = pluginManager.selectedMetadataPlugin.value + + private val savedTracksCache = + Cache.Builder>().build() + private val totalCountCache = Cache.Builder().build() + private val savedTrackIds = MutableStateFlow>(emptySet()) + + val savedTracksIdsFlow : StateFlow> = savedTrackIds.asStateFlow() + + init { + scope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged() + .collect { + invalidateCaches() + } + } + } + + fun invalidateCaches() { + savedTracksCache.invalidateAll() + totalCountCache.invalidateAll() + savedTrackIds.value = emptySet() + } + + suspend fun getSavedTracks(paginationStrategy: PaginationStrategy? = null) = + plugin?.let { plugin -> + val strategy = paginationStrategy ?: PaginationStrategy.Offset(0, 50) + savedTracksCache.get(strategy) { + val tracks = pluginManager.withScope { + plugin.use { + val tracks = metadataTrackAPI.savedTracks(paginationStrategy) + tracks + } + } + savedTrackIds.value += tracks.items.map { it.id }.toSet() + tracks + } + } + + suspend fun getSavedTracksCount(): Int? = plugin?.let { plugin -> + totalCountCache.get("count") { + pluginManager.withScope { + plugin.use { + val result = metadataTrackAPI.savedTracks(PaginationStrategy.Offset(0, 1)) + result.totalCount + } + } + } + } + + suspend fun saveTracks(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataTrackAPI.saveTracks(ids) + } + } + savedTracksCache.invalidateAll() + totalCountCache.invalidateAll() + savedTrackIds.value += ids.toSet() + } + } + + suspend fun removeSavedTracks(ids: List) { + plugin?.let { plugin -> + pluginManager.withScope { + plugin.use { + metadataTrackAPI.removeSavedTracks(ids) + } + } + savedTracksCache.invalidateAll() + totalCountCache.invalidateAll() + savedTrackIds.value -= ids.toSet() + } + } + + suspend fun isSavedTracks(ids: List): List { + // Filter out ids that are already known to be saved + val unknownIds = ids.filterNot { savedTrackIds.value.contains(it) } + + if(unknownIds.isEmpty()) { + return ids.map { true } + } + + val unknownStates = plugin?.let { plugin -> + val savedStates = pluginManager.withScope { + plugin.use { + metadataTrackAPI.isSavedTracks(unknownIds) + } + } + val savedIds = + unknownIds.filterIndexed { index, string -> savedStates.getOrNull(index) == true } + .toSet() + savedTrackIds.value += savedIds + savedStates + } ?: unknownIds.map { false } + + // Combine known saved states with unknown states + return ids.map { id -> + savedTrackIds.value.contains(id) || unknownStates.getOrNull(unknownIds.indexOf(id)) ?: false + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksScreen.kt new file mode 100644 index 00000000..3af1e7a7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksScreen.kt @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.saved_tracks + +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Scaffold +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.PlayerState +import dev.krtirtho.spotube.core.audioplayer.QueueCollectionEntry +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.ui.component.CollectionDetails +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.component.TrackList +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.core.ui.component.TrackOptionsState +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import org.jetbrains.compose.resources.DrawableResource +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.liked_tracks + +@Composable +fun SavedTracksScreen() { + val audioPlayerQueue: AudioPlayerQueue = koinInject() + val audioPlayer: AudioPlayer = koinInject() + val shareService: ShareService = koinInject() + val downloadsViewModel: DownloadsViewModel = koinViewModel() + val viewModel = koinViewModel( + key = SAVED_TRACKS_COLLECTION_ID, + parameters = { parametersOf() } + ) + val navigationCommands = koinInject() + val state by viewModel.uiState.collectAsStateWithLifecycle() + val queue by audioPlayerQueue.queueFlow.collectAsStateWithLifecycle() + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val currentCollectionEntry by audioPlayerQueue.currentCollectionEntryFlow.collectAsStateWithLifecycle() + val playerState by audioPlayer.playerStateFlow.collectAsStateWithLifecycle() + + fun getTrackOptionsState(track: MetadataTrack): TrackOptionsState { + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val queueTrackIds = queue.mapNotNull { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id + }.toSet() + return TrackOptionsState( + isInQueue = queueTrackIds.contains(track.id), + isCurrentlyPlaying = track.id == currentTrackId, + isFavorite = true, + isBlacklisted = false, + ) + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModel.handleTrackOptionsAction(track, action) + if (action is TrackOptionsAction.Share) { + val uri = track.externalUri?.takeIf { it.isNotBlank() } + if (uri != null) { + shareService.share(uri, track.title) + } + } + if (action is TrackOptionsAction.Download) { + downloadsViewModel.downloadTrack(track) + } + } + + Scaffold( + topBar = { ApplicationMainBar() } + ) { innerPadding -> + when (state) { + is SavedTracksScreenState.Loading -> { + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + SkeletonTree(true) { + CollectionDetails( + title = "Loading saved tracks...", + description = "", + imageURL = "", + imageResource = Res.drawable.liked_tracks, + ownerName = "You", + ownerImageURL = null, + onOwnerClick = {}, + onPlay = {}, + onShufflePlay = {}, + onAddToQueue = {}, + isPlaying = false, + isFollowing = false, + onFollowClick = {}, + showFollowButton = false, + ) + } + }, + tracks = emptyList(), + error = null, + hasMore = false, + isLoading = true, + isLoadingNextPage = false, + currentTrackId = null, + isCurrentTrackPlaying = false, + onTrackClick = {}, + onLoadNextPage = {}, + onArtistClick = { navigationCommands.navigateTo(Routes.Artist(it.id)) }, + onAlbumClick = { navigationCommands.navigateTo(Routes.Album(it.id)) }, + onTrackOptionsAction = { _, _ -> }, + trackOptionsState = { TrackOptionsState() }, + ) + } + + is SavedTracksScreenState.Error -> { + ErrorDisplay( + errorMessage = (state as SavedTracksScreenState.Error).message, + onRetry = { viewModel.refresh() }, + modifier = Modifier.padding(innerPadding), + ) + } + + is SavedTracksScreenState.Data -> { + val dataState = state as SavedTracksScreenState.Data + + TrackList( + modifier = Modifier.padding(innerPadding), + headerContent = { + CollectionDetails( + title = "Saved Tracks", + description = "${dataState.totalCount} tracks", + imageURL = "", + imageResource = Res.drawable.liked_tracks, + ownerName = "You", + ownerImageURL = null, + onOwnerClick = {}, + onPlay = viewModel::playSavedTracks, + onShufflePlay = {}, + onAddToQueue = viewModel::addSavedTracksToQueue, + isPlaying = currentCollectionEntry is QueueCollectionEntry.SavedTracks && + playerState == PlayerState.PLAYING, + isFollowing = false, + onFollowClick = {}, + showFollowButton = false, + ) + }, + tracks = dataState.tracks, + error = null, + hasMore = dataState.nextPagination != null, + isLoading = state is SavedTracksScreenState.Loading && dataState.tracks.isEmpty(), + isLoadingNextPage = state is SavedTracksScreenState.Data.LoadingMore, + currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id, + isCurrentTrackPlaying = playerState == PlayerState.PLAYING, + onTrackClick = viewModel::playSavedTracksFromTrack, + onLoadNextPage = viewModel::loadNextTracksPage, + onArtistClick = { navigationCommands.navigateTo(Routes.Artist(it.id)) }, + onAlbumClick = { navigationCommands.navigateTo(Routes.Album(it.id)) }, + onTrackOptionsAction = ::handleTrackOptionsAction, + trackOptionsState = ::getTrackOptionsState, + onBulkDownload = { tracks -> + downloadsViewModel.downloadTracks(tracks) + }, + onBulkAddToQueue = { tracks -> + viewModel.addTracksToQueue(tracks) + }, + onBulkPlayNext = { tracks -> + viewModel.playTracksNext(tracks) + }, + ) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksViewModel.kt new file mode 100644 index 00000000..1f3776a6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/saved_tracks/SavedTracksViewModel.kt @@ -0,0 +1,267 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.saved_tracks + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.produceState +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.lifecycle.ViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.playback.CollectionPlaybackHelper +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.launch +import org.koin.compose.koinInject +import org.koin.core.component.KoinComponent + +const val SAVED_TRACKS_COLLECTION_ID = "saved_tracks" + +sealed interface SavedTracksScreenState { + data object Loading : SavedTracksScreenState + + sealed interface Data : SavedTracksScreenState { + val tracks: List + val nextPagination: PaginationStrategy? + val totalCount: Int + + data class Loaded( + override val tracks: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + override val totalCount: Int = 0, + ) : Data { + fun toLoadingMore(): LoadingMore = LoadingMore( + tracks = tracks, + nextPagination = nextPagination, + totalCount = totalCount, + ) + } + + data class LoadingMore( + override val tracks: List = emptyList(), + override val nextPagination: PaginationStrategy? = null, + override val totalCount: Int = 0, + ) : Data + } + + data class Error(val message: String) : SavedTracksScreenState +} + +@OptIn(ExperimentalCoroutinesApi::class) +class SavedTracksViewModel( + private val repository: SavedTracksRepository, + private val playbackHelper: CollectionPlaybackHelper, + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel(), KoinComponent { + private val logger by injectLogger() + + private val _state = MutableStateFlow(SavedTracksScreenState.Loading) + val uiState: StateFlow = _state.asStateFlow() + val savedTrackIdsFlow: StateFlow> + get() = repository.savedTracksIdsFlow + + init { + viewModelScope.launch { + combine( + repository.pluginManager.selectedMetadataPlugin + .filterNotNull() + .flatMapLatest { it.loggedInFlow } + .distinctUntilChanged(), + repository.savedTracksIdsFlow + ) { _, _ -> }.collect { + loadInitialData() + } + } + } + + private suspend fun loadInitialData() { + runCatching { + val tracksResult = repository.getSavedTracks() + val totalCount = repository.getSavedTracksCount() ?: 0 + _state.value = SavedTracksScreenState.Data.Loaded( + tracks = tracksResult?.items ?: emptyList(), + nextPagination = tracksResult?.nextPagination, + totalCount = totalCount, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load saved tracks" } + _state.value = SavedTracksScreenState.Error(e.message ?: "Unknown error") + } + } + + fun loadNextTracksPage() { + viewModelScope.launch { + val currentState = _state.value + if (currentState is SavedTracksScreenState.Data.Loaded && currentState.nextPagination != null) { + _state.value = currentState.toLoadingMore() + runCatching { + val result = repository.getSavedTracks(currentState.nextPagination) + _state.value = SavedTracksScreenState.Data.Loaded( + tracks = currentState.tracks + (result?.items ?: emptyList()), + nextPagination = result?.nextPagination, + totalCount = currentState.totalCount, + ) + }.onFailure { e -> + logger.e(e) { "Failed to load more tracks" } + _state.value = SavedTracksScreenState.Error(e.message ?: "Unknown error") + } + } + } + } + + fun playSavedTracks() { + viewModelScope.launch { playbackHelper.playSavedTracks() } + } + + fun addSavedTracksToQueue() { + viewModelScope.launch { playbackHelper.addSavedTracksToQueue() } + } + + fun playSavedTracksFromTrack(track: MetadataTrack) { + viewModelScope.launch { playbackHelper.playSavedTracksFromTrack(track) } + } + + fun refresh() { + viewModelScope.launch { + repository.invalidateCaches() + loadInitialData() + } + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + viewModelScope.launch { + when (action) { + is TrackOptionsAction.StartRadio -> {} + is TrackOptionsAction.PlayNext -> { + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (queueIndex >= 0) { + audioPlayerQueue.removeFromQueue(queue[queueIndex]) + } + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + val newQueue = audioPlayerQueue.getQueue() + val newIndex = newQueue.indexOfFirst { e -> + (e as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + } + if (newIndex > 0) { + audioPlayerQueue.move(newIndex, 0) + } + } + + is TrackOptionsAction.AddToQueue -> { + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + } + + is TrackOptionsAction.RemoveFromQueue -> { + val queue = audioPlayerQueue.getQueue() + queue.find { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.matchesTrack(track) == true + }?.let { audioPlayerQueue.removeFromQueue(it) } + } + + is TrackOptionsAction.ToggleFavorite -> {} + is TrackOptionsAction.Download -> {} + is TrackOptionsAction.ToggleBlacklist -> {} + is TrackOptionsAction.Share -> {} + } + } + } + + fun addTracksToQueue(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllToQueue(entries) + } + } + + fun playTracksNext(tracks: List) { + viewModelScope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllAfterCurrent(entries) + } + } + + suspend fun isSavedTracks(trackIds: List): List { + return repository.isSavedTracks(trackIds) + } + + suspend fun saveTracks(trackIds: List) { + repository.saveTracks(trackIds) + } + + suspend fun removeSavedTracks(trackIds: List) { + repository.removeSavedTracks(trackIds) + } + + private fun MetadataTrack.matchesTrack(other: MetadataTrack): Boolean { + if (id.isNotBlank() && other.id.isNotBlank()) return id == other.id + return title == other.title && + durationMs == other.durationMs && + album?.id == other.album?.id && + artists.map { it.id.ifBlank { it.name } } == other.artists.map { it.id.ifBlank { it.name } } + } +} + + +sealed interface SavedState { + data class Success(val data: T) : SavedState + data object Loading : SavedState + data class Error(val message: String) : SavedState +} + +@Composable +fun rememberIsSavedTracks( + trackIds: List, + repository: SavedTracksRepository = koinInject(), +): SavedState> { + val scope = rememberCoroutineScope() + var state by remember { mutableStateOf>>(SavedState.Loading) } + + LaunchedEffect(trackIds) { + scope.launch { + state = SavedState.Loading + runCatching { + val result = repository.isSavedTracks(trackIds) + state = SavedState.Success(result) + }.onFailure { e -> + state = SavedState.Error(e.message ?: "Unknown error") + } + } + } + + return state +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchRepository.kt new file mode 100644 index 00000000..5ff73aeb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchRepository.kt @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.search + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSupportedSearchType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.modules.plugin.PluginManager +import io.github.reactivecircus.cache4k.Cache +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.launch + +class SearchRepository( + private val pluginManager: PluginManager +) { + private val scope = CoroutineScope(Dispatchers.Default + SupervisorJob()) + + private val supportedTypesCache = Cache.Builder>().build() + private val allSearchCache = Cache.Builder>().build() + private val trackSearchCache = Cache.Builder, PaginationResult>().build() + private val albumSearchCache = Cache.Builder, PaginationResult>().build() + private val artistSearchCache = Cache.Builder, PaginationResult>().build() + private val playlistSearchCache = Cache.Builder, PaginationResult>().build() + private val userSearchCache = Cache.Builder, PaginationResult>().build() + + init { + scope.launch { + pluginManager.selectedMetadataPlugin + .filterNotNull() + .distinctUntilChanged() + .collect { invalidateCaches() } + } + } + + fun invalidateCaches() { + supportedTypesCache.invalidateAll() + allSearchCache.invalidateAll() + trackSearchCache.invalidateAll() + albumSearchCache.invalidateAll() + artistSearchCache.invalidateAll() + playlistSearchCache.invalidateAll() + userSearchCache.invalidateAll() + } + + suspend fun loadSupportedSearchTypes(): List { + return supportedTypesCache.get(Unit) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.supportedSearchTypes } + } + } + } + + suspend fun searchAll(query: String): List { + return allSearchCache.get(query) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.search(query) } + } + } + } + + suspend fun searchTracks( + query: String, + pagination: PaginationStrategy? = null + ): PaginationResult { + val key = query to pagination + return trackSearchCache.get(key) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.searchTracks(query, pagination) } + } + } + } + + suspend fun searchAlbums( + query: String, + pagination: PaginationStrategy? = null + ): PaginationResult { + val key = query to pagination + return albumSearchCache.get(key) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.searchAlbums(query, pagination) } + } + } + } + + suspend fun searchArtists( + query: String, + pagination: PaginationStrategy? = null + ): PaginationResult { + val key = query to pagination + return artistSearchCache.get(key) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.searchArtists(query, pagination) } + } + } + } + + suspend fun searchPlaylists( + query: String, + pagination: PaginationStrategy? = null + ): PaginationResult { + val key = query to pagination + return playlistSearchCache.get(key) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.searchPlaylists(query, pagination) } + } + } + } + + suspend fun searchUsers( + query: String, + pagination: PaginationStrategy? = null + ): PaginationResult { + val key = query to pagination + return userSearchCache.get(key) { + val plugin = pluginManager.selectedMetadataPlugin.value + ?: throw IllegalStateException("No metadata plugin selected") + pluginManager.withScope { + plugin.use { metadataSearchAPI.searchUsers(query, pagination) } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchScreen.kt new file mode 100644 index 00000000..7a529cc1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchScreen.kt @@ -0,0 +1,1239 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.search + +import androidx.compose.animation.AnimatedContent +import androidx.compose.animation.core.LinearEasing +import androidx.compose.animation.core.RepeatMode +import androidx.compose.animation.core.animateFloat +import androidx.compose.animation.core.infiniteRepeatable +import androidx.compose.animation.core.rememberInfiniteTransition +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.togetherWith +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.material3.LinearProgressIndicator +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.items +import androidx.compose.foundation.lazy.grid.rememberLazyGridState +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.DropdownMenu +import androidx.compose.material3.DropdownMenuItem +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.focus.onFocusChanged +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.input.key.Key +import androidx.compose.ui.input.key.key +import androidx.compose.ui.input.key.onKeyEvent +import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.DpOffset +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.PopupProperties +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import compose.icons.FeatherIcons +import compose.icons.feathericons.X +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSupportedSearchType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.core.ui.component.AlbumCard +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.core.ui.component.ArtistCard +import dev.krtirtho.spotube.core.ui.component.ErrorDisplay +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.core.ui.component.PlaylistCard +import dev.krtirtho.spotube.core.ui.component.TrackList +import dev.krtirtho.spotube.core.ui.component.TrackOptionsAction +import dev.krtirtho.spotube.core.ui.component.TrackOptionsState +import dev.krtirtho.spotube.core.ui.component.UserCard +import dev.krtirtho.spotube.core.ui.component.cards.PlayableCard +import dev.krtirtho.spotube.core.ui.misc.SkeletonTree +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxSearchBroken +import dev.krtirtho.spotube.resources.iconsax.IconsaxTrash +import dev.krtirtho.spotube.resources.iconsax.InconsaxClock +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.launch +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel + +private val GridMinCellSize = 180.dp +private val SearchFieldShape = RoundedCornerShape(6.dp) +private val TabShape = RoundedCornerShape(6.dp) + +@Composable +fun SearchScreen(viewModel: SearchScreenViewModel = koinViewModel()) { + val audioPlayerQueue: AudioPlayerQueue = koinInject() + val shareService: ShareService = koinInject() + val downloadsViewModel: DownloadsViewModel = koinViewModel() + val state by viewModel.state.collectAsStateWithLifecycle() + val selectedType = state.selectedSearchType + val scope = rememberCoroutineScope() + val savedTrackIds by viewModel.savedTrackIds.collectAsStateWithLifecycle() + + var isSearchFocused by remember { mutableStateOf(false) } + val focusManager = LocalFocusManager.current + val focusRequester = remember { FocusRequester() } + var keyboardSelectedIndex by remember { mutableIntStateOf(-1) } + + fun playSingleTrack(track: MetadataTrack) { + scope.launch { + audioPlayerQueue.load( + entries = listOf(QueueEntry.StreamingTrack(track = track, url = "")), + autoPlay = true, + startPosition = 0, + collectionEntry = null, + ) + } + } + + fun handleTrackOptionsAction(track: MetadataTrack, action: TrackOptionsAction) { + scope.launch { + when (action) { + is TrackOptionsAction.StartRadio -> {} + is TrackOptionsAction.PlayNext -> { + val queue = audioPlayerQueue.getQueue() + val queueIndex = queue.indexOfFirst { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id == track.id + } + if (queueIndex >= 0) { + audioPlayerQueue.removeFromQueue(queue[queueIndex]) + } + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + val newQueue = audioPlayerQueue.getQueue() + val newIndex = newQueue.indexOfFirst { e -> + (e as? QueueEntry.StreamingTrack)?.track?.id == track.id + } + if (newIndex > 0) { + audioPlayerQueue.move(newIndex, 0) + } + } + + is TrackOptionsAction.AddToQueue -> { + audioPlayerQueue.addToQueue(QueueEntry.StreamingTrack(track = track, url = "")) + } + + is TrackOptionsAction.RemoveFromQueue -> { + val queue = audioPlayerQueue.getQueue() + queue.find { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id == track.id + }?.let { audioPlayerQueue.removeFromQueue(it) } + } + + is TrackOptionsAction.ToggleFavorite -> viewModel.toggleTrackIsFavorite(track.id) + is TrackOptionsAction.Download -> downloadsViewModel.downloadTrack(track) + is TrackOptionsAction.ToggleBlacklist -> {} + is TrackOptionsAction.Share -> { + val uri = track.externalUri?.takeIf { it.isNotBlank() } + if (uri != null) { + shareService.share(uri, track.title) + } + } + } + } + } + + fun getTrackOptionsState(track: MetadataTrack): TrackOptionsState { + val currentQueueEntry = audioPlayerQueue.currentQueueEntryFlow.value + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val queue = audioPlayerQueue.queueFlow.value + val queueTrackIds = queue.mapNotNull { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id + }.toSet() + return TrackOptionsState( + isInQueue = queueTrackIds.contains(track.id), + isCurrentlyPlaying = track.id == currentTrackId, + isFavorite = savedTrackIds.contains(track.id), + isBlacklisted = false, + ) + } + + val queue by audioPlayerQueue.queueFlow.collectAsStateWithLifecycle(emptyList()) + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + + fun getTrackOptionsStateReactive(track: MetadataTrack): TrackOptionsState { + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val queueTrackIds = queue.mapNotNull { entry -> + (entry as? QueueEntry.StreamingTrack)?.track?.id + }.toSet() + return TrackOptionsState( + isInQueue = queueTrackIds.contains(track.id), + isCurrentlyPlaying = track.id == currentTrackId, + isFavorite = savedTrackIds.contains(track.id), + isBlacklisted = false, + ) + } + + fun bulkAddToQueue(tracks: List) { + scope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllToQueue(entries) + } + } + + fun bulkPlayNext(tracks: List) { + scope.launch { + val entries = tracks.map { QueueEntry.StreamingTrack(track = it, url = "") } + audioPlayerQueue.addAllAfterCurrent(entries) + } + } + + val showRecentSearches = + isSearchFocused && state.query.isBlank() && state.recentSearches.isNotEmpty() + val dropdownItems = if (showRecentSearches) state.recentSearches else emptyList() + val totalDropdownItems = if (showRecentSearches) dropdownItems.size + 1 else 0 + + fun navigateDropdown(delta: Int) { + if (totalDropdownItems == 0) return + keyboardSelectedIndex = + (keyboardSelectedIndex + delta + totalDropdownItems) % totalDropdownItems + } + + fun selectDropdownItem() { + if (keyboardSelectedIndex < 0 || !showRecentSearches) return + if (keyboardSelectedIndex == 0) { + viewModel.clearAllRecentSearches() + } else { + val item = dropdownItems[keyboardSelectedIndex - 1] + viewModel.applyRecentSearch(item) + } + keyboardSelectedIndex = -1 + isSearchFocused = false + focusManager.clearFocus() + } + + Scaffold( + topBar = { ApplicationMainBar(backButton = false) } + ) { innerPadding -> + Column( + modifier = Modifier + .padding(innerPadding) + .fillMaxSize() + ) { + Column( + modifier = Modifier.fillMaxWidth() + ) { + SearchBar( + query = state.query, + onQueryChange = { + viewModel.onQueryChange(it) + keyboardSelectedIndex = -1 + }, + onClear = viewModel::clearQuery, + isFocused = isSearchFocused, + onFocusChanged = { isSearchFocused = it }, + focusRequester = focusRequester, + onKeyEvent = { event -> + when (event.key) { + Key.DirectionDown -> { + navigateDropdown(1); true + } + + Key.DirectionUp -> { + navigateDropdown(-1); true + } + + Key.Enter -> { + selectDropdownItem(); true + } + + Key.Escape -> { + isSearchFocused = false + keyboardSelectedIndex = -1 + focusManager.clearFocus() + true + } + + else -> false + } + }, + onSearch = { + focusManager.clearFocus() + isSearchFocused = false + }, + showDropdown = showRecentSearches, + onDismissDropdown = { + isSearchFocused = false + keyboardSelectedIndex = -1 + }, + recentSearches = state.recentSearches, + keyboardSelectedIndex = keyboardSelectedIndex, + onRecentSearchClick = { search -> + viewModel.applyRecentSearch(search) + isSearchFocused = false + keyboardSelectedIndex = -1 + focusManager.clearFocus() + }, + onRecentSearchRemove = viewModel::removeRecentSearch, + onClearAllRecentSearches = { + viewModel.clearAllRecentSearches() + isSearchFocused = false + keyboardSelectedIndex = -1 + focusManager.clearFocus() + }, + ) + + if (state.supportedSearchTypes.isNotEmpty()) { + SearchTabs( + types = state.supportedSearchTypes, + selectedType = selectedType, + onTabSelected = viewModel::onTabSelected, + ) + } + } + + when { + state.isLoadingSearchTypes -> { + SearchLoadingIndicator( + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == null -> { + SearchMessage( + message = "No search types available", + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == MetadataSupportedSearchType.ALL -> { + SearchAllTab( + query = state.query, + tracks = state.tracks, + albums = state.albums, + artists = state.artists, + playlists = state.playlists, + users = state.users, + supportedSearchTypes = state.supportedSearchTypes, + onSeeAll = viewModel::onTabSelected, + onTrackClick = ::playSingleTrack, + onTrackOptionsAction = ::handleTrackOptionsAction, + onTrackOptionsState = ::getTrackOptionsStateReactive, + onBulkDownload = { tracks -> downloadsViewModel.downloadTracks(tracks) }, + onBulkAddToQueue = ::bulkAddToQueue, + onBulkPlayNext = ::bulkPlayNext, + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == MetadataSupportedSearchType.TRACK -> { + SearchTracksTab( + query = state.query, + tracks = state.tracks, + onLoadNextPage = viewModel::loadNextTracks, + onTrackClick = ::playSingleTrack, + onTrackOptionsAction = ::handleTrackOptionsAction, + onTrackOptionsState = ::getTrackOptionsStateReactive, + onBulkDownload = { tracks -> downloadsViewModel.downloadTracks(tracks) }, + onBulkAddToQueue = ::bulkAddToQueue, + onBulkPlayNext = ::bulkPlayNext, + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == MetadataSupportedSearchType.PLAYLIST -> { + SearchPlaylistsTab( + query = state.query, + playlists = state.playlists, + onLoadNextPage = viewModel::loadNextPlaylists, + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == MetadataSupportedSearchType.ALBUM -> { + SearchAlbumsTab( + query = state.query, + albums = state.albums, + onLoadNextPage = viewModel::loadNextAlbums, + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == MetadataSupportedSearchType.ARTIST -> { + SearchArtistsTab( + query = state.query, + artists = state.artists, + onLoadNextPage = viewModel::loadNextArtists, + modifier = Modifier + .fillMaxSize(), + ) + } + + selectedType == MetadataSupportedSearchType.USER -> { + SearchUsersTab( + query = state.query, + users = state.users, + onLoadNextPage = viewModel::loadNextUsers, + modifier = Modifier + .fillMaxSize(), + ) + } + } + } + } +} + +@Composable +private fun SearchBar( + query: String, + onQueryChange: (String) -> Unit, + onClear: () -> Unit, + isFocused: Boolean, + onFocusChanged: (Boolean) -> Unit, + focusRequester: FocusRequester, + onKeyEvent: (androidx.compose.ui.input.key.KeyEvent) -> Boolean, + onSearch: () -> Unit, + showDropdown: Boolean, + onDismissDropdown: () -> Unit, + recentSearches: List, + keyboardSelectedIndex: Int, + onRecentSearchClick: (String) -> Unit, + onRecentSearchRemove: (String) -> Unit, + onClearAllRecentSearches: () -> Unit, +) { + Box( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp) + .padding(bottom = 8.dp) + ) { + TextField( + value = query, + onValueChange = onQueryChange, + singleLine = true, + maxLines = 1, + placeholder = { + Text( + "Search songs, artists, albums...", + color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f) + ) + }, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxSearchBroken, + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(18.dp) + ) + }, + trailingIcon = { + if (query.isNotBlank()) { + IconButton( + onClick = onClear, + modifier = Modifier.size(24.dp) + ) { + Icon( + imageVector = FeatherIcons.X, + contentDescription = "Clear", + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } + }, + modifier = Modifier + .fillMaxWidth() + .onFocusChanged { onFocusChanged(it.isFocused) } + .focusRequester(focusRequester) + .onKeyEvent(onKeyEvent), + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search), + keyboardActions = KeyboardActions(onSearch = { onSearch() }), + ) + + DropdownMenu( + expanded = showDropdown, + onDismissRequest = onDismissDropdown, + modifier = Modifier + .fillMaxWidth() + .heightIn(max = 300.dp), + offset = DpOffset(x = 0.dp, y = 4.dp), + properties = PopupProperties(focusable = false), + containerColor = MaterialTheme.colorScheme.surface, + shape = RoundedCornerShape(8.dp), + shadowElevation = 8.dp, + ) { + Box(modifier = Modifier.padding(vertical = 4.dp)) { + Column { + DropdownMenuItem( + text = { + Text( + "Clear all history", + color = MaterialTheme.colorScheme.error, + style = MaterialTheme.typography.bodyMedium + ) + }, + onClick = onClearAllRecentSearches, + leadingIcon = { + Icon( + imageVector = Iconsax.IconsaxTrash, + contentDescription = null, + tint = MaterialTheme.colorScheme.error, + modifier = Modifier.size(16.dp) + ) + }, + modifier = Modifier + .padding(horizontal = 4.dp, vertical = 2.dp) + .clip(RoundedCornerShape(4.dp)) + .background( + if (keyboardSelectedIndex == 0) MaterialTheme.colorScheme.surfaceVariant + else MaterialTheme.colorScheme.surface + ) + ) + + recentSearches.forEachIndexed { index, search -> + val isSelected = keyboardSelectedIndex == index + 1 + DropdownMenuItem( + text = { + Text( + search, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + style = MaterialTheme.typography.bodyMedium + ) + }, + leadingIcon = { + Icon( + imageVector = Iconsax.InconsaxClock, + contentDescription = null, + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + }, + trailingIcon = { + IconButton( + onClick = { onRecentSearchRemove(search) }, + modifier = Modifier.size(24.dp) + ) { + Icon( + imageVector = FeatherIcons.X, + contentDescription = "Remove", + modifier = Modifier.size(14.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f) + ) + } + }, + onClick = { onRecentSearchClick(search) }, + modifier = Modifier + .padding(horizontal = 4.dp, vertical = 2.dp) + .clip(RoundedCornerShape(4.dp)) + .background( + if (isSelected) MaterialTheme.colorScheme.surfaceVariant + else MaterialTheme.colorScheme.surface + ) + ) + } + } + } + } + } +} + +@Composable +private fun SearchTabs( + types: List, + selectedType: MetadataSupportedSearchType?, + onTabSelected: (MetadataSupportedSearchType) -> Unit, +) { + LazyRow( + modifier = Modifier.fillMaxWidth(), + contentPadding = PaddingValues(horizontal = 16.dp, vertical = 4.dp), + horizontalArrangement = Arrangement.spacedBy(6.dp) + ) { + items(types) { type -> + val isSelected = selectedType == type + SearchTab( + label = type.tabTitle(), + selected = isSelected, + onClick = { onTabSelected(type) } + ) + } + } +} + +@Composable +private fun SearchTab( + label: String, + selected: Boolean, + onClick: () -> Unit, +) { + Surface( + onClick = onClick, + shape = TabShape, + color = if (selected) + MaterialTheme.colorScheme.primaryContainer + else + MaterialTheme.colorScheme.surface, + contentColor = if (selected) + MaterialTheme.colorScheme.onPrimaryContainer + else + MaterialTheme.colorScheme.onSurfaceVariant, + border = if (selected) + null + else + BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), + modifier = Modifier.height(32.dp) + ) { + Box( + modifier = Modifier + .padding(horizontal = 14.dp, vertical = 6.dp), + contentAlignment = Alignment.Center + ) { + Text( + text = label, + style = MaterialTheme.typography.labelLarge, + fontWeight = if (selected) FontWeight.SemiBold else FontWeight.Medium, + maxLines = 1 + ) + } + } +} + +@Composable +private fun SearchAllTab( + query: String, + tracks: SearchPagedState, + albums: SearchPagedState, + artists: SearchPagedState, + playlists: SearchPagedState, + users: SearchPagedState, + supportedSearchTypes: List, + onSeeAll: (MetadataSupportedSearchType) -> Unit, + onTrackClick: (MetadataTrack) -> Unit, + onTrackOptionsAction: (MetadataTrack, TrackOptionsAction) -> Unit, + onTrackOptionsState: (MetadataTrack) -> TrackOptionsState, + onBulkDownload: (List) -> Unit, + onBulkAddToQueue: (List) -> Unit, + onBulkPlayNext: (List) -> Unit, + modifier: Modifier = Modifier, +) { + if (query.isBlank()) { + SearchMessage(message = "Start typing to search", modifier = modifier) + return + } + + val hasAnyContent = + tracks.items.isNotEmpty() || playlists.items.isNotEmpty() || albums.items.isNotEmpty() || + artists.items.isNotEmpty() || users.items.isNotEmpty() + + val hasAnyError = listOfNotNull( + tracks.error, + playlists.error, + albums.error, + artists.error, + users.error + ).firstOrNull() + val isLoadingAll = + tracks.isLoading || playlists.isLoading || albums.isLoading || artists.isLoading || users.isLoading + + if (!hasAnyContent && !isLoadingAll && hasAnyError != null) { + ErrorDisplay( + errorMessage = hasAnyError, + onRetry = { }, + modifier = modifier, + ) + return + } + + if (!hasAnyContent && !isLoadingAll) { + SearchMessage(message = "No results found", modifier = modifier) + return + } + + val bottomInset = LocalAppShellBottomInset.current + val showTracks = + MetadataSupportedSearchType.TRACK in supportedSearchTypes && tracks.items.isNotEmpty() + + TrackList( + tracks = if (showTracks) tracks.items.take(20) else emptyList(), + isLoading = tracks.isLoading && showTracks, + error = if (showTracks) tracks.error else null, + hasMore = false, + simplified = true, + showEmptyMessage = false, + modifier = modifier, + onTrackClick = onTrackClick, + onTrackOptionsAction = onTrackOptionsAction, + trackOptionsState = onTrackOptionsState, + onBulkDownload = onBulkDownload, + onBulkAddToQueue = onBulkAddToQueue, + onBulkPlayNext = onBulkPlayNext, + contentPadding = PaddingValues(top = 12.dp, bottom = 16.dp + bottomInset), + headerContent = { + if (showTracks) { + Text( + text = "Tracks", + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.SemiBold, + modifier = Modifier.padding(horizontal = 16.dp).padding(bottom = 12.dp), + ) + } + if (MetadataSupportedSearchType.TRACK in supportedSearchTypes) { + if (tracks.isLoading && tracks.items.isEmpty()) { + SearchLoadingIndicator() + } + if (tracks.error != null && tracks.items.isEmpty()) { + SearchMessageInline(tracks.error, isError = true) + } + } + }, + footerContent = { + Column( + modifier = Modifier.padding(top = 20.dp), + verticalArrangement = Arrangement.spacedBy(20.dp) + ) { + if (MetadataSupportedSearchType.PLAYLIST in supportedSearchTypes && playlists.items.isNotEmpty()) { + SearchHorizontalSection( + title = "Playlists", + onSeeAll = { onSeeAll(MetadataSupportedSearchType.PLAYLIST) }, + ) { + playlists.items.forEach { playlist -> + item(key = playlist.id) { PlaylistCard(playlist = playlist) } + } + } + } + + if (MetadataSupportedSearchType.ALBUM in supportedSearchTypes && albums.items.isNotEmpty()) { + SearchHorizontalSection( + title = "Albums", + onSeeAll = { onSeeAll(MetadataSupportedSearchType.ALBUM) }, + ) { + albums.items.forEach { album -> + item(key = album.id) { AlbumCard(album = album) } + } + } + } + + if (MetadataSupportedSearchType.ARTIST in supportedSearchTypes && artists.items.isNotEmpty()) { + SearchHorizontalSection( + title = "Artists", + onSeeAll = { onSeeAll(MetadataSupportedSearchType.ARTIST) }, + ) { + artists.items.forEach { artist -> + item(key = artist.id) { ArtistCard(artist = artist) } + } + } + } + + if (MetadataSupportedSearchType.USER in supportedSearchTypes && users.items.isNotEmpty()) { + SearchHorizontalSection( + title = "Users", + onSeeAll = { onSeeAll(MetadataSupportedSearchType.USER) }, + ) { + users.items.forEach { user -> + item(key = user.id) { UserCard(user = user) } + } + } + } + } + } + ) +} + +@Composable +private fun SearchTracksTab( + query: String, + tracks: SearchPagedState, + onLoadNextPage: () -> Unit, + onTrackClick: (MetadataTrack) -> Unit, + onTrackOptionsAction: (MetadataTrack, TrackOptionsAction) -> Unit, + onTrackOptionsState: (MetadataTrack) -> TrackOptionsState, + onBulkDownload: (List) -> Unit, + onBulkAddToQueue: (List) -> Unit, + onBulkPlayNext: (List) -> Unit, + modifier: Modifier = Modifier, +) { + if (query.isBlank()) { + SearchMessage(message = "Start typing to search tracks", modifier = modifier) + return + } + + if (tracks.isLoading && tracks.items.isEmpty()) { + SearchLoadingIndicator(message = "Loading tracks...", modifier = modifier) + return + } + + TrackList( + tracks = tracks.items, + error = tracks.error, + hasMore = tracks.hasNextPage, + isLoading = false, + isLoadingNextPage = tracks.isLoading && tracks.items.isNotEmpty(), + onLoadNextPage = onLoadNextPage, + onTrackClick = onTrackClick, + onTrackOptionsAction = onTrackOptionsAction, + trackOptionsState = onTrackOptionsState, + onBulkDownload = onBulkDownload, + onBulkAddToQueue = onBulkAddToQueue, + onBulkPlayNext = onBulkPlayNext, + simplified = true, + modifier = modifier, + ) +} + +@Composable +private fun SearchAlbumsTab( + query: String, + albums: SearchPagedState, + onLoadNextPage: () -> Unit, + modifier: Modifier = Modifier, +) { + SearchGridTab( + query = query, + items = albums.items, + isLoading = albums.isLoading, + error = albums.error, + hasNextPage = albums.hasNextPage, + onLoadNextPage = onLoadNextPage, + emptyMessage = "No albums found", + loadingMessage = "Loading albums...", + modifier = modifier, + ) { album -> + AlbumCard(album = album, modifier = Modifier.fillMaxWidth()) + } +} + +@Composable +private fun SearchArtistsTab( + query: String, + artists: SearchPagedState, + onLoadNextPage: () -> Unit, + modifier: Modifier = Modifier, +) { + SearchGridTab( + query = query, + items = artists.items, + isLoading = artists.isLoading, + error = artists.error, + hasNextPage = artists.hasNextPage, + onLoadNextPage = onLoadNextPage, + emptyMessage = "No artists found", + loadingMessage = "Loading artists...", + modifier = modifier, + ) { artist -> + ArtistCard(artist = artist, modifier = Modifier.fillMaxWidth()) + } +} + +@Composable +private fun SearchPlaylistsTab( + query: String, + playlists: SearchPagedState, + onLoadNextPage: () -> Unit, + modifier: Modifier = Modifier, +) { + SearchGridTab( + query = query, + items = playlists.items, + isLoading = playlists.isLoading, + error = playlists.error, + hasNextPage = playlists.hasNextPage, + onLoadNextPage = onLoadNextPage, + emptyMessage = "No playlists found", + loadingMessage = "Loading playlists...", + modifier = modifier, + ) { playlist -> + PlaylistCard(playlist = playlist, modifier = Modifier.fillMaxWidth()) + } +} + +@Composable +private fun SearchUsersTab( + query: String, + users: SearchPagedState, + onLoadNextPage: () -> Unit, + modifier: Modifier = Modifier, +) { + SearchGridTab( + query = query, + items = users.items, + isLoading = users.isLoading, + error = users.error, + hasNextPage = users.hasNextPage, + onLoadNextPage = onLoadNextPage, + emptyMessage = "No users found", + loadingMessage = "Loading users...", + modifier = modifier, + ) { user -> + UserCard(user = user, modifier = Modifier.fillMaxWidth()) + } +} + +@OptIn(ExperimentalFoundationApi::class) +@Composable +private fun SearchGridTab( + query: String, + items: List, + isLoading: Boolean, + error: String?, + hasNextPage: Boolean, + onLoadNextPage: () -> Unit, + emptyMessage: String, + loadingMessage: String, + modifier: Modifier = Modifier, + itemContent: @Composable (T) -> Unit, +) { + if (query.isBlank()) { + SearchMessage(message = "Start typing to search", modifier = modifier) + return + } + + val gridState = rememberLazyGridState() + val bottomInset = LocalAppShellBottomInset.current + + LaunchedEffect(gridState, items.size, hasNextPage, isLoading) { + snapshotFlow { gridState.layoutInfo } + .map { layoutInfo -> + val lastVisible = layoutInfo.visibleItemsInfo.lastOrNull()?.index ?: -1 + lastVisible to layoutInfo.totalItemsCount + } + .distinctUntilChanged() + .collect { (lastVisible, totalItems) -> + if (totalItems > 0 && lastVisible >= totalItems - 6 && hasNextPage && !isLoading) { + onLoadNextPage() + } + } + } + + when { + isLoading && items.isEmpty() -> { + SearchLoadingIndicator( + message = loadingMessage, + modifier = modifier, + ) + } + + error != null && items.isEmpty() -> { + ErrorDisplay( + errorMessage = error, + onRetry = onLoadNextPage, + modifier = modifier, + ) + } + + !isLoading && items.isEmpty() -> { + SearchMessage(message = emptyMessage, modifier = modifier) + } + + else -> { + LazyVerticalGrid( + state = gridState, + columns = GridCells.Adaptive(minSize = GridMinCellSize), + modifier = modifier.padding(horizontal = 12.dp), + contentPadding = PaddingValues(top = 12.dp, bottom = 16.dp + bottomInset), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + items(items) { item -> + itemContent(item) + } + + if (isLoading && items.isNotEmpty()) { + items(4) { + SkeletonTree(true) { + PlayableCard( + title = "Sample Title", + subtitle = "Sample Subtitle", + imageURL = "https://placehold.co/600x400", + ) + } + } + } + } + } + } +} + +@Composable +private fun SearchHorizontalSection( + title: String, + onSeeAll: () -> Unit, + content: androidx.compose.foundation.lazy.LazyListScope.() -> Unit, +) { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + ) { + Text( + text = title, + style = MaterialTheme.typography.titleLarge, + fontWeight = FontWeight.SemiBold, + ) + + Text( + text = "See all", + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.primary, + modifier = Modifier.clickable(onClick = onSeeAll), + ) + } + + LazyRow( + contentPadding = PaddingValues(horizontal = 16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + content = content, + ) + } +} + +@Composable +private fun SearchTrackRow( + index: Int, + track: MetadataTrack, + modifier: Modifier = Modifier, +) { + Row( + modifier = modifier + .fillMaxWidth() + .padding(vertical = 4.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp), + ) { + Text( + text = (index + 1).toString(), + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.End, + ) + + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + Text( + text = track.title, + style = MaterialTheme.typography.bodyLarge, + maxLines = 1, + ) + Text( + text = track.artists.joinToString { it.name }, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + ) + } + + if (track.album != null) Text( + text = track.album!!.title, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + modifier = Modifier.weight(1f), + ) + } +} + +private val WarmSearchMessages = listOf( + "Digging through the crates...", + "Searching the cosmos...", + "Warming up the speakers...", + "Dusting off the vinyl...", + "Consulting the music gods...", + "Tuning the antennas...", + "Flipping through the records...", +) + +@Composable +private fun SearchLoadingIndicator( + message: String? = null, + modifier: Modifier = Modifier, +) { + val infiniteTransition = rememberInfiniteTransition(label = "search-loading") + val rotation by infiniteTransition.animateFloat( + initialValue = 0f, + targetValue = 360f, + animationSpec = infiniteRepeatable( + animation = tween(durationMillis = 1500, easing = LinearEasing), + repeatMode = RepeatMode.Restart, + ), + label = "icon-rotation", + ) + val bounce by infiniteTransition.animateFloat( + initialValue = -8f, + targetValue = 8f, + animationSpec = infiniteRepeatable( + animation = tween(durationMillis = 800, easing = LinearEasing), + repeatMode = RepeatMode.Reverse, + ), + label = "icon-bounce", + ) + val messageIndex by infiniteTransition.animateFloat( + initialValue = 0f, + targetValue = WarmSearchMessages.size.toFloat(), + animationSpec = infiniteRepeatable( + animation = tween( + durationMillis = WarmSearchMessages.size * 2000, + easing = LinearEasing + ), + repeatMode = RepeatMode.Restart, + ), + label = "message-cycle", + ) + val displayMessage = + message ?: WarmSearchMessages[messageIndex.toInt() % WarmSearchMessages.size] + + Column( + modifier = modifier.fillMaxWidth(), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + ) { + Box( + modifier = Modifier.size(64.dp), + contentAlignment = Alignment.Center, + ) { + Icon( + imageVector = Iconsax.IconsaxSearchBroken, + contentDescription = "Searching", + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier + .size(48.dp) + .graphicsLayer { + rotationZ = rotation + translationY = bounce + }, + ) + } + LinearProgressIndicator( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 32.dp, vertical = 16.dp), + ) + AnimatedContent( + targetState = displayMessage, + transitionSpec = { + fadeIn(tween(300)) togetherWith fadeOut(tween(300)) + }, + label = "message-transition", + ) { msg -> + Text( + text = msg, + color = MaterialTheme.colorScheme.onSurfaceVariant, + style = MaterialTheme.typography.bodyMedium, + textAlign = TextAlign.Center, + ) + } + } +} + +@Composable +private fun SearchMessage( + message: String, + modifier: Modifier = Modifier, + isError: Boolean = false, +) { + Box( + modifier = modifier, + contentAlignment = Alignment.Center, + ) { + Text( + text = message, + color = if (isError) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.onSurfaceVariant, + style = MaterialTheme.typography.bodyMedium, + textAlign = TextAlign.Center, + modifier = Modifier.padding(16.dp), + ) + } +} + +@Composable +private fun SearchMessageInline( + message: String, + isError: Boolean = false, +) { + Text( + text = message, + color = if (isError) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.onSurfaceVariant, + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp), + ) +} + +@Composable +private fun MetadataSupportedSearchType.tabTitle(): String = when (this) { + MetadataSupportedSearchType.ALL -> "All" + MetadataSupportedSearchType.TRACK -> "Tracks" + MetadataSupportedSearchType.PLAYLIST -> "Playlists" + MetadataSupportedSearchType.ALBUM -> "Albums" + MetadataSupportedSearchType.ARTIST -> "Artists" + MetadataSupportedSearchType.USER -> "Users" +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchScreenViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchScreenViewModel.kt new file mode 100644 index 00000000..5f233b9a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/search/SearchScreenViewModel.kt @@ -0,0 +1,619 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.search + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import androidx.datastore.preferences.core.edit +import androidx.datastore.preferences.core.stringPreferencesKey +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSupportedSearchType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.spotube.core.db.Database +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksRepository +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.Job +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.joinAll +import kotlinx.coroutines.launch +import kotlinx.serialization.json.Json + +data class SearchPagedState( + val items: List = emptyList(), + val nextPagination: PaginationStrategy? = null, + val hasNextPage: Boolean = true, + val isLoading: Boolean = false, + val error: String? = null, +) + +data class SearchScreenState( + val query: String = "", + val supportedSearchTypes: List = emptyList(), + val selectedSearchType: MetadataSupportedSearchType? = null, + val isLoadingSearchTypes: Boolean = false, + val recentSearches: List = emptyList(), + val tracks: SearchPagedState = SearchPagedState(), + val albums: SearchPagedState = SearchPagedState(), + val artists: SearchPagedState = SearchPagedState(), + val playlists: SearchPagedState = SearchPagedState(), + val users: SearchPagedState = SearchPagedState(), +) + +@OptIn(ExperimentalCoroutinesApi::class) +class SearchScreenViewModel( + private val repository: SearchRepository, + private val savedTracksRepository: SavedTracksRepository, + private val database: Database, +) : ViewModel() { + companion object { + private val RECENT_SEARCHES_KEY = stringPreferencesKey("recent_searches") + private val SEARCH_TYPES_ORDER = listOf( + MetadataSupportedSearchType.ALL, + MetadataSupportedSearchType.TRACK, + MetadataSupportedSearchType.PLAYLIST, + MetadataSupportedSearchType.ALBUM, + MetadataSupportedSearchType.ARTIST, + MetadataSupportedSearchType.USER, + ) + private const val QUERY_DEBOUNCE_MS = 350L + private const val RECENT_SEARCHES_LIMIT = 12 + private const val TRACK_PAGE_SIZE = 20 + private const val ALL_ROW_PAGE_SIZE = 12 + } + + private val json = Json { ignoreUnknownKeys = true } + + private val _state = MutableStateFlow(SearchScreenState()) + val state: StateFlow = _state.asStateFlow() + + private var queryJob: Job? = null + + init { + viewModelScope.launch { + database.settingsDataStore.data.collect { preferences -> + val recent = parseRecentSearches(preferences[RECENT_SEARCHES_KEY]) + _state.value = _state.value.copy(recentSearches = recent) + } + } + + loadSupportedSearchTypes() + } + + fun onQueryChange(query: String) { + _state.value = _state.value.copy(query = query) + queryJob?.cancel() + queryJob = viewModelScope.launch { + delay(QUERY_DEBOUNCE_MS) + saveRecentSearch(query) + refreshCurrentSelection(reset = true) + } + } + + fun applyRecentSearch(query: String) { + _state.value = _state.value.copy(query = query) + queryJob?.cancel() + viewModelScope.launch { + saveRecentSearch(query) + refreshCurrentSelection(reset = true) + } + } + + fun clearQuery() { + queryJob?.cancel() + _state.value = _state.value.copy( + query = "", + tracks = SearchPagedState(), + albums = SearchPagedState(), + artists = SearchPagedState(), + playlists = SearchPagedState(), + users = SearchPagedState(), + ) + } + + fun clearAllRecentSearches() { + viewModelScope.launch { + database.settingsDataStore.edit { preferences -> + preferences.remove(RECENT_SEARCHES_KEY) + } + } + } + + fun removeRecentSearch(query: String) { + viewModelScope.launch { + val current = _state.value.recentSearches + val updated = current.filterNot { it.equals(query, ignoreCase = true) } + persistRecentSearches(updated) + } + } + + fun onTabSelected(type: MetadataSupportedSearchType) { + _state.value = _state.value.copy( + selectedSearchType = type, + tracks = SearchPagedState(), + albums = SearchPagedState(), + artists = SearchPagedState(), + playlists = SearchPagedState(), + users = SearchPagedState(), + ) + if (_state.value.query.isNotBlank()) { + viewModelScope.launch { + refreshCurrentSelection(reset = true) + } + } + } + + fun loadNextTracks() { + val current = _state.value + if (current.query.isBlank()) return + if (current.tracks.isLoading || current.tracks.nextPagination == null) return + + viewModelScope.launch { + loadTracks(reset = false) + } + } + + fun loadNextAlbums() { + val current = _state.value + if (current.query.isBlank()) return + if (current.albums.isLoading || current.albums.nextPagination == null) return + + viewModelScope.launch { + loadAlbums(reset = false) + } + } + + fun loadNextArtists() { + val current = _state.value + if (current.query.isBlank()) return + if (current.artists.isLoading || current.artists.nextPagination == null) return + + viewModelScope.launch { + loadArtists(reset = false) + } + } + + fun loadNextPlaylists() { + val current = _state.value + if (current.query.isBlank()) return + if (current.playlists.isLoading || current.playlists.nextPagination == null) return + + viewModelScope.launch { + loadPlaylists(reset = false) + } + } + + fun loadNextUsers() { + val current = _state.value + if (current.query.isBlank()) return + if (current.users.isLoading || current.users.nextPagination == null) return + + viewModelScope.launch { + loadUsers(reset = false) + } + } + + private fun loadSupportedSearchTypes() { + viewModelScope.launch { + runCatching { + repository.loadSupportedSearchTypes() + }.onSuccess { supportedTypes -> + val ordered = SEARCH_TYPES_ORDER.filter { it in supportedTypes } + val selected = _state.value.selectedSearchType + val selectedType = when { + selected != null && selected in ordered -> selected + MetadataSupportedSearchType.ALL in ordered -> MetadataSupportedSearchType.ALL + else -> ordered.firstOrNull() + } + + _state.value = _state.value.copy( + supportedSearchTypes = ordered, + selectedSearchType = selectedType, + isLoadingSearchTypes = false, + ) + + if (_state.value.query.isNotBlank()) { + refreshCurrentSelection(reset = true) + } + }.onFailure { + _state.value = _state.value.copy( + isLoadingSearchTypes = false, + supportedSearchTypes = emptyList(), + selectedSearchType = null, + tracks = SearchPagedState(error = it.message ?: "Failed to load search capabilities"), + ) + } + } + } + + private suspend fun refreshCurrentSelection(reset: Boolean) { + val current = _state.value + if (current.query.isBlank()) { + _state.value = current.copy( + tracks = SearchPagedState(), + albums = SearchPagedState(), + artists = SearchPagedState(), + playlists = SearchPagedState(), + users = SearchPagedState(), + ) + return + } + + when (current.selectedSearchType) { + MetadataSupportedSearchType.ALL -> loadAll(reset = reset) + MetadataSupportedSearchType.TRACK -> loadTracks(reset = reset) + MetadataSupportedSearchType.ALBUM -> loadAlbums(reset = reset) + MetadataSupportedSearchType.ARTIST -> loadArtists(reset = reset) + MetadataSupportedSearchType.PLAYLIST -> loadPlaylists(reset = reset) + MetadataSupportedSearchType.USER -> loadUsers(reset = reset) + null -> Unit + } + } + + private suspend fun loadAll(reset: Boolean) = coroutineScope { + if (!reset) return@coroutineScope + + val query = _state.value.query.trim() + val supported = _state.value.supportedSearchTypes + + _state.value = _state.value.copy( + tracks = SearchPagedState(isLoading = true), + albums = SearchPagedState(isLoading = true), + artists = SearchPagedState(isLoading = true), + playlists = SearchPagedState(isLoading = true), + users = SearchPagedState(isLoading = true), + ) + + if (MetadataSupportedSearchType.ALL in supported) { + runCatching { + repository.searchAll(query) + }.onSuccess { results -> + val tracks = results.filterIsInstance().map { it.data } + val playlists = results.filterIsInstance().map { it.data } + val albums = results.filterIsInstance().map { it.data } + val artists = results.filterIsInstance().map { it.data } + val users = results.filterIsInstance().map { it.data } + + val trackSubset = tracks.take(TRACK_PAGE_SIZE) + savedTracksRepository.isSavedTracks(trackSubset.map { it.id }) + + _state.value = _state.value.copy( + tracks = SearchPagedState( + items = tracks.take(TRACK_PAGE_SIZE), + nextPagination = null, + hasNextPage = false, + isLoading = false, + ), + playlists = SearchPagedState( + items = playlists.take(ALL_ROW_PAGE_SIZE), + nextPagination = null, + hasNextPage = false, + isLoading = false, + ), + albums = SearchPagedState( + items = albums.take(ALL_ROW_PAGE_SIZE), + nextPagination = null, + hasNextPage = false, + isLoading = false, + ), + artists = SearchPagedState( + items = artists.take(ALL_ROW_PAGE_SIZE), + nextPagination = null, + hasNextPage = false, + isLoading = false, + ), + users = SearchPagedState( + items = users.take(ALL_ROW_PAGE_SIZE), + nextPagination = null, + hasNextPage = false, + isLoading = false, + ), + ) + }.onFailure { + _state.value = _state.value.copy( + tracks = SearchPagedState(isLoading = false, error = it.message ?: "Failed to search"), + playlists = SearchPagedState(isLoading = false, error = it.message ?: "Failed to search"), + albums = SearchPagedState(isLoading = false, error = it.message ?: "Failed to search"), + artists = SearchPagedState(isLoading = false, error = it.message ?: "Failed to search"), + users = SearchPagedState(isLoading = false, error = it.message ?: "Failed to search"), + ) + } + return@coroutineScope + } + + val jobs = mutableListOf() + if (MetadataSupportedSearchType.TRACK in supported) jobs += launch { loadTracks(reset = true) } + if (MetadataSupportedSearchType.ALBUM in supported) jobs += launch { loadAlbums(reset = true) } + if (MetadataSupportedSearchType.ARTIST in supported) jobs += launch { loadArtists(reset = true) } + if (MetadataSupportedSearchType.PLAYLIST in supported) jobs += launch { loadPlaylists(reset = true) } + if (MetadataSupportedSearchType.USER in supported) jobs += launch { loadUsers(reset = true) } + jobs.joinAll() + + _state.value = _state.value.copy( + playlists = _state.value.playlists.copy(items = _state.value.playlists.items.take(ALL_ROW_PAGE_SIZE)), + albums = _state.value.albums.copy(items = _state.value.albums.items.take(ALL_ROW_PAGE_SIZE)), + artists = _state.value.artists.copy(items = _state.value.artists.items.take(ALL_ROW_PAGE_SIZE)), + users = _state.value.users.copy(items = _state.value.users.items.take(ALL_ROW_PAGE_SIZE)), + ) + } + + private suspend fun loadTracks(reset: Boolean) { + val currentState = _state.value.tracks + val query = _state.value.query.trim() + val pagination = if (reset) null else currentState.nextPagination ?: return + + _state.value = _state.value.copy( + tracks = if (reset) { + SearchPagedState(isLoading = true) + } else { + currentState.copy(isLoading = true, error = null) + } + ) + + runCatching { + repository.searchTracks(query, pagination) + }.onSuccess { page -> + val mergedItems = if (reset) { + page.items.map { it.data } + } else { + _state.value.tracks.items + page.items.map { it.data } + } + + savedTracksRepository.isSavedTracks(mergedItems.map { it.id }) + + _state.value = _state.value.copy( + tracks = SearchPagedState( + items = mergedItems, + nextPagination = page.nextPagination, + hasNextPage = page.nextPagination != null, + isLoading = false, + error = null, + ) + ) + }.onFailure { throwable -> + _state.value = _state.value.copy( + tracks = _state.value.tracks.copy( + isLoading = false, + hasNextPage = false, + error = throwable.message ?: "Failed to search tracks", + ) + ) + } + } + + private suspend fun loadAlbums(reset: Boolean) { + val currentState = _state.value.albums + val query = _state.value.query.trim() + val pagination = if (reset) null else currentState.nextPagination ?: return + + _state.value = _state.value.copy( + albums = if (reset) { + SearchPagedState(isLoading = true) + } else { + currentState.copy(isLoading = true, error = null) + } + ) + + runCatching { + repository.searchAlbums(query, pagination) + }.onSuccess { page -> + val mergedItems = if (reset) { + page.items.map { it.data } + } else { + _state.value.albums.items + page.items.map { it.data } + } + + _state.value = _state.value.copy( + albums = SearchPagedState( + items = mergedItems, + nextPagination = page.nextPagination, + hasNextPage = page.nextPagination != null, + isLoading = false, + error = null, + ) + ) + }.onFailure { throwable -> + _state.value = _state.value.copy( + albums = _state.value.albums.copy( + isLoading = false, + hasNextPage = false, + error = throwable.message ?: "Failed to search albums", + ) + ) + } + } + + private suspend fun loadArtists(reset: Boolean) { + val currentState = _state.value.artists + val query = _state.value.query.trim() + val pagination = if (reset) null else currentState.nextPagination ?: return + + _state.value = _state.value.copy( + artists = if (reset) { + SearchPagedState(isLoading = true) + } else { + currentState.copy(isLoading = true, error = null) + } + ) + + runCatching { + repository.searchArtists(query, pagination) + }.onSuccess { page -> + val mergedItems = if (reset) { + page.items.map { it.data } + } else { + _state.value.artists.items + page.items.map { it.data } + } + + _state.value = _state.value.copy( + artists = SearchPagedState( + items = mergedItems, + nextPagination = page.nextPagination, + hasNextPage = page.nextPagination != null, + isLoading = false, + error = null, + ) + ) + }.onFailure { throwable -> + _state.value = _state.value.copy( + artists = _state.value.artists.copy( + isLoading = false, + hasNextPage = false, + error = throwable.message ?: "Failed to search artists", + ) + ) + } + } + + private suspend fun loadPlaylists(reset: Boolean) { + val currentState = _state.value.playlists + val query = _state.value.query.trim() + val pagination = if (reset) null else currentState.nextPagination ?: return + + _state.value = _state.value.copy( + playlists = if (reset) { + SearchPagedState(isLoading = true) + } else { + currentState.copy(isLoading = true, error = null) + } + ) + + runCatching { + repository.searchPlaylists(query, pagination) + }.onSuccess { page -> + val mergedItems = if (reset) { + page.items.map { it.data } + } else { + _state.value.playlists.items + page.items.map { it.data } + } + + _state.value = _state.value.copy( + playlists = SearchPagedState( + items = mergedItems, + nextPagination = page.nextPagination, + hasNextPage = page.nextPagination != null, + isLoading = false, + error = null, + ) + ) + }.onFailure { throwable -> + _state.value = _state.value.copy( + playlists = _state.value.playlists.copy( + isLoading = false, + hasNextPage = false, + error = throwable.message ?: "Failed to search playlists", + ) + ) + } + } + + private suspend fun loadUsers(reset: Boolean) { + val currentState = _state.value.users + val query = _state.value.query.trim() + val pagination = if (reset) null else currentState.nextPagination ?: return + + _state.value = _state.value.copy( + users = if (reset) { + SearchPagedState(isLoading = true) + } else { + currentState.copy(isLoading = true, error = null) + } + ) + + runCatching { + repository.searchUsers(query, pagination) + }.onSuccess { page -> + val mergedItems = if (reset) { + page.items.map { it.data } + } else { + _state.value.users.items + page.items.map { it.data } + } + + _state.value = _state.value.copy( + users = SearchPagedState( + items = mergedItems, + nextPagination = page.nextPagination, + hasNextPage = page.nextPagination != null, + isLoading = false, + error = null, + ) + ) + }.onFailure { throwable -> + _state.value = _state.value.copy( + users = _state.value.users.copy( + isLoading = false, + hasNextPage = false, + error = throwable.message ?: "Failed to search users", + ) + ) + } + } + + val savedTrackIds + get() = savedTracksRepository.savedTracksIdsFlow + + fun toggleTrackIsFavorite(trackId: String) { + viewModelScope.launch { + val savedIds = savedTrackIds.value + if (savedIds.contains(trackId)) { + savedTracksRepository.removeSavedTracks(listOf(trackId)) + } else { + savedTracksRepository.saveTracks(listOf(trackId)) + } + } + } + + private suspend fun saveRecentSearch(query: String) { + val normalized = query.trim() + if (normalized.isBlank()) return + + val current = _state.value.recentSearches + val updated = (listOf(normalized) + current.filterNot { it.equals(normalized, ignoreCase = true) }) + .take(RECENT_SEARCHES_LIMIT) + persistRecentSearches(updated) + } + + private suspend fun persistRecentSearches(searches: List) { + database.settingsDataStore.edit { preferences -> + if (searches.isEmpty()) { + preferences.remove(RECENT_SEARCHES_KEY) + } else { + preferences[RECENT_SEARCHES_KEY] = json.encodeToString(searches) + } + } + } + + private fun parseRecentSearches(raw: String?): List { + if (raw.isNullOrBlank()) return emptyList() + return runCatching { + json.decodeFromString>(raw) + .map { it.trim() } + .filter { it.isNotBlank() } + .distinct() + .take(RECENT_SEARCHES_LIMIT) + }.getOrDefault(emptyList()) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsConstants.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsConstants.kt new file mode 100644 index 00000000..2c1d3d3b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsConstants.kt @@ -0,0 +1,329 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings + +import androidx.compose.ui.graphics.Color +import kotlinx.serialization.Serializable + +@Serializable +enum class CountryCode(val code: String, val displayName: String) { + AD("AD", "Andorra"), + AE("AE", "United Arab Emirates"), + AF("AF", "Afghanistan"), + AG("AG", "Antigua and Barbuda"), + AI("AI", "Anguilla"), + AL("AL", "Albania"), + AM("AM", "Armenia"), + AO("AO", "Angola"), + AQ("AQ", "Antarctica"), + AR("AR", "Argentina"), + AS("AS", "American Samoa"), + AT("AT", "Austria"), + AU("AU", "Australia"), + AW("AW", "Aruba"), + AX("AX", "Aland Islands"), + AZ("AZ", "Azerbaijan"), + BA("BA", "Bosnia and Herzegovina"), + BB("BB", "Barbados"), + BD("BD", "Bangladesh"), + BE("BE", "Belgium"), + BF("BF", "Burkina Faso"), + BG("BG", "Bulgaria"), + BH("BH", "Bahrain"), + BI("BI", "Burundi"), + BJ("BJ", "Benin"), + BL("BL", "Saint Barthelemy"), + BM("BM", "Bermuda"), + BN("BN", "Brunei Darussalam"), + BO("BO", "Bolivia"), + BQ("BQ", "Bonaire, Sint Eustatius and Saba"), + BR("BR", "Brazil"), + BS("BS", "Bahamas"), + BT("BT", "Bhutan"), + BV("BV", "Bouvet Island"), + BW("BW", "Botswana"), + BY("BY", "Belarus"), + BZ("BZ", "Belize"), + CA("CA", "Canada"), + CC("CC", "Cocos (Keeling) Islands"), + CD("CD", "Democratic Republic of the Congo"), + CF("CF", "Central African Republic"), + CG("CG", "Congo"), + CH("CH", "Switzerland"), + CI("CI", "Cote d'Ivoire"), + CK("CK", "Cook Islands"), + CL("CL", "Chile"), + CM("CM", "Cameroon"), + CN("CN", "China"), + CO("CO", "Colombia"), + CR("CR", "Costa Rica"), + CU("CU", "Cuba"), + CV("CV", "Cabo Verde"), + CW("CW", "Curacao"), + CX("CX", "Christmas Island"), + CY("CY", "Cyprus"), + CZ("CZ", "Czechia"), + DE("DE", "Germany"), + DJ("DJ", "Djibouti"), + DK("DK", "Denmark"), + DM("DM", "Dominica"), + DO("DO", "Dominican Republic"), + DZ("DZ", "Algeria"), + EC("EC", "Ecuador"), + EE("EE", "Estonia"), + EG("EG", "Egypt"), + EH("EH", "Western Sahara"), + ER("ER", "Eritrea"), + ES("ES", "Spain"), + ET("ET", "Ethiopia"), + FI("FI", "Finland"), + FJ("FJ", "Fiji"), + FK("FK", "Falkland Islands"), + FM("FM", "Micronesia"), + FO("FO", "Faroe Islands"), + FR("FR", "France"), + GA("GA", "Gabon"), + GB("GB", "United Kingdom"), + GD("GD", "Grenada"), + GE("GE", "Georgia"), + GF("GF", "French Guiana"), + GG("GG", "Guernsey"), + GH("GH", "Ghana"), + GI("GI", "Gibraltar"), + GL("GL", "Greenland"), + GM("GM", "Gambia"), + GN("GN", "Guinea"), + GP("GP", "Guadeloupe"), + GQ("GQ", "Equatorial Guinea"), + GR("GR", "Greece"), + GS("GS", "South Georgia and the South Sandwich Islands"), + GT("GT", "Guatemala"), + GU("GU", "Guam"), + GW("GW", "Guinea-Bissau"), + GY("GY", "Guyana"), + HK("HK", "Hong Kong"), + HM("HM", "Heard Island and McDonald Islands"), + HN("HN", "Honduras"), + HR("HR", "Croatia"), + HT("HT", "Haiti"), + HU("HU", "Hungary"), + ID("ID", "Indonesia"), + IE("IE", "Ireland"), + IL("IL", "Israel"), + IM("IM", "Isle of Man"), + IN("IN", "India"), + IO("IO", "British Indian Ocean Territory"), + IQ("IQ", "Iraq"), + IR("IR", "Iran"), + IS("IS", "Iceland"), + IT("IT", "Italy"), + JE("JE", "Jersey"), + JM("JM", "Jamaica"), + JO("JO", "Jordan"), + JP("JP", "Japan"), + KE("KE", "Kenya"), + KG("KG", "Kyrgyzstan"), + KH("KH", "Cambodia"), + KI("KI", "Kiribati"), + KM("KM", "Comoros"), + KN("KN", "Saint Kitts and Nevis"), + KP("KP", "North Korea"), + KR("KR", "South Korea"), + KW("KW", "Kuwait"), + KY("KY", "Cayman Islands"), + KZ("KZ", "Kazakhstan"), + LA("LA", "Lao People's Democratic Republic"), + LB("LB", "Lebanon"), + LC("LC", "Saint Lucia"), + LI("LI", "Liechtenstein"), + LK("LK", "Sri Lanka"), + LR("LR", "Liberia"), + LS("LS", "Lesotho"), + LT("LT", "Lithuania"), + LU("LU", "Luxembourg"), + LV("LV", "Latvia"), + LY("LY", "Libya"), + MA("MA", "Morocco"), + MC("MC", "Monaco"), + MD("MD", "Moldova"), + ME("ME", "Montenegro"), + MF("MF", "Saint Martin (French part)"), + MG("MG", "Madagascar"), + MH("MH", "Marshall Islands"), + MK("MK", "North Macedonia"), + ML("ML", "Mali"), + MM("MM", "Myanmar"), + MN("MN", "Mongolia"), + MO("MO", "Macao"), + MP("MP", "Northern Mariana Islands"), + MQ("MQ", "Martinique"), + MR("MR", "Mauritania"), + MS("MS", "Montserrat"), + MT("MT", "Malta"), + MU("MU", "Mauritius"), + MV("MV", "Maldives"), + MW("MW", "Malawi"), + MX("MX", "Mexico"), + MY("MY", "Malaysia"), + MZ("MZ", "Mozambique"), + NA("NA", "Namibia"), + NC("NC", "New Caledonia"), + NE("NE", "Niger"), + NF("NF", "Norfolk Island"), + NG("NG", "Nigeria"), + NI("NI", "Nicaragua"), + NL("NL", "Netherlands"), + NO("NO", "Norway"), + NP("NP", "Nepal"), + NR("NR", "Nauru"), + NU("NU", "Niue"), + NZ("NZ", "New Zealand"), + OM("OM", "Oman"), + PA("PA", "Panama"), + PE("PE", "Peru"), + PF("PF", "French Polynesia"), + PG("PG", "Papua New Guinea"), + PH("PH", "Philippines"), + PK("PK", "Pakistan"), + PL("PL", "Poland"), + PM("PM", "Saint Pierre and Miquelon"), + PN("PN", "Pitcairn"), + PR("PR", "Puerto Rico"), + PS("PS", "Palestine, State of"), + PT("PT", "Portugal"), + PW("PW", "Palau"), + PY("PY", "Paraguay"), + QA("QA", "Qatar"), + RE("RE", "Reunion"), + RO("RO", "Romania"), + RS("RS", "Serbia"), + RU("RU", "Russian Federation"), + RW("RW", "Rwanda"), + SA("SA", "Saudi Arabia"), + SB("SB", "Solomon Islands"), + SC("SC", "Seychelles"), + SD("SD", "Sudan"), + SE("SE", "Sweden"), + SG("SG", "Singapore"), + SH("SH", "Saint Helena, Ascension and Tristan da Cunha"), + SI("SI", "Slovenia"), + SJ("SJ", "Svalbard and Jan Mayen"), + SK("SK", "Slovakia"), + SL("SL", "Sierra Leone"), + SM("SM", "San Marino"), + SN("SN", "Senegal"), + SO("SO", "Somalia"), + SR("SR", "Suriname"), + SS("SS", "South Sudan"), + ST("ST", "Sao Tome and Principe"), + SV("SV", "El Salvador"), + SX("SX", "Sint Maarten (Dutch part)"), + SY("SY", "Syrian Arab Republic"), + SZ("SZ", "Eswatini"), + TC("TC", "Turks and Caicos Islands"), + TD("TD", "Chad"), + TF("TF", "French Southern Territories"), + TG("TG", "Togo"), + TH("TH", "Thailand"), + TJ("TJ", "Tajikistan"), + TK("TK", "Tokelau"), + TL("TL", "Timor-Leste"), + TM("TM", "Turkmenistan"), + TN("TN", "Tunisia"), + TO("TO", "Tonga"), + TR("TR", "Turkey"), + TT("TT", "Trinidad and Tobago"), + TV("TV", "Tuvalu"), + TW("TW", "Taiwan"), + TZ("TZ", "Tanzania"), + UA("UA", "Ukraine"), + UG("UG", "Uganda"), + UM("UM", "United States Minor Outlying Islands"), + US("US", "United States"), + UY("UY", "Uruguay"), + UZ("UZ", "Uzbekistan"), + VA("VA", "Holy See"), + VC("VC", "Saint Vincent and the Grenadines"), + VE("VE", "Venezuela"), + VG("VG", "Virgin Islands (British)"), + VI("VI", "Virgin Islands (U.S.)"), + VN("VN", "Viet Nam"), + VU("VU", "Vanuatu"), + WF("WF", "Wallis and Futuna"), + WS("WS", "Samoa"), + YE("YE", "Yemen"), + YT("YT", "Mayotte"), + ZA("ZA", "South Africa"), + ZM("ZM", "Zambia"), + ZW("ZW", "Zimbabwe"); + + companion object { + fun fromCode(code: String): CountryCode? { + return entries.find { it.code == code.uppercase() } + } + } +} + +@Serializable +enum class SupportedLanguages( + val locale: String, + val country: String, + val displayName: String +) { + EN("en", "US", "English"), + BN("bn", "BD", "Bengali"); + + companion object { + fun fromLocale(locale: String): SupportedLanguages? { + return entries.find { it.locale == locale } + } + } +} + +@Serializable +enum class AccentColors(val lightHex: Long, val darkHex: Long) { + // High-contrast Forest / Neon Mint + GREEN_GOBLIN(0xFF006D3A, 0xFF80DB92), + + // Royal Purple / Soft Lavender + ELECTRIC_VIOLET(0xFF6C40BF, 0xFFD0BCFF), + + // Deep Teal / Icy Cyan + OCEANIC_CYAN(0xFF00677D, 0xFF59D3ED), + + // Burnt Sienna / Peach Glow + SUNSET_ORANGE(0xFFA23F16, 0xFFFFB596), + + // Crimson Red / Pastel Pink-Red + ROSE_GARDEN(0xFFB12E49, 0xFFFFB2BB), + + // Deep Cobalt / Sky Blue + MIDNIGHT_BLUE(0xFF0056D2, 0xFFB1C5FF), + + // Slate Gray / Silver + METALLIC_SLATE(0xFF5A5F6B, 0xFFC2C7D4); + + companion object { + fun fromHex(lightHex: Long, darkHex: Long): AccentColors? { + return entries.find { it.lightHex == lightHex && it.darkHex == darkHex } + } + } + + fun toLightColor() = Color(lightHex) + fun toDarkColor() = Color(darkHex) +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsModels.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsModels.kt new file mode 100644 index 00000000..cfd8ed3e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsModels.kt @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioFormat +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioQuality +import kotlinx.serialization.Serializable + +@Serializable +enum class Theme { + LIGHT, DARK, SYSTEM +} + +@Serializable +data class UserSettings( + // Language and Region + val language: SupportedLanguages = SupportedLanguages.EN, + val country: CountryCode = CountryCode.BD, + + // Appearance + val theme: Theme = Theme.SYSTEM, + val accentColor: AccentColors = AccentColors.GREEN_GOBLIN, + + // Playback + val streamingMusicFormat: AudioFormat = AudioFormat( + codec = "opus", + container = "webm", + qualities = listOf( + AudioQuality.Lossy(bitrate = 44_000), + AudioQuality.Lossy(bitrate = 96_000), + AudioQuality.Lossy(bitrate = 128_000), + AudioQuality.Lossy(bitrate = 256_000), + ) + ), + val streamingMusicQuality: AudioQuality = AudioQuality.Lossy(bitrate = 256_000), + val enableMusicCaching: Boolean = true, + val cacheFolder: String? = null, + val cacheSizeLimitMB: Long = -1L, + val enableEndlessPlayback: Boolean = true, + val enableConnect: Boolean = false, + val playbackProxyServerPort: Int = 14769, + + // Downloads + val overloadedDownloadFolder: String? = null, // When null, uses default music folder + val localMediaFolders: List = emptyList(), + val downloadMusicFormat: AudioFormat = AudioFormat( + codec = "aac", + container = "mp4", + qualities = listOf( + AudioQuality.Lossy(bitrate = 44_000), + AudioQuality.Lossy(bitrate = 96_000), + AudioQuality.Lossy(bitrate = 128_000), + AudioQuality.Lossy(bitrate = 256_000), + ) + ), + val downloadMusicQuality: AudioQuality = AudioQuality.Lossy(bitrate = 256_000), + + // Desktop + val minimizeToTray: Boolean = false, + val discordRichPresence: Boolean = true, + + // Updates + val autoCheckForUpdates: Boolean = true, +) diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsRepository.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsRepository.kt new file mode 100644 index 00000000..35fb777d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsRepository.kt @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings + +import androidx.datastore.preferences.core.edit +import androidx.datastore.preferences.core.stringPreferencesKey +import dev.krtirtho.spotube.core.db.Database +import kotlinx.coroutines.flow.* +import kotlinx.serialization.json.Json + +class SettingsRepository(private val database: Database) { + companion object { + private val SETTINGS_KEY = stringPreferencesKey("user_settings") + } + + val userSettings: Flow = database.settingsDataStore.data.map { prefs -> + val json = prefs[SETTINGS_KEY] + if (json != null) { + Json.decodeFromString(json as String) + } else { + UserSettings() // Default value + } + } + + suspend fun updateSettings(newSettings: UserSettings) { + database.settingsDataStore.edit { prefs -> + prefs[SETTINGS_KEY] = Json.encodeToString(newSettings) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsScreen.kt new file mode 100644 index 00000000..fc731f8d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsScreen.kt @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.PlatformType +import dev.krtirtho.spotube.getPlatform +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.ui.component.ApplicationMainBar +import dev.krtirtho.spotube.modules.plugin.PluginManager +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.sections.appearanceSection +import dev.krtirtho.spotube.modules.settings.sections.cacheSection +import dev.krtirtho.spotube.modules.settings.sections.desktopSection +import dev.krtirtho.spotube.modules.settings.sections.downloadsSection +import dev.krtirtho.spotube.modules.settings.sections.languageRegionSection +import dev.krtirtho.spotube.modules.settings.sections.playbackSection +import dev.krtirtho.spotube.modules.settings.sections.pluginsSection +import dev.krtirtho.spotube.modules.settings.sections.updatesSection +import dev.krtirtho.spotube.modules.shell.LocalAppShellBottomInset +import org.jetbrains.compose.resources.stringResource +import org.koin.compose.koinInject + + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun SettingsScreen(pluginManager: PluginManager, settingsViewModel: SettingsViewModel) { + val navigatorCommands = koinInject() + val pluginState by pluginManager.state.collectAsStateWithLifecycle() + val settingsState by settingsViewModel.settingsState.collectAsStateWithLifecycle() + val platformType = remember { getPlatform().type } + val isDesktopPlatform = platformType == PlatformType.Windows || + platformType == PlatformType.Linux || + platformType == PlatformType.MacOS + + val shellBottomInset = LocalAppShellBottomInset.current + val contentPadding = remember(shellBottomInset) { + PaddingValues(top = 16.dp, bottom = 16.dp + shellBottomInset) + } + + Scaffold( + topBar = { + ApplicationMainBar( + title = { + Text(stringResource(Res.string.settings_screen_title)) + }, + backButton = false + ) + } + ) { innerPadding -> + Box( + modifier = Modifier + .fillMaxSize() + .padding(innerPadding) + ) { + LazyColumn( + modifier = Modifier + .widthIn(max = 1280.dp) + .align(Alignment.TopCenter), + contentPadding = contentPadding, + ) { + pluginsSection( + pluginManager = pluginManager, + pluginState = pluginState, + navigatorCommands = navigatorCommands, + ) + if (settingsState != null) { + languageRegionSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + } + if (settingsState != null) + appearanceSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + if (settingsState != null) + playbackSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + if (settingsState != null) + cacheSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + if (settingsState != null) + downloadsSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + if (isDesktopPlatform && settingsState != null) { + desktopSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + } + if (settingsState != null) + updatesSection( + settings = settingsState!!, + settingsViewModel = settingsViewModel, + ) + } + + } + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsViewModel.kt new file mode 100644 index 00000000..dcd418de --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/SettingsViewModel.kt @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.launch + +class SettingsViewModel( + private val repository: SettingsRepository +) : ViewModel() { + val settingsState: StateFlow = repository.userSettings.stateIn( + viewModelScope, + SharingStarted.WhileSubscribed(5000), + null, + ) + + fun updateSettings(transform: UserSettings.() -> UserSettings) { + viewModelScope.launch { + // Get current state, apply transform, and save + val currentSettings = settingsState.value ?: return@launch + val newSettings = currentSettings.transform() + repository.updateSettings(newSettings) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/components/InteractiveSettingCards.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/components/InteractiveSettingCards.kt new file mode 100644 index 00000000..373b9cd6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/components/InteractiveSettingCards.kt @@ -0,0 +1,288 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.components + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.RadioButton +import androidx.compose.material3.Switch +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TextField +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import dev.krtirtho.spotube.core.ui.component.AdaptiveDropdownBottomSheet +import dev.krtirtho.spotube.core.ui.component.AdaptiveMenuItem +import spotube.composeapp.generated.resources.* +import org.jetbrains.compose.resources.stringResource + +@Composable +internal fun SwitchSettingCard( + title: String, + subtitle: String? = null, + checked: Boolean, + onCheckedChange: (Boolean) -> Unit, + icon: (@Composable () -> Unit)? = null, +) { + SettingCardItem( + title = title, + subtitle = subtitle, + icon = icon, + trailingContent = { + Switch( + checked = checked, + onCheckedChange = onCheckedChange, + ) + }, + onClick = { + onCheckedChange(!checked) + } + ) +} + +@Composable +internal fun SelectionSettingCard( + title: String, + subtitle: String? = null, + selectedOption: T, + options: List, + optionLabel: @Composable (T) -> String, + onOptionSelected: (T) -> Unit, + dialogTitle: String = title, + icon: (@Composable () -> Unit)? = null, + inlineSelectorMinWidth: Dp = 700.dp, + filter: ((AdaptiveMenuItem, String) -> Boolean)? = null, +) { + var isDialogOpen by remember { mutableStateOf(false) } + + BoxWithConstraints { + val isWideLayout = maxWidth >= inlineSelectorMinWidth + + SettingCardItem( + title = title, + subtitle = subtitle, + icon = icon, + trailingContent = { + AdaptiveDropdownBottomSheet( + items = options.map { option -> + AdaptiveMenuItem( + label = optionLabel(option), + onClick = { onOptionSelected(option) }, + selected = option == selectedOption, + ) + }, + trigger = { onClick -> + TextButton(onClick = onClick) { + Text(optionLabel(selectedOption)) + } + }, + filter = filter, + ) + }, + onClick = { + if (isWideLayout) { + isDialogOpen = true + } + } + ) + + if (!isWideLayout && isDialogOpen) { + AlertDialog( + onDismissRequest = { isDialogOpen = false }, + title = { + Text(dialogTitle) + }, + text = { + Column( + modifier = Modifier.verticalScroll(rememberScrollState()), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + options.forEach { option -> + val isSelected = option == selectedOption + Row( + modifier = Modifier + .fillMaxWidth() + .clip(RoundedCornerShape(10.dp)) + .clickable { + onOptionSelected(option) + isDialogOpen = false + } + .padding(vertical = 4.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp) + ) { + RadioButton( + selected = isSelected, + onClick = { + onOptionSelected(option) + isDialogOpen = false + } + ) + Text( + text = optionLabel(option), + style = MaterialTheme.typography.bodyMedium + ) + } + } + } + }, + confirmButton = { + TextButton(onClick = { isDialogOpen = false }) { + Text(stringResource(Res.string.settings_action_close)) + } + } + ) + } + } +} + +@Composable +internal fun TextInputSettingCard( + title: String, + subtitle: String? = null, + value: String, + onValueSaved: (String) -> Unit, + dialogTitle: String = title, + dialogDescription: String? = null, + placeholder: String = "", + normalize: (String) -> String = { it.trim() }, + validate: (String) -> String? = { null }, + icon: (@Composable () -> Unit)? = null, + inlineTextFieldMinWidth: Dp = 700.dp, + inlineTextFieldWidth: Dp = 220.dp, + enabled: Boolean = true, +) { + var isDialogOpen by remember { mutableStateOf(false) } + + BoxWithConstraints { + val isWideLayout = maxWidth >= inlineTextFieldMinWidth + var inlineDraft by remember(value, isWideLayout) { mutableStateOf(value) } + + SettingCardItem( + enabled = enabled, + title = title, + subtitle = subtitle, + icon = icon, + trailingContent = if (isWideLayout) { + { + TextField( + value = inlineDraft, + onValueChange = { draft -> + inlineDraft = draft + val normalizedValue = normalize(draft) + if (validate(normalizedValue) == null) { + onValueSaved(normalizedValue) + } + }, + modifier = Modifier.width(inlineTextFieldWidth), + placeholder = if (placeholder.isNotEmpty()) { + { Text(placeholder) } + } else { + null + }, + singleLine = true, + enabled = enabled, + ) + } + } else { + null + }, + onClick = { + if (!isWideLayout) { + isDialogOpen = true + } + } + ) + + if (!isWideLayout && isDialogOpen) { + var draft by remember(value, isDialogOpen) { mutableStateOf(value) } + val normalizedValue = normalize(draft) + val errorMessage = validate(normalizedValue) + + AlertDialog( + onDismissRequest = { isDialogOpen = false }, + title = { + Text(dialogTitle) + }, + text = { + Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { + dialogDescription?.let { + Text( + text = it, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + OutlinedTextField( + value = draft, + onValueChange = { draft = it }, + modifier = Modifier.fillMaxWidth(), + placeholder = if (placeholder.isNotEmpty()) { + { Text(placeholder) } + } else { + null + }, + isError = errorMessage != null, + supportingText = errorMessage?.let { message -> + { Text(message) } + }, + singleLine = true, + ) + } + }, + confirmButton = { + TextButton( + onClick = { + if (errorMessage == null) { + onValueSaved(normalizedValue) + isDialogOpen = false + } + } + ) { + Text(stringResource(Res.string.settings_action_save)) + } + }, + dismissButton = { + TextButton(onClick = { isDialogOpen = false }) { + Text(stringResource(Res.string.settings_action_cancel)) + } + } + ) + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/components/SettingsCardItem.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/components/SettingsCardItem.kt new file mode 100644 index 00000000..fd514df2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/components/SettingsCardItem.kt @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp + +/** + * Reusable setting card item component for consistent styling + * across all list items in the settings screen + */ +@Composable +fun SettingCardItem( + enabled: Boolean = true, + title: String, + subtitle: String? = null, + icon: (@Composable () -> Unit)? = null, + trailingContent: (@Composable RowScope.() -> Unit)? = null, + onClick: () -> Unit = {}, + modifier: Modifier = Modifier +) { + Card( + modifier = modifier + .fillMaxWidth() + .padding(horizontal = 8.dp, vertical = 4.dp) + .clip(RoundedCornerShape(12.dp)) + .clickable(onClick = onClick, enabled = enabled) + .then(if (!enabled) Modifier.alpha(0.5f) else Modifier), + shape = RoundedCornerShape(12.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f) + ), + border = BorderStroke( + width = 1.dp, + color = MaterialTheme.colorScheme.outlineVariant + ), + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(12.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically + ) { + if (icon != null) { + icon() + } + + Column(modifier = Modifier.weight(1f)) { + Text( + title, + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onSurface + ) + if (subtitle != null) { + Text( + subtitle, + style = MaterialTheme.typography.bodySmall, + color = Color.Gray, + modifier = Modifier.padding(top = 4.dp) + ) + } + } + + trailingContent?.invoke(this) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/AppearanceSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/AppearanceSection.kt new file mode 100644 index 00000000..ac60082e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/AppearanceSection.kt @@ -0,0 +1,323 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.RadioButton +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import compose.icons.FeatherIcons +import compose.icons.feathericons.Droplet +import compose.icons.feathericons.Monitor +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.AccentColors +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.Theme +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SelectionSettingCard +import dev.krtirtho.spotube.modules.settings.components.SettingCardItem +import org.jetbrains.compose.resources.stringResource +import spotube.composeapp.generated.resources.* + +internal fun LazyListScope.appearanceSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + settingsSectionHeader(Res.string.settings_section_appearance) + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_theme_title), + subtitle = stringResource( + Res.string.settings_theme_subtitle_current, + settings.theme.displayLabel() + ), + icon = { + SettingsItemIcon(FeatherIcons.Monitor, stringResource(Res.string.settings_theme_title)) + }, + selectedOption = settings.theme, + options = Theme.entries, + optionLabel = { it.displayLabel() }, + onOptionSelected = { theme -> + settingsViewModel.updateSettings { + copy(theme = theme) + } + } + ) + } + + item { + AccentColorSettingCard( + selectedAccent = settings.accentColor, + icon = { + SettingsItemIcon(FeatherIcons.Droplet, stringResource(Res.string.settings_accent_title)) + }, + onColorSaved = { accent -> + settingsViewModel.updateSettings { + copy(accentColor = accent) + } + } + ) + } +} + +@Composable +private fun Theme.displayLabel(): String { + return when (this) { + Theme.LIGHT -> stringResource(Res.string.settings_theme_light) + Theme.DARK -> stringResource(Res.string.settings_theme_dark) + Theme.SYSTEM -> stringResource(Res.string.settings_theme_system) + } +} + +@Composable +private fun AccentColors.displayLabel(): String { + return when (this) { + AccentColors.GREEN_GOBLIN -> stringResource(Res.string.settings_accent_green_goblin) + AccentColors.ELECTRIC_VIOLET -> stringResource(Res.string.settings_accent_electric_violet) + AccentColors.OCEANIC_CYAN -> stringResource(Res.string.settings_accent_oceanic_cyan) + AccentColors.SUNSET_ORANGE -> stringResource(Res.string.settings_accent_sunset_orange) + AccentColors.ROSE_GARDEN -> stringResource(Res.string.settings_accent_rose_garden) + AccentColors.MIDNIGHT_BLUE -> stringResource(Res.string.settings_accent_midnight_blue) + AccentColors.METALLIC_SLATE -> stringResource(Res.string.settings_accent_metallic_slate) + } +} + +@Composable +private fun AccentColorSettingCard( + selectedAccent: AccentColors, + icon: (@Composable () -> Unit)? = null, + onColorSaved: (AccentColors) -> Unit, +) { + var isDialogOpen by remember { mutableStateOf(false) } + + SettingCardItem( + title = stringResource(Res.string.settings_accent_title), + subtitle = stringResource( + Res.string.settings_accent_subtitle_current, + selectedAccent.displayLabel() + ), + icon = icon, + trailingContent = { + AccentDualPreview( + lightAccent = selectedAccent.toLightColor(), + darkAccent = selectedAccent.toDarkColor(), + ) + }, + onClick = { + isDialogOpen = true + } + ) + + if (isDialogOpen) { + var draftAccent by remember(selectedAccent, isDialogOpen) { mutableStateOf(selectedAccent) } + + AlertDialog( + onDismissRequest = { isDialogOpen = false }, + title = { + Text(stringResource(Res.string.settings_accent_dialog_title)) + }, + text = { + Column( + modifier = Modifier + .fillMaxWidth() + .heightIn(max = 420.dp) + .verticalScroll(rememberScrollState()), + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + Text( + text = stringResource(Res.string.settings_accent_dialog_description), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(12.dp) + ) { + AccentThemePreview( + title = stringResource(Res.string.settings_preview_light), + accent = draftAccent.toLightColor(), + background = Color(0xFFFFFFFF), + textColor = Color(0xFF121212), + modifier = Modifier.weight(1f) + ) + AccentThemePreview( + title = stringResource(Res.string.settings_preview_dark), + accent = draftAccent.toDarkColor(), + background = Color(0xFF121212), + textColor = Color(0xFFEDEDED), + modifier = Modifier.weight(1f) + ) + } + + Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { + AccentColors.entries.forEach { option -> + Row( + modifier = Modifier + .fillMaxWidth() + .clickable { draftAccent = option } + .padding(horizontal = 4.dp, vertical = 4.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + RadioButton( + selected = option == draftAccent, + onClick = { draftAccent = option } + ) + Text( + text = option.displayLabel(), + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier.weight(1f) + ) + AccentDualPreview( + lightAccent = option.toLightColor(), + darkAccent = option.toDarkColor(), + ) + } + } + } + } + }, + confirmButton = { + TextButton( + onClick = { + onColorSaved(draftAccent) + isDialogOpen = false + } + ) { + Text(stringResource(Res.string.settings_action_save)) + } + }, + dismissButton = { + TextButton(onClick = { isDialogOpen = false }) { + Text(stringResource(Res.string.settings_action_cancel)) + } + } + ) + } +} + +@Composable +private fun AccentDualPreview( + lightAccent: Color, + darkAccent: Color, +) { + Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { + Box( + modifier = Modifier + .size(20.dp) + .background(Color.White, RoundedCornerShape(6.dp)) + .border(1.dp, Color(0x22000000), RoundedCornerShape(6.dp)), + contentAlignment = Alignment.Center + ) { + Box( + modifier = Modifier + .size(10.dp) + .background(lightAccent, CircleShape) + ) + } + Box( + modifier = Modifier + .size(20.dp) + .background(Color(0xFF121212), RoundedCornerShape(6.dp)) + .border(1.dp, Color(0x33FFFFFF), RoundedCornerShape(6.dp)), + contentAlignment = Alignment.Center + ) { + Box( + modifier = Modifier + .size(10.dp) + .background(darkAccent, CircleShape) + ) + } + } +} + +@Composable +private fun AccentThemePreview( + title: String, + accent: Color, + background: Color, + textColor: Color, + modifier: Modifier = Modifier, +) { + Column( + modifier = modifier + .background(background, RoundedCornerShape(10.dp)) + .border(1.dp, textColor.copy(alpha = 0.16f), RoundedCornerShape(10.dp)) + .padding(10.dp), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + Text(title, style = MaterialTheme.typography.labelMedium, color = textColor) + Box( + modifier = Modifier + .fillMaxWidth() + .height(6.dp) + .background(accent, RoundedCornerShape(999.dp)) + ) + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + Box( + modifier = Modifier + .size(14.dp) + .background(accent, CircleShape) + ) + Text( + stringResource(Res.string.settings_preview_label), + style = MaterialTheme.typography.bodySmall, + color = textColor + ) + Spacer(modifier = Modifier.weight(1f)) + Text( + stringResource(Res.string.settings_preview_button), + style = MaterialTheme.typography.labelSmall, + color = accent + ) + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/CacheSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/CacheSection.kt new file mode 100644 index 00000000..e7b210fa --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/CacheSection.kt @@ -0,0 +1,163 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import compose.icons.FeatherIcons +import compose.icons.feathericons.Folder +import compose.icons.feathericons.HardDrive +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SettingCardItem +import dev.krtirtho.spotube.modules.settings.components.SwitchSettingCard +import dev.krtirtho.spotube.modules.settings.components.TextInputSettingCard +import io.github.vinceglb.filekit.path +import io.github.vinceglb.filekit.dialogs.compose.rememberDirectoryPickerLauncher +import org.jetbrains.compose.resources.stringResource + +internal fun LazyListScope.cacheSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + settingsSectionHeader(Res.string.settings_section_caching) + + item { + SwitchSettingCard( + title = stringResource(Res.string.settings_enable_music_caching_title), + subtitle = stringResource(Res.string.settings_enable_music_caching_subtitle), + icon = { + SettingsItemIcon( + FeatherIcons.HardDrive, + stringResource(Res.string.settings_enable_music_caching_title) + ) + }, + checked = settings.enableMusicCaching, + onCheckedChange = { enabled -> + settingsViewModel.updateSettings { + copy(enableMusicCaching = enabled) + } + } + ) + } + + item { + CacheFolderSettingCard( + enabled = settings.enableMusicCaching, + folder = settings.cacheFolder, + onFolderSelected = { folder -> + settingsViewModel.updateSettings { + copy(cacheFolder = folder) + } + } + ) + } + + item { + val error_whole_number = stringResource(Res.string.settings_error_whole_number) + val error_cache_range = stringResource(Res.string.settings_error_cache_size_range) + + TextInputSettingCard( + enabled = settings.enableMusicCaching, + title = stringResource(Res.string.settings_cache_size_limit_title), + subtitle = when { + settings.cacheSizeLimitMB <= 0L -> stringResource(Res.string.settings_cache_size_limit_unlimited) + else -> stringResource( + Res.string.settings_cache_size_limit_current, + settings.cacheSizeLimitMB + ) + }, + icon = { + SettingsItemIcon( + FeatherIcons.HardDrive, + stringResource(Res.string.settings_cache_size_limit_title) + ) + }, + value = when { + settings.cacheSizeLimitMB <= 0L -> "" + else -> settings.cacheSizeLimitMB.toString() + }, + dialogDescription = stringResource(Res.string.settings_cache_size_limit_description), + placeholder = stringResource(Res.string.settings_cache_size_limit_placeholder), + normalize = { it.trim() }, + validate = { value -> + if (value.isBlank()) null + else { + val mb = value.toLongOrNull() + when { + mb == null -> error_whole_number + mb < 0L -> error_cache_range + else -> null + } + } + }, + onValueSaved = { value -> + settingsViewModel.updateSettings { + copy(cacheSizeLimitMB = value.toLongOrNull()?.coerceAtLeast(0L) ?: 0L) + } + } + ) + } +} + +@Composable +private fun CacheFolderSettingCard( + enabled: Boolean, + folder: String?, + onFolderSelected: (String?) -> Unit, +) { + val pickerLauncher = rememberDirectoryPickerLauncher { directory -> + if (directory != null) { + val normalized = normalizePath(directory.path) + if (normalized.isNotEmpty()) { + onFolderSelected(normalized) + } + } + } + + SettingCardItem( + title = stringResource(Res.string.settings_cache_folder_title), + subtitle = folder?.let { + stringResource(Res.string.settings_cache_folder_current, it) + } ?: stringResource(Res.string.settings_cache_folder_default), + icon = { + SettingsItemIcon( + FeatherIcons.Folder, + stringResource(Res.string.settings_cache_folder_title) + ) + }, + trailingContent = { + IconButton( + onClick = { pickerLauncher.launch() }, + enabled = enabled, + ) { + Icon( + FeatherIcons.Folder, + contentDescription = stringResource(Res.string.settings_cache_folder_title) + ) + } + }, + onClick = { pickerLauncher.launch() }, + enabled = enabled, + ) +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/DesktopSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/DesktopSection.kt new file mode 100644 index 00000000..ed261b5d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/DesktopSection.kt @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.lazy.LazyListScope +import compose.icons.FeatherIcons +import compose.icons.feathericons.Activity +import compose.icons.feathericons.Minimize2 +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SwitchSettingCard +import org.jetbrains.compose.resources.stringResource + +internal fun LazyListScope.desktopSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + settingsSectionHeader(Res.string.settings_section_desktop) + + item { + SwitchSettingCard( + title = stringResource(Res.string.settings_desktop_minimize_title), + subtitle = stringResource(Res.string.settings_desktop_minimize_subtitle), + icon = { + SettingsItemIcon( + FeatherIcons.Minimize2, + stringResource(Res.string.settings_desktop_minimize_title) + ) + }, + checked = settings.minimizeToTray, + onCheckedChange = { enabled -> + settingsViewModel.updateSettings { + copy(minimizeToTray = enabled) + } + } + ) + } + + item { + SwitchSettingCard( + title = stringResource(Res.string.settings_desktop_discord_title), + subtitle = stringResource(Res.string.settings_desktop_discord_subtitle), + icon = { + SettingsItemIcon( + FeatherIcons.Activity, + stringResource(Res.string.settings_desktop_discord_title) + ) + }, + checked = settings.discordRichPresence, + onCheckedChange = { enabled -> + settingsViewModel.updateSettings { + copy(discordRichPresence = enabled) + } + } + ) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/DownloadsSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/DownloadsSection.kt new file mode 100644 index 00000000..c4ae1a8c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/DownloadsSection.kt @@ -0,0 +1,323 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateListOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import compose.icons.FeatherIcons +import compose.icons.feathericons.Disc +import compose.icons.feathericons.Folder +import compose.icons.feathericons.PlusSquare +import compose.icons.feathericons.Sliders +import compose.icons.feathericons.Trash2 +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SettingCardItem +import dev.krtirtho.spotube.modules.settings.components.SelectionSettingCard +import io.github.vinceglb.filekit.path +import io.github.vinceglb.filekit.dialogs.compose.rememberDirectoryPickerLauncher +import org.jetbrains.compose.resources.stringResource + +internal fun LazyListScope.downloadsSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + val downloadFormats = availableAudioFormats(settings.downloadMusicFormat, downloadFormatPresets) + val downloadQualities = availableAudioQualities( + format = settings.downloadMusicFormat, + current = settings.downloadMusicQuality, + ) + + settingsSectionHeader(Res.string.settings_section_downloads) + + item { + DownloadFolderSettingCard( + folder = settings.overloadedDownloadFolder, + onFolderSelected = { folder -> + settingsViewModel.updateSettings { + copy(overloadedDownloadFolder = folder) + } + } + ) + } + + item { + LocalMediaFoldersSettingCard( + folders = settings.localMediaFolders, + onFoldersSaved = { folders -> + settingsViewModel.updateSettings { + copy(localMediaFolders = folders) + } + } + ) + } + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_download_format_title), + subtitle = stringResource( + Res.string.settings_download_format_subtitle_current, + settings.downloadMusicFormat.displayLabel() + ), + icon = { + SettingsItemIcon(FeatherIcons.Disc, stringResource(Res.string.settings_download_format_title)) + }, + selectedOption = settings.downloadMusicFormat, + options = downloadFormats, + optionLabel = { it.displayLabel() }, + onOptionSelected = { format -> + settingsViewModel.updateSettings { + copy( + downloadMusicFormat = format, + downloadMusicQuality = format.resolveQuality(downloadMusicQuality), + ) + } + } + ) + } + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_download_quality_title), + subtitle = stringResource( + Res.string.settings_subtitle_current, + settings.downloadMusicQuality.displayLabel() + ), + icon = { + SettingsItemIcon(FeatherIcons.Sliders, stringResource(Res.string.settings_download_quality_title)) + }, + selectedOption = settings.downloadMusicQuality, + options = downloadQualities, + optionLabel = { it.displayLabel() }, + onOptionSelected = { quality -> + settingsViewModel.updateSettings { + copy(downloadMusicQuality = quality) + } + } + ) + } +} + +@Composable +private fun DownloadFolderSettingCard( + folder: String?, + onFolderSelected: (String?) -> Unit, +) { + val pickerLauncher = rememberDirectoryPickerLauncher { directory -> + if (directory != null) { + val normalized = normalizePath(directory.path) + if (normalized.isNotEmpty()) { + onFolderSelected(normalized) + } + } + } + + SettingCardItem( + title = stringResource(Res.string.settings_download_folder_title), + subtitle = folder?.let { + stringResource(Res.string.settings_download_folder_current, it) + } ?: stringResource(Res.string.settings_download_folder_default), + icon = { + SettingsItemIcon(FeatherIcons.Folder, stringResource(Res.string.settings_download_folder_title)) + }, + trailingContent = { + IconButton(onClick = { pickerLauncher.launch() }) { + Icon( + FeatherIcons.Folder, + contentDescription = stringResource(Res.string.settings_download_folder_title) + ) + } + }, + onClick = { + pickerLauncher.launch() + } + ) +} + +@Composable +private fun LocalMediaFoldersSettingCard( + folders: List, + onFoldersSaved: (List) -> Unit, +) { + var isDialogOpen by remember { mutableStateOf(false) } + + val subtitlePreview = when { + folders.isEmpty() -> stringResource(Res.string.settings_local_media_folders_subtitle_empty) + folders.size == 1 -> folders.first() + else -> stringResource( + Res.string.settings_local_media_folders_subtitle_current, + folders.size, + ) + } + + SettingCardItem( + title = stringResource(Res.string.settings_local_media_folders_title), + subtitle = subtitlePreview, + icon = { + SettingsItemIcon( + FeatherIcons.Folder, + stringResource(Res.string.settings_local_media_folders_title), + ) + }, + trailingContent = { + TextButton(onClick = { isDialogOpen = true }) { + Text(stringResource(Res.string.settings_local_media_folders_manage)) + } + }, + onClick = { + isDialogOpen = true + } + ) + + if (isDialogOpen) { + LocalMediaFoldersDialog( + folders = folders, + onDismiss = { isDialogOpen = false }, + onFoldersSaved = onFoldersSaved, + ) + } +} + +@Composable +private fun LocalMediaFoldersDialog( + folders: List, + onDismiss: () -> Unit, + onFoldersSaved: (List) -> Unit, +) { + val draftFolders = remember(folders) { + mutableStateListOf().apply { addAll(folders) } + } + val pickerLauncher = rememberDirectoryPickerLauncher { directory -> + if (directory != null) { + val normalized = normalizePath(directory.path) + if (normalized.isNotEmpty() && draftFolders.none { normalizePath(it) == normalized }) { + draftFolders.add(normalized) + } + } + } + + AlertDialog( + onDismissRequest = onDismiss, + title = { + Text(stringResource(Res.string.settings_local_media_folders_title)) + }, + text = { + Column( + verticalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.verticalScroll(rememberScrollState()), + ) { + Text( + text = stringResource(Res.string.settings_local_media_folders_description), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + TextButton(onClick = { pickerLauncher.launch() }) { + Row( + horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Icon(FeatherIcons.PlusSquare, contentDescription = null) + Text(stringResource(Res.string.settings_local_media_folders_add_action)) + } + } + + if (draftFolders.isEmpty()) { + Box(modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp)) { + Text( + text = stringResource(Res.string.settings_local_media_folders_none_added), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } else { + Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { + draftFolders.forEachIndexed { index, folder -> + Row( + modifier = Modifier.fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = folder, + modifier = Modifier.weight(1f), + maxLines = 2, + overflow = TextOverflow.Ellipsis, + style = MaterialTheme.typography.bodySmall, + ) + IconButton( + onClick = { + if (index in draftFolders.indices) { + draftFolders.removeAt(index) + } + } + ) { + Icon( + imageVector = FeatherIcons.Trash2, + contentDescription = stringResource( + Res.string.settings_local_media_folders_remove_action, + ), + ) + } + } + } + } + } + } + }, + confirmButton = { + TextButton( + onClick = { + onFoldersSaved(draftFolders.map(::normalizePath).filter { it.isNotBlank() }.distinct()) + onDismiss() + } + ) { + Text(stringResource(Res.string.settings_action_save)) + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text(stringResource(Res.string.settings_action_cancel)) + } + } + ) +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/LanguageRegionSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/LanguageRegionSection.kt new file mode 100644 index 00000000..06b7dabb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/LanguageRegionSection.kt @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.lazy.LazyListScope +import compose.icons.FeatherIcons +import compose.icons.feathericons.Globe +import compose.icons.feathericons.MapPin +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.CountryCode +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.SupportedLanguages +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SelectionSettingCard +import org.jetbrains.compose.resources.stringResource + +internal fun LazyListScope.languageRegionSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + settingsSectionHeader(Res.string.settings_section_language_region) + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_language_title), + subtitle = stringResource( + Res.string.settings_language_subtitle_current, + settings.language.displayName + ), + icon = { + SettingsItemIcon( + FeatherIcons.Globe, + stringResource(Res.string.settings_language_title) + ) + }, + selectedOption = settings.language, + options = SupportedLanguages.entries, + optionLabel = { + stringResource(Res.string.settings_option_name_and_code, it.displayName, it.locale) + }, + onOptionSelected = { value -> + settingsViewModel.updateSettings { + copy(language = value) + } + }, + filter = { item, query -> item.label.contains(query, ignoreCase = true) }, + ) + } + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_country_title), + subtitle = stringResource( + Res.string.settings_country_subtitle_current, + settings.country.displayName + ), + icon = { + SettingsItemIcon( + FeatherIcons.MapPin, + stringResource(Res.string.settings_country_title) + ) + }, + selectedOption = settings.country, + options = CountryCode.entries, + optionLabel = { + stringResource(Res.string.settings_option_name_and_code, it.displayName, it.code) + }, + onOptionSelected = { value -> + settingsViewModel.updateSettings { + copy(country = value) + } + }, + filter = { item, query -> item.label.contains(query, ignoreCase = true) }, + ) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/PlaybackSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/PlaybackSection.kt new file mode 100644 index 00000000..f0cbeb4f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/PlaybackSection.kt @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.lazy.LazyListScope +import compose.icons.FeatherIcons +import compose.icons.feathericons.Cast +import compose.icons.feathericons.Radio +import compose.icons.feathericons.Repeat +import compose.icons.feathericons.Server +import compose.icons.feathericons.Sliders +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SelectionSettingCard +import dev.krtirtho.spotube.modules.settings.components.SwitchSettingCard +import dev.krtirtho.spotube.modules.settings.components.TextInputSettingCard +import org.jetbrains.compose.resources.stringResource + +internal fun LazyListScope.playbackSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + val streamingFormats = availableAudioFormats(settings.streamingMusicFormat, streamingFormatPresets) + val streamingQualities = availableAudioQualities( + format = settings.streamingMusicFormat, + current = settings.streamingMusicQuality, + ) + + settingsSectionHeader(Res.string.settings_section_playback) + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_streaming_format_title), + subtitle = stringResource( + Res.string.settings_streaming_format_subtitle_current, + settings.streamingMusicFormat.displayLabel() + ), + icon = { + SettingsItemIcon(FeatherIcons.Radio, stringResource(Res.string.settings_streaming_format_title)) + }, + selectedOption = settings.streamingMusicFormat, + options = streamingFormats, + optionLabel = { it.displayLabel() }, + onOptionSelected = { format -> + settingsViewModel.updateSettings { + copy( + streamingMusicFormat = format, + streamingMusicQuality = format.resolveQuality(streamingMusicQuality), + ) + } + } + ) + } + + item { + SelectionSettingCard( + title = stringResource(Res.string.settings_streaming_quality_title), + subtitle = stringResource( + Res.string.settings_subtitle_current, + settings.streamingMusicQuality.displayLabel() + ), + icon = { + SettingsItemIcon(FeatherIcons.Sliders, stringResource(Res.string.settings_streaming_quality_title)) + }, + selectedOption = settings.streamingMusicQuality, + options = streamingQualities, + optionLabel = { it.displayLabel() }, + onOptionSelected = { quality -> + settingsViewModel.updateSettings { + copy(streamingMusicQuality = quality) + } + } + ) + } + + item { + SwitchSettingCard( + title = stringResource(Res.string.settings_enable_endless_playback_title), + subtitle = stringResource(Res.string.settings_enable_endless_playback_subtitle), + icon = { + SettingsItemIcon( + FeatherIcons.Repeat, + stringResource(Res.string.settings_enable_endless_playback_title) + ) + }, + checked = settings.enableEndlessPlayback, + onCheckedChange = { enabled -> + settingsViewModel.updateSettings { + copy(enableEndlessPlayback = enabled) + } + } + ) + } + + item { + SwitchSettingCard( + title = stringResource(Res.string.settings_enable_connect_title), + subtitle = stringResource(Res.string.settings_enable_connect_subtitle), + icon = { + SettingsItemIcon(FeatherIcons.Cast, stringResource(Res.string.settings_enable_connect_title)) + }, + checked = settings.enableConnect, + onCheckedChange = { enabled -> + settingsViewModel.updateSettings { + copy(enableConnect = enabled) + } + } + ) + } + + item { + val error_whole_number = stringResource(Res.string.settings_error_whole_number) + val error_port_range = stringResource(Res.string.settings_error_port_range) + + TextInputSettingCard( + title = stringResource(Res.string.settings_playback_port_title), + subtitle = stringResource( + Res.string.settings_playback_port_subtitle_current, + settings.playbackProxyServerPort + ), + icon = { + SettingsItemIcon(FeatherIcons.Server, stringResource(Res.string.settings_playback_port_title)) + }, + value = settings.playbackProxyServerPort.toString(), + dialogDescription = stringResource(Res.string.settings_playback_port_description), + placeholder = stringResource(Res.string.settings_playback_port_placeholder), + normalize = { it.trim() }, + validate = { value -> + val port = value.toIntOrNull() + when { + port == null -> error_whole_number + port !in 1..65535 -> error_port_range + else -> null + } + }, + onValueSaved = { value -> + settingsViewModel.updateSettings { + copy(playbackProxyServerPort = value.toInt()) + } + } + ) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/PluginsSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/PluginsSection.kt new file mode 100644 index 00000000..93c190eb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/PluginsSection.kt @@ -0,0 +1,385 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import compose.icons.FeatherIcons +import compose.icons.feathericons.Activity +import compose.icons.feathericons.AlignLeft +import compose.icons.feathericons.Check +import compose.icons.feathericons.ChevronRight +import compose.icons.feathericons.ExternalLink +import compose.icons.feathericons.FileText +import compose.icons.feathericons.Music +import compose.icons.feathericons.Package +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.core.ui.component.AdaptiveDropdownBottomSheet +import dev.krtirtho.spotube.core.ui.component.AdaptiveMenuItem +import dev.krtirtho.spotube.core.ui.component.HeaderDisplayMode +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.plugin.PluginAbility +import dev.krtirtho.spotube.modules.plugin.PluginEntry +import dev.krtirtho.spotube.modules.plugin.PluginManager +import dev.krtirtho.spotube.modules.plugin.PluginManagerStates +import dev.krtirtho.spotube.modules.settings.components.SettingCardItem +import kotlinx.coroutines.flow.StateFlow +import org.jetbrains.compose.resources.stringResource + +@Composable +fun DefaultAbilityPluginSelector( + ability: PluginAbility, + state: StateFlow>, + selectedPlugin: PluginEntry? = null, + onSelected: (PluginEntry?) -> Unit = { }, + onManagePlugins: () -> Unit = { } +) { + val plugins by state.collectAsStateWithLifecycle() + val noPluginsText = stringResource(Res.string.settings_plugins_no_plugins) + val clearText = stringResource(Res.string.settings_plugins_clear) + val manageText = stringResource(Res.string.settings_plugins_manage_title) + + val menuItems = buildList { + if (plugins.isNotEmpty()) { + plugins.forEach { plugin -> + val isSelected = selectedPlugin?.name == plugin.name + add( + AdaptiveMenuItem( + label = plugin.name, + onClick = { onSelected(plugin) }, + selected = isSelected, + ) + ) + } + + if (selectedPlugin != null) { + add( + AdaptiveMenuItem( + icon = FeatherIcons.AlignLeft, + label = clearText, + onClick = { onSelected(null) }, + dividerBefore = true, + ) + ) + } + } else { + add( + AdaptiveMenuItem( + label = noPluginsText, + onClick = { }, + enabled = false, + ) + ) + } + + add( + AdaptiveMenuItem( + icon = FeatherIcons.ExternalLink, + label = manageText, + onClick = onManagePlugins, + dividerBefore = true, + ) + ) + } + + Column( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 8.dp, vertical = 4.dp) + ) { + Card( + modifier = Modifier.fillMaxWidth(), + shape = RoundedCornerShape(12.dp), + colors = CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f) + ), + border = BorderStroke( + width = 1.dp, + color = if (selectedPlugin != null) { + MaterialTheme.colorScheme.primary.copy(alpha = 0.3f) + } else { + MaterialTheme.colorScheme.outlineVariant + } + ) + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(12.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Row( + modifier = Modifier.weight(1f), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp) + ) { + Surface( + modifier = Modifier.clip(RoundedCornerShape(8.dp)), + color = when (ability) { + PluginAbility.METADATA -> Color(0xFF4CAF50).copy(alpha = 0.1f) + PluginAbility.AUDIO -> Color(0xFF2196F3).copy(alpha = 0.1f) + PluginAbility.LYRICS -> Color(0xFFFFC107).copy(alpha = 0.1f) + PluginAbility.SCROBBLE -> Color(0xFF9C27B0).copy(alpha = 0.1f) + } + ) { + Icon( + imageVector = when (ability) { + PluginAbility.METADATA -> FeatherIcons.FileText + PluginAbility.AUDIO -> FeatherIcons.Music + PluginAbility.LYRICS -> FeatherIcons.AlignLeft + PluginAbility.SCROBBLE -> FeatherIcons.Activity + }, + contentDescription = stringResource( + Res.string.settings_plugins_plugin_content_description, + ability.displayLabel() + ), + modifier = Modifier.padding(8.dp), + tint = when (ability) { + PluginAbility.METADATA -> Color(0xFF4CAF50) + PluginAbility.AUDIO -> Color(0xFF2196F3) + PluginAbility.LYRICS -> Color(0xFFFFC107) + PluginAbility.SCROBBLE -> Color(0xFF9C27B0) + } + ) + } + + Column(modifier = Modifier.weight(1f)) { + Text( + stringResource( + Res.string.settings_plugins_default_ability_title, + ability.displayLabel() + ), + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onSurface + ) + if (selectedPlugin != null) { + Text( + selectedPlugin.name, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.primary, + modifier = Modifier.padding(top = 4.dp) + ) + } else { + Text( + stringResource(Res.string.settings_plugins_no_selection), + style = MaterialTheme.typography.bodySmall, + color = Color.Gray, + modifier = Modifier.padding(top = 4.dp) + ) + } + } + } + + AdaptiveDropdownBottomSheet( + items = menuItems, + headerDisplayMode = HeaderDisplayMode.OnlyInBottomSheet, + header = { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + Surface( + modifier = Modifier.clip(RoundedCornerShape(8.dp)), + color = when (ability) { + PluginAbility.METADATA -> Color(0xFF4CAF50).copy(alpha = 0.1f) + PluginAbility.AUDIO -> Color(0xFF2196F3).copy(alpha = 0.1f) + PluginAbility.LYRICS -> Color(0xFFFFC107).copy(alpha = 0.1f) + PluginAbility.SCROBBLE -> Color(0xFF9C27B0).copy(alpha = 0.1f) + } + ) { + Icon( + imageVector = when (ability) { + PluginAbility.METADATA -> FeatherIcons.FileText + PluginAbility.AUDIO -> FeatherIcons.Music + PluginAbility.LYRICS -> FeatherIcons.AlignLeft + PluginAbility.SCROBBLE -> FeatherIcons.Activity + }, + contentDescription = null, + modifier = Modifier.padding(8.dp), + tint = when (ability) { + PluginAbility.METADATA -> Color(0xFF4CAF50) + PluginAbility.AUDIO -> Color(0xFF2196F3) + PluginAbility.LYRICS -> Color(0xFFFFC107) + PluginAbility.SCROBBLE -> Color(0xFF9C27B0) + } + ) + } + Column(modifier = Modifier.weight(1f)) { + Text( + stringResource( + Res.string.settings_plugins_default_ability_title, + ability.displayLabel() + ), + style = MaterialTheme.typography.titleMedium, + ) + selectedPlugin?.let { + Text( + it.name, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.primary, + ) + } + } + } + }, + trigger = { onClick -> + Button( + onClick = onClick, + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.primary.copy(alpha = 0.1f), + contentColor = MaterialTheme.colorScheme.primary + ), + modifier = Modifier.clip(RoundedCornerShape(8.dp)) + ) { + Row( + horizontalArrangement = Arrangement.spacedBy(6.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = FeatherIcons.Check, + contentDescription = null, + modifier = Modifier.padding(0.dp), + tint = MaterialTheme.colorScheme.primary + ) + Text( + if (selectedPlugin != null) { + stringResource(Res.string.settings_plugins_action_change) + } else { + stringResource(Res.string.settings_plugins_action_select) + }, + style = MaterialTheme.typography.labelSmall + ) + } + } + }, + ) + } + } + } + } +} + +internal fun LazyListScope.pluginsSection( + pluginManager: PluginManager, + pluginState: PluginManagerStates, + navigatorCommands: NavigationCommands +) { + item { + Text( + stringResource(Res.string.settings_section_plugins), + style = MaterialTheme.typography.labelMedium, + color = Color.Gray, + modifier = Modifier + .fillMaxSize() + .padding(horizontal = 16.dp, vertical = 8.dp) + ) + } + item { + SettingCardItem( + title = stringResource(Res.string.settings_plugins_manage_title), + subtitle = stringResource(Res.string.settings_plugins_manage_subtitle), + icon = { + Surface( + modifier = Modifier.clip(RoundedCornerShape(8.dp)), + color = Color(0xFFFF9800).copy(alpha = 0.1f) + ) { + Icon( + imageVector = FeatherIcons.Package, + contentDescription = stringResource(Res.string.settings_section_plugins), + modifier = Modifier.padding(8.dp), + tint = Color(0xFFFF9800) + ) + } + }, + trailingContent = { + Icon( + imageVector = FeatherIcons.ChevronRight, + contentDescription = stringResource(Res.string.settings_plugins_manage_title), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + }, + onClick = { + navigatorCommands.navigateTo(Routes.Plugins) + } + ) + } + items(PluginAbility.entries.size) { index -> + val ability = PluginAbility.entries[index] + val selectedPlugin = + (pluginState as? PluginManagerStates.Data)?.selectedPlugins?.get(ability) + DefaultAbilityPluginSelector( + ability = ability, + selectedPlugin = selectedPlugin, + state = when (ability) { + PluginAbility.METADATA -> pluginManager.metadataPlugins + PluginAbility.AUDIO -> pluginManager.audioPlugins + PluginAbility.LYRICS -> pluginManager.lyricsPlugins + PluginAbility.SCROBBLE -> pluginManager.scrobblePlugins + }, + onSelected = { plugin -> + pluginManager.setSelectedPlugin(ability, plugin) + }, + onManagePlugins = { + navigatorCommands.navigateTo(Routes.Plugins) + } + ) + } +} + +@Composable +private fun PluginAbility.displayLabel(): String { + return when (this) { + PluginAbility.METADATA -> stringResource(Res.string.settings_plugins_ability_metadata) + PluginAbility.AUDIO -> stringResource(Res.string.settings_plugins_ability_audio) + PluginAbility.LYRICS -> stringResource(Res.string.settings_plugins_ability_lyrics) + PluginAbility.SCROBBLE -> stringResource(Res.string.settings_plugins_ability_scrobble) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/SettingsSectionSupport.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/SettingsSectionSupport.kt new file mode 100644 index 00000000..6caea3ee --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/SettingsSectionSupport.kt @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.unit.dp +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioFormat +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioQuality +import org.jetbrains.compose.resources.StringResource +import org.jetbrains.compose.resources.stringResource + +private val standardLossyQualities = listOf( + AudioQuality.Lossy(bitrate = 44_000), + AudioQuality.Lossy(bitrate = 96_000), + AudioQuality.Lossy(bitrate = 128_000), + AudioQuality.Lossy(bitrate = 256_000), +) + +internal val streamingFormatPresets = listOf( + AudioFormat( + codec = "opus", + container = "webm", + qualities = standardLossyQualities, + ), + AudioFormat( + codec = "aac", + container = "mp4", + qualities = standardLossyQualities, + ), + AudioFormat( + codec = "vorbis", + container = "ogg", + qualities = standardLossyQualities, + ), +) + +internal val downloadFormatPresets = listOf( + AudioFormat( + codec = "aac", + container = "mp4", + qualities = standardLossyQualities, + ), + AudioFormat( + codec = "mp3", + container = "mp3", + qualities = standardLossyQualities, + ), + AudioFormat( + codec = "opus", + container = "webm", + qualities = standardLossyQualities, + ), + AudioFormat( + codec = "flac", + container = "flac", + qualities = listOf( + AudioQuality.Lossless(sampleRate = 44_100, channels = 2), + AudioQuality.Lossless(sampleRate = 48_000, channels = 2), + ), + ), +) + +internal fun LazyListScope.settingsSectionHeader(title: StringResource) { + item { + Text( + text = stringResource(title), + style = MaterialTheme.typography.labelMedium, + color = Color.Gray, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 8.dp) + ) + } +} + +@Composable +internal fun SettingsItemIcon( + imageVector: ImageVector, + contentDescription: String, + tint: Color = MaterialTheme.colorScheme.primary, +) { + Surface( + shape = RoundedCornerShape(8.dp), + color = tint.copy(alpha = 0.12f), + ) { + Box(modifier = Modifier.padding(8.dp)) { + Icon( + imageVector = imageVector, + contentDescription = contentDescription, + tint = tint, + ) + } + } +} + +internal fun availableAudioFormats(current: AudioFormat, presets: List): List { + val options = mutableListOf(current) + presets.forEach { preset -> + val alreadyIncluded = options.any { + it.codec.equals(preset.codec, ignoreCase = true) && + it.container.equals(preset.container, ignoreCase = true) + } + if (!alreadyIncluded) { + options += preset + } + } + return options +} + +internal fun availableAudioQualities(format: AudioFormat, current: AudioQuality): List { + val options = format.qualities.toMutableList() + if (options.none { it == current }) { + options += current + } + return options +} + +internal fun AudioFormat.displayLabel(): String { + return "${codec.uppercase()} in ${container.uppercase()} • ${preferredQuality().displayLabel()}" +} + +internal fun AudioFormat.preferredQuality(): AudioQuality { + return qualities.lastOrNull() ?: AudioQuality.Lossy(bitrate = 256_000) +} + +internal fun AudioFormat.resolveQuality(preferred: AudioQuality): AudioQuality { + return qualities.firstOrNull { it == preferred } ?: preferredQuality() +} + +internal fun AudioQuality.displayLabel(): String { + return when (this) { + is AudioQuality.Lossy -> "${bitrate / 1000} kbps" + is AudioQuality.Lossless -> { + val sampleRateLabel = if (sampleRate % 1000 == 0) { + "${sampleRate / 1000}" + } else { + "${sampleRate / 1000.0}" + } + "$sampleRateLabel kHz • $channels ch" + } + } +} + +internal fun normalizePath(path: String): String { + return path.trim().trimEnd('/', '\\') +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/UpdatesSection.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/UpdatesSection.kt new file mode 100644 index 00000000..708d0afd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/settings/sections/UpdatesSection.kt @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.settings.sections + +import androidx.compose.foundation.lazy.LazyListScope +import compose.icons.FeatherIcons +import compose.icons.feathericons.RefreshCw +import spotube.composeapp.generated.resources.* +import dev.krtirtho.spotube.modules.settings.SettingsViewModel +import dev.krtirtho.spotube.modules.settings.UserSettings +import dev.krtirtho.spotube.modules.settings.components.SwitchSettingCard +import org.jetbrains.compose.resources.stringResource +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.settings_section_updates + +internal fun LazyListScope.updatesSection( + settings: UserSettings, + settingsViewModel: SettingsViewModel, +) { + settingsSectionHeader(Res.string.settings_section_updates) + + item { + SwitchSettingCard( + title = stringResource(Res.string.settings_updates_auto_check_title), + subtitle = stringResource(Res.string.settings_updates_auto_check_subtitle), + icon = { + SettingsItemIcon( + FeatherIcons.RefreshCw, + stringResource(Res.string.settings_updates_auto_check_title) + ) + }, + checked = settings.autoCheckForUpdates, + onCheckedChange = { enabled -> + settingsViewModel.updateSettings { + copy(autoCheckForUpdates = enabled) + } + } + ) + } +} + diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppBottombar.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppBottombar.kt new file mode 100644 index 00000000..9f07264f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppBottombar.kt @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBars +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.windowInsetsPadding +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import dev.krtirtho.spotube.core.navigation.NavigationState +import dev.krtirtho.spotube.core.navigation.Navigator +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.modules.downloads.DownloadBadgeIndicator +import dev.krtirtho.spotube.tabs + +@Composable +fun AppBottombar( + navigator: Navigator, + navigationState: NavigationState, + modifier: Modifier = Modifier, +) { + Surface( + modifier = modifier.fillMaxWidth().windowInsetsPadding(WindowInsets.navigationBars), + shape = RoundedCornerShape(topStart = 18.dp, topEnd = 18.dp), + color = MaterialTheme.colorScheme.surface, + tonalElevation = 3.dp, + shadowElevation = 10.dp, + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .height(80.dp), + horizontalArrangement = Arrangement.SpaceEvenly, + verticalAlignment = Alignment.CenterVertically, + ) { + tabs.forEach { (label, icon, activeIcon, screen) -> + val selected = navigationState.topLevelRoute == screen + val labelColor = if (selected) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + + Column( + modifier = Modifier + .clip(CircleShape) + .clickable { navigator.navigate(screen) } + .padding(8.dp) + .size(56.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + ) { + Box { + Icon( + imageVector = activeIcon, + contentDescription = label, + tint = if (selected) MaterialTheme.colorScheme.primary + else MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(20.dp), + ) + if (screen == Routes.Library) { + DownloadBadgeIndicator( + modifier = Modifier.align(Alignment.TopEnd) + ) + } + } + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = label, + style = MaterialTheme.typography.labelSmall, + fontWeight = if (selected) FontWeight.Medium else FontWeight.Normal, + color = labelColor, + ) + } + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppExpandedPlayer.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppExpandedPlayer.kt new file mode 100644 index 00000000..90abd300 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppExpandedPlayer.kt @@ -0,0 +1,729 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.animation.AnimatedVisibilityScope +import androidx.compose.animation.ExperimentalSharedTransitionApi +import androidx.compose.animation.SharedTransitionScope +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Slider +import androidx.compose.material3.SnackbarHost +import androidx.compose.material3.SnackbarHostState +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.LoopState +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.modules.lyrics.LyricsViewModel +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksViewModel +import dev.krtirtho.spotube.modules.saved_tracks.SAVED_TRACKS_COLLECTION_ID +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.Iconsax3DotsMore +import dev.krtirtho.spotube.resources.iconsax.IconsaxArrowDown4 +import dev.krtirtho.spotube.resources.iconsax.IconsaxArrowSquareUp +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicFilter +import dev.krtirtho.spotube.resources.iconsax.IconsaxNext +import dev.krtirtho.spotube.resources.iconsax.IconsaxPause +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlay +import dev.krtirtho.spotube.resources.iconsax.IconsaxPrevious +import dev.krtirtho.spotube.resources.iconsax.IconsaxRepeatMusic +import dev.krtirtho.spotube.resources.iconsax.IconsaxRepeateMusic +import dev.krtirtho.spotube.resources.iconsax.IconsaxRepeateOne +import dev.krtirtho.spotube.resources.iconsax.IconsaxShuffle +import dev.krtirtho.spotube.resources.iconsax.SwapHorizontal2 +import kotlinx.coroutines.launch +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf +import kotlin.time.Duration.Companion.milliseconds +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.modules.saved_tracks.rememberIsSavedTracks +import dev.krtirtho.spotube.modules.saved_tracks.SavedState +import dev.krtirtho.spotube.modules.downloads.DownloadProgressIcon +import dev.krtirtho.spotube.modules.downloads.DownloadStatus +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.resources.iconsax.IconsaxDirectboxReceive +import dev.krtirtho.spotube.resources.iconsax.IconsaxCd +import dev.krtirtho.spotube.resources.iconsax.IconsaxCheckCircle +import dev.krtirtho.spotube.resources.iconsax.IconsaxCloseSquare +import dev.krtirtho.spotube.resources.iconsax.IconsaxRefreshRight +import dev.krtirtho.spotube.resources.iconsax.InconsaxClock + + +// The expanded player on small screens +// on the top left it has a angle/chevron down that can be used to collapse the player back to the +// floating player +// on the top right it has a three dots for options +// The top bar can be used to swipe down and close the player back to the floating player. It should +// follow the user's finger while swiping down and should have a nice animation when collapsing back +// to the floating player +// On the middle the album art stays rounded, centered and takes up most of the space +// Below the album art, on the left the song title and artists are shown and on the right the like +// button is shown +// below that we have the playback controls and the progress bar, which should be similar to the +// large player but with a different layout to fit the smaller screen +// And at the very end we will have the volume slider +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun AppExpandedPlayer( + modifier: Modifier = Modifier, + sharedTransitionScope: SharedTransitionScope? = null, + animatedVisibilityScope: AnimatedVisibilityScope? = null, + onCollapse: () -> Unit = {}, + onQueue: () -> Unit = {}, + onAlternativeSource: () -> Unit = {}, + onExpandLyrics: () -> Unit = {}, + onDownloadTrack: () -> Unit = {}, + onGoToAlbum: () -> Unit = {}, + onSleepTimer: () -> Unit = {}, + audioPlayer: AudioPlayer = koinInject(), + audioPlayerQueue: AudioPlayerQueue = koinInject(), + savedTracksViewModel: SavedTracksViewModel = koinViewModel( + key = SAVED_TRACKS_COLLECTION_ID, + parameters = { parametersOf() } + ), +) { + val playerUiState = rememberPlayerUiState(audioPlayer, audioPlayerQueue) + val scope = rememberCoroutineScope() + val downloadsViewModel: DownloadsViewModel = koinViewModel() + val navigationCommands: NavigationCommands = koinInject() + val currentEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val currentTrack = remember(currentEntry) { + (currentEntry as? QueueEntry.StreamingTrack)?.track + } + val downloads by downloadsViewModel.downloads.collectAsStateWithLifecycle() + val currentDownload = remember(currentTrack, downloads) { + currentTrack?.let { t -> + downloads.lastOrNull { it.track?.id == t.id } + } + } + val snackbarHostState = remember { SnackbarHostState() } + val albumArtModifier = + rememberSharedAlbumArtModifier(sharedTransitionScope, animatedVisibilityScope) + val coverModel = playerUiState.coverUrl.takeIf { it.isNotBlank() } + var isSeeking by remember { mutableStateOf(false) } + var seekProgress by remember { mutableFloatStateOf(playerUiState.progress) } + var showMoreOptionsSheet by remember { mutableStateOf(false) } + val moreOptionsSheetState = rememberModalBottomSheetState() + + + LaunchedEffect(playerUiState.progress, isSeeking) { + if (!isSeeking) { + seekProgress = playerUiState.progress + } + } + + fun onPlayPause() { + scope.launch { + if (playerUiState.isPlaying) { + audioPlayer.pause() + } else { + audioPlayer.play() + } + } + } + + fun onSkipPrevious() { + scope.launch { audioPlayer.skipToPrevious() } + } + + fun onSkipNext() { + scope.launch { audioPlayer.skipToNext() } + } + + fun onShuffleToggle() { + scope.launch { audioPlayer.shuffle(!playerUiState.isShuffling) } + } + + fun onLoopToggle() { + scope.launch { audioPlayer.loop(playerUiState.loopState.next()) } + } + + fun onSeekFinished() { + val durationMillis = playerUiState.seekDuration.inWholeMilliseconds + if (durationMillis <= 0L) return + scope.launch { + audioPlayer.seekTo( + (durationMillis * seekProgress.coerceIn( + 0f, + 1f + )).toLong().milliseconds + ) + } + } + + Scaffold( + modifier = modifier.fillMaxSize(), + snackbarHost = { SnackbarHost(hostState = snackbarHostState) }, + ) { innerPadding -> + if (showMoreOptionsSheet) { + ModalBottomSheet( + onDismissRequest = { + showMoreOptionsSheet = false + }, + sheetState = moreOptionsSheetState + ) { + // Grid of Options + LazyVerticalGrid( + columns = GridCells.Fixed(3), + contentPadding = PaddingValues(16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.fillMaxWidth(), + ) { + item { + OptionTile( + icon = Iconsax.SwapHorizontal2, + label = "Alternative Source", + onClick = { + showMoreOptionsSheet = false + onAlternativeSource() + }, + ) + } + item { + val download = currentDownload + val status = download?.status + val statusLabel = when (status) { + is DownloadStatus.Completed -> "Downloaded" + is DownloadStatus.Failed -> "Failed" + is DownloadStatus.Cancelled -> "Cancelled" + is DownloadStatus.Queued -> "Queued" + is DownloadStatus.Downloading -> "Downloading..." + null -> "Download" + } + val statusColor = when (status) { + is DownloadStatus.Completed -> MaterialTheme.colorScheme.primary + is DownloadStatus.Failed -> MaterialTheme.colorScheme.error + else -> MaterialTheme.colorScheme.onSurfaceVariant + } + + Surface( + modifier = Modifier + .aspectRatio(1f) + .clickable { + showMoreOptionsSheet = false + when (status) { + is DownloadStatus.Completed -> { + scope.launch { + snackbarHostState.showSnackbar("Already downloaded") + } + } + is DownloadStatus.Failed, is DownloadStatus.Cancelled -> { + download?.let { downloadsViewModel.retry(it.id) } + scope.launch { + snackbarHostState.showSnackbar("Retrying download...") + } + } + is DownloadStatus.Downloading, is DownloadStatus.Queued -> { + // already in progress + } + null -> { + val track = currentTrack + if (track != null) { + downloadsViewModel.downloadTrack(track) + scope.launch { + snackbarHostState.showSnackbar( + message = "Downloading ${track.title}" + ) + } + } + } + } + onDownloadTrack() + }, + shape = RoundedCornerShape(16.dp), + color = MaterialTheme.colorScheme.surfaceContainerHigh, + tonalElevation = 1.dp, + ) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(12.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + ) { + if (status is DownloadStatus.Downloading) { + DownloadProgressIcon( + track = currentTrack, + icon = Iconsax.IconsaxDirectboxReceive, + contentDescription = "Download", + modifier = Modifier.size(28.dp), + tint = MaterialTheme.colorScheme.onSurface, + ) + } else { + val icon = when (status) { + is DownloadStatus.Completed -> Iconsax.IconsaxCheckCircle + is DownloadStatus.Failed -> Iconsax.IconsaxCloseSquare + is DownloadStatus.Cancelled -> Iconsax.IconsaxRefreshRight + is DownloadStatus.Queued -> Iconsax.InconsaxClock + null -> Iconsax.IconsaxDirectboxReceive + } + Icon( + imageVector = icon, + contentDescription = statusLabel, + modifier = Modifier.size(28.dp), + tint = when (status) { + is DownloadStatus.Completed -> MaterialTheme.colorScheme.primary + is DownloadStatus.Failed -> MaterialTheme.colorScheme.error + else -> MaterialTheme.colorScheme.onSurface + }, + ) + } + Spacer(modifier = Modifier.height(8.dp)) + Text( + text = statusLabel, + style = MaterialTheme.typography.labelSmall, + textAlign = TextAlign.Center, + maxLines = 2, + overflow = TextOverflow.Ellipsis, + color = statusColor, + ) + } + } + } + item { + OptionTile( + icon = Iconsax.InconsaxClock, + label = "Sleep Timer", + onClick = { + showMoreOptionsSheet = false + onSleepTimer() + }, + ) + } + item { + OptionTile( + icon = Iconsax.IconsaxCd, + label = "Go to Album", + onClick = { + showMoreOptionsSheet = false + val albumId = currentTrack?.album?.id + if (albumId != null) { + navigationCommands.navigateTo(Routes.Album(albumId)) + } + onGoToAlbum() + }, + ) + } + } + } + } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(innerPadding) + .verticalScroll(rememberScrollState()) + .padding(horizontal = 16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Spacer(modifier = Modifier.height(4.dp)) + Row( + modifier = Modifier + .fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically + ) { + IconButton(onClick = onCollapse) { + Icon(Iconsax.IconsaxArrowDown4, contentDescription = "Collapse player") + } + Text( + text = "Now Playing", + style = MaterialTheme.typography.titleMedium, + modifier = Modifier.weight(1f), + textAlign = TextAlign.Center, + maxLines = 1, + ) + IconButton(onClick = { showMoreOptionsSheet = true }) { + Icon(Iconsax.Iconsax3DotsMore, contentDescription = "Player options") + } + } + + Box( + modifier = Modifier + .fillMaxWidth() + .padding(top = 20.dp, bottom = 24.dp), + contentAlignment = Alignment.Center, + ) { + Box( + modifier = Modifier + .fillMaxWidth(0.84f) + .aspectRatio(1f) + .then(albumArtModifier) + .clip(RoundedCornerShape(22.dp)) + .background(MaterialTheme.colorScheme.surfaceContainerHighest) + ) { + AsyncImage( + model = coverModel, + contentDescription = playerUiState.title, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } + } + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 2.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + PlayerHeartButton( + audioPlayerQueue = audioPlayerQueue, + savedTracksViewModel = savedTracksViewModel, + ) + Column( + modifier = Modifier.weight(1f), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Text( + text = playerUiState.title, + style = MaterialTheme.typography.headlineSmall, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + textAlign = TextAlign.Center, + ) + Text( + text = playerUiState.artists, + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + textAlign = TextAlign.Center, + ) + } + IconButton(onClick = onQueue) { + Icon(Iconsax.IconsaxMusicFilter, contentDescription = "Queue") + } + } + + Column(modifier = Modifier.padding(top = 20.dp)) { + Slider( + value = seekProgress, + onValueChange = { + seekProgress = it + isSeeking = true + }, + onValueChangeFinished = { + isSeeking = false + onSeekFinished() + }, + enabled = playerUiState.seekDuration.inWholeMilliseconds > 0L, + modifier = Modifier.fillMaxWidth() + ) + Row( + modifier = Modifier + .fillMaxWidth() + .padding(top = 2.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = formatPlayerTime(playerUiState.position), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Text( + text = formatPlayerTime(playerUiState.displayDuration), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + Row( + modifier = Modifier + .fillMaxWidth() + .padding(top = 16.dp, bottom = 12.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + IconButton(onClick = ::onShuffleToggle) { + Icon( + Iconsax.IconsaxShuffle, + contentDescription = if (playerUiState.isShuffling) "Disable shuffle" else "Enable shuffle", + tint = if (playerUiState.isShuffling) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + ) + } + IconButton(onClick = ::onSkipPrevious) { + Icon(Iconsax.IconsaxPrevious, contentDescription = "Previous") + } + Surface( + shape = CircleShape, + color = MaterialTheme.colorScheme.onSurface, + contentColor = MaterialTheme.colorScheme.surface, + shadowElevation = 8.dp, + modifier = Modifier.size(72.dp), + ) { + IconButton(onClick = ::onPlayPause, modifier = Modifier.fillMaxSize()) { + Icon( + if (playerUiState.isPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = if (playerUiState.isPlaying) "Pause" else "Play", + modifier = Modifier.size(30.dp), + ) + } + } + IconButton(onClick = ::onSkipNext) { + Icon(Iconsax.IconsaxNext, contentDescription = "Next") + } + IconButton(onClick = ::onLoopToggle) { + Icon( + imageVector = when (playerUiState.loopState) { + LoopState.NONE -> Iconsax.IconsaxRepeateMusic + LoopState.ONE -> Iconsax.IconsaxRepeateOne + LoopState.ALL -> Iconsax.IconsaxRepeatMusic + }, + contentDescription = "Loop mode ${playerUiState.loopState.name}", + tint = if (playerUiState.loopState == LoopState.NONE) { + MaterialTheme.colorScheme.onSurfaceVariant + } else { + MaterialTheme.colorScheme.primary + } + ) + } + } + } + + LyricsPreviewCard( + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 16.dp), + audioPlayer = audioPlayer, + onExpand = onExpandLyrics, + ) + } + } +} + +@OptIn(ExperimentalSharedTransitionApi::class) +@Composable +private fun rememberSharedAlbumArtModifier( + sharedTransitionScope: SharedTransitionScope?, + animatedVisibilityScope: AnimatedVisibilityScope?, +): Modifier { + if (sharedTransitionScope == null || animatedVisibilityScope == null) return Modifier + + with(sharedTransitionScope) { + return Modifier.sharedElement( + sharedContentState = rememberSharedContentState(key = "player_album_art"), + animatedVisibilityScope = animatedVisibilityScope, + ) + } +} + +@Composable +private fun LyricsPreviewCard( + modifier: Modifier = Modifier, + audioPlayer: AudioPlayer, + onExpand: () -> Unit, + viewModel: LyricsViewModel = koinViewModel() +) { + val uiState by viewModel.uiState.collectAsState() + val syncedLyrics = uiState.syncedLyrics ?: emptyList() + val isLoading = uiState.isLoading + + val listState = rememberLazyListState() + val positionMillis by audioPlayer.positionFlow.collectAsState(initial = 0.milliseconds) + + val currentIndex by remember { + derivedStateOf { + if (syncedLyrics.isEmpty()) return@derivedStateOf -1 + var idx = 0 + for (i in syncedLyrics.indices) { + if (syncedLyrics[i].time <= positionMillis.inWholeMilliseconds) { + idx = i + } else { + break + } + } + idx + } + } + + LaunchedEffect(currentIndex) { + if (currentIndex >= 0 && syncedLyrics.isNotEmpty()) { + val centerIndex = currentIndex.coerceIn(0, syncedLyrics.lastIndex) + listState.animateScrollToItem(centerIndex, scrollOffset = -50) + } + } + + if (syncedLyrics.isEmpty() || isLoading) return + + Surface( + modifier = modifier + .clip(RoundedCornerShape(16.dp)) + .clickable(onClick = onExpand), + color = MaterialTheme.colorScheme.surfaceContainerHighest, + tonalElevation = 2.dp, + ) { + Column(modifier = Modifier.padding(12.dp)) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = "Lyrics", + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + IconButton( + onClick = onExpand, + modifier = Modifier.size(24.dp), + ) { + Icon( + Iconsax.IconsaxArrowSquareUp, + contentDescription = "Expand lyrics", + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + + LazyColumn( + state = listState, + modifier = Modifier + .fillMaxWidth() + .height(120.dp), + contentPadding = PaddingValues(vertical = 4.dp), + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + val displayLines = syncedLyrics.take(6) + itemsIndexed(displayLines) { index, line -> + val isCurrent = + index == currentIndex.coerceIn(0, displayLines.lastIndex.coerceAtLeast(0)) + Text( + text = line.text.ifBlank { "..." }, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 8.dp, vertical = 2.dp), + style = MaterialTheme.typography.bodySmall.copy( + fontWeight = if (isCurrent) FontWeight.Bold else FontWeight.Normal, + color = if (isCurrent) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.7f) + } + ), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + textAlign = TextAlign.Center, + ) + } + } + } + } +} + +@Composable +private fun OptionTile( + icon: ImageVector, + label: String, + onClick: () -> Unit, + modifier: Modifier = Modifier, +) { + Surface( + modifier = modifier + .aspectRatio(1f) + .clickable(onClick = onClick), + shape = RoundedCornerShape(16.dp), + color = MaterialTheme.colorScheme.surfaceContainerHigh, + tonalElevation = 1.dp, + ) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(12.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + ) { + Icon( + imageVector = icon, + contentDescription = label, + modifier = Modifier.size(28.dp), + tint = MaterialTheme.colorScheme.onSurface, + ) + Spacer(modifier = Modifier.height(8.dp)) + Text( + text = label, + style = MaterialTheme.typography.labelSmall, + textAlign = TextAlign.Center, + maxLines = 2, + overflow = TextOverflow.Ellipsis, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppFloatingPlayer.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppFloatingPlayer.kt new file mode 100644 index 00000000..73736d87 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppFloatingPlayer.kt @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.animation.AnimatedVisibilityScope +import androidx.compose.animation.ExperimentalSharedTransitionApi +import androidx.compose.animation.SharedTransitionScope +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.LinearProgressIndicator +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedIconButton +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksViewModel +import dev.krtirtho.spotube.modules.saved_tracks.SAVED_TRACKS_COLLECTION_ID +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart2 +import dev.krtirtho.spotube.resources.iconsax.IconsaxPause +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlay +import kotlinx.coroutines.launch +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf +import androidx.lifecycle.compose.collectAsStateWithLifecycle + +// The floating player on small screens that appears above the floating AppBottombar +// +// on left the album art, song title, artists grouped together +// on right the playback controls +// top border is actually the progress bar +// users can skip to next or previous track by swiping left or right on the player +// +// the player can be expanded to the full screen by swiping up on the player, and can be collapsed +// back to the floating player by swiping down on the player +@Composable +fun AppFloatingPlayer( + modifier: Modifier = Modifier, + sharedTransitionScope: SharedTransitionScope? = null, + animatedVisibilityScope: AnimatedVisibilityScope? = null, + audioPlayer: AudioPlayer = koinInject(), + audioPlayerQueue: AudioPlayerQueue = koinInject(), + savedTracksViewModel: SavedTracksViewModel = koinViewModel( + key = SAVED_TRACKS_COLLECTION_ID, + parameters = { parametersOf() } + ), +) { + val playerUiState = rememberPlayerUiState(audioPlayer, audioPlayerQueue) + val scope = rememberCoroutineScope() + val albumArtModifier = + rememberSharedAlbumArtModifier(sharedTransitionScope, animatedVisibilityScope) + val coverModel = playerUiState.coverUrl.takeIf { it.isNotBlank() } + var seekProgress by remember { mutableFloatStateOf(playerUiState.progress) } + + LaunchedEffect(playerUiState.progress) { + seekProgress = playerUiState.progress + } + + fun onPlayPause() { + scope.launch { + if (playerUiState.isPlaying) { + audioPlayer.pause() + } else { + audioPlayer.play() + } + } + } + + Surface( + modifier = modifier + .fillMaxWidth() + .height(76.dp), + shape = RoundedCornerShape(24.dp, 24.dp), + color = MaterialTheme.colorScheme.inverseSurface, + contentColor = MaterialTheme.colorScheme.inverseOnSurface, + tonalElevation = 3.dp, + ) { + Box( + modifier = Modifier + .fillMaxSize(), + ) { + LinearProgressIndicator( + progress = { seekProgress.coerceIn(0f, 1f) }, + color = MaterialTheme.colorScheme.inverseOnSurface, + trackColor = MaterialTheme.colorScheme.inverseOnSurface.copy(alpha = 0.22f), + modifier = Modifier + .fillMaxWidth() + .height(2.dp) + ) + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 10.dp) + .padding(bottom = 22.dp, top = 8.dp) + .align(Alignment.Center), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Row( + modifier = Modifier.weight(1f), + verticalAlignment = Alignment.CenterVertically + ) { + Box( + modifier = Modifier + .size(48.dp) + .then(albumArtModifier) + .clip(RoundedCornerShape(16.dp)) + .background(MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f)) + ) { + AsyncImage( + model = coverModel, + contentDescription = playerUiState.title, + modifier = Modifier + .fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } + Column(modifier = Modifier.padding(start = 10.dp)) { + Text( + text = playerUiState.title, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.inverseOnSurface, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + Text( + text = playerUiState.artists, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.inverseOnSurface.copy(alpha = 0.72f), + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + } + } + + Row(verticalAlignment = Alignment.CenterVertically) { + PlayerHeartButton( + audioPlayerQueue = audioPlayerQueue, + savedTracksViewModel = savedTracksViewModel, + ) + OutlinedIconButton( + onClick = ::onPlayPause, + enabled = playerUiState.queue.isNotEmpty() + ) { + Icon( + if (playerUiState.isPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = if (playerUiState.isPlaying) "Pause" else "Play", + modifier = Modifier.size(20.dp), + tint = MaterialTheme.colorScheme.inverseOnSurface, + ) + } + } + } + } + } +} + +@OptIn(ExperimentalSharedTransitionApi::class) +@Composable +private fun rememberSharedAlbumArtModifier( + sharedTransitionScope: SharedTransitionScope?, + animatedVisibilityScope: AnimatedVisibilityScope?, +): Modifier { + if (sharedTransitionScope == null || animatedVisibilityScope == null) return Modifier + + with(sharedTransitionScope) { + return Modifier.sharedElement( + sharedContentState = rememberSharedContentState(key = "player_album_art"), + animatedVisibilityScope = animatedVisibilityScope, + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppLargePlayer.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppLargePlayer.kt new file mode 100644 index 00000000..0f019b11 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppLargePlayer.kt @@ -0,0 +1,365 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Slider +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import coil3.compose.AsyncImage +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.LoopState +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.modules.downloads.DownloadProgressIcon +import dev.krtirtho.spotube.modules.downloads.DownloadsViewModel +import dev.krtirtho.spotube.modules.saved_tracks.SAVED_TRACKS_COLLECTION_ID +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksViewModel +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.Iconsax3DotsMore +import dev.krtirtho.spotube.resources.iconsax.IconsaxDirectboxReceive +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusic +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicFilter +import dev.krtirtho.spotube.resources.iconsax.IconsaxNext +import dev.krtirtho.spotube.resources.iconsax.IconsaxPause +import dev.krtirtho.spotube.resources.iconsax.IconsaxPlay +import dev.krtirtho.spotube.resources.iconsax.IconsaxPrevious +import dev.krtirtho.spotube.resources.iconsax.IconsaxRepeatMusic +import dev.krtirtho.spotube.resources.iconsax.IconsaxRepeateMusic +import dev.krtirtho.spotube.resources.iconsax.IconsaxRepeateOne +import dev.krtirtho.spotube.resources.iconsax.IconsaxShuffle +import dev.krtirtho.spotube.resources.iconsax.IconsaxVolumeCross +import dev.krtirtho.spotube.resources.iconsax.IconsaxVolumeHigh +import dev.krtirtho.spotube.resources.iconsax.IconsaxVolumeLow +import dev.krtirtho.spotube.resources.iconsax.SwapHorizontal2 +import kotlinx.coroutines.launch +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel +import org.koin.core.parameter.parametersOf +import kotlin.time.Duration.Companion.milliseconds + + +// The main player on large screens shown at the bottom of the screen permanently. It should be +// below the sidebar. And should be similarly give a floating vibe with a translucent background +// just like the AppBottombar. +// +// On the left it contains the album art, song title, artists and like btn grouped together +// On the center it contains the playback controls and the progress bar +// On the right it contains the queue btn, download button btn, alternative track source button +// and three dots for options grouped together and below these buttons the volume slider will be shown +@Composable +fun AppLargePlayer( + modifier: Modifier = Modifier, + onQueue: () -> Unit = {}, + onDownload: () -> Unit = {}, + onAlternativeSource: () -> Unit = {}, + onMoreOptions: () -> Unit = {}, + onLyrics: () -> Unit = {}, + audioPlayer: AudioPlayer = koinInject(), + audioPlayerQueue: AudioPlayerQueue = koinInject(), + downloadsViewModel: DownloadsViewModel = koinViewModel(), + savedTracksViewModel: SavedTracksViewModel = koinViewModel( + key = SAVED_TRACKS_COLLECTION_ID, + parameters = { parametersOf() } + ), +) { + val playerUiState = rememberPlayerUiState(audioPlayer, audioPlayerQueue) + val scope = rememberCoroutineScope() + val currentEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + var isSeeking by remember { mutableStateOf(false) } + var seekProgress by remember { mutableFloatStateOf(playerUiState.progress) } + var lastNonZeroVolume by remember { mutableFloatStateOf(if (playerUiState.volume > 0f) playerUiState.volume else 0.6f) } + val coverModel = playerUiState.coverUrl.takeIf { it.isNotBlank() } + + LaunchedEffect(playerUiState.progress, isSeeking) { + if (!isSeeking) { + seekProgress = playerUiState.progress + } + } + + LaunchedEffect(playerUiState.volume) { + if (playerUiState.volume > 0f) { + lastNonZeroVolume = playerUiState.volume + } + } + + fun onPlayPause() { + scope.launch { + if (playerUiState.isPlaying) { + audioPlayer.pause() + } else { + audioPlayer.play() + } + } + } + + fun onSkipPrevious() { + scope.launch { audioPlayer.skipToPrevious() } + } + + fun onSkipNext() { + scope.launch { audioPlayer.skipToNext() } + } + + fun onShuffleToggle() { + scope.launch { audioPlayer.shuffle(!playerUiState.isShuffling) } + } + + fun onLoopToggle() { + scope.launch { audioPlayer.loop(playerUiState.loopState.next()) } + } + + fun onSeekFinished() { + val durationMillis = playerUiState.seekDuration.inWholeMilliseconds + if (durationMillis <= 0L) return + scope.launch { + audioPlayer.seekTo( + (durationMillis * seekProgress.coerceIn( + 0f, + 1f + )).toLong().milliseconds + ) + } + } + + Surface( + modifier = modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surfaceContainerHigh.copy(alpha = 0.78f), + tonalElevation = 4.dp, + shadowElevation = 14.dp + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 10.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Row( + modifier = Modifier.weight(1f), + verticalAlignment = Alignment.CenterVertically + ) { + Box( + modifier = Modifier + .size(52.dp) + .clip(RoundedCornerShape(12.dp)) + .background(MaterialTheme.colorScheme.surfaceContainerHighest) + ) { + AsyncImage( + model = coverModel, + contentDescription = playerUiState.title, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } + Column(modifier = Modifier.padding(start = 12.dp)) { + Text( + text = playerUiState.title, + style = MaterialTheme.typography.bodyLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + Text( + text = playerUiState.artists, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis + ) + } + PlayerHeartButton( + audioPlayerQueue = audioPlayerQueue, + savedTracksViewModel = savedTracksViewModel, + ) + } + + Column( + modifier = Modifier.weight(1.1f), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Slider( + value = seekProgress, + onValueChange = { + seekProgress = it + isSeeking = true + }, + onValueChangeFinished = { + isSeeking = false + onSeekFinished() + }, + enabled = playerUiState.seekDuration.inWholeMilliseconds > 0L, + modifier = Modifier.fillMaxWidth(), + ) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = formatPlayerTime(playerUiState.position), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Text( + text = formatPlayerTime(playerUiState.displayDuration), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + modifier = Modifier.fillMaxWidth() + ) { + IconButton(onClick = ::onShuffleToggle) { + Icon( + Iconsax.IconsaxShuffle, + contentDescription = if (playerUiState.isShuffling) "Disable shuffle" else "Enable shuffle", + tint = if (playerUiState.isShuffling) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + ) + } + IconButton(onClick = ::onSkipPrevious) { + Icon(Iconsax.IconsaxPrevious, contentDescription = "Previous") + } + IconButton(onClick = ::onPlayPause, modifier = Modifier.size(44.dp)) { + Icon( + if (playerUiState.isPlaying) Iconsax.IconsaxPause else Iconsax.IconsaxPlay, + contentDescription = if (playerUiState.isPlaying) "Pause" else "Play or pause", + ) + } + IconButton(onClick = ::onSkipNext) { + Icon(Iconsax.IconsaxNext, contentDescription = "Next") + } + IconButton(onClick = ::onLoopToggle) { + Icon( + imageVector = when (playerUiState.loopState) { + LoopState.NONE -> Iconsax.IconsaxRepeateMusic + LoopState.ONE -> Iconsax.IconsaxRepeateOne + LoopState.ALL -> Iconsax.IconsaxRepeatMusic + }, + contentDescription = "Loop mode ${playerUiState.loopState.name}", + tint = if (playerUiState.loopState == LoopState.NONE) { + MaterialTheme.colorScheme.onSurfaceVariant + } else { + MaterialTheme.colorScheme.primary + } + ) + } + } + } + + Column( + modifier = Modifier.weight(1f), + horizontalAlignment = Alignment.End + ) { + Row(verticalAlignment = Alignment.CenterVertically) { + IconButton(onClick = onQueue) { + Icon(Iconsax.IconsaxMusicFilter, contentDescription = "Queue") + } + IconButton(onClick = { + val track = (currentEntry as? QueueEntry.StreamingTrack)?.track + if (track != null) { + downloadsViewModel.downloadTrack(track) + } + }) { + DownloadProgressIcon( + track = (currentEntry as? QueueEntry.StreamingTrack)?.track, + icon = Iconsax.IconsaxDirectboxReceive, + contentDescription = "Download", + ) + } + IconButton(onClick = onAlternativeSource) { + Icon(Iconsax.SwapHorizontal2, contentDescription = "Alternative source") + } + IconButton(onClick = onLyrics) { + Icon(Iconsax.IconsaxMusic, contentDescription = "Lyrics") + } + IconButton(onClick = onMoreOptions) { + Icon(Iconsax.Iconsax3DotsMore, contentDescription = "More options") + } + } + Row(verticalAlignment = Alignment.CenterVertically) { + IconButton( + onClick = { + scope.launch { + if (playerUiState.volume <= 0f) { + audioPlayer.setVolume(lastNonZeroVolume) + } else { + lastNonZeroVolume = playerUiState.volume + audioPlayer.setVolume(0f) + } + } + } + ) { + val volumeIcon = when { + playerUiState.volume <= 0f -> Iconsax.IconsaxVolumeCross + playerUiState.volume < 0.5f -> Iconsax.IconsaxVolumeLow + else -> Iconsax.IconsaxVolumeHigh + } + Icon( + imageVector = volumeIcon, + contentDescription = if (playerUiState.volume <= 0f) "Unmute" else "Mute" + ) + } + Slider( + value = playerUiState.volume, + onValueChange = { + lastNonZeroVolume = it + scope.launch { + audioPlayer.setVolume(it) + } + }, + modifier = Modifier.fillMaxWidth(0.62f) + ) + } + } + } + } + +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppPlayerState.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppPlayerState.kt new file mode 100644 index 00000000..30d8f4fd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppPlayerState.kt @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.getValue +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.LoopState +import dev.krtirtho.spotube.core.audioplayer.PlayerState +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.di.rememberLogger +import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds + +internal data class PlayerUiState( + val queue: List = emptyList(), + val currentQueueEntry: QueueEntry? = null, + val title: String = "No-op track title", + val artists: String = "No-op artists", + val album: String = "", + val coverUrl: String = "", + val position: Duration = 0.milliseconds, + val actualDuration: Duration = 0.milliseconds, + val metadataDuration: Duration = 0.milliseconds, + val playerState: PlayerState = PlayerState.IDLE, + val loopState: LoopState = LoopState.NONE, + val isShuffling: Boolean = false, + val volume: Float = 0f, +) { + val isPlaying: Boolean get() = playerState == PlayerState.PLAYING + val displayDuration: Duration + get() = if (actualDuration.inWholeMilliseconds > 0L) actualDuration else metadataDuration + val seekDuration: Duration + get() = if (actualDuration.inWholeMilliseconds > 0L) actualDuration else Duration.ZERO + val progress: Float + get() = if (seekDuration.inWholeMilliseconds > 0L) { + (position.inWholeMilliseconds.toFloat() / seekDuration.inWholeMilliseconds.toFloat()) + .coerceIn(0f, 1f) + } else { + 0f + } + + fun toDebugString(): String { + return """PlayerUiState( + queue=${queue.map { it.displayTitle() }}, + currentQueueEntry=${currentQueueEntry?.displayTitle()}, + title='$title', artists='$artists', + album='$album', coverUrl='$coverUrl', + position=$position, actualDuration=$actualDuration, metadataDuration=$metadataDuration, + playerState=$playerState, loopState=$loopState, isShuffling=$isShuffling, volume=$volume + ) + """.trimIndent() + } +} + +@Composable +internal fun rememberPlayerUiState( + audioPlayer: AudioPlayer, + audioPlayerQueue: AudioPlayerQueue, +): PlayerUiState { + val queue by audioPlayerQueue.queueFlow.collectAsState(initial = emptyList()) + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsState(initial = null) + val playerState by audioPlayer.playerStateFlow.collectAsState() + val position by audioPlayer.positionFlow.collectAsState() + val duration by audioPlayer.durationFlow.collectAsState() + val loopState by audioPlayer.loopStateFlow.collectAsState() + val isShuffling by audioPlayer.shuffleModeFlow.collectAsState() + val volume by audioPlayer.volumeFlow.collectAsState() + val metadataDuration = (currentQueueEntry?.durationInMilliseconds() ?: 0L).milliseconds + + val state = PlayerUiState( + queue = queue, + currentQueueEntry = currentQueueEntry, + title = currentQueueEntry?.displayTitle().orEmpty().ifBlank { "No-op track title" }, + artists = currentQueueEntry?.displayArtists().orEmpty().ifBlank { "No-op artists" }, + album = currentQueueEntry?.displayAlbum().orEmpty(), + coverUrl = currentQueueEntry?.coverUrl().orEmpty(), + position = position, + actualDuration = duration, + metadataDuration = metadataDuration, + playerState = playerState, + loopState = loopState, + isShuffling = isShuffling, + volume = volume, + ) + +// val logger = rememberLogger() +// logger.d { state.toDebugString() } + return state +} + +private fun QueueEntry.displayTitle(): String { + return when (this) { + is QueueEntry.StreamingTrack -> track.title + is QueueEntry.LocalTrack -> name + } +} + +private fun QueueEntry.displayArtists(): String { + return when (this) { + is QueueEntry.StreamingTrack -> track.artists.joinToString(", ") { artist -> artist.name } + is QueueEntry.LocalTrack -> artists.joinToString(", ") + } +} + +private fun QueueEntry.displayAlbum(): String { + return when (this) { + is QueueEntry.StreamingTrack -> track.album?.title ?: "Unknown Album" + is QueueEntry.LocalTrack -> album.orEmpty() + } +} + +private fun QueueEntry.coverUrl(): String { + return when (this) { + is QueueEntry.StreamingTrack -> (track.album?.thumbnails + ?: track.thumbnails)?.firstOrNull()?.url.orEmpty() + + is QueueEntry.LocalTrack -> "" + } +} + +private fun QueueEntry.durationInMilliseconds(): Long { + return when (this) { + is QueueEntry.StreamingTrack -> track.durationMs + is QueueEntry.LocalTrack -> duration + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppShell.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppShell.kt new file mode 100644 index 00000000..ba17d6e6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppShell.kt @@ -0,0 +1,341 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.animation.ExperimentalSharedTransitionApi +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.BoxWithConstraintsScope +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBars +import androidx.compose.foundation.layout.offset +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.material3.BottomSheetScaffold +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.SheetValue +import androidx.compose.material3.rememberBottomSheetScaffoldState +import androidx.compose.material3.rememberStandardBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.snapshotFlow +import androidx.compose.runtime.staticCompositionLocalOf +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Dialog +import androidx.compose.ui.window.DialogProperties +import dev.krtirtho.spotube.core.navigation.NavigationCommands +import dev.krtirtho.spotube.core.navigation.NavigationState +import dev.krtirtho.spotube.core.navigation.Navigator +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.modules.lyrics.LyricsScreen +import dev.krtirtho.spotube.modules.shell.alternative_track.AlternativeTrackContent +import dev.krtirtho.spotube.modules.shell.alternative_track.AlternativeTrackContentViewModel +import dev.krtirtho.spotube.modules.shell.alternative_track.AlternativeTrackSheet +import dev.krtirtho.spotube.modules.shell.player_queue.PlayerQueueContent +import dev.krtirtho.spotube.modules.shell.player_queue.PlayerQueueContentViewModel +import dev.krtirtho.spotube.modules.shell.player_queue.QueueSheet +import kotlinx.coroutines.launch +import org.koin.compose.koinInject +import org.koin.compose.viewmodel.koinViewModel + +val LocalAppShellBottomInset = staticCompositionLocalOf { 0.dp } + +@OptIn(ExperimentalSharedTransitionApi::class, ExperimentalFoundationApi::class) +@Composable +fun AppShell( + navigator: Navigator, + navigationState: NavigationState, + viewModel: AppShellViewModel = koinViewModel(), + queueViewModel: PlayerQueueContentViewModel = koinViewModel(), + alternativeViewModel: AlternativeTrackContentViewModel = koinViewModel(), + content: @Composable () -> Unit, +) { + val navigatorCommands: NavigationCommands = koinInject() + val isQueueVisible by queueViewModel.isQueueVisible.collectAsState() + val isAlternativeVisible by alternativeViewModel.isAlternativeVisible.collectAsState() + val isLyricsOverlayVisible by viewModel.isLyricsOverlayVisible.collectAsState() + + LaunchedEffect(navigatorCommands, navigator) { + launch { + navigatorCommands.navigationCommandFlow.collect { route -> + navigator.navigate(route) + } + } + launch { + navigatorCommands.navigationPopCommandFlow.collect { route -> + navigationState.backStacks[navigationState.topLevelRoute]?.let { backStack -> + backStack.lastOrNull()?.let { currentRoute -> + if (route == null || route == currentRoute) { + navigator.pop() + } + } + } + } + } + } + + Box(modifier = Modifier.fillMaxSize()) { + val useSidebar = viewModel.useSidebar() + val bottomOverlayInset = viewModel.bottomOverlayInset(useSidebar) + + CompositionLocalProvider(LocalAppShellBottomInset provides bottomOverlayInset) { + if (useSidebar) { + Column(modifier = Modifier.fillMaxSize()) { + Box(modifier = Modifier.fillMaxSize().weight(1f)) { + Row(modifier = Modifier.fillMaxSize()) { + AppSidebar( + navigator = navigator, navigationState = navigationState + ) + + Box(modifier = Modifier.weight(1f)) { + content() + } + } + + if (isQueueVisible) { + Box( + modifier = Modifier.fillMaxSize().clickable( + interactionSource = remember { MutableInteractionSource() }, + indication = null, + onClick = { queueViewModel.setQueueVisibility(false) }, + ) + ) + } + + if (isAlternativeVisible) { + Box( + modifier = Modifier.fillMaxSize().clickable( + interactionSource = remember { MutableInteractionSource() }, + indication = null, + onClick = { alternativeViewModel.setAlternativeVisibility(false) }, + ) + ) + } + + QueueSheet( + isVisible = isQueueVisible, + onDismiss = { queueViewModel.setQueueVisibility(false) }, + modifier = Modifier.fillMaxSize(), + ) { + PlayerQueueContent( + viewModel = queueViewModel, + modifier = Modifier.fillMaxSize(), + ) + } + + AlternativeTrackSheet( + isVisible = isAlternativeVisible, + onDismiss = { alternativeViewModel.setAlternativeVisibility(false) }, + modifier = Modifier.fillMaxSize(), + ) { + AlternativeTrackContent( + viewModel = alternativeViewModel, + modifier = Modifier.fillMaxSize(), + ) + } + } + AppLargePlayer( + modifier = Modifier.fillMaxWidth(), + onQueue = queueViewModel::toggleQueueVisibility, + onAlternativeSource = alternativeViewModel::toggleAlternativeVisibility, + onLyrics = { navigatorCommands.navigateTo(Routes.Lyrics) }, + ) + } + } else { + BoxWithConstraints(modifier = Modifier.fillMaxSize()) { + CompactPlayerOverlay( + navigator = navigator, + navigationState = navigationState, + viewModel = viewModel, + onQueue = queueViewModel::toggleQueueVisibility, + onAlternativeSource = alternativeViewModel::toggleAlternativeVisibility, + onExpandLyrics = viewModel::showLyricsOverlay, + content = content, + ) + + QueueSheet( + isVisible = isQueueVisible, + onDismiss = { queueViewModel.setQueueVisibility(false) }, + modifier = Modifier.fillMaxSize() + ) { + PlayerQueueContent( + viewModel = queueViewModel, + modifier = Modifier.fillMaxSize(), + ) + } + + AlternativeTrackSheet( + isVisible = isAlternativeVisible, + onDismiss = { alternativeViewModel.setAlternativeVisibility(false) }, + modifier = Modifier.fillMaxSize(), + ) { + AlternativeTrackContent( + viewModel = alternativeViewModel, + modifier = Modifier.fillMaxSize(), + ) + } + + if (isLyricsOverlayVisible) { + Dialog( + onDismissRequest = { viewModel.hideLyricsOverlay() }, + properties = DialogProperties( + usePlatformDefaultWidth = false, + dismissOnBackPress = true, + dismissOnClickOutside = true, + ), + ) { + Box(modifier = Modifier.fillMaxSize()) { + LyricsScreen( + modifier = Modifier.fillMaxSize(), + onClose = { viewModel.hideLyricsOverlay() }, + ) + } + } + } + } + } + } + } +} + +@OptIn( + ExperimentalSharedTransitionApi::class, ExperimentalFoundationApi::class, + ExperimentalMaterial3Api::class +) +@Composable +private fun BoxWithConstraintsScope.CompactPlayerOverlay( + navigator: Navigator, + navigationState: NavigationState, + viewModel: AppShellViewModel, + onQueue: () -> Unit, + onAlternativeSource: () -> Unit, + onExpandLyrics: () -> Unit, + content: @Composable () -> Unit, +) { + val density = LocalDensity.current + val scope = rememberCoroutineScope() + + val floatingPlayerHeightPx = with(density) { viewModel.floatingPlayerHeight.toPx() } + val bottomBarHeightPx = with(density) { viewModel.bottomBarHeight.toPx() } + val navBarInsetPx = WindowInsets.navigationBars.getBottom(density).toFloat() + val peekHeightPx = floatingPlayerHeightPx + bottomBarHeightPx + navBarInsetPx + val peekHeight = with(density) { peekHeightPx.toDp() } + + val sheetHeightPx = with(density) { maxHeight.toPx() } + + val sheetState = rememberStandardBottomSheetState( + initialValue = SheetValue.PartiallyExpanded, + skipHiddenState = true, + ) + val scaffoldState = rememberBottomSheetScaffoldState( + bottomSheetState = sheetState, + ) + + val progressState = remember { mutableFloatStateOf(0f) } + LaunchedEffect(sheetState, sheetHeightPx, peekHeightPx) { + snapshotFlow { + try { + sheetState.requireOffset() + } catch (_: IllegalStateException) { + peekHeightPx + } + }.collect { offset -> + val expandedOffset = 0f + val collapsedOffset = sheetHeightPx - peekHeightPx + val range = (collapsedOffset - expandedOffset).coerceAtLeast(1f) + val rawProgress = (collapsedOffset - offset) / range + progressState.floatValue = rawProgress.coerceIn(0f, 1f) + } + } + + val uiState by remember { + derivedStateOf { + viewModel.compactSheetUiState(progressState.floatValue) + } + } + + BottomSheetScaffold( + scaffoldState = scaffoldState, + sheetPeekHeight = peekHeight, + sheetDragHandle = null, + sheetContainerColor = Color.Transparent, + sheetShape = RectangleShape, + sheetTonalElevation = 0.dp, + sheetShadowElevation = 0.dp, + sheetContent = { + Box(modifier = Modifier.fillMaxSize()) { + if (uiState.showExpandedPlayer) { + AppExpandedPlayer( + modifier = Modifier + .fillMaxSize() + .graphicsLayer { alpha = uiState.expandedPlayerAlpha }, + onCollapse = { + scope.launch { sheetState.partialExpand() } + }, + onQueue = onQueue, + onAlternativeSource = onAlternativeSource, + onExpandLyrics = onExpandLyrics, + ) + } + + if (uiState.floatingPlayerAlpha > 0.01f) { + Column(modifier = Modifier.fillMaxWidth()) { + AppFloatingPlayer( + modifier = Modifier + .offset(y = 12.dp) + .graphicsLayer { + alpha = uiState.floatingPlayerAlpha + }, + ) + } + } + } + }, + ) { _ -> + Box(modifier = Modifier.fillMaxSize()) { + content() + } + } + if (uiState.floatingPlayerAlpha > 0.01f) { + AppBottombar( + navigator = navigator, + navigationState = navigationState, + modifier = Modifier.fillMaxWidth().align(Alignment.BottomCenter).graphicsLayer { + alpha = uiState.floatingPlayerAlpha + }, + ) + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppShellViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppShellViewModel.kt new file mode 100644 index 00000000..ed3bffcc --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppShellViewModel.kt @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalWindowInfo +import androidx.lifecycle.ViewModel +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.update +import kotlin.math.min + +data class CompactSheetUiState( + val progress: Float, + val showExpandedPlayer: Boolean, + val expandedPlayerAlpha: Float, + val floatingPlayerAlpha: Float, + val bottomBarAlpha: Float, +) + +data class LyricsOverlayState( + val isVisible: Boolean = false, +) + +class AppShellViewModel : ViewModel() { + val sidebarMinWidth = 840.dp + val bottomBarEstimatedHeight = 58.dp + val bottomBarHeight = 80.dp + val floatingPlayerHeight = 74.dp + val largePlayerInset = 100.dp + val floatingPlayerDismissProgress = 0.7f + val expandedPlayerVisibilityThreshold = 0.001f + + private val lyricsOverlayVisible = MutableStateFlow(false) + + val isLyricsOverlayVisible: StateFlow = lyricsOverlayVisible.asStateFlow() + + val floatingPlayerBottomOffset: Dp + get() = bottomBarEstimatedHeight + 8.dp + + val compactChromeInset: Dp + get() = floatingPlayerBottomOffset + floatingPlayerHeight + 10.dp + + @Composable + fun useSidebar(maxWidth: Dp? = null): Boolean { + if (maxWidth != null) { + return maxWidth >= sidebarMinWidth + } + val density = LocalDensity.current + val windowInfo = LocalWindowInfo.current + return with(density) { windowInfo.containerSize.width.toDp() >= sidebarMinWidth } + } + + fun bottomOverlayInset(useSidebar: Boolean): Dp = + if (useSidebar) largePlayerInset else compactChromeInset + + fun sheetProgress(sheetOffsetPx: Float, sheetHeightPx: Float): Float = + if (sheetHeightPx > 0f) { + (sheetOffsetPx / sheetHeightPx).coerceIn(0f, 1f) + } else { + 0f + } + + fun floatingPlayerAlpha(progress: Float): Float { + val normalized = min(progress / floatingPlayerDismissProgress, 1f) + return 1f - normalized + } + + fun compactSheetUiState(progress: Float): CompactSheetUiState { + return CompactSheetUiState( + progress = progress, + showExpandedPlayer = progress > expandedPlayerVisibilityThreshold, + expandedPlayerAlpha = progress, + floatingPlayerAlpha = floatingPlayerAlpha(progress), + bottomBarAlpha = 1f - progress, + ) + } + + fun showLyricsOverlay() { + lyricsOverlayVisible.value = true + } + + fun hideLyricsOverlay() { + lyricsOverlayVisible.value = false + } + + fun toggleLyricsOverlay() { + lyricsOverlayVisible.update { !it } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppSidebar.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppSidebar.kt new file mode 100644 index 00000000..1409f20f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/AppSidebar.kt @@ -0,0 +1,203 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.core.animateDpAsState +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.unit.dp +import androidx.compose.runtime.collectAsState +import androidx.compose.ui.graphics.vector.ImageVector +import dev.krtirtho.spotube.core.navigation.NavigationState +import dev.krtirtho.spotube.core.navigation.Navigator +import dev.krtirtho.spotube.core.navigation.Routes +import dev.krtirtho.spotube.modules.downloads.DownloadBadgeIndicator +import dev.krtirtho.spotube.modules.library.LibraryState +import dev.krtirtho.spotube.modules.library.LibraryTab +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxSidebarLeftBroken +import dev.krtirtho.spotube.resources.iconsax.IconsaxSidebarRightBroken +import dev.krtirtho.spotube.tabs +import org.koin.compose.koinInject + +@Composable +fun AppSidebar( + navigator: Navigator, + navigationState: NavigationState, + modifier: Modifier = Modifier, + libraryState: LibraryState = koinInject() +) { + var expanded by rememberSaveable { mutableStateOf(true) } + val width by animateDpAsState(targetValue = if (expanded) 236.dp else 86.dp) + val currentLibraryTab by libraryState.currentTab.collectAsState() + + Column( + modifier = modifier + .fillMaxHeight() + .width(width) + .background(MaterialTheme.colorScheme.surfaceContainer), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(14.dp), + horizontalArrangement = if (expanded) Arrangement.SpaceBetween else Arrangement.Center, + verticalAlignment = Alignment.CenterVertically + ) { + AnimatedVisibility(visible = expanded, enter = fadeIn(), exit = fadeOut()) { + Text( + text = "Spotube", + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface + ) + } + Icon( + imageVector = if (expanded) Iconsax.IconsaxSidebarLeftBroken else Iconsax.IconsaxSidebarRightBroken, + contentDescription = if (expanded) "Collapse sidebar" else "Expand sidebar", + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier + .size(22.dp) + .clickable { expanded = !expanded } + ) + } + + Spacer(modifier = Modifier.height(8.dp)) + + tabs.forEach { (label, icon, activeIcon, screen) -> + val selected = navigationState.topLevelRoute == screen + + if (screen == Routes.Library) { + AnimatedVisibility(visible = expanded) { + Text( + text = "LIBRARY", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.fillMaxWidth() + .padding(horizontal = 24.dp, vertical = 8.dp) + ) + } + + LibraryTab.entries.forEach { tab -> + val isSubSelected = selected && currentLibraryTab == tab + + SidebarItem( + label = tab.title, + activeIcon = tab.icon, + onClick = { + libraryState.currentTab.value = tab + navigator.navigate(screen) + }, + selected = isSubSelected, + expanded = expanded, + showDownloadBadge = tab == LibraryTab.Downloads, + ) + } + } else { + SidebarItem( + label = label, + activeIcon = activeIcon, + onClick = { navigator.navigate(screen) }, + selected = selected, + expanded = expanded, + ) + } + } + } +} + +@Composable +fun SidebarItem( + label: String, + activeIcon: ImageVector, + selected: Boolean, + expanded: Boolean, + onClick: () -> Unit, + showDownloadBadge: Boolean = false, +) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 10.dp, vertical = 4.dp) + .clip(MaterialTheme.shapes.small) + .background( + if (selected) MaterialTheme.colorScheme.secondaryContainer + else MaterialTheme.colorScheme.surfaceContainer + ) + .clickable { onClick() } + .padding(horizontal = 14.dp, vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = if (expanded) Arrangement.Start else Arrangement.Center + ) { + Box(modifier = Modifier.size(24.dp)) { + Icon( + imageVector = activeIcon, + contentDescription = label, + tint = if (selected) { + MaterialTheme.colorScheme.onSecondaryContainer + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + ) + if (showDownloadBadge) { + DownloadBadgeIndicator( + modifier = Modifier.align(Alignment.TopEnd) + ) + } + } + AnimatedVisibility(visible = expanded, enter = fadeIn(), exit = fadeOut()) { + Row(verticalAlignment = Alignment.CenterVertically) { + Spacer(modifier = Modifier.width(12.dp)) + Text( + text = label, + color = if (selected) { + MaterialTheme.colorScheme.onSecondaryContainer + } else { + MaterialTheme.colorScheme.onSurfaceVariant + } + ) + } + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/PlayerHeartButton.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/PlayerHeartButton.kt new file mode 100644 index 00000000..7268724c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/PlayerHeartButton.kt @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.rememberCoroutineScope +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.modules.saved_tracks.SavedState +import dev.krtirtho.spotube.modules.saved_tracks.SavedTracksViewModel +import dev.krtirtho.spotube.modules.saved_tracks.rememberIsSavedTracks +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart +import dev.krtirtho.spotube.resources.iconsax.IconsaxHeart2 +import kotlinx.coroutines.launch + +@Composable +fun PlayerHeartButton( + audioPlayerQueue: AudioPlayerQueue, + savedTracksViewModel: SavedTracksViewModel, +) { + val scope = rememberCoroutineScope() + val currentQueueEntry by audioPlayerQueue.currentQueueEntryFlow.collectAsStateWithLifecycle() + val currentTrackId = (currentQueueEntry as? QueueEntry.StreamingTrack)?.track?.id + val isSavedTrackState = + rememberIsSavedTracks(trackIds = currentTrackId?.let { listOf(it) } ?: emptyList()) + val savedTrackIds by savedTracksViewModel.savedTrackIdsFlow.collectAsStateWithLifecycle() + + val isInSavedIds = if (currentTrackId != null) currentTrackId in savedTrackIds else false + val isLiked = if (isSavedTrackState is SavedState.Success) { + isSavedTrackState.data.firstOrNull() == true || isInSavedIds + } else { + isInSavedIds + } + + fun onLike() { + val entry = currentQueueEntry as? QueueEntry.StreamingTrack ?: return + if (isLiked) { + scope.launch { + savedTracksViewModel.removeSavedTracks(listOf(entry.track.id)) + } + } else { + scope.launch { + savedTracksViewModel.saveTracks(listOf(entry.track.id)) + } + } + } + IconButton( + onClick = ::onLike, + enabled = isSavedTrackState is SavedState.Success + ) { + Icon( + imageVector = if (isLiked) Iconsax.IconsaxHeart2 else Iconsax.IconsaxHeart, + contentDescription = if (isLiked) "Unlike" else "Like", + tint = if (isLiked) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurfaceVariant, + ) + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/PlayerTimeFormat.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/PlayerTimeFormat.kt new file mode 100644 index 00000000..a07f430c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/PlayerTimeFormat.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell + +import kotlin.time.Duration + +internal fun formatPlayerTime(duration: Duration): String { + return duration.toComponents { hours, minutes, seconds, _ -> + val pMin = minutes.toString().padStart(2, '0') + val pSec = seconds.toString().padStart(2, '0') + + if (hours > 0) { + "${hours.toString().padStart(2, '0')}:$pMin:$pSec" + } else { + "$pMin:$pSec" + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackContent.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackContent.kt new file mode 100644 index 00000000..97e0aa28 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackContent.kt @@ -0,0 +1,235 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell.alternative_track + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxCheckCircle +import org.koin.compose.viewmodel.koinViewModel + +@Composable +fun AlternativeTrackContent( + viewModel: AlternativeTrackContentViewModel = koinViewModel(), + modifier: Modifier = Modifier, +) { + val uiState by viewModel.alternativeTrackUiState.collectAsState() + + LaunchedEffect(uiState.currentTrack?.id) { + viewModel.loadAlternatives() + } + + Surface(modifier = modifier) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(16.dp), + verticalArrangement = Arrangement.spacedBy(10.dp), + ) { + Text( + text = "Alternative Sources", + style = MaterialTheme.typography.titleLarge, + ) + + val currentTrack = uiState.currentTrack + if (currentTrack == null) { + Text( + text = "No track currently playing", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + return@Column + } + + if (uiState.isLoading && uiState.alternatives.isEmpty()) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.Center, + verticalAlignment = Alignment.CenterVertically, + ) { + CircularProgressIndicator( + modifier = Modifier.size(24.dp), + strokeWidth = 2.dp, + ) + Spacer(modifier = Modifier.width(12.dp)) + Text( + text = "Searching for alternative sources...", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + return@Column + } + + if (uiState.alternatives.isEmpty()) { + Text( + text = "No alternative sources found", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + return@Column + } + + LazyColumn( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.spacedBy(6.dp), + ) { + items( + items = uiState.alternatives, + key = { source -> source.id }, + ) { source -> + AlternativeSourceRow( + source = source, + isActive = source.id == uiState.activeSourceId, + onClick = { viewModel.selectAlternative(source) }, + ) + } + } + } + } +} + +@Composable +private fun AlternativeSourceRow( + source: AudioSource, + isActive: Boolean, + onClick: () -> Unit, +) { + val thumbnailUrl = source.thumbnails.maxByOrNull { it.width * it.height }?.url + val rowColor = if (isActive) { + MaterialTheme.colorScheme.secondaryContainer + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + + Surface( + modifier = Modifier + .fillMaxWidth() + .clip(MaterialTheme.shapes.medium) + .clickable(onClick = onClick), + tonalElevation = if (isActive) 2.dp else 0.dp, + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .height(64.dp) + .background(rowColor) + .padding(horizontal = 12.dp, vertical = 8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Box( + modifier = Modifier + .size(44.dp) + .clip(MaterialTheme.shapes.small) + .background(MaterialTheme.colorScheme.surfaceVariant), + contentAlignment = Alignment.Center, + ) { + if (thumbnailUrl != null) { + AsyncImage( + model = thumbnailUrl, + contentDescription = null, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } else { + Text( + text = source.title.firstOrNull()?.uppercase() ?: "?", + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + + Spacer(modifier = Modifier.width(12.dp)) + + Column(modifier = Modifier.weight(1f)) { + Text( + text = source.title, + style = MaterialTheme.typography.bodyLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + color = if (isActive) { + MaterialTheme.colorScheme.onSecondaryContainer + } else { + MaterialTheme.colorScheme.onSurface + }, + ) + val subtitle = buildString { + source.artist?.let { append(it) } + if (source.album != null) { + if (isNotEmpty()) append(" - ") + append(source.album) + } + } + if (subtitle.isNotEmpty()) { + Text( + text = subtitle, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + Text( + text = "Confidence: ${(source.confidence * 100).toInt()}%", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + + if (isActive) { + Icon( + Iconsax.IconsaxCheckCircle, + contentDescription = "Active source", + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(22.dp), + ) + } + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackContentViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackContentViewModel.kt new file mode 100644 index 00000000..2bd49aa6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackContentViewModel.kt @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell.alternative_track + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.server.AlternativeTracksRepository +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch + +data class AlternativeTrackUiState( + val currentTrack: MetadataTrack? = null, + val alternatives: List = emptyList(), + val activeSourceId: String? = null, + val isLoading: Boolean = false, +) + +class AlternativeTrackContentViewModel( + private val audioPlayerQueue: AudioPlayerQueue, + private val alternativeTracksRepository: AlternativeTracksRepository, +) : ViewModel() { + private val alternativeVisibilityFlow = MutableStateFlow(false) + private val alternativesFlow = MutableStateFlow>(emptyList()) + private val activeSourceIdFlow = MutableStateFlow(null) + private val isLoadingFlow = MutableStateFlow(false) + + val isAlternativeVisible: StateFlow = alternativeVisibilityFlow.asStateFlow() + + val alternativeTrackUiState: StateFlow = combine( + audioPlayerQueue.currentQueueEntryFlow, + alternativesFlow, + activeSourceIdFlow, + isLoadingFlow, + ) { currentEntry, alternatives, activeSourceId, isLoading -> + val currentTrack = (currentEntry as? QueueEntry.StreamingTrack)?.track + AlternativeTrackUiState( + currentTrack = currentTrack, + alternatives = alternatives, + activeSourceId = activeSourceId, + isLoading = isLoading, + ) + }.stateIn( + scope = viewModelScope, + started = SharingStarted.WhileSubscribed(5_000), + initialValue = AlternativeTrackUiState(), + ) + + fun toggleAlternativeVisibility() { + alternativeVisibilityFlow.update { !it } + } + + fun setAlternativeVisibility(isVisible: Boolean) { + alternativeVisibilityFlow.value = isVisible + } + + fun loadAlternatives() { + val currentTrack = (audioPlayerQueue.currentQueueEntryFlow.value as? QueueEntry.StreamingTrack)?.track + if (currentTrack == null) { + alternativesFlow.value = emptyList() + activeSourceIdFlow.value = null + return + } + viewModelScope.launch { + isLoadingFlow.value = true + val sources = alternativeTracksRepository.resolveAlternatives(currentTrack) + alternativesFlow.value = sources + activeSourceIdFlow.value = alternativeTracksRepository.getActiveSourceId(currentTrack) + isLoadingFlow.value = false + } + } + + fun selectAlternative(source: AudioSource) { + val currentTrack = (audioPlayerQueue.currentQueueEntryFlow.value as? QueueEntry.StreamingTrack)?.track + if (currentTrack == null) return + viewModelScope.launch { + alternativeTracksRepository.selectAlternative(currentTrack, source) + activeSourceIdFlow.value = source.id + setAlternativeVisibility(false) + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackSheet.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackSheet.kt new file mode 100644 index 00000000..220f0869 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/alternative_track/AlternativeTrackSheet.kt @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell.alternative_track + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.EnterExitState +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally +import androidx.compose.animation.core.animateDp +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.Surface +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +private val SlidingSheetBreakpoint = 840.dp + +@Composable +fun AlternativeTrackSheet( + isVisible: Boolean, + onDismiss: () -> Unit, + modifier: Modifier = Modifier, + content: @Composable () -> Unit, +) { + BoxWithConstraints(modifier = modifier) { + if (maxWidth >= SlidingSheetBreakpoint) { + SlidingAlternativeSheet(isVisible, onDismiss, content) + } else { + BottomAlternativeSheet(isVisible, onDismiss, content) + } + } +} + +@Composable +private fun SlidingAlternativeSheet( + isVisible: Boolean, + onDismiss: () -> Unit, + content: @Composable () -> Unit, +) { + Box(modifier = Modifier.fillMaxSize()) { + AnimatedVisibility( + visible = isVisible, + modifier = Modifier + .align(Alignment.TopEnd) + .padding(top = 12.dp, end = 12.dp, bottom = 12.dp), + enter = slideInHorizontally { fullWidth -> fullWidth / 2 } + fadeIn(), + exit = slideOutHorizontally { fullWidth -> fullWidth / 2 } + fadeOut(), + ) { + val animatedShadowElevation = transition.animateDp(label = "alternativeShadow") { state -> + if (state == EnterExitState.Visible) 20.dp else 0.dp + } + Surface( + modifier = Modifier + .fillMaxHeight() + .width(460.dp), + shape = MaterialTheme.shapes.large, + tonalElevation = 2.dp, + shadowElevation = animatedShadowElevation.value, + ) { + content() + } + } + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +private fun BottomAlternativeSheet( + isVisible: Boolean, + onDismiss: () -> Unit, + content: @Composable () -> Unit, +) { + if (isVisible) { + ModalBottomSheet( + onDismissRequest = onDismiss, + ) { + content() + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/PlayerQueueContent.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/PlayerQueueContent.kt new file mode 100644 index 00000000..f6a9a4e7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/PlayerQueueContent.kt @@ -0,0 +1,414 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell.player_queue + +import androidx.compose.animation.core.animateDpAsState +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.material3.DropdownMenu +import androidx.compose.material3.DropdownMenuItem +import androidx.compose.material3.FilledTonalIconButton +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateListOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.runtime.collectAsState +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import coil3.compose.AsyncImage +import compose.icons.FeatherIcons +import compose.icons.feathericons.MoreVertical +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import dev.krtirtho.spotube.core.di.rememberLogger +import dev.krtirtho.spotube.core.ui.base.TextField +import dev.krtirtho.spotube.resources.iconsax.Iconsax +import dev.krtirtho.spotube.resources.iconsax.IconsaxFilterSearch +import dev.krtirtho.spotube.resources.iconsax.IconsaxMusicSquareRemove +import dev.krtirtho.spotube.resources.iconsax.IconsaxTrash +import org.koin.compose.viewmodel.koinViewModel +import sh.calvin.reorderable.ReorderableItem +import sh.calvin.reorderable.rememberReorderableLazyListState + +private data class QueueItemUi( + val id: String, + val title: String, + val subtitle: String, + val durationMs: Long, + val isCurrent: Boolean, + val imageUrl: String?, + val originalIndex: Int, +) + +@Composable +fun PlayerQueueContent( + viewModel: PlayerQueueContentViewModel = koinViewModel(), + modifier: Modifier = Modifier, +) { + val logger = rememberLogger("PlayerQueueContent") + val queueContentUiState by viewModel.queueContentUiState.collectAsState() + val queue = queueContentUiState.queue + val currentQueueEntry = queueContentUiState.currentQueueEntry + val filterQuery = queueContentUiState.filterQuery + + val normalizedFilter = remember(filterQuery) { filterQuery.trim().lowercase() } + val currentIndex = remember(queue, currentQueueEntry) { + val current = currentQueueEntry ?: return@remember -1 + queue.indexOfFirst { entry -> entry.matchesCurrent(current) } + } + + val sourceItems = remember(queue, currentIndex) { + queue.mapIndexed { index, entry -> + val (title, subtitle, durationMs, imageUrl) = entry.toQueueDisplayData() + QueueItemUi( + id = "${entry.url}@$index", + title = title, + subtitle = subtitle, + durationMs = durationMs, + isCurrent = index == currentIndex, + imageUrl = imageUrl, + originalIndex = index, + ) + } + } + + val isFiltered = normalizedFilter.isNotBlank() + val displayList = remember { mutableStateListOf() } + var moveParams by remember { mutableStateOf?>(null) } + var queueVersion by remember { mutableIntStateOf(0) } + + LaunchedEffect(sourceItems, normalizedFilter) { + queueVersion++ + displayList.clear() + val filtered = if (isFiltered) { + sourceItems.filter { item -> + item.title.lowercase().contains(normalizedFilter) || + item.subtitle.lowercase().contains(normalizedFilter) + } + } else { + sourceItems + } + displayList.addAll(filtered) + } + + val lazyListState = rememberLazyListState() + val reorderableLazyListState = + rememberReorderableLazyListState( + lazyListState, + onMove = { from, to -> + if (isFiltered) return@rememberReorderableLazyListState + val item = displayList.removeAt(from.index) + displayList.add(to.index, item) + + logger.i { "Moved item from ${from.index} to ${to.index}" } + + moveParams = item.originalIndex to to.index + }, + ) + + fun finalizeReorder() { + moveParams?.let { (fromOriginal, toDisplay) -> + logger.i { "Finalizing move from $fromOriginal to $toDisplay (version $queueVersion)" } + viewModel.moveQueueItem(fromOriginal, toDisplay) + } + moveParams = null + } + + Surface(modifier = modifier) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(16.dp), + verticalArrangement = Arrangement.spacedBy(10.dp), + ) { + Text( + text = "Queue", + style = MaterialTheme.typography.titleLarge, + ) + + Row( + horizontalArrangement = Arrangement.spacedBy(5.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + TextField( + value = filterQuery, + onValueChange = viewModel::setQueueFilter, + placeholder = { Text("Filter queue...") }, + leadingIcon = { + Icon( + Iconsax.IconsaxFilterSearch, + contentDescription = "Search", + modifier = Modifier.size(18.dp), + ) + }, + singleLine = true, + modifier = Modifier.weight(1f), + ) + FilledTonalIconButton( + onClick = viewModel::clearQueue, + shape = MaterialTheme.shapes.small, + ) { + Icon(Iconsax.IconsaxTrash, contentDescription = "Clear Queue") + } + } + + if (displayList.isEmpty()) { + Text( + text = "No queue entries", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } else { + LazyColumn( + modifier = Modifier.fillMaxSize(), + state = lazyListState, + contentPadding = PaddingValues(bottom = 8.dp), + verticalArrangement = Arrangement.spacedBy(6.dp), + ) { + items(displayList, key = { item -> item.id }) { item -> + ReorderableItem(reorderableLazyListState, key = item.id) { isDragging -> + val elevation by animateDpAsState(if (isDragging) 8.dp else 0.dp) + QueueItemRow( + item = item, + isDragging = isDragging, + elevation = elevation, + reorderScope = if (isFiltered) null else this, + onPlayClick = { viewModel.playQueueItem(item.originalIndex) }, + onRemoveClick = { viewModel.removeQueueItem(item.originalIndex) }, + onDragStopped = ::finalizeReorder, + ) + } + } + } + } + } + } +} + +@Composable +private fun QueueItemRow( + item: QueueItemUi, + isDragging: Boolean, + elevation: androidx.compose.ui.unit.Dp, + reorderScope: sh.calvin.reorderable.ReorderableCollectionItemScope?, + onPlayClick: () -> Unit, + onRemoveClick: () -> Unit, + onDragStopped: () -> Unit, +) { + var showMenu by remember { mutableStateOf(false) } + + val rowColor = if (item.isCurrent) { + MaterialTheme.colorScheme.secondaryContainer + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + + Surface( + modifier = Modifier + .fillMaxWidth() + .clip(MaterialTheme.shapes.medium) + .clickable(onClick = onPlayClick), + shadowElevation = elevation, + tonalElevation = if (item.isCurrent) 2.dp else 0.dp, + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .height(72.dp) + .background(rowColor) + .padding(horizontal = 12.dp, vertical = 8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Icon( + FeatherIcons.MoreVertical, + contentDescription = if (reorderScope != null) "Reorder" else null, + modifier = Modifier + .size(24.dp) + .then( + if (reorderScope != null) { + with(reorderScope) { Modifier.draggableHandle(onDragStopped = onDragStopped) } + } else { + Modifier + }, + ), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Box( + modifier = Modifier + .size(48.dp) + .clip(MaterialTheme.shapes.small) + .background(MaterialTheme.colorScheme.surfaceVariant), + contentAlignment = Alignment.Center, + ) { + if (item.imageUrl != null) { + AsyncImage( + model = item.imageUrl, + contentDescription = null, + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } else { + Text( + text = "${item.originalIndex + 1}", + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + + Spacer(modifier = Modifier.width(12.dp)) + + Column(modifier = Modifier.weight(1f)) { + Text( + text = item.title, + style = MaterialTheme.typography.bodyLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + color = if (item.isCurrent) { + MaterialTheme.colorScheme.onSecondaryContainer + } else { + MaterialTheme.colorScheme.onSurface + }, + ) + Text( + text = item.subtitle, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } + + Spacer(modifier = Modifier.width(8.dp)) + + Text( + text = item.durationMs.toDurationString(), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Spacer(modifier = Modifier.width(4.dp)) + + Box { + IconButton( + onClick = { showMenu = true }, + modifier = Modifier.size(36.dp), + ) { + Icon( + FeatherIcons.MoreVertical, + contentDescription = "More options", + modifier = Modifier.size(18.dp), + ) + } + DropdownMenu( + expanded = showMenu, + onDismissRequest = { showMenu = false }, + ) { + DropdownMenuItem( + text = { Text("Remove from queue") }, + onClick = { + onRemoveClick() + showMenu = false + }, + leadingIcon = { + Icon(Iconsax.IconsaxMusicSquareRemove, contentDescription = null) + }, + ) + } + } + } + } +} + +private fun QueueEntry.toQueueDisplayData(): Tuple4 { + return when (this) { + is QueueEntry.StreamingTrack -> { + val imageUrl = track.thumbnails?.maxByOrNull { it.width * it.height }?.url + ?: track.album?.thumbnails?.maxByOrNull { it.width * it.height }?.url + Tuple4( + track.title, + track.artists.joinToString(", ") { it.name }, + track.durationMs, + imageUrl, + ) + } + + is QueueEntry.LocalTrack -> Tuple4( + name, + artists.joinToString(", "), + duration, + null, + ) + } +} + +private data class Tuple4( + val first: A, + val second: B, + val third: C, + val fourth: D, +) + +private fun QueueEntry.matchesCurrent(current: QueueEntry): Boolean { + return when { + this is QueueEntry.StreamingTrack && current is QueueEntry.StreamingTrack -> { + this.track.id == current.track.id + } + + this is QueueEntry.LocalTrack && current is QueueEntry.LocalTrack -> { + this.url == current.url && this.name == current.name + } + + else -> false + } +} + +private fun Long.toDurationString(): String { + val totalSeconds = (this / 1000).coerceAtLeast(0) + val minutes = totalSeconds / 60 + val seconds = totalSeconds % 60 + return "$minutes:${seconds.toString().padStart(2, '0')}" +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/PlayerQueueContentViewModel.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/PlayerQueueContentViewModel.kt new file mode 100644 index 00000000..ff3d7dca --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/PlayerQueueContentViewModel.kt @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell.player_queue + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import dev.krtirtho.spotube.core.audioplayer.AudioPlayerQueue +import dev.krtirtho.spotube.core.audioplayer.QueueEntry +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch + +data class QueueContentUiState( + val filterQuery: String = "", + val queue: List = emptyList(), + val currentQueueEntry: QueueEntry? = null, +) + +class PlayerQueueContentViewModel( + private val audioPlayerQueue: AudioPlayerQueue, +) : ViewModel() { + private val queueVisibilityFlow = MutableStateFlow(false) + private val queueFilterFlow = MutableStateFlow("") + + val isQueueVisible: StateFlow = queueVisibilityFlow.asStateFlow() + + val queueContentUiState: StateFlow = combine( + audioPlayerQueue.queueFlow, + audioPlayerQueue.currentQueueEntryFlow, + queueFilterFlow, + ) { queue, currentQueueEntry, filterQuery -> + QueueContentUiState( + filterQuery = filterQuery, + queue = queue, + currentQueueEntry = currentQueueEntry, + ) + }.stateIn( + scope = viewModelScope, + started = SharingStarted.WhileSubscribed(5_000), + initialValue = QueueContentUiState(), + ) + + fun toggleQueueVisibility() { + queueVisibilityFlow.update { !it } + } + + fun setQueueVisibility(isVisible: Boolean) { + queueVisibilityFlow.value = isVisible + } + + fun setQueueFilter(query: String) { + queueFilterFlow.value = query + } + + fun moveQueueItem(fromIndex: Int, toIndex: Int) { + if (fromIndex == toIndex || fromIndex < 0 || toIndex < 0) return + viewModelScope.launch { + audioPlayerQueue.move(fromIndex, toIndex) + } + } + + fun playQueueItem(index: Int) { + if (index < 0) return + viewModelScope.launch { + audioPlayerQueue.jumpTo(index) + } + } + + fun removeQueueItem(index: Int) { + if (index < 0) return + viewModelScope.launch { + val currentQueue = audioPlayerQueue.queueFlow.value + if (index < currentQueue.size) { + audioPlayerQueue.removeFromQueue(currentQueue[index]) + } + } + } + + fun clearQueue() { + viewModelScope.launch { + audioPlayerQueue.clear() + } + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/QueueSheet.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/QueueSheet.kt new file mode 100644 index 00000000..a0e8220c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/shell/player_queue/QueueSheet.kt @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.shell.player_queue + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.EnterExitState +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally +import androidx.compose.animation.core.animateDp +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.Surface +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +private val SlidingSheetBreakpoint = 840.dp + +@Composable +fun QueueSheet( + isVisible: Boolean, + onDismiss: () -> Unit, + modifier: Modifier = Modifier, + content: @Composable () -> Unit, +) { + BoxWithConstraints(modifier = modifier) { + if (maxWidth >= SlidingSheetBreakpoint) { + SlidingQueueSheet(isVisible, onDismiss, content) + } else { + BottomQueueSheet(isVisible, onDismiss, content) + } + } +} + +@Composable +private fun SlidingQueueSheet( + isVisible: Boolean, + onDismiss: () -> Unit, + content: @Composable () -> Unit, +) { + Box(modifier = Modifier.fillMaxSize()) { + AnimatedVisibility( + visible = isVisible, + modifier = Modifier + .align(Alignment.TopEnd) + .padding(top = 12.dp, end = 12.dp, bottom = 12.dp), + enter = slideInHorizontally { fullWidth -> fullWidth / 2 } + fadeIn(), + exit = slideOutHorizontally { fullWidth -> fullWidth / 2 } + fadeOut(), + ) { + val animatedShadowElevation = transition.animateDp(label = "queueShadow") { state -> + if (state == EnterExitState.Visible) 20.dp else 0.dp + } + Surface( + modifier = Modifier + .fillMaxHeight() + .width(460.dp), + shape = MaterialTheme.shapes.large, + tonalElevation = 2.dp, + shadowElevation = animatedShadowElevation.value, + ) { + content() + } + } + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +private fun BottomQueueSheet( + isVisible: Boolean, + onDismiss: () -> Unit, + content: @Composable () -> Unit, +) { + if (isVisible) { + ModalBottomSheet( + onDismissRequest = onDismiss, + ) { + content() + } + } +} diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/webview/WebViewScreen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/webview/WebViewScreen.kt new file mode 100644 index 00000000..a3a80650 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/modules/webview/WebViewScreen.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.webview + +import androidx.compose.runtime.Composable +import dev.krtirtho.spotube.core.di.rememberLogger +import dev.krtirtho.spotube.core.webview.PlatformWebViewScreen +import dev.krtirtho.spotube.core.webview.WebViewController + +internal object WebViewScreen +@Composable +fun WebViewScreen(controller: WebViewController) { + val logger = rememberLogger() + logger.d("WebViewScreen Opened") + return PlatformWebViewScreen(webViewController = controller) +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/ArrowLeft3.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/ArrowLeft3.kt new file mode 100644 index 00000000..d51ba7ce --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/ArrowLeft3.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.ArrowLeft3: ImageVector + get() { + if (_ArrowLeft3 != null) { + return _ArrowLeft3!! + } + _ArrowLeft3 = ImageVector.Builder( + name = "ArrowLeft3", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(11.19f, 7.94f) + lineTo(8.57f, 10.56f) + curveTo(7.8f, 11.33f, 7.8f, 12.59f, 8.57f, 13.36f) + lineTo(15.09f, 19.88f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(15.09f, 4.04f) + lineTo(14.05f, 5.08f) + } + }.build() + + return _ArrowLeft3!! + } + +@Suppress("ObjectPropertyName") +private var _ArrowLeft3: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Iconsax.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Iconsax.kt new file mode 100644 index 00000000..338fda64 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Iconsax.kt @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +object Iconsax diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Iconsax3DotsMore.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Iconsax3DotsMore.kt new file mode 100644 index 00000000..62160400 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Iconsax3DotsMore.kt @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.Iconsax3DotsMore: ImageVector + get() { + if (_Iconsax3DotsMore != null) { + return _Iconsax3DotsMore!! + } + _Iconsax3DotsMore = ImageVector.Builder( + name = "Iconsax3DotsMore", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f + ) { + moveTo(5f, 10f) + curveTo(3.9f, 10f, 3f, 10.9f, 3f, 12f) + curveTo(3f, 13.1f, 3.9f, 14f, 5f, 14f) + curveTo(6.1f, 14f, 7f, 13.1f, 7f, 12f) + curveTo(7f, 10.9f, 6.1f, 10f, 5f, 10f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f + ) { + moveTo(19f, 10f) + curveTo(17.9f, 10f, 17f, 10.9f, 17f, 12f) + curveTo(17f, 13.1f, 17.9f, 14f, 19f, 14f) + curveTo(20.1f, 14f, 21f, 13.1f, 21f, 12f) + curveTo(21f, 10.9f, 20.1f, 10f, 19f, 10f) + close() + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f + ) { + moveTo(12f, 10f) + curveTo(10.9f, 10f, 10f, 10.9f, 10f, 12f) + curveTo(10f, 13.1f, 10.9f, 14f, 12f, 14f) + curveTo(13.1f, 14f, 14f, 13.1f, 14f, 12f) + curveTo(14f, 10.9f, 13.1f, 10f, 12f, 10f) + close() + } + } + }.build() + + return _Iconsax3DotsMore!! + } + +@Suppress("ObjectPropertyName") +private var _Iconsax3DotsMore: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxAddSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxAddSquare.kt new file mode 100644 index 00000000..a433ce28 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxAddSquare.kt @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxAddSquare: ImageVector + get() { + if (_IconsaxAddSquare != null) { + return _IconsaxAddSquare!! + } + _IconsaxAddSquare = ImageVector.Builder( + name = "IconsaxAddSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14.99f, 12f) + horizontalLineTo(16f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(8f, 12f) + horizontalLineTo(11.81f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12f, 16f) + verticalLineTo(8f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(2f, 13.04f) + verticalLineTo(15f) + curveTo(2f, 20f, 4f, 22f, 9f, 22f) + horizontalLineTo(15f) + curveTo(20f, 22f, 22f, 20f, 22f, 15f) + verticalLineTo(9f) + curveTo(22f, 4f, 20f, 2f, 15f, 2f) + horizontalLineTo(9f) + curveTo(4f, 2f, 2f, 4f, 2f, 9f) + } + } + }.build() + + return _IconsaxAddSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxAddSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxArrowDown4.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxArrowDown4.kt new file mode 100644 index 00000000..2d56673e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxArrowDown4.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxArrowDown4: ImageVector + get() { + if (_IconsaxArrowDown4 != null) { + return _IconsaxArrowDown4!! + } + _IconsaxArrowDown4 = ImageVector.Builder( + name = "IconsaxArrowDown4", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(16.01f, 12.85f) + lineTo(13.39f, 15.47f) + curveTo(12.62f, 16.24f, 11.36f, 16.24f, 10.59f, 15.47f) + lineTo(4.08f, 8.95f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(19.92f, 8.95f) + lineTo(18.88f, 9.99f) + } + }.build() + + return _IconsaxArrowDown4!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxArrowDown4: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxArrowSquareUp.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxArrowSquareUp.kt new file mode 100644 index 00000000..59516b40 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxArrowSquareUp.kt @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxArrowSquareUp: ImageVector + get() { + if (_IconsaxArrowSquareUp != null) { + return _IconsaxArrowSquareUp!! + } + _IconsaxArrowSquareUp = ImageVector.Builder( + name = "IconsaxArrowSquareUp", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path(fill = SolidColor(Color.White)) { + moveTo(15f, 22.75f) + horizontalLineTo(9f) + curveTo(3.57f, 22.75f, 1.25f, 20.43f, 1.25f, 15f) + verticalLineTo(9f) + curveTo(1.25f, 3.57f, 3.57f, 1.25f, 9f, 1.25f) + horizontalLineTo(15f) + curveTo(20.43f, 1.25f, 22.75f, 3.57f, 22.75f, 9f) + verticalLineTo(15f) + curveTo(22.75f, 20.43f, 20.43f, 22.75f, 15f, 22.75f) + close() + moveTo(9f, 2.75f) + curveTo(4.39f, 2.75f, 2.75f, 4.39f, 2.75f, 9f) + verticalLineTo(15f) + curveTo(2.75f, 19.61f, 4.39f, 21.25f, 9f, 21.25f) + horizontalLineTo(15f) + curveTo(19.61f, 21.25f, 21.25f, 19.61f, 21.25f, 15f) + verticalLineTo(9f) + curveTo(21.25f, 4.39f, 19.61f, 2.75f, 15f, 2.75f) + horizontalLineTo(9f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.53f, 14.21f) + curveTo(15.34f, 14.21f, 15.15f, 14.14f, 15f, 13.99f) + lineTo(12f, 10.99f) + lineTo(9f, 13.99f) + curveTo(8.71f, 14.28f, 8.23f, 14.28f, 7.94f, 13.99f) + curveTo(7.65f, 13.7f, 7.65f, 13.22f, 7.94f, 12.93f) + lineTo(11.47f, 9.4f) + curveTo(11.76f, 9.11f, 12.24f, 9.11f, 12.53f, 9.4f) + lineTo(16.06f, 12.93f) + curveTo(16.35f, 13.22f, 16.35f, 13.7f, 16.06f, 13.99f) + curveTo(15.91f, 14.14f, 15.72f, 14.21f, 15.53f, 14.21f) + close() + } + }.build() + + return _IconsaxArrowSquareUp!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxArrowSquareUp: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxBoxAdd.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxBoxAdd.kt new file mode 100644 index 00000000..06b11520 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxBoxAdd.kt @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxBoxAdd: ImageVector + get() { + if (_IconsaxBoxAdd != null) { + return _IconsaxBoxAdd!! + } + _IconsaxBoxAdd = ImageVector.Builder( + name = "IconsaxBoxAdd", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(22f, 15.7f) + curveTo(22f, 15.69f, 21.99f, 15.68f, 21.98f, 15.67f) + curveTo(21.94f, 15.61f, 21.89f, 15.55f, 21.84f, 15.5f) + curveTo(21.83f, 15.49f, 21.82f, 15.47f, 21.81f, 15.46f) + curveTo(21f, 14.56f, 19.81f, 14f, 18.5f, 14f) + curveTo(17.24f, 14f, 16.09f, 14.52f, 15.27f, 15.36f) + curveTo(14.48f, 16.17f, 14f, 17.28f, 14f, 18.5f) + curveTo(14f, 19.34f, 14.24f, 20.14f, 14.65f, 20.82f) + curveTo(14.87f, 21.19f, 15.15f, 21.53f, 15.47f, 21.81f) + curveTo(15.49f, 21.82f, 15.5f, 21.83f, 15.51f, 21.84f) + curveTo(15.56f, 21.89f, 15.61f, 21.93f, 15.67f, 21.98f) + curveTo(15.67f, 21.98f, 15.67f, 21.98f, 15.68f, 21.98f) + curveTo(15.69f, 21.99f, 15.7f, 22f, 15.71f, 22f) + curveTo(16.46f, 22.63f, 17.43f, 23f, 18.5f, 23f) + curveTo(20.14f, 23f, 21.57f, 22.12f, 22.35f, 20.82f) + curveTo(22.58f, 20.43f, 22.76f, 20f, 22.87f, 19.55f) + curveTo(22.96f, 19.21f, 23f, 18.86f, 23f, 18.5f) + curveTo(23f, 17.44f, 22.63f, 16.46f, 22f, 15.7f) + close() + moveTo(20.18f, 19.23f) + horizontalLineTo(19.25f) + verticalLineTo(20.2f) + curveTo(19.25f, 20.61f, 18.91f, 20.95f, 18.5f, 20.95f) + curveTo(18.09f, 20.95f, 17.75f, 20.61f, 17.75f, 20.2f) + verticalLineTo(19.23f) + horizontalLineTo(16.82f) + curveTo(16.41f, 19.23f, 16.07f, 18.89f, 16.07f, 18.48f) + curveTo(16.07f, 18.07f, 16.41f, 17.73f, 16.82f, 17.73f) + horizontalLineTo(17.75f) + verticalLineTo(16.84f) + curveTo(17.75f, 16.43f, 18.09f, 16.09f, 18.5f, 16.09f) + curveTo(18.91f, 16.09f, 19.25f, 16.43f, 19.25f, 16.84f) + verticalLineTo(17.73f) + horizontalLineTo(20.18f) + curveTo(20.59f, 17.73f, 20.93f, 18.07f, 20.93f, 18.48f) + curveTo(20.93f, 18.89f, 20.6f, 19.23f, 20.18f, 19.23f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(19.35f, 5.66f) + lineTo(13.06f, 2.27f) + curveTo(12.4f, 1.91f, 11.6f, 1.91f, 10.93f, 2.27f) + lineTo(4.64f, 5.66f) + curveTo(4.18f, 5.91f, 3.9f, 6.4f, 3.9f, 6.94f) + curveTo(3.9f, 7.48f, 4.18f, 7.97f, 4.64f, 8.22f) + lineTo(10.93f, 11.61f) + curveTo(11.26f, 11.79f, 11.63f, 11.88f, 11.99f, 11.88f) + curveTo(12.35f, 11.88f, 12.72f, 11.79f, 13.05f, 11.61f) + lineTo(19.34f, 8.22f) + curveTo(19.8f, 7.97f, 20.08f, 7.48f, 20.08f, 6.94f) + curveTo(20.1f, 6.4f, 19.81f, 5.91f, 19.35f, 5.66f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(9.9f, 12.79f) + lineTo(4.05f, 9.86f) + curveTo(3.6f, 9.63f, 3.08f, 9.66f, 2.65f, 9.92f) + curveTo(2.22f, 10.18f, 1.97f, 10.64f, 1.97f, 11.14f) + verticalLineTo(16.67f) + curveTo(1.97f, 17.63f, 2.5f, 18.49f, 3.36f, 18.92f) + lineTo(9.21f, 21.84f) + curveTo(9.41f, 21.94f, 9.63f, 21.99f, 9.85f, 21.99f) + curveTo(10.11f, 21.99f, 10.37f, 21.92f, 10.6f, 21.77f) + curveTo(11.03f, 21.51f, 11.28f, 21.05f, 11.28f, 20.55f) + verticalLineTo(15.02f) + curveTo(11.29f, 14.08f, 10.76f, 13.22f, 9.9f, 12.79f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(22.03f, 11.15f) + verticalLineTo(15.74f) + curveTo(22.02f, 15.73f, 22.01f, 15.71f, 22f, 15.7f) + curveTo(22f, 15.69f, 21.99f, 15.68f, 21.98f, 15.67f) + curveTo(21.94f, 15.61f, 21.89f, 15.55f, 21.84f, 15.5f) + curveTo(21.83f, 15.49f, 21.82f, 15.47f, 21.81f, 15.46f) + curveTo(21f, 14.56f, 19.81f, 14f, 18.5f, 14f) + curveTo(17.24f, 14f, 16.09f, 14.52f, 15.27f, 15.36f) + curveTo(14.48f, 16.17f, 14f, 17.28f, 14f, 18.5f) + curveTo(14f, 19.34f, 14.24f, 20.14f, 14.65f, 20.82f) + curveTo(14.82f, 21.11f, 15.03f, 21.37f, 15.26f, 21.61f) + lineTo(14.79f, 21.85f) + curveTo(14.59f, 21.95f, 14.37f, 22f, 14.15f, 22f) + curveTo(13.89f, 22f, 13.63f, 21.93f, 13.39f, 21.78f) + curveTo(12.97f, 21.52f, 12.71f, 21.06f, 12.71f, 20.56f) + verticalLineTo(15.04f) + curveTo(12.71f, 14.08f, 13.24f, 13.22f, 14.1f, 12.79f) + lineTo(19.95f, 9.87f) + curveTo(20.4f, 9.64f, 20.92f, 9.66f, 21.35f, 9.93f) + curveTo(21.77f, 10.19f, 22.03f, 10.65f, 22.03f, 11.15f) + close() + } + } + }.build() + + return _IconsaxBoxAdd!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxBoxAdd: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCd.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCd.kt new file mode 100644 index 00000000..2ca12047 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCd.kt @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxCd: ImageVector + get() { + if (_IconsaxCd != null) { + return _IconsaxCd!! + } + _IconsaxCd = ImageVector.Builder( + name = "IconsaxCd", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 20f, + viewportHeight = 20f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(20f) + verticalLineToRelative(20f) + horizontalLineToRelative(-20f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(10f, 20f) + curveTo(15.523f, 20f, 20f, 15.523f, 20f, 10f) + curveTo(20f, 4.477f, 15.523f, 0f, 10f, 0f) + curveTo(4.477f, 0f, 0f, 4.477f, 0f, 10f) + curveTo(0f, 15.523f, 4.477f, 20f, 10f, 20f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(10f, 12.5f) + curveTo(11.381f, 12.5f, 12.5f, 11.381f, 12.5f, 10f) + curveTo(12.5f, 8.619f, 11.381f, 7.5f, 10f, 7.5f) + curveTo(8.619f, 7.5f, 7.5f, 8.619f, 7.5f, 10f) + curveTo(7.5f, 11.381f, 8.619f, 12.5f, 10f, 12.5f) + close() + } + } + }.build() + + return _IconsaxCd!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxCd: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCheckCircle.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCheckCircle.kt new file mode 100644 index 00000000..1dd8454a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCheckCircle.kt @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxCheckCircle: ImageVector + get() { + if (_IconsaxCheckCircle != null) { + return _IconsaxCheckCircle!! + } + _IconsaxCheckCircle = ImageVector.Builder( + name = "IconsaxCheckCircle", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12f, 22f) + curveTo(17.5f, 22f, 22f, 17.5f, 22f, 12f) + curveTo(22f, 6.5f, 17.5f, 2f, 12f, 2f) + curveTo(6.5f, 2f, 2f, 6.5f, 2f, 12f) + curveTo(2f, 17.5f, 6.5f, 22f, 12f, 22f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(7.75f, 12f) + lineTo(10.58f, 14.83f) + lineTo(16.25f, 9.17f) + } + } + }.build() + + return _IconsaxCheckCircle!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxCheckCircle: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCheckSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCheckSquare.kt new file mode 100644 index 00000000..08d47f5b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCheckSquare.kt @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxCheckSquare: ImageVector + get() { + if (_IconsaxCheckSquare != null) { + return _IconsaxCheckSquare!! + } + _IconsaxCheckSquare = ImageVector.Builder( + name = "IconsaxCheckSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(16.19f, 2f) + horizontalLineTo(7.81f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.83f, 4.17f, 22f, 7.81f, 22f) + horizontalLineTo(16.18f) + curveTo(19.82f, 22f, 21.99f, 19.83f, 21.99f, 16.19f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + moveTo(16.78f, 9.7f) + lineTo(11.11f, 15.37f) + curveTo(10.97f, 15.51f, 10.78f, 15.59f, 10.58f, 15.59f) + curveTo(10.38f, 15.59f, 10.19f, 15.51f, 10.05f, 15.37f) + lineTo(7.22f, 12.54f) + curveTo(6.93f, 12.25f, 6.93f, 11.77f, 7.22f, 11.48f) + curveTo(7.51f, 11.19f, 7.99f, 11.19f, 8.28f, 11.48f) + lineTo(10.58f, 13.78f) + lineTo(15.72f, 8.64f) + curveTo(16.01f, 8.35f, 16.49f, 8.35f, 16.78f, 8.64f) + curveTo(17.07f, 8.93f, 17.07f, 9.4f, 16.78f, 9.7f) + close() + } + } + }.build() + + return _IconsaxCheckSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxCheckSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCloseSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCloseSquare.kt new file mode 100644 index 00000000..e27c9e18 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxCloseSquare.kt @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxCloseSquare: ImageVector + get() { + if (_IconsaxCloseSquare != null) { + return _IconsaxCloseSquare!! + } + _IconsaxCloseSquare = ImageVector.Builder( + name = "IconsaxCloseSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.19f, 2f) + horizontalLineTo(7.81f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.83f, 4.17f, 22f, 7.81f, 22f) + horizontalLineTo(16.18f) + curveTo(19.82f, 22f, 21.99f, 19.83f, 21.99f, 16.19f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(13.06f, 11.999f) + lineTo(15.36f, 9.699f) + curveTo(15.65f, 9.409f, 15.65f, 8.929f, 15.36f, 8.639f) + curveTo(15.07f, 8.349f, 14.59f, 8.349f, 14.3f, 8.639f) + lineTo(12f, 10.939f) + lineTo(9.7f, 8.639f) + curveTo(9.41f, 8.349f, 8.93f, 8.349f, 8.64f, 8.639f) + curveTo(8.35f, 8.929f, 8.35f, 9.409f, 8.64f, 9.699f) + lineTo(10.94f, 11.999f) + lineTo(8.64f, 14.299f) + curveTo(8.35f, 14.589f, 8.35f, 15.069f, 8.64f, 15.359f) + curveTo(8.79f, 15.509f, 8.98f, 15.579f, 9.17f, 15.579f) + curveTo(9.36f, 15.579f, 9.55f, 15.509f, 9.7f, 15.359f) + lineTo(12f, 13.059f) + lineTo(14.3f, 15.359f) + curveTo(14.45f, 15.509f, 14.64f, 15.579f, 14.83f, 15.579f) + curveTo(15.02f, 15.579f, 15.21f, 15.509f, 15.36f, 15.359f) + curveTo(15.65f, 15.069f, 15.65f, 14.589f, 15.36f, 14.299f) + lineTo(13.06f, 11.999f) + close() + } + } + }.build() + + return _IconsaxCloseSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxCloseSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxColorsSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxColorsSquare.kt new file mode 100644 index 00000000..78dc0cea --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxColorsSquare.kt @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxColorsSquare: ImageVector + get() { + if (_IconsaxColorsSquare != null) { + return _IconsaxColorsSquare!! + } + _IconsaxColorsSquare = ImageVector.Builder( + name = "IconsaxColorsSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.19f, 2f) + horizontalLineTo(7.82f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.82f, 4.17f, 21.99f, 7.81f, 21.99f) + horizontalLineTo(16.18f) + curveTo(19.82f, 21.99f, 21.99f, 19.82f, 21.99f, 16.18f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.6f, + strokeAlpha = 0.6f + ) { + moveTo(13.2f, 14.4f) + curveTo(13.2f, 15.46f, 12.74f, 16.42f, 12f, 17.08f) + curveTo(11.36f, 17.66f, 10.52f, 18f, 9.6f, 18f) + curveTo(7.61f, 18f, 6f, 16.39f, 6f, 14.4f) + curveTo(6f, 12.74f, 7.13f, 11.34f, 8.65f, 10.93f) + curveTo(9.06f, 11.97f, 9.95f, 12.78f, 11.05f, 13.08f) + curveTo(11.35f, 13.16f, 11.67f, 13.21f, 12f, 13.21f) + curveTo(12.33f, 13.21f, 12.65f, 13.17f, 12.95f, 13.08f) + curveTo(13.11f, 13.48f, 13.2f, 13.93f, 13.2f, 14.4f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.6f, 9.6f) + curveTo(15.6f, 10.07f, 15.51f, 10.52f, 15.35f, 10.93f) + curveTo(14.94f, 11.97f, 14.05f, 12.78f, 12.95f, 13.08f) + curveTo(12.65f, 13.16f, 12.33f, 13.21f, 12f, 13.21f) + curveTo(11.67f, 13.21f, 11.35f, 13.17f, 11.05f, 13.08f) + curveTo(9.95f, 12.78f, 9.06f, 11.98f, 8.65f, 10.93f) + curveTo(8.49f, 10.52f, 8.4f, 10.07f, 8.4f, 9.6f) + curveTo(8.4f, 7.61f, 10.01f, 6f, 12f, 6f) + curveTo(13.99f, 6f, 15.6f, 7.61f, 15.6f, 9.6f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(18f, 14.4f) + curveTo(18f, 16.39f, 16.39f, 18f, 14.4f, 18f) + curveTo(13.48f, 18f, 12.64f, 17.65f, 12f, 17.08f) + curveTo(12.74f, 16.43f, 13.2f, 15.47f, 13.2f, 14.4f) + curveTo(13.2f, 13.93f, 13.11f, 13.48f, 12.95f, 13.07f) + curveTo(14.05f, 12.77f, 14.94f, 11.97f, 15.35f, 10.92f) + curveTo(16.87f, 11.34f, 18f, 12.74f, 18f, 14.4f) + close() + } + } + }.build() + + return _IconsaxColorsSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxColorsSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxDirectboxReceive.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxDirectboxReceive.kt new file mode 100644 index 00000000..e4a763f7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxDirectboxReceive.kt @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxDirectboxReceive: ImageVector + get() { + if (_IconsaxDirectboxReceive != null) { + return _IconsaxDirectboxReceive!! + } + _IconsaxDirectboxReceive = ImageVector.Builder( + name = "IconsaxDirectboxReceive", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(14.79f, 4f) + horizontalLineTo(9.21f) + curveTo(4.79f, 4f, 4.79f, 6.35f, 4.79f, 8.42f) + verticalLineTo(12.21f) + curveTo(4.79f, 12.43f, 4.89f, 12.63f, 5.06f, 12.76f) + curveTo(5.23f, 12.89f, 5.46f, 12.94f, 5.67f, 12.88f) + curveTo(6.12f, 12.76f, 6.68f, 12.7f, 7.35f, 12.7f) + curveTo(8.02f, 12.7f, 8.16f, 12.78f, 8.56f, 13.08f) + lineTo(9.47f, 14.04f) + curveTo(10.12f, 14.74f, 11.05f, 15.14f, 12.01f, 15.14f) + curveTo(12.97f, 15.14f, 13.89f, 14.74f, 14.55f, 14.04f) + lineTo(15.46f, 13.08f) + curveTo(15.86f, 12.78f, 16f, 12.7f, 16.67f, 12.7f) + curveTo(17.34f, 12.7f, 17.9f, 12.76f, 18.35f, 12.88f) + curveTo(18.56f, 12.94f, 18.78f, 12.89f, 18.96f, 12.76f) + curveTo(19.13f, 12.63f, 19.23f, 12.42f, 19.23f, 12.21f) + verticalLineTo(8.42f) + curveTo(19.21f, 6.35f, 19.21f, 4f, 14.79f, 4f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(14.275f, 6.8f) + curveTo(14.015f, 6.54f, 13.585f, 6.54f, 13.325f, 6.8f) + lineTo(12.675f, 7.45f) + verticalLineTo(2.67f) + curveTo(12.675f, 2.3f, 12.365f, 2f, 11.995f, 2f) + curveTo(11.625f, 2f, 11.315f, 2.3f, 11.315f, 2.67f) + verticalLineTo(7.44f) + lineTo(10.675f, 6.8f) + curveTo(10.415f, 6.54f, 9.985f, 6.54f, 9.725f, 6.8f) + curveTo(9.465f, 7.06f, 9.465f, 7.49f, 9.725f, 7.75f) + lineTo(11.525f, 9.55f) + curveTo(11.535f, 9.56f, 11.535f, 9.56f, 11.545f, 9.56f) + curveTo(11.605f, 9.61f, 11.665f, 9.66f, 11.745f, 9.69f) + curveTo(11.825f, 9.72f, 11.915f, 9.74f, 12.005f, 9.74f) + curveTo(12.095f, 9.74f, 12.175f, 9.72f, 12.265f, 9.69f) + curveTo(12.345f, 9.66f, 12.425f, 9.61f, 12.485f, 9.54f) + lineTo(14.285f, 7.74f) + curveTo(14.535f, 7.49f, 14.535f, 7.06f, 14.275f, 6.8f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(18.69f, 11.531f) + curveTo(18.12f, 11.381f, 17.45f, 11.301f, 16.65f, 11.301f) + curveTo(15.54f, 11.301f, 15.13f, 11.571f, 14.56f, 12.001f) + curveTo(14.53f, 12.021f, 14.5f, 12.051f, 14.47f, 12.081f) + lineTo(13.52f, 13.091f) + curveTo(12.72f, 13.931f, 11.28f, 13.941f, 10.48f, 13.081f) + lineTo(9.53f, 12.081f) + curveTo(9.5f, 12.051f, 9.47f, 12.021f, 9.44f, 12.001f) + curveTo(8.87f, 11.571f, 8.46f, 11.301f, 7.35f, 11.301f) + curveTo(6.55f, 11.301f, 5.88f, 11.381f, 5.31f, 11.531f) + curveTo(2.93f, 12.171f, 2.93f, 14.061f, 2.93f, 15.721f) + verticalLineTo(16.651f) + curveTo(2.93f, 19.161f, 2.93f, 22.001f, 8.28f, 22.001f) + horizontalLineTo(15.72f) + curveTo(19.27f, 22.001f, 21.07f, 20.201f, 21.07f, 16.651f) + verticalLineTo(15.721f) + curveTo(21.07f, 14.061f, 21.07f, 12.171f, 18.69f, 11.531f) + close() + moveTo(14.33f, 18.401f) + horizontalLineTo(9.67f) + curveTo(9.29f, 18.401f, 8.98f, 18.091f, 8.98f, 17.701f) + curveTo(8.98f, 17.311f, 9.29f, 17.001f, 9.67f, 17.001f) + horizontalLineTo(14.33f) + curveTo(14.71f, 17.001f, 15.02f, 17.311f, 15.02f, 17.701f) + curveTo(15.02f, 18.091f, 14.71f, 18.401f, 14.33f, 18.401f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(15.02f, 17.7f) + curveTo(15.02f, 18.09f, 14.71f, 18.4f, 14.33f, 18.4f) + horizontalLineTo(9.67f) + curveTo(9.29f, 18.4f, 8.98f, 18.09f, 8.98f, 17.7f) + curveTo(8.98f, 17.31f, 9.29f, 17f, 9.67f, 17f) + horizontalLineTo(14.33f) + curveTo(14.71f, 17f, 15.02f, 17.31f, 15.02f, 17.7f) + close() + } + } + }.build() + + return _IconsaxDirectboxReceive!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxDirectboxReceive: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxDocumentText.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxDocumentText.kt new file mode 100644 index 00000000..f4889441 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxDocumentText.kt @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxDocumentText: ImageVector + get() { + if (_IconsaxDocumentText != null) { + return _IconsaxDocumentText!! + } + _IconsaxDocumentText = ImageVector.Builder( + name = "IconsaxDocumentText", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(20.5f, 10.19f) + horizontalLineTo(17.61f) + curveTo(15.24f, 10.19f, 13.31f, 8.26f, 13.31f, 5.89f) + verticalLineTo(3f) + curveTo(13.31f, 2.45f, 12.86f, 2f, 12.31f, 2f) + horizontalLineTo(8.07f) + curveTo(4.99f, 2f, 2.5f, 4f, 2.5f, 7.57f) + verticalLineTo(16.43f) + curveTo(2.5f, 20f, 4.99f, 22f, 8.07f, 22f) + horizontalLineTo(15.93f) + curveTo(19.01f, 22f, 21.5f, 20f, 21.5f, 16.43f) + verticalLineTo(11.19f) + curveTo(21.5f, 10.64f, 21.05f, 10.19f, 20.5f, 10.19f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.8f, 2.21f) + curveTo(15.39f, 1.8f, 14.68f, 2.08f, 14.68f, 2.65f) + verticalLineTo(6.14f) + curveTo(14.68f, 7.6f, 15.92f, 8.81f, 17.43f, 8.81f) + curveTo(18.38f, 8.82f, 19.7f, 8.82f, 20.83f, 8.82f) + curveTo(21.4f, 8.82f, 21.7f, 8.15f, 21.3f, 7.75f) + curveTo(19.86f, 6.3f, 17.28f, 3.69f, 15.8f, 2.21f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(13.5f, 13.75f) + horizontalLineTo(7.5f) + curveTo(7.09f, 13.75f, 6.75f, 13.41f, 6.75f, 13f) + curveTo(6.75f, 12.59f, 7.09f, 12.25f, 7.5f, 12.25f) + horizontalLineTo(13.5f) + curveTo(13.91f, 12.25f, 14.25f, 12.59f, 14.25f, 13f) + curveTo(14.25f, 13.41f, 13.91f, 13.75f, 13.5f, 13.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(11.5f, 17.75f) + horizontalLineTo(7.5f) + curveTo(7.09f, 17.75f, 6.75f, 17.41f, 6.75f, 17f) + curveTo(6.75f, 16.59f, 7.09f, 16.25f, 7.5f, 16.25f) + horizontalLineTo(11.5f) + curveTo(11.91f, 16.25f, 12.25f, 16.59f, 12.25f, 17f) + curveTo(12.25f, 17.41f, 11.91f, 17.75f, 11.5f, 17.75f) + close() + } + } + }.build() + + return _IconsaxDocumentText!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxDocumentText: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFilterSearch.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFilterSearch.kt new file mode 100644 index 00000000..427444a3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFilterSearch.kt @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxFilterSearch: ImageVector + get() { + if (_IconsaxFilterSearch != null) { + return _IconsaxFilterSearch!! + } + _IconsaxFilterSearch = ImageVector.Builder( + name = "IconsaxFilterSearch", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(19.75f, 15.41f) + lineTo(18.9f, 14.56f) + curveTo(19.34f, 13.89f, 19.6f, 13.1f, 19.6f, 12.24f) + curveTo(19.6f, 9.9f, 17.7f, 8f, 15.36f, 8f) + curveTo(13.02f, 8f, 11.12f, 9.9f, 11.12f, 12.24f) + curveTo(11.12f, 14.58f, 13.02f, 16.48f, 15.36f, 16.48f) + curveTo(16.22f, 16.48f, 17.02f, 16.22f, 17.68f, 15.78f) + lineTo(18.53f, 16.63f) + curveTo(18.7f, 16.8f, 18.92f, 16.88f, 19.14f, 16.88f) + curveTo(19.36f, 16.88f, 19.58f, 16.8f, 19.75f, 16.63f) + curveTo(20.08f, 16.29f, 20.08f, 15.74f, 19.75f, 15.41f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(5.41f, 2f) + horizontalLineTo(18.58f) + curveTo(19.68f, 2f, 20.58f, 2.91f, 20.58f, 4.02f) + verticalLineTo(6.24f) + curveTo(20.58f, 7.05f, 20.08f, 8.06f, 19.58f, 8.56f) + lineTo(15.29f, 12.4f) + curveTo(14.69f, 12.91f, 14.29f, 13.92f, 14.29f, 14.72f) + verticalLineTo(19.06f) + curveTo(14.29f, 19.67f, 13.89f, 20.47f, 13.39f, 20.78f) + lineTo(11.99f, 21.69f) + curveTo(10.69f, 22.5f, 8.9f, 21.59f, 8.9f, 19.97f) + verticalLineTo(14.62f) + curveTo(8.9f, 13.91f, 8.5f, 13f, 8.1f, 12.5f) + lineTo(4.31f, 8.46f) + curveTo(3.81f, 7.95f, 3.41f, 7.05f, 3.41f, 6.44f) + verticalLineTo(4.12f) + curveTo(3.42f, 2.91f, 4.32f, 2f, 5.41f, 2f) + close() + } + } + }.build() + + return _IconsaxFilterSearch!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxFilterSearch: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFolderOpen.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFolderOpen.kt new file mode 100644 index 00000000..0a21adbf --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFolderOpen.kt @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxFolderOpen: ImageVector + get() { + if (_IconsaxFolderOpen != null) { + return _IconsaxFolderOpen!! + } + _IconsaxFolderOpen = ImageVector.Builder( + name = "IconsaxFolderOpen", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f + ) { + moveTo(21.67f, 14.3f) + lineTo(21.27f, 19.3f) + curveTo(21.12f, 20.83f, 21f, 22f, 18.29f, 22f) + horizontalLineTo(5.71f) + curveTo(3f, 22f, 2.88f, 20.83f, 2.73f, 19.3f) + lineTo(2.33f, 14.3f) + curveTo(2.25f, 13.47f, 2.51f, 12.7f, 2.98f, 12.11f) + curveTo(2.99f, 12.1f, 2.99f, 12.1f, 3f, 12.09f) + curveTo(3.55f, 11.42f, 4.38f, 11f, 5.31f, 11f) + horizontalLineTo(18.69f) + curveTo(19.62f, 11f, 20.44f, 11.42f, 20.98f, 12.07f) + curveTo(20.99f, 12.08f, 21f, 12.09f, 21f, 12.1f) + curveTo(21.49f, 12.69f, 21.76f, 13.46f, 21.67f, 14.3f) + close() + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(3.5f, 11.43f) + verticalLineTo(6.28f) + curveTo(3.5f, 2.88f, 4.35f, 2.03f, 7.75f, 2.03f) + horizontalLineTo(9.02f) + curveTo(10.29f, 2.03f, 10.58f, 2.41f, 11.06f, 3.05f) + lineTo(12.33f, 4.75f) + curveTo(12.65f, 5.17f, 12.84f, 5.43f, 13.69f, 5.43f) + horizontalLineTo(16.24f) + curveTo(19.64f, 5.43f, 20.49f, 6.28f, 20.49f, 9.68f) + verticalLineTo(11.47f) + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(9.43f, 17f) + horizontalLineTo(14.57f) + } + } + }.build() + + return _IconsaxFolderOpen!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxFolderOpen: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFormatCircle.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFormatCircle.kt new file mode 100644 index 00000000..50211bc4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxFormatCircle.kt @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxFormatCircle: ImageVector + get() { + if (_IconsaxFormatCircle != null) { + return _IconsaxFormatCircle!! + } + _IconsaxFormatCircle = ImageVector.Builder( + name = "IconsaxFormatCircle", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(21.5f, 5.35f) + curveTo(21.5f, 6.26f, 21.07f, 7.07f, 20.41f, 7.59f) + curveTo(19.93f, 7.97f, 19.32f, 8.2f, 18.65f, 8.2f) + curveTo(17.07f, 8.2f, 15.8f, 6.93f, 15.8f, 5.35f) + curveTo(15.8f, 4.68f, 16.03f, 4.08f, 16.41f, 3.59f) + horizontalLineTo(16.42f) + curveTo(16.93f, 2.93f, 17.74f, 2.5f, 18.65f, 2.5f) + curveTo(20.23f, 2.5f, 21.5f, 3.77f, 21.5f, 5.35f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(8.2f, 5.35f) + curveTo(8.2f, 6.93f, 6.93f, 8.2f, 5.35f, 8.2f) + curveTo(4.68f, 8.2f, 4.08f, 7.97f, 3.59f, 7.59f) + curveTo(2.93f, 7.07f, 2.5f, 6.26f, 2.5f, 5.35f) + curveTo(2.5f, 3.77f, 3.77f, 2.5f, 5.35f, 2.5f) + curveTo(6.26f, 2.5f, 7.07f, 2.93f, 7.59f, 3.59f) + curveTo(7.97f, 4.08f, 8.2f, 4.68f, 8.2f, 5.35f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(21.5f, 18.651f) + curveTo(21.5f, 20.231f, 20.23f, 21.501f, 18.65f, 21.501f) + curveTo(17.74f, 21.501f, 16.93f, 21.071f, 16.42f, 20.411f) + horizontalLineTo(16.41f) + curveTo(16.03f, 19.931f, 15.8f, 19.321f, 15.8f, 18.651f) + curveTo(15.8f, 17.071f, 17.07f, 15.801f, 18.65f, 15.801f) + curveTo(19.32f, 15.801f, 19.92f, 16.031f, 20.41f, 16.411f) + verticalLineTo(16.421f) + curveTo(21.07f, 16.931f, 21.5f, 17.741f, 21.5f, 18.651f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(8.2f, 18.651f) + curveTo(8.2f, 19.321f, 7.97f, 19.921f, 7.59f, 20.411f) + curveTo(7.07f, 21.081f, 6.26f, 21.501f, 5.35f, 21.501f) + curveTo(3.77f, 21.501f, 2.5f, 20.231f, 2.5f, 18.651f) + curveTo(2.5f, 17.741f, 2.93f, 16.931f, 3.59f, 16.421f) + verticalLineTo(16.411f) + curveTo(4.07f, 16.031f, 4.68f, 15.801f, 5.35f, 15.801f) + curveTo(6.93f, 15.801f, 8.2f, 17.071f, 8.2f, 18.651f) + close() + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(21.5f, 12f) + curveTo(21.5f, 13.6f, 21.11f, 15.09f, 20.41f, 16.41f) + curveTo(19.93f, 16.03f, 19.32f, 15.8f, 18.65f, 15.8f) + curveTo(17.07f, 15.8f, 15.8f, 17.07f, 15.8f, 18.65f) + curveTo(15.8f, 19.32f, 16.03f, 19.92f, 16.41f, 20.41f) + curveTo(15.09f, 21.11f, 13.6f, 21.5f, 12f, 21.5f) + curveTo(10.41f, 21.5f, 8.91f, 21.11f, 7.59f, 20.41f) + curveTo(7.97f, 19.93f, 8.2f, 19.32f, 8.2f, 18.65f) + curveTo(8.2f, 17.07f, 6.93f, 15.8f, 5.35f, 15.8f) + curveTo(4.68f, 15.8f, 4.08f, 16.03f, 3.59f, 16.41f) + curveTo(2.89f, 15.09f, 2.5f, 13.6f, 2.5f, 12f) + curveTo(2.5f, 10.41f, 2.89f, 8.91f, 3.59f, 7.59f) + curveTo(4.08f, 7.97f, 4.68f, 8.2f, 5.35f, 8.2f) + curveTo(6.93f, 8.2f, 8.2f, 6.93f, 8.2f, 5.35f) + curveTo(8.2f, 4.68f, 7.97f, 4.08f, 7.59f, 3.59f) + curveTo(8.91f, 2.89f, 10.41f, 2.5f, 12f, 2.5f) + curveTo(13.6f, 2.5f, 15.09f, 2.89f, 16.41f, 3.59f) + curveTo(16.03f, 4.07f, 15.8f, 4.68f, 15.8f, 5.35f) + curveTo(15.8f, 6.93f, 17.07f, 8.2f, 18.65f, 8.2f) + curveTo(19.32f, 8.2f, 19.92f, 7.97f, 20.41f, 7.59f) + curveTo(21.11f, 8.91f, 21.5f, 10.41f, 21.5f, 12f) + close() + } + } + }.build() + + return _IconsaxFormatCircle!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxFormatCircle: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHeart.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHeart.kt new file mode 100644 index 00000000..4d07781b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHeart.kt @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxHeart: ImageVector + get() { + if (_IconsaxHeart != null) { + return _IconsaxHeart!! + } + _IconsaxHeart = ImageVector.Builder( + name = "IconsaxHeart", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(20.59f, 4.97f) + curveTo(21.47f, 5.96f, 22f, 7.26f, 22f, 8.69f) + curveTo(22f, 15.69f, 15.52f, 19.82f, 12.62f, 20.82f) + curveTo(12.28f, 20.94f, 11.72f, 20.94f, 11.38f, 20.82f) + curveTo(8.48f, 19.82f, 2f, 15.69f, 2f, 8.69f) + curveTo(2f, 5.6f, 4.49f, 3.1f, 7.56f, 3.1f) + curveTo(9.38f, 3.1f, 10.99f, 3.98f, 12f, 5.34f) + curveTo(13.01f, 3.98f, 14.63f, 3.1f, 16.44f, 3.1f) + } + } + }.build() + + return _IconsaxHeart!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxHeart: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHeart2.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHeart2.kt new file mode 100644 index 00000000..6a5877ff --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHeart2.kt @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxHeart2: ImageVector + get() { + if (_IconsaxHeart2 != null) { + return _IconsaxHeart2!! + } + _IconsaxHeart2 = ImageVector.Builder( + name = "IconsaxHeart2", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(16.44f, 3.1f) + curveTo(14.63f, 3.1f, 13.01f, 3.98f, 12f, 5.33f) + curveTo(10.99f, 3.98f, 9.37f, 3.1f, 7.56f, 3.1f) + curveTo(4.49f, 3.1f, 2f, 5.6f, 2f, 8.69f) + curveTo(2f, 9.88f, 2.19f, 10.98f, 2.52f, 12f) + curveTo(4.1f, 17f, 8.97f, 19.99f, 11.38f, 20.81f) + curveTo(11.72f, 20.93f, 12.28f, 20.93f, 12.62f, 20.81f) + curveTo(15.03f, 19.99f, 19.9f, 17f, 21.48f, 12f) + curveTo(21.81f, 10.98f, 22f, 9.88f, 22f, 8.69f) + curveTo(22f, 5.6f, 19.51f, 3.1f, 16.44f, 3.1f) + close() + } + } + }.build() + + return _IconsaxHeart2!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxHeart2: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHome.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHome.kt new file mode 100644 index 00000000..27f58c50 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHome.kt @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxHome: ImageVector + get() { + if (_IconsaxHome != null) { + return _IconsaxHome!! + } + _IconsaxHome = ImageVector.Builder( + name = "IconsaxHome", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(20.83f, 8.01f) + lineTo(14.28f, 2.77f) + curveTo(13f, 1.75f, 11f, 1.74f, 9.73f, 2.76f) + lineTo(3.18f, 8.01f) + curveTo(2.24f, 8.76f, 1.67f, 10.26f, 1.87f, 11.44f) + lineTo(3.13f, 18.98f) + curveTo(3.42f, 20.67f, 4.99f, 22f, 6.7f, 22f) + horizontalLineTo(17.3f) + curveTo(18.99f, 22f, 20.59f, 20.64f, 20.88f, 18.97f) + lineTo(22.14f, 11.43f) + curveTo(22.32f, 10.26f, 21.75f, 8.76f, 20.83f, 8.01f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 18.75f) + curveTo(11.59f, 18.75f, 11.25f, 18.41f, 11.25f, 18f) + verticalLineTo(15f) + curveTo(11.25f, 14.59f, 11.59f, 14.25f, 12f, 14.25f) + curveTo(12.41f, 14.25f, 12.75f, 14.59f, 12.75f, 15f) + verticalLineTo(18f) + curveTo(12.75f, 18.41f, 12.41f, 18.75f, 12f, 18.75f) + close() + } + } + }.build() + + return _IconsaxHome!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxHome: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHomeBroken.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHomeBroken.kt new file mode 100644 index 00000000..8081f558 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxHomeBroken.kt @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxHomeBroken: ImageVector + get() { + if (_IconsaxHomeBroken != null) { + return _IconsaxHomeBroken!! + } + _IconsaxHomeBroken = ImageVector.Builder( + name = "IconsaxHomeBroken", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12f, 18f) + verticalLineTo(15f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(20.64f, 19.24f) + curveTo(20.4f, 20.65f, 19.03f, 21.81f, 17.6f, 21.81f) + horizontalLineTo(6.4f) + curveTo(4.96f, 21.81f, 3.6f, 20.66f, 3.36f, 19.24f) + lineTo(2.03f, 11.28f) + curveTo(1.86f, 10.3f, 2.36f, 8.99f, 3.14f, 8.37f) + lineTo(10.07f, 2.82f) + curveTo(11.13f, 1.97f, 12.86f, 1.97f, 13.93f, 2.83f) + lineTo(20.86f, 8.37f) + curveTo(21.63f, 8.99f, 22.13f, 10.3f, 21.97f, 11.28f) + lineTo(21.35f, 15f) + } + } + }.build() + + return _IconsaxHomeBroken!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxHomeBroken: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxLanguageSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxLanguageSquare.kt new file mode 100644 index 00000000..7204461d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxLanguageSquare.kt @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxLanguageSquare: ImageVector + get() { + if (_IconsaxLanguageSquare != null) { + return _IconsaxLanguageSquare!! + } + _IconsaxLanguageSquare = ImageVector.Builder( + name = "IconsaxLanguageSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(16.99f, 8.96f) + horizontalLineTo(7.01f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12f, 7.28f) + verticalLineTo(8.96f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14.5f, 8.94f) + curveTo(14.5f, 13.24f, 11.14f, 16.72f, 7f, 16.72f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(17f, 16.72f) + curveTo(15.2f, 16.72f, 13.6f, 15.76f, 12.45f, 14.25f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(9f, 22f) + horizontalLineTo(15f) + curveTo(20f, 22f, 22f, 20f, 22f, 15f) + verticalLineTo(9f) + curveTo(22f, 4f, 20f, 2f, 15f, 2f) + horizontalLineTo(9f) + curveTo(4f, 2f, 2f, 4f, 2f, 9f) + verticalLineTo(15f) + curveTo(2f, 20f, 4f, 22f, 9f, 22f) + close() + } + } + }.build() + + return _IconsaxLanguageSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxLanguageSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxLocation.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxLocation.kt new file mode 100644 index 00000000..545e4726 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxLocation.kt @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxLocation: ImageVector + get() { + if (_IconsaxLocation != null) { + return _IconsaxLocation!! + } + _IconsaxLocation = ImageVector.Builder( + name = "IconsaxLocation", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(20.62f, 8.45f) + curveTo(19.57f, 3.83f, 15.54f, 1.75f, 12f, 1.75f) + curveTo(12f, 1.75f, 12f, 1.75f, 11.99f, 1.75f) + curveTo(8.46f, 1.75f, 4.42f, 3.82f, 3.37f, 8.44f) + curveTo(2.2f, 13.6f, 5.36f, 17.97f, 8.22f, 20.72f) + curveTo(9.28f, 21.74f, 10.64f, 22.25f, 12f, 22.25f) + curveTo(13.36f, 22.25f, 14.72f, 21.74f, 15.77f, 20.72f) + curveTo(18.63f, 17.97f, 21.79f, 13.61f, 20.62f, 8.45f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 13.46f) + curveTo(13.74f, 13.46f, 15.15f, 12.05f, 15.15f, 10.31f) + curveTo(15.15f, 8.57f, 13.74f, 7.16f, 12f, 7.16f) + curveTo(10.26f, 7.16f, 8.85f, 8.57f, 8.85f, 10.31f) + curveTo(8.85f, 12.05f, 10.26f, 13.46f, 12f, 13.46f) + close() + } + } + }.build() + + return _IconsaxLocation!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxLocation: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMagic.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMagic.kt new file mode 100644 index 00000000..14595f6f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMagic.kt @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMagic: ImageVector + get() { + if (_IconsaxMagic != null) { + return _IconsaxMagic!! + } + _IconsaxMagic = ImageVector.Builder( + name = "IconsaxMagic", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(7.999f, 16.11f) + lineTo(2.109f, 22f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(13.83f, 4.08f) + lineTo(15.55f, 4.77f) + curveTo(16f, 4.95f, 16f, 5.24f, 15.55f, 5.43f) + lineTo(13.83f, 6.12f) + lineTo(13.141f, 7.85f) + curveTo(12.96f, 8.28f, 12.66f, 8.28f, 12.481f, 7.85f) + lineTo(11.79f, 6.12f) + lineTo(10.071f, 5.43f) + curveTo(9.641f, 5.25f, 9.641f, 4.96f, 10.071f, 4.77f) + lineTo(11.79f, 4.08f) + lineTo(12.481f, 2.35f) + curveTo(12.66f, 1.89f, 12.96f, 1.89f, 13.141f, 2.35f) + lineTo(13.83f, 4.08f) + close() + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(20.34f, 9.15f) + lineTo(21.89f, 9.77f) + curveTo(22.291f, 9.93f, 22.291f, 10.2f, 21.89f, 10.36f) + lineTo(20.34f, 10.98f) + lineTo(19.721f, 12.53f) + curveTo(19.56f, 12.92f, 19.291f, 12.92f, 19.131f, 12.53f) + lineTo(18.51f, 10.98f) + lineTo(16.961f, 10.36f) + curveTo(16.57f, 10.2f, 16.57f, 9.93f, 16.961f, 9.77f) + lineTo(18.51f, 9.15f) + lineTo(19.131f, 7.6f) + curveTo(19.291f, 7.19f, 19.56f, 7.19f, 19.721f, 7.6f) + lineTo(20.34f, 9.15f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12.38f, 11.85f) + lineTo(13.71f, 12.38f) + curveTo(14.06f, 12.52f, 14.06f, 12.75f, 13.71f, 12.89f) + lineTo(12.38f, 13.42f) + lineTo(11.85f, 14.75f) + curveTo(11.71f, 15.09f, 11.48f, 15.09f, 11.34f, 14.75f) + lineTo(10.81f, 13.42f) + lineTo(9.48f, 12.89f) + curveTo(9.15f, 12.75f, 9.15f, 12.52f, 9.48f, 12.38f) + lineTo(10.81f, 11.85f) + lineTo(11.34f, 10.52f) + curveTo(11.48f, 10.17f, 11.71f, 10.17f, 11.85f, 10.52f) + lineTo(12.38f, 11.85f) + close() + } + } + }.build() + + return _IconsaxMagic!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMagic: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMinusSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMinusSquare.kt new file mode 100644 index 00000000..22a9de81 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMinusSquare.kt @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMinusSquare: ImageVector + get() { + if (_IconsaxMinusSquare != null) { + return _IconsaxMinusSquare!! + } + _IconsaxMinusSquare = ImageVector.Builder( + name = "IconsaxMinusSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.19f, 2f) + horizontalLineTo(7.81f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.83f, 4.17f, 22f, 7.81f, 22f) + horizontalLineTo(16.18f) + curveTo(19.82f, 22f, 21.99f, 19.83f, 21.99f, 16.19f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(16f, 12.75f) + horizontalLineTo(8f) + curveTo(7.59f, 12.75f, 7.25f, 12.41f, 7.25f, 12f) + curveTo(7.25f, 11.59f, 7.59f, 11.25f, 8f, 11.25f) + horizontalLineTo(16f) + curveTo(16.41f, 11.25f, 16.75f, 11.59f, 16.75f, 12f) + curveTo(16.75f, 12.41f, 16.41f, 12.75f, 16f, 12.75f) + close() + } + } + }.build() + + return _IconsaxMinusSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMinusSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMoon.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMoon.kt new file mode 100644 index 00000000..a9dd219e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMoon.kt @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMoon: ImageVector + get() { + if (_IconsaxMoon != null) { + return _IconsaxMoon!! + } + _IconsaxMoon = ImageVector.Builder( + name = "IconsaxMoon", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(9f, 19f) + curveTo(9f, 19.84f, 9.13f, 20.66f, 9.37f, 21.42f) + curveTo(5.53f, 20.09f, 2.63f, 16.56f, 2.33f, 12.43f) + curveTo(2.03f, 8.04f, 4.56f, 3.94f, 8.65f, 2.22f) + curveTo(9.71f, 1.78f, 10.25f, 2.1f, 10.48f, 2.33f) + curveTo(10.7f, 2.55f, 11.01f, 3.08f, 10.57f, 4.09f) + curveTo(10.12f, 5.13f, 9.9f, 6.23f, 9.9f, 7.37f) + curveTo(9.91f, 9.41f, 10.71f, 11.3f, 12.01f, 12.75f) + curveTo(10.18f, 14.21f, 9f, 16.47f, 9f, 19f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(21.21f, 17.72f) + curveTo(19.23f, 20.41f, 16.09f, 21.99f, 12.74f, 21.99f) + curveTo(12.58f, 21.99f, 12.42f, 21.98f, 12.26f, 21.97f) + curveTo(11.26f, 21.93f, 10.29f, 21.74f, 9.37f, 21.42f) + curveTo(9.13f, 20.66f, 9f, 19.84f, 9f, 19f) + curveTo(9f, 16.47f, 10.18f, 14.21f, 12.01f, 12.75f) + curveTo(13.48f, 14.4f, 15.59f, 15.47f, 17.92f, 15.57f) + curveTo(18.55f, 15.6f, 19.18f, 15.55f, 19.8f, 15.44f) + curveTo(20.92f, 15.24f, 21.37f, 15.66f, 21.53f, 15.93f) + curveTo(21.7f, 16.2f, 21.88f, 16.79f, 21.21f, 17.72f) + close() + } + } + }.build() + + return _IconsaxMoon!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMoon: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusic.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusic.kt new file mode 100644 index 00000000..703de396 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusic.kt @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusic: ImageVector + get() { + if (_IconsaxMusic != null) { + return _IconsaxMusic!! + } + _IconsaxMusic = ImageVector.Builder( + name = "IconsaxMusic", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(10.29f, 10.34f) + verticalLineTo(18.41f) + curveTo(10.29f, 20.39f, 8.67f, 22f, 6.7f, 22f) + curveTo(4.72f, 22f, 3.11f, 20.39f, 3.11f, 18.41f) + curveTo(3.11f, 16.44f, 4.72f, 14.83f, 6.7f, 14.83f) + curveTo(7.53f, 14.83f, 8.28f, 15.12f, 8.89f, 15.59f) + verticalLineTo(10.74f) + lineTo(10.29f, 10.34f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(20.89f, 7.32f) + verticalLineTo(16.48f) + curveTo(20.89f, 18.46f, 19.28f, 20.07f, 17.3f, 20.07f) + curveTo(15.33f, 20.07f, 13.71f, 18.46f, 13.71f, 16.48f) + curveTo(13.71f, 14.51f, 15.33f, 12.9f, 17.3f, 12.9f) + curveTo(18.14f, 12.9f, 18.89f, 13.19f, 19.5f, 13.67f) + verticalLineTo(7.72f) + lineTo(20.89f, 7.32f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(20.89f, 5.18f) + verticalLineTo(7.32f) + lineTo(8.89f, 10.74f) + verticalLineTo(6.75f) + curveTo(8.89f, 5.28f, 9.78f, 4.14f, 11.19f, 3.76f) + lineTo(16.97f, 2.18f) + curveTo(18.14f, 1.86f, 19.13f, 1.97f, 19.83f, 2.51f) + curveTo(20.54f, 3.04f, 20.89f, 3.94f, 20.89f, 5.18f) + close() + } + } + }.build() + + return _IconsaxMusic!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusic: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicCircle.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicCircle.kt new file mode 100644 index 00000000..2d157fcd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicCircle.kt @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicCircle: ImageVector + get() { + if (_IconsaxMusicCircle != null) { + return _IconsaxMusicCircle!! + } + _IconsaxMusicCircle = ImageVector.Builder( + name = "IconsaxMusicCircle", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(2.58f, 9.42f) + curveTo(2.5f, 9.42f, 2.41f, 9.41f, 2.33f, 9.38f) + curveTo(1.94f, 9.24f, 1.74f, 8.81f, 1.87f, 8.42f) + curveTo(2.54f, 6.54f, 3.7f, 4.89f, 5.25f, 3.64f) + curveTo(5.57f, 3.38f, 6.04f, 3.43f, 6.3f, 3.75f) + curveTo(6.56f, 4.07f, 6.51f, 4.54f, 6.19f, 4.81f) + curveTo(4.87f, 5.88f, 3.86f, 7.3f, 3.29f, 8.92f) + curveTo(3.18f, 9.23f, 2.89f, 9.42f, 2.58f, 9.42f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(2.58f, 16.08f) + curveTo(2.27f, 16.08f, 1.98f, 15.89f, 1.87f, 15.58f) + curveTo(1.46f, 14.42f, 1.25f, 13.21f, 1.25f, 12f) + curveTo(1.25f, 11.59f, 1.59f, 11.25f, 2f, 11.25f) + curveTo(2.41f, 11.25f, 2.75f, 11.59f, 2.75f, 12f) + curveTo(2.75f, 13.04f, 2.93f, 14.08f, 3.29f, 15.08f) + curveTo(3.43f, 15.47f, 3.22f, 15.9f, 2.83f, 16.04f) + curveTo(2.75f, 16.07f, 2.66f, 16.08f, 2.58f, 16.08f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 22.75f) + curveTo(10.94f, 22.75f, 9.89f, 22.59f, 8.87f, 22.28f) + curveTo(8.47f, 22.16f, 8.25f, 21.74f, 8.37f, 21.34f) + curveTo(8.49f, 20.94f, 8.91f, 20.72f, 9.31f, 20.84f) + curveTo(10.18f, 21.11f, 11.09f, 21.24f, 12f, 21.24f) + curveTo(17.1f, 21.24f, 21.25f, 17.09f, 21.25f, 11.99f) + curveTo(21.25f, 11.47f, 21.2f, 10.93f, 21.1f, 10.36f) + curveTo(21.03f, 9.95f, 21.3f, 9.56f, 21.71f, 9.49f) + curveTo(22.11f, 9.42f, 22.51f, 9.69f, 22.58f, 10.1f) + curveTo(22.7f, 10.76f, 22.76f, 11.38f, 22.76f, 12f) + curveTo(22.75f, 17.93f, 17.93f, 22.75f, 12f, 22.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(5.72f, 20.5f) + curveTo(5.55f, 20.5f, 5.39f, 20.45f, 5.25f, 20.33f) + curveTo(4.68f, 19.87f, 4.22f, 19.43f, 3.83f, 18.98f) + curveTo(3.56f, 18.67f, 3.6f, 18.19f, 3.91f, 17.92f) + curveTo(4.23f, 17.65f, 4.7f, 17.69f, 4.97f, 18f) + curveTo(5.3f, 18.38f, 5.7f, 18.76f, 6.19f, 19.16f) + curveTo(6.51f, 19.42f, 6.56f, 19.89f, 6.3f, 20.21f) + curveTo(6.16f, 20.4f, 5.94f, 20.5f, 5.72f, 20.5f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(20.24f, 7.09f) + curveTo(20f, 7.09f, 19.77f, 6.98f, 19.62f, 6.76f) + curveTo(17.9f, 4.25f, 15.04f, 2.75f, 12f, 2.75f) + curveTo(11.09f, 2.75f, 10.18f, 2.88f, 9.31f, 3.15f) + curveTo(8.92f, 3.27f, 8.5f, 3.05f, 8.37f, 2.65f) + curveTo(8.24f, 2.25f, 8.47f, 1.83f, 8.87f, 1.71f) + curveTo(9.89f, 1.41f, 10.94f, 1.25f, 12f, 1.25f) + curveTo(15.54f, 1.25f, 18.85f, 3f, 20.86f, 5.92f) + curveTo(21.09f, 6.26f, 21.01f, 6.73f, 20.67f, 6.96f) + curveTo(20.54f, 7.05f, 20.39f, 7.09f, 20.24f, 7.09f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(16.03f, 6.5f) + curveTo(15.7f, 6.25f, 15.1f, 6f, 14.14f, 6.26f) + lineTo(10.95f, 7.12f) + curveTo(10.03f, 7.38f, 9.43f, 8.16f, 9.43f, 9.12f) + verticalLineTo(10.76f) + verticalLineTo(13.34f) + curveTo(9.17f, 13.241f, 8.89f, 13.181f, 8.59f, 13.181f) + curveTo(7.3f, 13.181f, 6.25f, 14.231f, 6.25f, 15.521f) + curveTo(6.25f, 16.81f, 7.3f, 17.861f, 8.59f, 17.861f) + curveTo(9.87f, 17.861f, 10.9f, 16.83f, 10.92f, 15.561f) + curveTo(10.92f, 15.55f, 10.93f, 15.54f, 10.93f, 15.521f) + verticalLineTo(11.33f) + lineTo(15.25f, 10.151f) + verticalLineTo(12.281f) + curveTo(14.99f, 12.181f, 14.71f, 12.12f, 14.41f, 12.12f) + curveTo(13.12f, 12.12f, 12.07f, 13.17f, 12.07f, 14.46f) + curveTo(12.07f, 15.75f, 13.12f, 16.801f, 14.41f, 16.801f) + curveTo(15.7f, 16.801f, 16.75f, 15.75f, 16.75f, 14.46f) + verticalLineTo(9.17f) + verticalLineTo(8.25f) + curveTo(16.75f, 7.45f, 16.51f, 6.86f, 16.03f, 6.5f) + close() + moveTo(8.59f, 16.361f) + curveTo(8.13f, 16.361f, 7.75f, 15.981f, 7.75f, 15.521f) + curveTo(7.75f, 15.061f, 8.13f, 14.681f, 8.59f, 14.681f) + curveTo(9.05f, 14.681f, 9.43f, 15.061f, 9.43f, 15.521f) + curveTo(9.43f, 15.981f, 9.05f, 16.361f, 8.59f, 16.361f) + close() + moveTo(14.41f, 15.3f) + curveTo(13.95f, 15.3f, 13.57f, 14.92f, 13.57f, 14.46f) + curveTo(13.57f, 14f, 13.95f, 13.62f, 14.41f, 13.62f) + curveTo(14.87f, 13.62f, 15.25f, 14f, 15.25f, 14.46f) + curveTo(15.25f, 14.92f, 14.87f, 15.3f, 14.41f, 15.3f) + close() + } + } + }.build() + + return _IconsaxMusicCircle!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicCircle: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicDashboard.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicDashboard.kt new file mode 100644 index 00000000..8591e793 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicDashboard.kt @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicDashboard: ImageVector + get() { + if (_IconsaxMusicDashboard != null) { + return _IconsaxMusicDashboard!! + } + _IconsaxMusicDashboard = ImageVector.Builder( + name = "IconsaxMusicDashboard", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(7f, 2.05f) + verticalLineTo(21.95f) + curveTo(3.85f, 21.66f, 2f, 19.55f, 2f, 16.19f) + verticalLineTo(7.81f) + curveTo(2f, 4.45f, 3.85f, 2.34f, 7f, 2.05f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(22f, 7.81f) + verticalLineTo(16.19f) + curveTo(22f, 19.83f, 19.83f, 22f, 16.19f, 22f) + horizontalLineTo(7.81f) + curveTo(7.53f, 22f, 7.26f, 21.99f, 7f, 21.95f) + verticalLineTo(2.05f) + curveTo(7.26f, 2.01f, 7.53f, 2f, 7.81f, 2f) + horizontalLineTo(16.19f) + curveTo(19.83f, 2f, 22f, 4.17f, 22f, 7.81f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(18.49f, 6.8f) + curveTo(18.17f, 6.55f, 17.59f, 6.31f, 16.67f, 6.56f) + lineTo(13.69f, 7.38f) + curveTo(12.8f, 7.61f, 12.22f, 8.36f, 12.22f, 9.3f) + verticalLineTo(11.05f) + verticalLineTo(13.21f) + curveTo(11.99f, 13.13f, 11.74f, 13.07f, 11.48f, 13.07f) + curveTo(10.24f, 13.07f, 9.24f, 14.08f, 9.24f, 15.31f) + curveTo(9.24f, 16.54f, 10.25f, 17.55f, 11.48f, 17.55f) + curveTo(12.7f, 17.55f, 13.7f, 16.56f, 13.72f, 15.35f) + curveTo(13.72f, 15.34f, 13.73f, 15.33f, 13.73f, 15.32f) + verticalLineTo(11.62f) + lineTo(17.7f, 10.54f) + verticalLineTo(12.22f) + curveTo(17.47f, 12.14f, 17.22f, 12.08f, 16.95f, 12.08f) + curveTo(15.71f, 12.08f, 14.71f, 13.09f, 14.71f, 14.32f) + curveTo(14.71f, 15.56f, 15.72f, 16.56f, 16.95f, 16.56f) + curveTo(18.17f, 16.56f, 19.17f, 15.57f, 19.19f, 14.35f) + curveTo(19.19f, 14.34f, 19.2f, 14.33f, 19.2f, 14.31f) + verticalLineTo(9.55f) + verticalLineTo(8.48f) + curveTo(19.18f, 7.72f, 18.95f, 7.16f, 18.49f, 6.8f) + close() + moveTo(11.47f, 16.05f) + curveTo(11.06f, 16.05f, 10.73f, 15.72f, 10.73f, 15.31f) + curveTo(10.73f, 14.9f, 11.06f, 14.57f, 11.47f, 14.57f) + curveTo(11.88f, 14.57f, 12.21f, 14.9f, 12.21f, 15.31f) + curveTo(12.21f, 15.72f, 11.87f, 16.05f, 11.47f, 16.05f) + close() + moveTo(16.93f, 15.05f) + curveTo(16.52f, 15.05f, 16.19f, 14.72f, 16.19f, 14.31f) + curveTo(16.19f, 13.9f, 16.52f, 13.57f, 16.93f, 13.57f) + curveTo(17.34f, 13.57f, 17.67f, 13.9f, 17.67f, 14.31f) + curveTo(17.67f, 14.72f, 17.34f, 15.05f, 16.93f, 15.05f) + close() + } + } + }.build() + + return _IconsaxMusicDashboard!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicDashboard: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicFilter.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicFilter.kt new file mode 100644 index 00000000..1192dffa --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicFilter.kt @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicFilter: ImageVector + get() { + if (_IconsaxMusicFilter != null) { + return _IconsaxMusicFilter!! + } + _IconsaxMusicFilter = ImageVector.Builder( + name = "IconsaxMusicFilter", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(22f, 3.75f) + horizontalLineTo(2f) + curveTo(1.59f, 3.75f, 1.25f, 3.41f, 1.25f, 3f) + curveTo(1.25f, 2.59f, 1.59f, 2.25f, 2f, 2.25f) + horizontalLineTo(22f) + curveTo(22.41f, 2.25f, 22.75f, 2.59f, 22.75f, 3f) + curveTo(22.75f, 3.41f, 22.41f, 3.75f, 22f, 3.75f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(11f, 9.75f) + horizontalLineTo(2f) + curveTo(1.59f, 9.75f, 1.25f, 9.41f, 1.25f, 9f) + curveTo(1.25f, 8.59f, 1.59f, 8.25f, 2f, 8.25f) + horizontalLineTo(11f) + curveTo(11.41f, 8.25f, 11.75f, 8.59f, 11.75f, 9f) + curveTo(11.75f, 9.41f, 11.41f, 9.75f, 11f, 9.75f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(8f, 15.75f) + horizontalLineTo(2f) + curveTo(1.59f, 15.75f, 1.25f, 15.41f, 1.25f, 15f) + curveTo(1.25f, 14.59f, 1.59f, 14.25f, 2f, 14.25f) + horizontalLineTo(8f) + curveTo(8.41f, 14.25f, 8.75f, 14.59f, 8.75f, 15f) + curveTo(8.75f, 15.41f, 8.41f, 15.75f, 8f, 15.75f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(6f, 21.75f) + horizontalLineTo(2f) + curveTo(1.59f, 21.75f, 1.25f, 21.41f, 1.25f, 21f) + curveTo(1.25f, 20.59f, 1.59f, 20.25f, 2f, 20.25f) + horizontalLineTo(6f) + curveTo(6.41f, 20.25f, 6.75f, 20.59f, 6.75f, 21f) + curveTo(6.75f, 21.41f, 6.41f, 21.75f, 6f, 21.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(21.86f, 7.68f) + curveTo(21.27f, 7.23f, 20.46f, 7.14f, 19.51f, 7.4f) + lineTo(15.16f, 8.58f) + curveTo(13.99f, 8.9f, 13.27f, 9.85f, 13.27f, 11.05f) + verticalLineTo(13.6f) + verticalLineTo(17.28f) + curveTo(12.85f, 17.04f, 12.36f, 16.89f, 11.84f, 16.89f) + curveTo(10.23f, 16.89f, 8.91f, 18.2f, 8.91f, 19.82f) + curveTo(8.91f, 21.43f, 10.22f, 22.75f, 11.84f, 22.75f) + curveTo(13.46f, 22.75f, 14.77f, 21.44f, 14.77f, 19.82f) + verticalLineTo(14.17f) + lineTo(21.25f, 12.4f) + verticalLineTo(15.83f) + curveTo(20.83f, 15.59f, 20.34f, 15.44f, 19.82f, 15.44f) + curveTo(18.21f, 15.44f, 16.89f, 16.75f, 16.89f, 18.37f) + curveTo(16.89f, 19.98f, 18.2f, 21.3f, 19.82f, 21.3f) + curveTo(21.44f, 21.3f, 22.75f, 19.99f, 22.75f, 18.37f) + verticalLineTo(11.42f) + verticalLineTo(9.87f) + curveTo(22.75f, 8.86f, 22.45f, 8.12f, 21.86f, 7.68f) + close() + moveTo(11.84f, 21.25f) + curveTo(11.05f, 21.25f, 10.41f, 20.61f, 10.41f, 19.82f) + curveTo(10.41f, 19.03f, 11.05f, 18.39f, 11.84f, 18.39f) + curveTo(12.63f, 18.39f, 13.27f, 19.03f, 13.27f, 19.82f) + curveTo(13.27f, 20.61f, 12.63f, 21.25f, 11.84f, 21.25f) + close() + moveTo(19.82f, 19.8f) + curveTo(19.03f, 19.8f, 18.39f, 19.16f, 18.39f, 18.37f) + curveTo(18.39f, 17.58f, 19.03f, 16.94f, 19.82f, 16.94f) + curveTo(20.61f, 16.94f, 21.25f, 17.58f, 21.25f, 18.37f) + curveTo(21.25f, 19.16f, 20.61f, 19.8f, 19.82f, 19.8f) + close() + } + } + }.build() + + return _IconsaxMusicFilter!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicFilter: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicLibrary.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicLibrary.kt new file mode 100644 index 00000000..37cb9576 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicLibrary.kt @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicLibrary: ImageVector + get() { + if (_IconsaxMusicLibrary != null) { + return _IconsaxMusicLibrary!! + } + _IconsaxMusicLibrary = ImageVector.Builder( + name = "IconsaxMusicLibrary", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(19f, 7f) + verticalLineTo(8.13f) + curveTo(18.68f, 8.04f, 18.35f, 8f, 18f, 8f) + horizontalLineTo(6f) + curveTo(5.65f, 8f, 5.32f, 8.04f, 5f, 8.13f) + verticalLineTo(7f) + curveTo(5f, 5.9f, 5.9f, 5f, 7f, 5f) + horizontalLineTo(17f) + curveTo(18.1f, 5f, 19f, 5.9f, 19f, 7f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16f, 3.51f) + verticalLineTo(5f) + horizontalLineTo(8f) + verticalLineTo(3.51f) + curveTo(8f, 2.68f, 8.68f, 2f, 9.51f, 2f) + horizontalLineTo(14.49f) + curveTo(15.32f, 2f, 16f, 2.68f, 16f, 3.51f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(22f, 12f) + verticalLineTo(18f) + curveTo(22f, 20.2f, 20.2f, 22f, 18f, 22f) + horizontalLineTo(6f) + curveTo(3.8f, 22f, 2f, 20.2f, 2f, 18f) + verticalLineTo(12f) + curveTo(2f, 10.15f, 3.28f, 8.58f, 5f, 8.13f) + curveTo(5.32f, 8.04f, 5.65f, 8f, 6f, 8f) + horizontalLineTo(18f) + curveTo(18.35f, 8f, 18.68f, 8.04f, 19f, 8.13f) + curveTo(20.72f, 8.58f, 22f, 10.15f, 22f, 12f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.35f, 10.51f) + curveTo(15.05f, 10.28f, 14.51f, 10.06f, 13.66f, 10.29f) + lineTo(11.01f, 11.02f) + curveTo(10.18f, 11.24f, 9.65f, 11.94f, 9.65f, 12.8f) + verticalLineTo(14.35f) + verticalLineTo(16.15f) + curveTo(9.47f, 16.1f, 9.27f, 16.06f, 9.07f, 16.06f) + curveTo(7.93f, 16.06f, 7f, 16.99f, 7f, 18.13f) + curveTo(7f, 19.27f, 7.93f, 20.2f, 9.07f, 20.2f) + curveTo(10.21f, 20.2f, 11.13f, 19.28f, 11.14f, 18.15f) + curveTo(11.14f, 18.14f, 11.15f, 18.13f, 11.15f, 18.12f) + verticalLineTo(14.91f) + lineTo(14.5f, 14f) + verticalLineTo(15.26f) + curveTo(14.32f, 15.21f, 14.13f, 15.17f, 13.93f, 15.17f) + curveTo(12.79f, 15.17f, 11.86f, 16.1f, 11.86f, 17.24f) + curveTo(11.86f, 18.38f, 12.79f, 19.31f, 13.93f, 19.31f) + curveTo(15.07f, 19.31f, 16f, 18.38f, 16f, 17.24f) + verticalLineTo(13.02f) + verticalLineTo(12.07f) + curveTo(16f, 11.2f, 15.64f, 10.74f, 15.35f, 10.51f) + close() + moveTo(9.07f, 18.71f) + curveTo(8.75f, 18.71f, 8.5f, 18.45f, 8.5f, 18.14f) + curveTo(8.5f, 17.83f, 8.76f, 17.57f, 9.07f, 17.57f) + curveTo(9.38f, 17.57f, 9.64f, 17.83f, 9.64f, 18.14f) + curveTo(9.64f, 18.45f, 9.39f, 18.71f, 9.07f, 18.71f) + close() + moveTo(13.93f, 17.82f) + curveTo(13.61f, 17.82f, 13.36f, 17.56f, 13.36f, 17.25f) + curveTo(13.36f, 16.94f, 13.62f, 16.68f, 13.93f, 16.68f) + curveTo(14.24f, 16.68f, 14.5f, 16.94f, 14.5f, 17.25f) + curveTo(14.5f, 17.56f, 14.24f, 17.82f, 13.93f, 17.82f) + close() + } + } + }.build() + + return _IconsaxMusicLibrary!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicLibrary: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicLibraryOutline.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicLibraryOutline.kt new file mode 100644 index 00000000..75726088 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicLibraryOutline.kt @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicLibraryOutline: ImageVector + get() { + if (_IconsaxMusicLibraryOutline != null) { + return _IconsaxMusicLibraryOutline!! + } + _IconsaxMusicLibraryOutline = ImageVector.Builder( + name = "IconsaxMusicLibraryOutline", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(22f, 13f) + verticalLineTo(17f) + curveTo(22f, 20.5f, 20f, 22f, 17f, 22f) + horizontalLineTo(7f) + curveTo(4f, 22f, 2f, 20.5f, 2f, 17f) + verticalLineTo(13f) + curveTo(2f, 10.35f, 3.15f, 8.85f, 5f, 8.28f) + curveTo(5.6f, 8.09f, 6.27f, 8f, 7f, 8f) + horizontalLineTo(17f) + curveTo(17.73f, 8f, 18.4f, 8.09f, 19f, 8.28f) + curveTo(20.85f, 8.85f, 22f, 10.35f, 22f, 13f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(19f, 7f) + verticalLineTo(8.28f) + curveTo(18.4f, 8.09f, 17.73f, 8f, 17f, 8f) + horizontalLineTo(7f) + curveTo(6.27f, 8f, 5.6f, 8.09f, 5f, 8.28f) + verticalLineTo(7f) + curveTo(5f, 5.9f, 5.9f, 5f, 7f, 5f) + horizontalLineTo(17f) + curveTo(18.1f, 5f, 19f, 5.9f, 19f, 7f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(16f, 3.51f) + verticalLineTo(5f) + horizontalLineTo(8f) + verticalLineTo(3.51f) + curveTo(8f, 2.68f, 8.68f, 2f, 9.51f, 2f) + horizontalLineTo(14.49f) + curveTo(15.32f, 2f, 16f, 2.68f, 16f, 3.51f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(9.07f, 19.451f) + curveTo(9.799f, 19.451f, 10.39f, 18.86f, 10.39f, 18.131f) + curveTo(10.39f, 17.402f, 9.799f, 16.81f, 9.07f, 16.81f) + curveTo(8.341f, 16.81f, 7.75f, 17.402f, 7.75f, 18.131f) + curveTo(7.75f, 18.86f, 8.341f, 19.451f, 9.07f, 19.451f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(15.25f, 17.25f) + verticalLineTo(12.08f) + curveTo(15.25f, 10.98f, 14.56f, 10.82f, 13.86f, 11.02f) + lineTo(11.21f, 11.74f) + curveTo(10.73f, 11.87f, 10.4f, 12.25f, 10.4f, 12.8f) + verticalLineTo(13.72f) + verticalLineTo(14.34f) + verticalLineTo(18.13f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(13.93f, 18.57f) + curveTo(14.659f, 18.57f, 15.25f, 17.979f, 15.25f, 17.25f) + curveTo(15.25f, 16.521f, 14.659f, 15.93f, 13.93f, 15.93f) + curveTo(13.201f, 15.93f, 12.61f, 16.521f, 12.61f, 17.25f) + curveTo(12.61f, 17.979f, 13.201f, 18.57f, 13.93f, 18.57f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(10.4f, 14.35f) + lineTo(15.25f, 13.03f) + } + } + }.build() + + return _IconsaxMusicLibraryOutline!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicLibraryOutline: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicPlaylist.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicPlaylist.kt new file mode 100644 index 00000000..d8f043e1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicPlaylist.kt @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicPlaylist: ImageVector + get() { + if (_IconsaxMusicPlaylist != null) { + return _IconsaxMusicPlaylist!! + } + _IconsaxMusicPlaylist = ImageVector.Builder( + name = "IconsaxMusicPlaylist", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(18f, 5.25f) + horizontalLineTo(6f) + curveTo(5.59f, 5.25f, 5.25f, 4.91f, 5.25f, 4.5f) + curveTo(5.25f, 4.09f, 5.59f, 3.75f, 6f, 3.75f) + horizontalLineTo(18f) + curveTo(18.41f, 3.75f, 18.75f, 4.09f, 18.75f, 4.5f) + curveTo(18.75f, 4.91f, 18.41f, 5.25f, 18f, 5.25f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15f, 2.75f) + horizontalLineTo(9f) + curveTo(8.59f, 2.75f, 8.25f, 2.41f, 8.25f, 2f) + curveTo(8.25f, 1.59f, 8.59f, 1.25f, 9f, 1.25f) + horizontalLineTo(15f) + curveTo(15.41f, 1.25f, 15.75f, 1.59f, 15.75f, 2f) + curveTo(15.75f, 2.41f, 15.41f, 2.75f, 15f, 2.75f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(18f, 7f) + horizontalLineTo(6f) + curveTo(3.8f, 7f, 2f, 8.8f, 2f, 11f) + verticalLineTo(18f) + curveTo(2f, 20.2f, 3.8f, 22f, 6f, 22f) + horizontalLineTo(18f) + curveTo(20.2f, 22f, 22f, 20.2f, 22f, 18f) + verticalLineTo(11f) + curveTo(22f, 8.8f, 20.2f, 7f, 18f, 7f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.37f, 9.89f) + curveTo(15.07f, 9.65f, 14.52f, 9.42f, 13.64f, 9.65f) + lineTo(10.91f, 10.4f) + curveTo(10.06f, 10.62f, 9.51f, 11.34f, 9.51f, 12.23f) + verticalLineTo(13.83f) + verticalLineTo(15.73f) + curveTo(9.31f, 15.67f, 9.11f, 15.63f, 8.89f, 15.63f) + curveTo(7.72f, 15.63f, 6.77f, 16.58f, 6.77f, 17.75f) + curveTo(6.77f, 18.92f, 7.72f, 19.87f, 8.89f, 19.87f) + curveTo(10.06f, 19.87f, 11.01f, 18.92f, 11.01f, 17.75f) + verticalLineTo(17.74f) + verticalLineTo(14.41f) + lineTo(14.53f, 13.45f) + verticalLineTo(14.82f) + curveTo(14.33f, 14.76f, 14.13f, 14.72f, 13.91f, 14.72f) + curveTo(12.74f, 14.72f, 11.79f, 15.67f, 11.79f, 16.84f) + curveTo(11.79f, 18.01f, 12.74f, 18.96f, 13.91f, 18.96f) + curveTo(15.06f, 18.96f, 16f, 18.04f, 16.02f, 16.89f) + curveTo(16.02f, 16.87f, 16.03f, 16.86f, 16.03f, 16.84f) + verticalLineTo(12.47f) + verticalLineTo(11.49f) + curveTo(16.03f, 10.59f, 15.67f, 10.12f, 15.37f, 9.89f) + close() + moveTo(8.89f, 18.36f) + curveTo(8.55f, 18.36f, 8.27f, 18.08f, 8.27f, 17.74f) + curveTo(8.27f, 17.4f, 8.55f, 17.12f, 8.89f, 17.12f) + curveTo(9.23f, 17.12f, 9.5f, 17.39f, 9.51f, 17.73f) + curveTo(9.51f, 18.08f, 9.23f, 18.36f, 8.89f, 18.36f) + close() + moveTo(13.91f, 17.45f) + curveTo(13.57f, 17.45f, 13.29f, 17.17f, 13.29f, 16.83f) + curveTo(13.29f, 16.49f, 13.57f, 16.21f, 13.91f, 16.21f) + curveTo(14.25f, 16.21f, 14.53f, 16.49f, 14.53f, 16.83f) + curveTo(14.53f, 17.17f, 14.25f, 17.45f, 13.91f, 17.45f) + close() + } + } + }.build() + + return _IconsaxMusicPlaylist!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicPlaylist: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicSquareRemove.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicSquareRemove.kt new file mode 100644 index 00000000..d84c6d19 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxMusicSquareRemove.kt @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxMusicSquareRemove: ImageVector + get() { + if (_IconsaxMusicSquareRemove != null) { + return _IconsaxMusicSquareRemove!! + } + _IconsaxMusicSquareRemove = ImageVector.Builder( + name = "IconsaxMusicSquareRemove", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(21f, 8.65f) + verticalLineTo(14.35f) + curveTo(21f, 14.69f, 20.99f, 15.02f, 20.97f, 15.33f) + curveTo(20.25f, 14.51f, 19.18f, 14f, 18f, 14f) + curveTo(15.79f, 14f, 14f, 15.79f, 14f, 18f) + curveTo(14f, 18.75f, 14.21f, 19.46f, 14.58f, 20.06f) + curveTo(14.78f, 20.4f, 15.04f, 20.71f, 15.34f, 20.97f) + curveTo(15.03f, 20.99f, 14.7f, 21f, 14.35f, 21f) + horizontalLineTo(8.65f) + curveTo(3.9f, 21f, 2f, 19.1f, 2f, 14.35f) + verticalLineTo(8.65f) + curveTo(2f, 3.9f, 3.9f, 2f, 8.65f, 2f) + horizontalLineTo(14.35f) + curveTo(19.1f, 2f, 21f, 3.9f, 21f, 8.65f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(6.72f, 14.42f) + curveTo(7.521f, 14.42f, 8.17f, 13.77f, 8.17f, 12.969f) + curveTo(8.17f, 12.169f, 7.521f, 11.519f, 6.72f, 11.519f) + curveTo(5.919f, 11.519f, 5.27f, 12.169f, 5.27f, 12.969f) + curveTo(5.27f, 13.77f, 5.919f, 14.42f, 6.72f, 14.42f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(13.47f, 12f) + verticalLineTo(6.34f) + curveTo(13.47f, 5.13f, 12.71f, 4.969f, 11.95f, 5.179f) + lineTo(9.06f, 5.969f) + curveTo(8.54f, 6.109f, 8.17f, 6.53f, 8.17f, 7.129f) + verticalLineTo(8.14f) + verticalLineTo(8.819f) + verticalLineTo(12.969f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12.03f, 13.45f) + curveTo(12.831f, 13.45f, 13.48f, 12.801f, 13.48f, 12f) + curveTo(13.48f, 11.199f, 12.831f, 10.55f, 12.03f, 10.55f) + curveTo(11.229f, 10.55f, 10.58f, 11.199f, 10.58f, 12f) + curveTo(10.58f, 12.801f, 11.229f, 13.45f, 12.03f, 13.45f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(8.17f, 8.83f) + lineTo(13.47f, 7.38f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(22f, 18f) + curveTo(22f, 18.75f, 21.79f, 19.46f, 21.42f, 20.06f) + curveTo(20.73f, 21.22f, 19.46f, 22f, 18f, 22f) + curveTo(16.97f, 22f, 16.04f, 21.61f, 15.34f, 20.97f) + curveTo(15.04f, 20.71f, 14.78f, 20.4f, 14.58f, 20.06f) + curveTo(14.21f, 19.46f, 14f, 18.75f, 14f, 18f) + curveTo(14f, 15.79f, 15.79f, 14f, 18f, 14f) + curveTo(19.18f, 14f, 20.25f, 14.51f, 20.97f, 15.33f) + curveTo(21.61f, 16.04f, 22f, 16.98f, 22f, 18f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(19.07f, 19.04f) + lineTo(16.95f, 16.93f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(19.05f, 16.96f) + lineTo(16.93f, 19.07f) + } + } + }.build() + + return _IconsaxMusicSquareRemove!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxMusicSquareRemove: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxNext.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxNext.kt new file mode 100644 index 00000000..7333b73a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxNext.kt @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxNext: ImageVector + get() { + if (_IconsaxNext != null) { + return _IconsaxNext!! + } + _IconsaxNext = ImageVector.Builder( + name = "IconsaxNext", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(3.76f, 7.22f) + verticalLineTo(16.79f) + curveTo(3.76f, 18.75f, 5.89f, 19.98f, 7.59f, 19f) + lineTo(11.74f, 16.61f) + lineTo(15.89f, 14.21f) + curveTo(17.59f, 13.23f, 17.59f, 10.78f, 15.89f, 9.8f) + lineTo(11.74f, 7.4f) + lineTo(7.59f, 5.01f) + curveTo(5.89f, 4.03f, 3.76f, 5.25f, 3.76f, 7.22f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(20.24f, 18.93f) + curveTo(19.83f, 18.93f, 19.49f, 18.59f, 19.49f, 18.18f) + verticalLineTo(5.82f) + curveTo(19.49f, 5.41f, 19.83f, 5.07f, 20.24f, 5.07f) + curveTo(20.65f, 5.07f, 20.99f, 5.41f, 20.99f, 5.82f) + verticalLineTo(18.18f) + curveTo(20.99f, 18.59f, 20.66f, 18.93f, 20.24f, 18.93f) + close() + } + } + }.build() + + return _IconsaxNext!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxNext: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPause.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPause.kt new file mode 100644 index 00000000..096a3b71 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPause.kt @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxPause: ImageVector + get() { + if (_IconsaxPause != null) { + return _IconsaxPause!! + } + _IconsaxPause = ImageVector.Builder( + name = "IconsaxPause", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(10.65f, 19.11f) + verticalLineTo(4.89f) + curveTo(10.65f, 3.54f, 10.08f, 3f, 8.64f, 3f) + horizontalLineTo(5.01f) + curveTo(3.57f, 3f, 3f, 3.54f, 3f, 4.89f) + verticalLineTo(19.11f) + curveTo(3f, 20.46f, 3.57f, 21f, 5.01f, 21f) + horizontalLineTo(8.64f) + curveTo(10.08f, 21f, 10.65f, 20.46f, 10.65f, 19.11f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(21f, 19.11f) + verticalLineTo(4.89f) + curveTo(21f, 3.54f, 20.43f, 3f, 18.99f, 3f) + horizontalLineTo(15.36f) + curveTo(13.93f, 3f, 13.35f, 3.54f, 13.35f, 4.89f) + verticalLineTo(19.11f) + curveTo(13.35f, 20.46f, 13.92f, 21f, 15.36f, 21f) + horizontalLineTo(18.99f) + curveTo(20.43f, 21f, 21f, 20.46f, 21f, 19.11f) + close() + } + } + }.build() + + return _IconsaxPause!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxPause: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPauseCircle.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPauseCircle.kt new file mode 100644 index 00000000..81f70bae --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPauseCircle.kt @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxPauseCircle: ImageVector + get() { + if (_IconsaxPauseCircle != null) { + return _IconsaxPauseCircle!! + } + _IconsaxPauseCircle = ImageVector.Builder( + name = "IconsaxPauseCircle", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(11.97f, 22f) + curveTo(17.493f, 22f, 21.97f, 17.523f, 21.97f, 12f) + curveTo(21.97f, 6.477f, 17.493f, 2f, 11.97f, 2f) + curveTo(6.447f, 2f, 1.97f, 6.477f, 1.97f, 12f) + curveTo(1.97f, 17.523f, 6.447f, 22f, 11.97f, 22f) + close() + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(10.72f, 14.53f) + verticalLineTo(9.47f) + curveTo(10.72f, 8.99f, 10.52f, 8.8f, 10.01f, 8.8f) + horizontalLineTo(8.71f) + curveTo(8.2f, 8.8f, 8f, 8.99f, 8f, 9.47f) + verticalLineTo(14.53f) + curveTo(8f, 15.01f, 8.2f, 15.2f, 8.71f, 15.2f) + horizontalLineTo(10f) + curveTo(10.52f, 15.2f, 10.72f, 15.01f, 10.72f, 14.53f) + close() + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(16f, 14.53f) + verticalLineTo(9.47f) + curveTo(16f, 8.99f, 15.8f, 8.8f, 15.29f, 8.8f) + horizontalLineTo(14f) + curveTo(13.49f, 8.8f, 13.29f, 8.99f, 13.29f, 9.47f) + verticalLineTo(14.53f) + curveTo(13.29f, 15.01f, 13.49f, 15.2f, 14f, 15.2f) + horizontalLineTo(15.29f) + curveTo(15.8f, 15.2f, 16f, 15.01f, 16f, 14.53f) + close() + } + } + }.build() + + return _IconsaxPauseCircle!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxPauseCircle: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlay.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlay.kt new file mode 100644 index 00000000..66ca07d9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlay.kt @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxPlay: ImageVector + get() { + if (_IconsaxPlay != null) { + return _IconsaxPlay!! + } + _IconsaxPlay = ImageVector.Builder( + name = "IconsaxPlay", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(18.7f, 8.98f) + lineTo(4.14f, 17.71f) + curveTo(4.05f, 17.38f, 4f, 17.03f, 4f, 16.67f) + verticalLineTo(7.33f) + curveTo(4f, 4.25f, 7.33f, 2.33f, 10f, 3.87f) + lineTo(14.04f, 6.2f) + lineTo(18.09f, 8.54f) + curveTo(18.31f, 8.67f, 18.52f, 8.81f, 18.7f, 8.98f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(18.09f, 15.46f) + lineTo(14.04f, 17.8f) + lineTo(10f, 20.13f) + curveTo(8.09f, 21.23f, 5.84f, 20.57f, 4.72f, 18.96f) + lineTo(5.14f, 18.71f) + lineTo(19.58f, 10.05f) + curveTo(20.58f, 11.85f, 20.09f, 14.31f, 18.09f, 15.46f) + close() + } + } + }.build() + + return _IconsaxPlay!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxPlay: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlayCircle.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlayCircle.kt new file mode 100644 index 00000000..b9c81564 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlayCircle.kt @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxPlayCircle: ImageVector + get() { + if (_IconsaxPlayCircle != null) { + return _IconsaxPlayCircle!! + } + _IconsaxPlayCircle = ImageVector.Builder( + name = "IconsaxPlayCircle", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14.91f, 14.12f) + curveTo(16.71f, 13.08f, 16.71f, 11.38f, 14.91f, 10.34f) + lineTo(13.46f, 9.5f) + lineTo(12.01f, 8.66f) + curveTo(10.21f, 7.62f, 8.74f, 8.47f, 8.74f, 10.55f) + verticalLineTo(12.22f) + verticalLineTo(13.89f) + curveTo(8.74f, 15.55f, 9.68f, 16.43f, 10.98f, 16.18f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(4f, 6f) + curveTo(2.75f, 7.67f, 2f, 9.75f, 2f, 12f) + curveTo(2f, 17.52f, 6.48f, 22f, 12f, 22f) + curveTo(17.52f, 22f, 22f, 17.52f, 22f, 12f) + curveTo(22f, 6.48f, 17.52f, 2f, 12f, 2f) + curveTo(10.57f, 2f, 9.2f, 2.3f, 7.97f, 2.85f) + } + } + }.build() + + return _IconsaxPlayCircle!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxPlayCircle: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlayCircle2.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlayCircle2.kt new file mode 100644 index 00000000..f2b95adb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPlayCircle2.kt @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxPlayCircle2: ImageVector + get() { + if (_IconsaxPlayCircle2 != null) { + return _IconsaxPlayCircle2!! + } + _IconsaxPlayCircle2 = ImageVector.Builder( + name = "IconsaxPlayCircle2", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(19.07f, 19.82f) + curveTo(18.88f, 19.82f, 18.69f, 19.75f, 18.54f, 19.6f) + curveTo(18.25f, 19.31f, 18.25f, 18.83f, 18.54f, 18.54f) + curveTo(22.15f, 14.93f, 22.15f, 9.06f, 18.54f, 5.46f) + curveTo(18.25f, 5.17f, 18.25f, 4.69f, 18.54f, 4.4f) + curveTo(18.83f, 4.11f, 19.31f, 4.11f, 19.6f, 4.4f) + curveTo(23.79f, 8.59f, 23.79f, 15.41f, 19.6f, 19.6f) + curveTo(19.45f, 19.75f, 19.26f, 19.82f, 19.07f, 19.82f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(4.93f, 19.82f) + curveTo(4.74f, 19.82f, 4.55f, 19.75f, 4.4f, 19.6f) + curveTo(0.21f, 15.41f, 0.21f, 8.59f, 4.4f, 4.4f) + curveTo(4.69f, 4.11f, 5.17f, 4.11f, 5.46f, 4.4f) + curveTo(5.75f, 4.69f, 5.75f, 5.17f, 5.46f, 5.46f) + curveTo(1.85f, 9.07f, 1.85f, 14.94f, 5.46f, 18.54f) + curveTo(5.75f, 18.83f, 5.75f, 19.31f, 5.46f, 19.6f) + curveTo(5.31f, 19.75f, 5.12f, 19.82f, 4.93f, 19.82f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(12f, 22.71f) + curveTo(10.75f, 22.7f, 9.56f, 22.5f, 8.45f, 22.11f) + curveTo(8.06f, 21.97f, 7.85f, 21.54f, 7.99f, 21.15f) + curveTo(8.13f, 20.76f, 8.55f, 20.55f, 8.95f, 20.69f) + curveTo(9.91f, 21.02f, 10.93f, 21.2f, 12.01f, 21.2f) + curveTo(13.08f, 21.2f, 14.11f, 21.02f, 15.06f, 20.69f) + curveTo(15.45f, 20.56f, 15.88f, 20.76f, 16.02f, 21.15f) + curveTo(16.16f, 21.54f, 15.95f, 21.97f, 15.56f, 22.11f) + curveTo(14.44f, 22.5f, 13.25f, 22.71f, 12f, 22.71f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(15.3f, 3.34f) + curveTo(15.22f, 3.34f, 15.13f, 3.33f, 15.05f, 3.3f) + curveTo(14.09f, 2.97f, 13.06f, 2.79f, 11.99f, 2.79f) + curveTo(10.92f, 2.79f, 9.9f, 2.97f, 8.94f, 3.3f) + curveTo(8.55f, 3.43f, 8.12f, 3.23f, 7.98f, 2.84f) + curveTo(7.84f, 2.45f, 8.05f, 2.02f, 8.44f, 1.88f) + curveTo(9.55f, 1.49f, 10.75f, 1.29f, 11.99f, 1.29f) + curveTo(13.23f, 1.29f, 14.43f, 1.49f, 15.54f, 1.88f) + curveTo(15.93f, 2.02f, 16.14f, 2.45f, 16f, 2.84f) + curveTo(15.9f, 3.15f, 15.61f, 3.34f, 15.3f, 3.34f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(8.74f, 12f) + verticalLineTo(10.33f) + curveTo(8.74f, 8.25f, 10.21f, 7.4f, 12.01f, 8.44f) + lineTo(13.46f, 9.28f) + lineTo(14.91f, 10.12f) + curveTo(16.71f, 11.16f, 16.71f, 12.86f, 14.91f, 13.9f) + lineTo(13.46f, 14.74f) + lineTo(12.01f, 15.58f) + curveTo(10.21f, 16.62f, 8.74f, 15.77f, 8.74f, 13.69f) + verticalLineTo(12f) + close() + } + } + }.build() + + return _IconsaxPlayCircle2!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxPlayCircle2: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPrevious.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPrevious.kt new file mode 100644 index 00000000..b5197971 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxPrevious.kt @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxPrevious: ImageVector + get() { + if (_IconsaxPrevious != null) { + return _IconsaxPrevious!! + } + _IconsaxPrevious = ImageVector.Builder( + name = "IconsaxPrevious", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(20.24f, 7.22f) + verticalLineTo(16.79f) + curveTo(20.24f, 18.75f, 18.11f, 19.98f, 16.41f, 19f) + lineTo(12.26f, 16.61f) + lineTo(8.11f, 14.21f) + curveTo(6.41f, 13.23f, 6.41f, 10.78f, 8.11f, 9.8f) + lineTo(12.26f, 7.4f) + lineTo(16.41f, 5.01f) + curveTo(18.11f, 4.03f, 20.24f, 5.25f, 20.24f, 7.22f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(3.76f, 18.93f) + curveTo(3.35f, 18.93f, 3.01f, 18.59f, 3.01f, 18.18f) + verticalLineTo(5.82f) + curveTo(3.01f, 5.41f, 3.35f, 5.07f, 3.76f, 5.07f) + curveTo(4.17f, 5.07f, 4.51f, 5.41f, 4.51f, 5.82f) + verticalLineTo(18.18f) + curveTo(4.51f, 18.59f, 4.17f, 18.93f, 3.76f, 18.93f) + close() + } + } + }.build() + + return _IconsaxPrevious!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxPrevious: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRefreshRight.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRefreshRight.kt new file mode 100644 index 00000000..0a6e186b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRefreshRight.kt @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxRefreshRight: ImageVector + get() { + if (_IconsaxRefreshRight != null) { + return _IconsaxRefreshRight!! + } + _IconsaxRefreshRight = ImageVector.Builder( + name = "IconsaxRefreshRight", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.19f, 2f) + horizontalLineTo(7.82f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.82f, 4.17f, 21.99f, 7.81f, 21.99f) + horizontalLineTo(16.18f) + curveTo(19.82f, 21.99f, 21.99f, 19.82f, 21.99f, 16.18f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(16.78f, 9.07f) + curveTo(16.55f, 8.72f, 16.08f, 8.63f, 15.74f, 8.86f) + curveTo(15.4f, 9.09f, 15.3f, 9.56f, 15.53f, 9.9f) + curveTo(16f, 10.6f, 16.24f, 11.42f, 16.24f, 12.26f) + curveTo(16.24f, 14.6f, 14.33f, 16.51f, 11.99f, 16.51f) + curveTo(9.65f, 16.51f, 7.74f, 14.6f, 7.74f, 12.26f) + curveTo(7.74f, 9.92f, 9.65f, 8.01f, 11.99f, 8.01f) + curveTo(12.18f, 8.01f, 12.36f, 8.03f, 12.55f, 8.05f) + lineTo(12f, 8.46f) + curveTo(11.67f, 8.7f, 11.59f, 9.17f, 11.84f, 9.51f) + curveTo(11.99f, 9.71f, 12.22f, 9.82f, 12.45f, 9.82f) + curveTo(12.6f, 9.82f, 12.76f, 9.77f, 12.89f, 9.68f) + lineTo(14.83f, 8.26f) + curveTo(14.84f, 8.25f, 14.84f, 8.24f, 14.85f, 8.24f) + curveTo(14.86f, 8.23f, 14.87f, 8.23f, 14.88f, 8.22f) + curveTo(14.91f, 8.19f, 14.93f, 8.16f, 14.95f, 8.13f) + curveTo(14.98f, 8.09f, 15.02f, 8.06f, 15.04f, 8.01f) + curveTo(15.06f, 7.97f, 15.07f, 7.92f, 15.09f, 7.88f) + curveTo(15.1f, 7.83f, 15.12f, 7.79f, 15.13f, 7.74f) + curveTo(15.14f, 7.69f, 15.13f, 7.65f, 15.12f, 7.6f) + curveTo(15.12f, 7.55f, 15.12f, 7.51f, 15.1f, 7.46f) + curveTo(15.09f, 7.41f, 15.06f, 7.37f, 15.04f, 7.32f) + curveTo(15.02f, 7.29f, 15.02f, 7.25f, 14.99f, 7.21f) + curveTo(14.98f, 7.2f, 14.97f, 7.2f, 14.97f, 7.19f) + curveTo(14.96f, 7.18f, 14.96f, 7.17f, 14.95f, 7.16f) + lineTo(13.28f, 5.25f) + curveTo(13.01f, 4.94f, 12.53f, 4.9f, 12.22f, 5.18f) + curveTo(11.91f, 5.45f, 11.88f, 5.93f, 12.15f, 6.24f) + lineTo(12.43f, 6.56f) + curveTo(12.29f, 6.55f, 12.15f, 6.53f, 12f, 6.53f) + curveTo(8.83f, 6.53f, 6.25f, 9.11f, 6.25f, 12.28f) + curveTo(6.25f, 15.45f, 8.83f, 18.03f, 12f, 18.03f) + curveTo(15.17f, 18.03f, 17.75f, 15.45f, 17.75f, 12.28f) + curveTo(17.75f, 11.12f, 17.42f, 10.02f, 16.78f, 9.07f) + close() + } + }.build() + + return _IconsaxRefreshRight!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxRefreshRight: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeatArrow.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeatArrow.kt new file mode 100644 index 00000000..d68aba5d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeatArrow.kt @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxRepeatArrow: ImageVector + get() { + if (_IconsaxRepeatArrow != null) { + return _IconsaxRepeatArrow!! + } + _IconsaxRepeatArrow = ImageVector.Builder( + name = "IconsaxRepeatArrow", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(3.58f, 5.16f) + horizontalLineTo(17.42f) + curveTo(19.08f, 5.16f, 20.42f, 6.5f, 20.42f, 8.16f) + verticalLineTo(11.48f) + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(6.74f, 2f) + lineTo(3.58f, 5.16f) + lineTo(6.74f, 8.32f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(20.42f, 18.84f) + horizontalLineTo(6.58f) + curveTo(4.92f, 18.84f, 3.58f, 17.5f, 3.58f, 15.84f) + verticalLineTo(12.519f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(17.26f, 22f) + lineTo(20.42f, 18.84f) + lineTo(17.26f, 15.68f) + } + }.build() + + return _IconsaxRepeatArrow!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxRepeatArrow: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeatMusic.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeatMusic.kt new file mode 100644 index 00000000..2f6fd2a1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeatMusic.kt @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxRepeatMusic: ImageVector + get() { + if (_IconsaxRepeatMusic != null) { + return _IconsaxRepeatMusic!! + } + _IconsaxRepeatMusic = ImageVector.Builder( + name = "IconsaxRepeatMusic", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(3.66f, 16.931f) + curveTo(3.47f, 16.931f, 3.28f, 16.861f, 3.13f, 16.711f) + curveTo(1.76f, 15.331f, 1f, 13.511f, 1f, 11.581f) + curveTo(1f, 7.571f, 4.25f, 4.311f, 8.25f, 4.311f) + lineTo(14.32f, 4.331f) + lineTo(13.23f, 3.291f) + curveTo(12.93f, 3.001f, 12.92f, 2.531f, 13.21f, 2.231f) + curveTo(13.5f, 1.931f, 13.97f, 1.921f, 14.27f, 2.211f) + lineTo(16.71f, 4.551f) + curveTo(16.93f, 4.761f, 17f, 5.091f, 16.89f, 5.371f) + curveTo(16.78f, 5.651f, 16.5f, 5.841f, 16.19f, 5.841f) + lineTo(8.24f, 5.821f) + curveTo(5.07f, 5.821f, 2.49f, 8.411f, 2.49f, 11.591f) + curveTo(2.49f, 13.121f, 3.09f, 14.571f, 4.18f, 15.661f) + curveTo(4.47f, 15.951f, 4.47f, 16.431f, 4.18f, 16.721f) + curveTo(4.04f, 16.861f, 3.85f, 16.931f, 3.66f, 16.931f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(9.75f, 21.501f) + curveTo(9.56f, 21.501f, 9.38f, 21.431f, 9.23f, 21.291f) + lineTo(6.79f, 18.951f) + curveTo(6.57f, 18.741f, 6.5f, 18.411f, 6.61f, 18.131f) + curveTo(6.72f, 17.851f, 7f, 17.661f, 7.31f, 17.661f) + lineTo(15.26f, 17.681f) + curveTo(18.43f, 17.681f, 21.01f, 15.091f, 21.01f, 11.911f) + curveTo(21.01f, 10.381f, 20.41f, 8.931f, 19.32f, 7.841f) + curveTo(19.03f, 7.551f, 19.03f, 7.071f, 19.32f, 6.781f) + curveTo(19.61f, 6.491f, 20.09f, 6.491f, 20.38f, 6.781f) + curveTo(21.75f, 8.161f, 22.51f, 9.981f, 22.51f, 11.911f) + curveTo(22.51f, 15.921f, 19.26f, 19.181f, 15.26f, 19.181f) + lineTo(9.19f, 19.161f) + lineTo(10.28f, 20.201f) + curveTo(10.58f, 20.491f, 10.59f, 20.961f, 10.3f, 21.261f) + curveTo(10.14f, 21.421f, 9.95f, 21.501f, 9.75f, 21.501f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(9f, 15.5f) + horizontalLineTo(15f) + curveTo(16.93f, 15.5f, 18.5f, 13.92f, 18.5f, 12f) + curveTo(18.5f, 10.08f, 16.93f, 8.5f, 15f, 8.5f) + horizontalLineTo(9f) + curveTo(7.07f, 8.5f, 5.5f, 10.08f, 5.5f, 12f) + curveTo(5.5f, 13.92f, 7.07f, 15.5f, 9f, 15.5f) + close() + } + } + }.build() + + return _IconsaxRepeatMusic!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxRepeatMusic: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeateMusic.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeateMusic.kt new file mode 100644 index 00000000..f5d3442f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeateMusic.kt @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxRepeateMusic: ImageVector + get() { + if (_IconsaxRepeateMusic != null) { + return _IconsaxRepeateMusic!! + } + _IconsaxRepeateMusic = ImageVector.Builder( + name = "IconsaxRepeateMusic", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14f, 3f) + lineTo(16.44f, 5.34f) + lineTo(8.49f, 5.32f) + curveTo(4.92f, 5.32f, 1.99f, 8.25f, 1.99f, 11.84f) + curveTo(1.99f, 13.63f, 2.72f, 15.26f, 3.9f, 16.44f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(10f, 21f) + lineTo(7.56f, 18.66f) + lineTo(15.51f, 18.68f) + curveTo(19.08f, 18.68f, 22.01f, 15.75f, 22.01f, 12.16f) + curveTo(22.01f, 10.37f, 21.28f, 8.74f, 20.1f, 7.56f) + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(9f, 12f) + horizontalLineTo(15f) + } + } + }.build() + + return _IconsaxRepeateMusic!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxRepeateMusic: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeateOne.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeateOne.kt new file mode 100644 index 00000000..d4cfaf28 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxRepeateOne.kt @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxRepeateOne: ImageVector + get() { + if (_IconsaxRepeateOne != null) { + return _IconsaxRepeateOne!! + } + _IconsaxRepeateOne = ImageVector.Builder( + name = "IconsaxRepeateOne", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14f, 3f) + lineTo(16.44f, 5.34f) + lineTo(8.49f, 5.32f) + curveTo(4.92f, 5.32f, 1.99f, 8.25f, 1.99f, 11.84f) + curveTo(1.99f, 13.63f, 2.72f, 15.26f, 3.9f, 16.44f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(10f, 21f) + lineTo(7.56f, 18.66f) + lineTo(15.51f, 18.68f) + curveTo(19.08f, 18.68f, 22.01f, 15.75f, 22.01f, 12.16f) + curveTo(22.01f, 10.37f, 21.28f, 8.74f, 20.1f, 7.56f) + } + path( + fillAlpha = 0.4f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.4f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12.25f, 14.67f) + verticalLineTo(9.33f) + lineTo(10.75f, 11f) + } + } + }.build() + + return _IconsaxRepeateOne!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxRepeateOne: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSearch.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSearch.kt new file mode 100644 index 00000000..2340e13c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSearch.kt @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSearch: ImageVector + get() { + if (_IconsaxSearch != null) { + return _IconsaxSearch!! + } + _IconsaxSearch = ImageVector.Builder( + name = "IconsaxSearch", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(11.5f, 21f) + curveTo(16.747f, 21f, 21f, 16.747f, 21f, 11.5f) + curveTo(21f, 6.253f, 16.747f, 2f, 11.5f, 2f) + curveTo(6.253f, 2f, 2f, 6.253f, 2f, 11.5f) + curveTo(2f, 16.747f, 6.253f, 21f, 11.5f, 21f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(21.3f, 22f) + curveTo(21.12f, 22f, 20.94f, 21.93f, 20.81f, 21.8f) + lineTo(18.95f, 19.94f) + curveTo(18.68f, 19.67f, 18.68f, 19.23f, 18.95f, 18.95f) + curveTo(19.22f, 18.68f, 19.66f, 18.68f, 19.94f, 18.95f) + lineTo(21.8f, 20.81f) + curveTo(22.07f, 21.08f, 22.07f, 21.52f, 21.8f, 21.8f) + curveTo(21.66f, 21.93f, 21.48f, 22f, 21.3f, 22f) + close() + } + }.build() + + return _IconsaxSearch!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSearch: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSearchBroken.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSearchBroken.kt new file mode 100644 index 00000000..73b0554f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSearchBroken.kt @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSearchBroken: ImageVector + get() { + if (_IconsaxSearchBroken != null) { + return _IconsaxSearchBroken!! + } + _IconsaxSearchBroken = ImageVector.Builder( + name = "IconsaxSearchBroken", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(11.5f, 2f) + curveTo(16.75f, 2f, 21f, 6.25f, 21f, 11.5f) + curveTo(21f, 16.75f, 16.75f, 21f, 11.5f, 21f) + curveTo(6.25f, 21f, 2f, 16.75f, 2f, 11.5f) + curveTo(2f, 7.8f, 4.11f, 4.6f, 7.2f, 3.03f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(22f, 22f) + lineTo(20f, 20f) + } + }.build() + + return _IconsaxSearchBroken!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSearchBroken: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSetting.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSetting.kt new file mode 100644 index 00000000..8fab354c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSetting.kt @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSetting: ImageVector + get() { + if (_IconsaxSetting != null) { + return _IconsaxSetting!! + } + _IconsaxSetting = ImageVector.Builder( + name = "IconsaxSetting", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(18.51f, 8.251f) + curveTo(19.01f, 8.251f, 19.41f, 7.851f, 19.41f, 7.351f) + verticalLineTo(2.701f) + curveTo(19.41f, 2.201f, 19.01f, 1.801f, 18.51f, 1.801f) + curveTo(18.01f, 1.801f, 17.61f, 2.201f, 17.61f, 2.701f) + verticalLineTo(7.351f) + curveTo(17.61f, 7.841f, 18.02f, 8.251f, 18.51f, 8.251f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 15.75f) + curveTo(11.5f, 15.75f, 11.1f, 16.15f, 11.1f, 16.65f) + verticalLineTo(21.3f) + curveTo(11.1f, 21.8f, 11.5f, 22.2f, 12f, 22.2f) + curveTo(12.5f, 22.2f, 12.9f, 21.8f, 12.9f, 21.3f) + verticalLineTo(16.65f) + curveTo(12.9f, 16.16f, 12.5f, 15.75f, 12f, 15.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(5.49f, 8.251f) + curveTo(5.99f, 8.251f, 6.39f, 7.851f, 6.39f, 7.351f) + verticalLineTo(2.701f) + curveTo(6.39f, 2.201f, 5.99f, 1.801f, 5.49f, 1.801f) + curveTo(4.99f, 1.801f, 4.59f, 2.201f, 4.59f, 2.701f) + verticalLineTo(7.351f) + curveTo(4.59f, 7.841f, 4.99f, 8.251f, 5.49f, 8.251f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(7.35f, 10.17f) + horizontalLineTo(3.63f) + curveTo(3.13f, 10.17f, 2.73f, 10.57f, 2.73f, 11.07f) + curveTo(2.73f, 11.57f, 3.13f, 11.97f, 3.63f, 11.97f) + horizontalLineTo(4.59f) + verticalLineTo(21.3f) + curveTo(4.59f, 21.8f, 4.99f, 22.2f, 5.49f, 22.2f) + curveTo(5.99f, 22.2f, 6.39f, 21.8f, 6.39f, 21.3f) + verticalLineTo(11.97f) + horizontalLineTo(7.35f) + curveTo(7.85f, 11.97f, 8.25f, 11.57f, 8.25f, 11.07f) + curveTo(8.25f, 10.57f, 7.84f, 10.17f, 7.35f, 10.17f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(20.37f, 10.17f) + horizontalLineTo(16.65f) + curveTo(16.15f, 10.17f, 15.75f, 10.57f, 15.75f, 11.07f) + curveTo(15.75f, 11.57f, 16.15f, 11.97f, 16.65f, 11.97f) + horizontalLineTo(17.61f) + verticalLineTo(21.3f) + curveTo(17.61f, 21.8f, 18.01f, 22.2f, 18.51f, 22.2f) + curveTo(19.01f, 22.2f, 19.41f, 21.8f, 19.41f, 21.3f) + verticalLineTo(11.97f) + horizontalLineTo(20.37f) + curveTo(20.87f, 11.97f, 21.27f, 11.57f, 21.27f, 11.07f) + curveTo(21.27f, 10.57f, 20.87f, 10.17f, 20.37f, 10.17f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(13.86f, 12.031f) + horizontalLineTo(12.9f) + verticalLineTo(2.701f) + curveTo(12.9f, 2.201f, 12.5f, 1.801f, 12f, 1.801f) + curveTo(11.5f, 1.801f, 11.1f, 2.201f, 11.1f, 2.701f) + verticalLineTo(12.031f) + horizontalLineTo(10.14f) + curveTo(9.64f, 12.031f, 9.24f, 12.431f, 9.24f, 12.931f) + curveTo(9.24f, 13.431f, 9.64f, 13.831f, 10.14f, 13.831f) + horizontalLineTo(13.86f) + curveTo(14.36f, 13.831f, 14.76f, 13.431f, 14.76f, 12.931f) + curveTo(14.76f, 12.431f, 14.36f, 12.031f, 13.86f, 12.031f) + close() + } + } + }.build() + + return _IconsaxSetting!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSetting: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSetting2.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSetting2.kt new file mode 100644 index 00000000..5f305537 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSetting2.kt @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSetting2: ImageVector + get() { + if (_IconsaxSetting2 != null) { + return _IconsaxSetting2!! + } + _IconsaxSetting2 = ImageVector.Builder( + name = "IconsaxSetting2", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(2f, 12.879f) + verticalLineTo(11.119f) + curveTo(2f, 10.079f, 2.85f, 9.219f, 3.9f, 9.219f) + curveTo(5.71f, 9.219f, 6.45f, 7.939f, 5.54f, 6.369f) + curveTo(5.02f, 5.469f, 5.33f, 4.299f, 6.24f, 3.779f) + lineTo(7.97f, 2.789f) + curveTo(8.76f, 2.319f, 9.78f, 2.599f, 10.25f, 3.389f) + lineTo(10.36f, 3.579f) + curveTo(11.26f, 5.149f, 12.74f, 5.149f, 13.65f, 3.579f) + lineTo(13.76f, 3.389f) + curveTo(14.23f, 2.599f, 15.25f, 2.319f, 16.04f, 2.789f) + lineTo(17.77f, 3.779f) + curveTo(18.68f, 4.299f, 18.99f, 5.469f, 18.47f, 6.369f) + curveTo(17.56f, 7.939f, 18.3f, 9.219f, 20.11f, 9.219f) + curveTo(21.15f, 9.219f, 22.01f, 10.069f, 22.01f, 11.119f) + verticalLineTo(12.879f) + curveTo(22.01f, 13.919f, 21.16f, 14.779f, 20.11f, 14.779f) + curveTo(18.3f, 14.779f, 17.56f, 16.059f, 18.47f, 17.629f) + curveTo(18.99f, 18.539f, 18.68f, 19.699f, 17.77f, 20.219f) + lineTo(16.04f, 21.209f) + curveTo(15.25f, 21.679f, 14.23f, 21.399f, 13.76f, 20.609f) + lineTo(13.65f, 20.419f) + curveTo(12.75f, 18.849f, 11.27f, 18.849f, 10.36f, 20.419f) + lineTo(10.25f, 20.609f) + curveTo(9.78f, 21.399f, 8.76f, 21.679f, 7.97f, 21.209f) + lineTo(6.24f, 20.219f) + curveTo(5.33f, 19.699f, 5.02f, 18.529f, 5.54f, 17.629f) + curveTo(6.45f, 16.059f, 5.71f, 14.779f, 3.9f, 14.779f) + curveTo(2.85f, 14.779f, 2f, 13.919f, 2f, 12.879f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 15.25f) + curveTo(13.795f, 15.25f, 15.25f, 13.795f, 15.25f, 12f) + curveTo(15.25f, 10.205f, 13.795f, 8.75f, 12f, 8.75f) + curveTo(10.205f, 8.75f, 8.75f, 10.205f, 8.75f, 12f) + curveTo(8.75f, 13.795f, 10.205f, 15.25f, 12f, 15.25f) + close() + } + } + }.build() + + return _IconsaxSetting2!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSetting2: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSettingTwotone.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSettingTwotone.kt new file mode 100644 index 00000000..46cc447b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSettingTwotone.kt @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSettingTwotone: ImageVector + get() { + if (_IconsaxSettingTwotone != null) { + return _IconsaxSettingTwotone!! + } + _IconsaxSettingTwotone = ImageVector.Builder( + name = "IconsaxSettingTwotone", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fillAlpha = 0.34f, + stroke = SolidColor(Color.White), + strokeAlpha = 0.34f, + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(12f, 15f) + curveTo(13.657f, 15f, 15f, 13.657f, 15f, 12f) + curveTo(15f, 10.343f, 13.657f, 9f, 12f, 9f) + curveTo(10.343f, 9f, 9f, 10.343f, 9f, 12f) + curveTo(9f, 13.657f, 10.343f, 15f, 12f, 15f) + close() + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(2f, 12.879f) + verticalLineTo(11.119f) + curveTo(2f, 10.079f, 2.85f, 9.219f, 3.9f, 9.219f) + curveTo(5.71f, 9.219f, 6.45f, 7.939f, 5.54f, 6.369f) + curveTo(5.02f, 5.469f, 5.33f, 4.299f, 6.24f, 3.779f) + lineTo(7.97f, 2.789f) + curveTo(8.76f, 2.319f, 9.78f, 2.599f, 10.25f, 3.389f) + lineTo(10.36f, 3.579f) + curveTo(11.26f, 5.149f, 12.74f, 5.149f, 13.65f, 3.579f) + lineTo(13.76f, 3.389f) + curveTo(14.23f, 2.599f, 15.25f, 2.319f, 16.04f, 2.789f) + lineTo(17.77f, 3.779f) + curveTo(18.68f, 4.299f, 18.99f, 5.469f, 18.47f, 6.369f) + curveTo(17.56f, 7.939f, 18.3f, 9.219f, 20.11f, 9.219f) + curveTo(21.15f, 9.219f, 22.01f, 10.069f, 22.01f, 11.119f) + verticalLineTo(12.879f) + curveTo(22.01f, 13.919f, 21.16f, 14.779f, 20.11f, 14.779f) + curveTo(18.3f, 14.779f, 17.56f, 16.059f, 18.47f, 17.629f) + curveTo(18.99f, 18.539f, 18.68f, 19.699f, 17.77f, 20.219f) + lineTo(16.04f, 21.209f) + curveTo(15.25f, 21.679f, 14.23f, 21.399f, 13.76f, 20.609f) + lineTo(13.65f, 20.419f) + curveTo(12.75f, 18.849f, 11.27f, 18.849f, 10.36f, 20.419f) + lineTo(10.25f, 20.609f) + curveTo(9.78f, 21.399f, 8.76f, 21.679f, 7.97f, 21.209f) + lineTo(6.24f, 20.219f) + curveTo(5.33f, 19.699f, 5.02f, 18.529f, 5.54f, 17.629f) + curveTo(6.45f, 16.059f, 5.71f, 14.779f, 3.9f, 14.779f) + curveTo(2.85f, 14.779f, 2f, 13.919f, 2f, 12.879f) + close() + } + } + }.build() + + return _IconsaxSettingTwotone!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSettingTwotone: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxShare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxShare.kt new file mode 100644 index 00000000..769f22f8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxShare.kt @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxShare: ImageVector + get() { + if (_IconsaxShare != null) { + return _IconsaxShare!! + } + _IconsaxShare = ImageVector.Builder( + name = "IconsaxShare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(20.36f, 12.73f) + curveTo(19.99f, 12.73f, 19.68f, 12.45f, 19.64f, 12.08f) + curveTo(19.4f, 9.88f, 18.22f, 7.9f, 16.4f, 6.64f) + curveTo(16.07f, 6.41f, 15.99f, 5.96f, 16.22f, 5.63f) + curveTo(16.45f, 5.3f, 16.9f, 5.22f, 17.23f, 5.45f) + curveTo(19.4f, 6.96f, 20.8f, 9.32f, 21.09f, 11.93f) + curveTo(21.13f, 12.33f, 20.84f, 12.69f, 20.44f, 12.73f) + curveTo(20.41f, 12.73f, 20.39f, 12.73f, 20.36f, 12.73f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(3.74f, 12.779f) + curveTo(3.72f, 12.779f, 3.69f, 12.779f, 3.67f, 12.779f) + curveTo(3.27f, 12.739f, 2.98f, 12.379f, 3.02f, 11.979f) + curveTo(3.29f, 9.369f, 4.67f, 7.009f, 6.82f, 5.489f) + curveTo(7.14f, 5.259f, 7.6f, 5.339f, 7.83f, 5.659f) + curveTo(8.06f, 5.989f, 7.98f, 6.439f, 7.66f, 6.669f) + curveTo(5.86f, 7.949f, 4.69f, 9.929f, 4.47f, 12.119f) + curveTo(4.43f, 12.499f, 4.11f, 12.779f, 3.74f, 12.779f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(15.99f, 21.1f) + curveTo(14.76f, 21.69f, 13.44f, 21.99f, 12.06f, 21.99f) + curveTo(10.62f, 21.99f, 9.25f, 21.67f, 7.97f, 21.02f) + curveTo(7.61f, 20.85f, 7.47f, 20.41f, 7.65f, 20.05f) + curveTo(7.82f, 19.69f, 8.26f, 19.55f, 8.62f, 19.72f) + curveTo(9.25f, 20.04f, 9.92f, 20.26f, 10.6f, 20.39f) + curveTo(11.52f, 20.57f, 12.46f, 20.58f, 13.38f, 20.42f) + curveTo(14.06f, 20.3f, 14.73f, 20.09f, 15.35f, 19.79f) + curveTo(15.72f, 19.62f, 16.16f, 19.76f, 16.32f, 20.13f) + curveTo(16.5f, 20.49f, 16.36f, 20.93f, 15.99f, 21.1f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12.05f, 2.01f) + curveTo(10.5f, 2.01f, 9.23f, 3.27f, 9.23f, 4.83f) + curveTo(9.23f, 6.39f, 10.49f, 7.65f, 12.05f, 7.65f) + curveTo(13.61f, 7.65f, 14.87f, 6.39f, 14.87f, 4.83f) + curveTo(14.87f, 3.27f, 13.61f, 2.01f, 12.05f, 2.01f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(5.05f, 13.869f) + curveTo(3.5f, 13.869f, 2.23f, 15.129f, 2.23f, 16.689f) + curveTo(2.23f, 18.249f, 3.49f, 19.509f, 5.05f, 19.509f) + curveTo(6.61f, 19.509f, 7.87f, 18.249f, 7.87f, 16.689f) + curveTo(7.87f, 15.129f, 6.6f, 13.869f, 5.05f, 13.869f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(18.95f, 13.869f) + curveTo(17.4f, 13.869f, 16.13f, 15.129f, 16.13f, 16.689f) + curveTo(16.13f, 18.249f, 17.39f, 19.509f, 18.95f, 19.509f) + curveTo(20.51f, 19.509f, 21.77f, 18.249f, 21.77f, 16.689f) + curveTo(21.77f, 15.129f, 20.51f, 13.869f, 18.95f, 13.869f) + close() + } + } + }.build() + + return _IconsaxShare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxShare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxShuffle.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxShuffle.kt new file mode 100644 index 00000000..d369fe57 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxShuffle.kt @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxShuffle: ImageVector + get() { + if (_IconsaxShuffle != null) { + return _IconsaxShuffle!! + } + _IconsaxShuffle = ImageVector.Builder( + name = "IconsaxShuffle", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(21.75f, 17.98f) + curveTo(21.75f, 17.96f, 21.74f, 17.94f, 21.74f, 17.92f) + curveTo(21.73f, 17.84f, 21.72f, 17.76f, 21.69f, 17.69f) + curveTo(21.65f, 17.6f, 21.6f, 17.53f, 21.54f, 17.46f) + curveTo(21.54f, 17.46f, 21.54f, 17.45f, 21.53f, 17.45f) + curveTo(21.46f, 17.38f, 21.38f, 17.33f, 21.29f, 17.29f) + curveTo(21.2f, 17.25f, 21.1f, 17.23f, 21f, 17.23f) + lineTo(16.33f, 17.25f) + curveTo(16.33f, 17.25f, 16.33f, 17.25f, 16.32f, 17.25f) + curveTo(15.72f, 17.25f, 15.14f, 16.97f, 14.78f, 16.49f) + lineTo(13.56f, 14.92f) + curveTo(13.31f, 14.59f, 12.84f, 14.53f, 12.51f, 14.79f) + curveTo(12.18f, 15.05f, 12.12f, 15.51f, 12.38f, 15.84f) + lineTo(13.6f, 17.41f) + curveTo(14.25f, 18.25f, 15.27f, 18.75f, 16.33f, 18.75f) + horizontalLineTo(16.34f) + lineTo(19.19f, 18.74f) + lineTo(18.48f, 19.45f) + curveTo(18.19f, 19.74f, 18.19f, 20.22f, 18.48f, 20.51f) + curveTo(18.63f, 20.66f, 18.82f, 20.73f, 19.01f, 20.73f) + curveTo(19.2f, 20.73f, 19.39f, 20.66f, 19.54f, 20.51f) + lineTo(21.54f, 18.51f) + curveTo(21.61f, 18.44f, 21.66f, 18.36f, 21.7f, 18.27f) + curveTo(21.73f, 18.17f, 21.75f, 18.07f, 21.75f, 17.98f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(8.42f, 6.69f) + curveTo(7.77f, 5.79f, 6.73f, 5.26f, 5.62f, 5.26f) + curveTo(5.61f, 5.26f, 5.61f, 5.26f, 5.6f, 5.26f) + lineTo(2.99f, 5.27f) + curveTo(2.58f, 5.27f, 2.24f, 5.61f, 2.24f, 6.02f) + curveTo(2.24f, 6.43f, 2.58f, 6.77f, 2.99f, 6.77f) + lineTo(5.6f, 6.76f) + horizontalLineTo(5.61f) + curveTo(6.24f, 6.76f, 6.83f, 7.06f, 7.19f, 7.57f) + lineTo(8.27f, 9.07f) + curveTo(8.42f, 9.27f, 8.65f, 9.38f, 8.88f, 9.38f) + curveTo(9.03f, 9.38f, 9.19f, 9.33f, 9.32f, 9.24f) + curveTo(9.66f, 9f, 9.73f, 8.53f, 9.49f, 8.19f) + lineTo(8.42f, 6.69f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(21.74f, 6.08f) + curveTo(21.74f, 6.06f, 21.75f, 6.04f, 21.75f, 6.03f) + curveTo(21.75f, 5.93f, 21.73f, 5.83f, 21.69f, 5.74f) + curveTo(21.65f, 5.65f, 21.6f, 5.57f, 21.53f, 5.5f) + lineTo(19.53f, 3.5f) + curveTo(19.24f, 3.21f, 18.76f, 3.21f, 18.47f, 3.5f) + curveTo(18.18f, 3.79f, 18.18f, 4.27f, 18.47f, 4.56f) + lineTo(19.18f, 5.27f) + lineTo(16.45f, 5.26f) + curveTo(16.44f, 5.26f, 16.44f, 5.26f, 16.43f, 5.26f) + curveTo(15.28f, 5.26f, 14.2f, 5.83f, 13.56f, 6.8f) + lineTo(7.17f, 16.38f) + curveTo(6.81f, 16.92f, 6.2f, 17.25f, 5.55f, 17.25f) + horizontalLineTo(5.54f) + lineTo(2.99f, 17.24f) + curveTo(2.58f, 17.24f, 2.24f, 17.57f, 2.24f, 17.99f) + curveTo(2.24f, 18.4f, 2.57f, 18.74f, 2.99f, 18.74f) + lineTo(5.54f, 18.75f) + curveTo(5.55f, 18.75f, 5.55f, 18.75f, 5.56f, 18.75f) + curveTo(6.72f, 18.75f, 7.79f, 18.18f, 8.43f, 17.21f) + lineTo(14.82f, 7.63f) + curveTo(15.18f, 7.09f, 15.79f, 6.76f, 16.44f, 6.76f) + horizontalLineTo(16.45f) + lineTo(21f, 6.78f) + curveTo(21.1f, 6.78f, 21.19f, 6.76f, 21.29f, 6.72f) + curveTo(21.38f, 6.68f, 21.46f, 6.63f, 21.53f, 6.56f) + curveTo(21.53f, 6.56f, 21.53f, 6.55f, 21.54f, 6.55f) + curveTo(21.6f, 6.48f, 21.66f, 6.41f, 21.69f, 6.32f) + curveTo(21.72f, 6.24f, 21.73f, 6.16f, 21.74f, 6.08f) + close() + } + } + }.build() + + return _IconsaxShuffle!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxShuffle: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSidebarLeftBroken.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSidebarLeftBroken.kt new file mode 100644 index 00000000..0d9381f0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSidebarLeftBroken.kt @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSidebarLeftBroken: ImageVector + get() { + if (_IconsaxSidebarLeftBroken != null) { + return _IconsaxSidebarLeftBroken!! + } + _IconsaxSidebarLeftBroken = ImageVector.Builder( + name = "IconsaxSidebarLeftBroken", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(7.97f, 2f) + verticalLineTo(22f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14.97f, 9.439f) + lineTo(12.41f, 12f) + lineTo(14.97f, 14.559f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(2f, 13f) + verticalLineTo(15f) + curveTo(2f, 20f, 4f, 22f, 9f, 22f) + horizontalLineTo(15f) + curveTo(20f, 22f, 22f, 20f, 22f, 15f) + verticalLineTo(9f) + curveTo(22f, 4f, 20f, 2f, 15f, 2f) + horizontalLineTo(9f) + curveTo(4f, 2f, 2f, 4f, 2f, 9f) + } + } + }.build() + + return _IconsaxSidebarLeftBroken!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSidebarLeftBroken: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSidebarRightBroken.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSidebarRightBroken.kt new file mode 100644 index 00000000..35f6e6cd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSidebarRightBroken.kt @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSidebarRightBroken: ImageVector + get() { + if (_IconsaxSidebarRightBroken != null) { + return _IconsaxSidebarRightBroken!! + } + _IconsaxSidebarRightBroken = ImageVector.Builder( + name = "IconsaxSidebarRightBroken", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(1.97f, 12.98f) + verticalLineTo(15f) + curveTo(1.97f, 20f, 3.97f, 22f, 8.97f, 22f) + horizontalLineTo(14.97f) + curveTo(19.97f, 22f, 21.97f, 20f, 21.97f, 15f) + verticalLineTo(9f) + curveTo(21.97f, 4f, 19.97f, 2f, 14.97f, 2f) + horizontalLineTo(8.97f) + curveTo(3.97f, 2f, 1.97f, 4f, 1.97f, 9f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(14.97f, 2f) + verticalLineTo(22f) + } + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(7.97f, 9.439f) + lineTo(10.53f, 12f) + lineTo(7.97f, 14.559f) + } + } + }.build() + + return _IconsaxSidebarRightBroken!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSidebarRightBroken: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSort.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSort.kt new file mode 100644 index 00000000..46b0afd1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSort.kt @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSort: ImageVector + get() { + if (_IconsaxSort != null) { + return _IconsaxSort!! + } + _IconsaxSort = ImageVector.Builder( + name = "IconsaxSort", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.19f, 2f) + horizontalLineTo(7.81f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.83f, 4.17f, 22f, 7.81f, 22f) + horizontalLineTo(16.18f) + curveTo(19.82f, 22f, 21.99f, 19.83f, 21.99f, 16.19f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(18f, 8.5f) + horizontalLineTo(6f) + curveTo(5.59f, 8.5f, 5.25f, 8.16f, 5.25f, 7.75f) + curveTo(5.25f, 7.34f, 5.59f, 7f, 6f, 7f) + horizontalLineTo(18f) + curveTo(18.41f, 7f, 18.75f, 7.34f, 18.75f, 7.75f) + curveTo(18.75f, 8.16f, 18.41f, 8.5f, 18f, 8.5f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(16f, 12.75f) + horizontalLineTo(8f) + curveTo(7.59f, 12.75f, 7.25f, 12.41f, 7.25f, 12f) + curveTo(7.25f, 11.59f, 7.59f, 11.25f, 8f, 11.25f) + horizontalLineTo(16f) + curveTo(16.41f, 11.25f, 16.75f, 11.59f, 16.75f, 12f) + curveTo(16.75f, 12.41f, 16.41f, 12.75f, 16f, 12.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(13.33f, 17f) + horizontalLineTo(10.66f) + curveTo(10.25f, 17f, 9.91f, 16.66f, 9.91f, 16.25f) + curveTo(9.91f, 15.84f, 10.25f, 15.5f, 10.66f, 15.5f) + horizontalLineTo(13.33f) + curveTo(13.74f, 15.5f, 14.08f, 15.84f, 14.08f, 16.25f) + curveTo(14.08f, 16.66f, 13.75f, 17f, 13.33f, 17f) + close() + } + } + }.build() + + return _IconsaxSort!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSort: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSound.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSound.kt new file mode 100644 index 00000000..89e3d481 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSound.kt @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSound: ImageVector + get() { + if (_IconsaxSound != null) { + return _IconsaxSound!! + } + _IconsaxSound = ImageVector.Builder( + name = "IconsaxSound", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(3f, 16.5f) + curveTo(2.59f, 16.5f, 2.25f, 16.16f, 2.25f, 15.75f) + verticalLineTo(8.25f) + curveTo(2.25f, 7.84f, 2.59f, 7.5f, 3f, 7.5f) + curveTo(3.41f, 7.5f, 3.75f, 7.84f, 3.75f, 8.25f) + verticalLineTo(15.75f) + curveTo(3.75f, 16.16f, 3.41f, 16.5f, 3f, 16.5f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(7.5f, 19f) + curveTo(7.09f, 19f, 6.75f, 18.66f, 6.75f, 18.25f) + verticalLineTo(5.75f) + curveTo(6.75f, 5.34f, 7.09f, 5f, 7.5f, 5f) + curveTo(7.91f, 5f, 8.25f, 5.34f, 8.25f, 5.75f) + verticalLineTo(18.25f) + curveTo(8.25f, 18.66f, 7.91f, 19f, 7.5f, 19f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 21.5f) + curveTo(11.59f, 21.5f, 11.25f, 21.16f, 11.25f, 20.75f) + verticalLineTo(3.25f) + curveTo(11.25f, 2.84f, 11.59f, 2.5f, 12f, 2.5f) + curveTo(12.41f, 2.5f, 12.75f, 2.84f, 12.75f, 3.25f) + verticalLineTo(20.75f) + curveTo(12.75f, 21.16f, 12.41f, 21.5f, 12f, 21.5f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.5f, 19f) + curveTo(16.09f, 19f, 15.75f, 18.66f, 15.75f, 18.25f) + verticalLineTo(5.75f) + curveTo(15.75f, 5.34f, 16.09f, 5f, 16.5f, 5f) + curveTo(16.91f, 5f, 17.25f, 5.34f, 17.25f, 5.75f) + verticalLineTo(18.25f) + curveTo(17.25f, 18.66f, 16.91f, 19f, 16.5f, 19f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(21f, 16.5f) + curveTo(20.59f, 16.5f, 20.25f, 16.16f, 20.25f, 15.75f) + verticalLineTo(8.25f) + curveTo(20.25f, 7.84f, 20.59f, 7.5f, 21f, 7.5f) + curveTo(21.41f, 7.5f, 21.75f, 7.84f, 21.75f, 8.25f) + verticalLineTo(15.75f) + curveTo(21.75f, 16.16f, 21.41f, 16.5f, 21f, 16.5f) + close() + } + } + }.build() + + return _IconsaxSound!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSound: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSquare.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSquare.kt new file mode 100644 index 00000000..6d81de56 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxSquare.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxSquare: ImageVector + get() { + if (_IconsaxSquare != null) { + return _IconsaxSquare!! + } + _IconsaxSquare = ImageVector.Builder( + name = "IconsaxSquare", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path(fill = SolidColor(Color.White)) { + moveTo(15f, 22.75f) + horizontalLineTo(9f) + curveTo(3.57f, 22.75f, 1.25f, 20.43f, 1.25f, 15f) + verticalLineTo(9f) + curveTo(1.25f, 3.57f, 3.57f, 1.25f, 9f, 1.25f) + horizontalLineTo(15f) + curveTo(20.43f, 1.25f, 22.75f, 3.57f, 22.75f, 9f) + verticalLineTo(15f) + curveTo(22.75f, 20.43f, 20.43f, 22.75f, 15f, 22.75f) + close() + moveTo(9f, 2.75f) + curveTo(4.39f, 2.75f, 2.75f, 4.39f, 2.75f, 9f) + verticalLineTo(15f) + curveTo(2.75f, 19.61f, 4.39f, 21.25f, 9f, 21.25f) + horizontalLineTo(15f) + curveTo(19.61f, 21.25f, 21.25f, 19.61f, 21.25f, 15f) + verticalLineTo(9f) + curveTo(21.25f, 4.39f, 19.61f, 2.75f, 15f, 2.75f) + horizontalLineTo(9f) + close() + } + }.build() + + return _IconsaxSquare!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxSquare: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxTrash.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxTrash.kt new file mode 100644 index 00000000..eb81b633 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxTrash.kt @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxTrash: ImageVector + get() { + if (_IconsaxTrash != null) { + return _IconsaxTrash!! + } + _IconsaxTrash = ImageVector.Builder( + name = "IconsaxTrash", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(21.07f, 5.23f) + curveTo(19.46f, 5.07f, 17.85f, 4.95f, 16.23f, 4.86f) + verticalLineTo(4.85f) + lineTo(16.01f, 3.55f) + curveTo(15.86f, 2.63f, 15.64f, 1.25f, 13.3f, 1.25f) + horizontalLineTo(10.68f) + curveTo(8.35f, 1.25f, 8.13f, 2.57f, 7.97f, 3.54f) + lineTo(7.76f, 4.82f) + curveTo(6.83f, 4.88f, 5.9f, 4.94f, 4.97f, 5.03f) + lineTo(2.93f, 5.23f) + curveTo(2.51f, 5.27f, 2.21f, 5.64f, 2.25f, 6.05f) + curveTo(2.29f, 6.46f, 2.65f, 6.76f, 3.07f, 6.72f) + lineTo(5.11f, 6.52f) + curveTo(10.35f, 6f, 15.63f, 6.2f, 20.93f, 6.73f) + curveTo(20.96f, 6.73f, 20.98f, 6.73f, 21.01f, 6.73f) + curveTo(21.39f, 6.73f, 21.72f, 6.44f, 21.76f, 6.05f) + curveTo(21.79f, 5.64f, 21.49f, 5.27f, 21.07f, 5.23f) + close() + } + path( + fill = SolidColor(Color.White), + fillAlpha = 0.3991f, + strokeAlpha = 0.3991f + ) { + moveTo(19.23f, 8.14f) + curveTo(18.99f, 7.89f, 18.66f, 7.75f, 18.32f, 7.75f) + horizontalLineTo(5.68f) + curveTo(5.34f, 7.75f, 5f, 7.89f, 4.77f, 8.14f) + curveTo(4.54f, 8.39f, 4.41f, 8.73f, 4.43f, 9.08f) + lineTo(5.05f, 19.34f) + curveTo(5.16f, 20.86f, 5.3f, 22.76f, 8.79f, 22.76f) + horizontalLineTo(15.21f) + curveTo(18.7f, 22.76f, 18.84f, 20.87f, 18.95f, 19.34f) + lineTo(19.57f, 9.09f) + curveTo(19.59f, 8.73f, 19.46f, 8.39f, 19.23f, 8.14f) + close() + } + path( + fill = SolidColor(Color.White), + pathFillType = PathFillType.EvenOdd + ) { + moveTo(9.58f, 17f) + curveTo(9.58f, 16.586f, 9.916f, 16.25f, 10.33f, 16.25f) + horizontalLineTo(13.66f) + curveTo(14.074f, 16.25f, 14.41f, 16.586f, 14.41f, 17f) + curveTo(14.41f, 17.414f, 14.074f, 17.75f, 13.66f, 17.75f) + horizontalLineTo(10.33f) + curveTo(9.916f, 17.75f, 9.58f, 17.414f, 9.58f, 17f) + close() + } + path( + fill = SolidColor(Color.White), + pathFillType = PathFillType.EvenOdd + ) { + moveTo(8.75f, 13f) + curveTo(8.75f, 12.586f, 9.086f, 12.25f, 9.5f, 12.25f) + horizontalLineTo(14.5f) + curveTo(14.914f, 12.25f, 15.25f, 12.586f, 15.25f, 13f) + curveTo(15.25f, 13.414f, 14.914f, 13.75f, 14.5f, 13.75f) + horizontalLineTo(9.5f) + curveTo(9.086f, 13.75f, 8.75f, 13.414f, 8.75f, 13f) + close() + } + } + }.build() + + return _IconsaxTrash!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxTrash: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeCross.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeCross.kt new file mode 100644 index 00000000..4ea83846 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeCross.kt @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxVolumeCross: ImageVector + get() { + if (_IconsaxVolumeCross != null) { + return _IconsaxVolumeCross!! + } + _IconsaxVolumeCross = ImageVector.Builder( + name = "IconsaxVolumeCross", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(22.53f, 13.42f) + lineTo(21.08f, 11.97f) + lineTo(22.48f, 10.57f) + curveTo(22.77f, 10.28f, 22.77f, 9.8f, 22.48f, 9.51f) + curveTo(22.19f, 9.22f, 21.71f, 9.22f, 21.42f, 9.51f) + lineTo(20.02f, 10.91f) + lineTo(18.57f, 9.46f) + curveTo(18.28f, 9.17f, 17.8f, 9.17f, 17.51f, 9.46f) + curveTo(17.22f, 9.75f, 17.22f, 10.23f, 17.51f, 10.52f) + lineTo(18.96f, 11.97f) + lineTo(17.47f, 13.46f) + curveTo(17.18f, 13.75f, 17.18f, 14.23f, 17.47f, 14.52f) + curveTo(17.62f, 14.67f, 17.81f, 14.74f, 18f, 14.74f) + curveTo(18.19f, 14.74f, 18.38f, 14.67f, 18.53f, 14.52f) + lineTo(20.02f, 13.03f) + lineTo(21.47f, 14.48f) + curveTo(21.62f, 14.63f, 21.81f, 14.7f, 22f, 14.7f) + curveTo(22.19f, 14.7f, 22.38f, 14.63f, 22.53f, 14.48f) + curveTo(22.82f, 14.19f, 22.82f, 13.72f, 22.53f, 13.42f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(14.02f, 3.78f) + curveTo(12.9f, 3.16f, 11.47f, 3.32f, 10.01f, 4.23f) + lineTo(7.09f, 6.06f) + curveTo(6.89f, 6.18f, 6.66f, 6.25f, 6.43f, 6.25f) + horizontalLineTo(5.5f) + horizontalLineTo(5f) + curveTo(2.58f, 6.25f, 1.25f, 7.58f, 1.25f, 10f) + verticalLineTo(14f) + curveTo(1.25f, 16.42f, 2.58f, 17.75f, 5f, 17.75f) + horizontalLineTo(5.5f) + horizontalLineTo(6.43f) + curveTo(6.66f, 17.75f, 6.89f, 17.82f, 7.09f, 17.94f) + lineTo(10.01f, 19.77f) + curveTo(10.89f, 20.32f, 11.75f, 20.59f, 12.55f, 20.59f) + curveTo(13.07f, 20.59f, 13.57f, 20.47f, 14.02f, 20.22f) + curveTo(15.13f, 19.6f, 15.75f, 18.31f, 15.75f, 16.59f) + verticalLineTo(7.41f) + curveTo(15.75f, 5.69f, 15.13f, 4.4f, 14.02f, 3.78f) + close() + } + } + }.build() + + return _IconsaxVolumeCross!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxVolumeCross: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeHigh.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeHigh.kt new file mode 100644 index 00000000..2f4498f3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeHigh.kt @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxVolumeHigh: ImageVector + get() { + if (_IconsaxVolumeHigh != null) { + return _IconsaxVolumeHigh!! + } + _IconsaxVolumeHigh = ImageVector.Builder( + name = "IconsaxVolumeHigh", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(18f, 16.75f) + curveTo(17.84f, 16.75f, 17.69f, 16.7f, 17.55f, 16.6f) + curveTo(17.22f, 16.35f, 17.15f, 15.88f, 17.4f, 15.55f) + curveTo(18.97f, 13.46f, 18.97f, 10.54f, 17.4f, 8.45f) + curveTo(17.15f, 8.12f, 17.22f, 7.65f, 17.55f, 7.4f) + curveTo(17.88f, 7.15f, 18.35f, 7.22f, 18.6f, 7.55f) + curveTo(20.56f, 10.17f, 20.56f, 13.83f, 18.6f, 16.45f) + curveTo(18.45f, 16.65f, 18.23f, 16.75f, 18f, 16.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(19.83f, 19.25f) + curveTo(19.67f, 19.25f, 19.52f, 19.2f, 19.38f, 19.1f) + curveTo(19.05f, 18.85f, 18.98f, 18.38f, 19.23f, 18.05f) + curveTo(21.9f, 14.49f, 21.9f, 9.51f, 19.23f, 5.95f) + curveTo(18.98f, 5.62f, 19.05f, 5.15f, 19.38f, 4.9f) + curveTo(19.71f, 4.65f, 20.18f, 4.72f, 20.43f, 5.05f) + curveTo(23.5f, 9.14f, 23.5f, 14.86f, 20.43f, 18.95f) + curveTo(20.29f, 19.15f, 20.06f, 19.25f, 19.83f, 19.25f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(14.02f, 3.78f) + curveTo(12.9f, 3.16f, 11.47f, 3.32f, 10.01f, 4.23f) + lineTo(7.09f, 6.06f) + curveTo(6.89f, 6.18f, 6.66f, 6.25f, 6.43f, 6.25f) + horizontalLineTo(5.5f) + horizontalLineTo(5f) + curveTo(2.58f, 6.25f, 1.25f, 7.58f, 1.25f, 10f) + verticalLineTo(14f) + curveTo(1.25f, 16.42f, 2.58f, 17.75f, 5f, 17.75f) + horizontalLineTo(5.5f) + horizontalLineTo(6.43f) + curveTo(6.66f, 17.75f, 6.89f, 17.82f, 7.09f, 17.94f) + lineTo(10.01f, 19.77f) + curveTo(10.89f, 20.32f, 11.75f, 20.59f, 12.55f, 20.59f) + curveTo(13.07f, 20.59f, 13.57f, 20.47f, 14.02f, 20.22f) + curveTo(15.13f, 19.6f, 15.75f, 18.31f, 15.75f, 16.59f) + verticalLineTo(7.41f) + curveTo(15.75f, 5.69f, 15.13f, 4.4f, 14.02f, 3.78f) + close() + } + } + }.build() + + return _IconsaxVolumeHigh!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxVolumeHigh: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeLow.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeLow.kt new file mode 100644 index 00000000..484258aa --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/IconsaxVolumeLow.kt @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.IconsaxVolumeLow: ImageVector + get() { + if (_IconsaxVolumeLow != null) { + return _IconsaxVolumeLow!! + } + _IconsaxVolumeLow = ImageVector.Builder( + name = "IconsaxVolumeLow", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path(fill = SolidColor(Color.White)) { + moveTo(19.33f, 16.75f) + curveTo(19.17f, 16.75f, 19.02f, 16.7f, 18.88f, 16.6f) + curveTo(18.55f, 16.35f, 18.48f, 15.88f, 18.73f, 15.55f) + curveTo(20.3f, 13.46f, 20.3f, 10.54f, 18.73f, 8.45f) + curveTo(18.48f, 8.12f, 18.55f, 7.65f, 18.88f, 7.4f) + curveTo(19.21f, 7.15f, 19.68f, 7.22f, 19.93f, 7.55f) + curveTo(21.9f, 10.17f, 21.9f, 13.83f, 19.93f, 16.45f) + curveTo(19.79f, 16.65f, 19.56f, 16.75f, 19.33f, 16.75f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.35f, 3.78f) + curveTo(14.23f, 3.16f, 12.8f, 3.32f, 11.34f, 4.23f) + lineTo(8.42f, 6.06f) + curveTo(8.22f, 6.18f, 7.99f, 6.25f, 7.76f, 6.25f) + horizontalLineTo(6.83f) + horizontalLineTo(6.33f) + curveTo(3.91f, 6.25f, 2.58f, 7.58f, 2.58f, 10f) + verticalLineTo(14f) + curveTo(2.58f, 16.42f, 3.91f, 17.75f, 6.33f, 17.75f) + horizontalLineTo(6.83f) + horizontalLineTo(7.76f) + curveTo(7.99f, 17.75f, 8.22f, 17.82f, 8.42f, 17.94f) + lineTo(11.34f, 19.77f) + curveTo(12.22f, 20.32f, 13.08f, 20.59f, 13.88f, 20.59f) + curveTo(14.4f, 20.59f, 14.9f, 20.47f, 15.35f, 20.22f) + curveTo(16.46f, 19.6f, 17.08f, 18.31f, 17.08f, 16.59f) + verticalLineTo(7.41f) + curveTo(17.08f, 5.69f, 16.46f, 4.4f, 15.35f, 3.78f) + close() + } + } + }.build() + + return _IconsaxVolumeLow!! + } + +@Suppress("ObjectPropertyName") +private var _IconsaxVolumeLow: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/InconsaxClock.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/InconsaxClock.kt new file mode 100644 index 00000000..b7ff81fd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/InconsaxClock.kt @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.InconsaxClock: ImageVector + get() { + if (_InconsaxClock != null) { + return _InconsaxClock!! + } + _InconsaxClock = ImageVector.Builder( + name = "InconsaxClock", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(12f, 22f) + curveTo(17.523f, 22f, 22f, 17.523f, 22f, 12f) + curveTo(22f, 6.477f, 17.523f, 2f, 12f, 2f) + curveTo(6.477f, 2f, 2f, 6.477f, 2f, 12f) + curveTo(2f, 17.523f, 6.477f, 22f, 12f, 22f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(15.71f, 15.93f) + curveTo(15.58f, 15.93f, 15.45f, 15.9f, 15.33f, 15.82f) + lineTo(12.23f, 13.97f) + curveTo(11.46f, 13.51f, 10.89f, 12.5f, 10.89f, 11.61f) + verticalLineTo(7.51f) + curveTo(10.89f, 7.1f, 11.23f, 6.76f, 11.64f, 6.76f) + curveTo(12.05f, 6.76f, 12.39f, 7.1f, 12.39f, 7.51f) + verticalLineTo(11.61f) + curveTo(12.39f, 11.97f, 12.69f, 12.5f, 13f, 12.68f) + lineTo(16.1f, 14.53f) + curveTo(16.46f, 14.74f, 16.57f, 15.2f, 16.36f, 15.56f) + curveTo(16.21f, 15.8f, 15.96f, 15.93f, 15.71f, 15.93f) + close() + } + } + }.build() + + return _InconsaxClock!! + } + +@Suppress("ObjectPropertyName") +private var _InconsaxClock: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Play.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Play.kt new file mode 100644 index 00000000..d52dc6be --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/Play.kt @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.Play: ImageVector + get() { + if (_Play != null) { + return _Play!! + } + _Play = ImageVector.Builder( + name = "Play", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + stroke = SolidColor(Color.White), + strokeLineWidth = 1.5f, + strokeLineCap = StrokeCap.Round, + strokeLineJoin = StrokeJoin.Round + ) { + moveTo(17.13f, 7.98f) + curveTo(20.96f, 10.19f, 20.96f, 13.81f, 17.13f, 16.02f) + lineTo(14.04f, 17.8f) + lineTo(10.95f, 19.58f) + curveTo(7.13f, 21.79f, 4f, 19.98f, 4f, 15.56f) + verticalLineTo(12f) + verticalLineTo(8.44f) + curveTo(4f, 4.02f, 7.13f, 2.21f, 10.96f, 4.42f) + lineTo(13.21f, 5.72f) + } + } + }.build() + + return _Play!! + } + +@Suppress("ObjectPropertyName") +private var _Play: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/SwapHorizontal2.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/SwapHorizontal2.kt new file mode 100644 index 00000000..f73604fd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/SwapHorizontal2.kt @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.SwapHorizontal2: ImageVector + get() { + if (_SwapHorizontal2 != null) { + return _SwapHorizontal2!! + } + _SwapHorizontal2 = ImageVector.Builder( + name = "SwapHorizontal2", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(16.19f, 2f) + horizontalLineTo(7.81f) + curveTo(4.17f, 2f, 2f, 4.17f, 2f, 7.81f) + verticalLineTo(16.18f) + curveTo(2f, 19.83f, 4.17f, 22f, 7.81f, 22f) + horizontalLineTo(16.18f) + curveTo(19.82f, 22f, 21.99f, 19.83f, 21.99f, 16.19f) + verticalLineTo(7.81f) + curveTo(22f, 4.17f, 19.83f, 2f, 16.19f, 2f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(17.85f, 13.53f) + curveTo(17.77f, 13.35f, 17.63f, 13.2f, 17.44f, 13.12f) + curveTo(17.35f, 13.08f, 17.25f, 13.06f, 17.15f, 13.06f) + horizontalLineTo(6.85f) + curveTo(6.44f, 13.06f, 6.1f, 13.4f, 6.1f, 13.81f) + curveTo(6.1f, 14.22f, 6.44f, 14.56f, 6.85f, 14.56f) + horizontalLineTo(15.35f) + lineTo(13.59f, 16.32f) + curveTo(13.3f, 16.61f, 13.3f, 17.09f, 13.59f, 17.38f) + curveTo(13.74f, 17.53f, 13.93f, 17.6f, 14.12f, 17.6f) + curveTo(14.31f, 17.6f, 14.5f, 17.53f, 14.65f, 17.38f) + lineTo(17.69f, 14.34f) + curveTo(17.76f, 14.27f, 17.81f, 14.19f, 17.85f, 14.1f) + curveTo(17.92f, 13.92f, 17.92f, 13.71f, 17.85f, 13.53f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(6.15f, 10.47f) + curveTo(6.23f, 10.65f, 6.37f, 10.8f, 6.56f, 10.88f) + curveTo(6.65f, 10.92f, 6.75f, 10.94f, 6.85f, 10.94f) + horizontalLineTo(17.16f) + curveTo(17.57f, 10.94f, 17.91f, 10.6f, 17.91f, 10.19f) + curveTo(17.91f, 9.78f, 17.57f, 9.44f, 17.16f, 9.44f) + horizontalLineTo(8.66f) + lineTo(10.42f, 7.68f) + curveTo(10.71f, 7.39f, 10.71f, 6.91f, 10.42f, 6.62f) + curveTo(10.13f, 6.33f, 9.65f, 6.33f, 9.36f, 6.62f) + lineTo(6.32f, 9.65f) + curveTo(6.25f, 9.72f, 6.19f, 9.81f, 6.15f, 9.9f) + curveTo(6.08f, 10.08f, 6.08f, 10.29f, 6.15f, 10.47f) + close() + } + }.build() + + return _SwapHorizontal2!! + } + +@Suppress("ObjectPropertyName") +private var _SwapHorizontal2: ImageVector? = null diff --git a/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/User.kt b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/User.kt new file mode 100644 index 00000000..6f9368ca --- /dev/null +++ b/composeApp/src/commonMain/kotlin/dev/krtirtho/spotube/resources/iconsax/User.kt @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.resources.iconsax + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val Iconsax.User: ImageVector + get() { + if (_User != null) { + return _User!! + } + _User = ImageVector.Builder( + name = "User", + defaultWidth = 24.dp, + defaultHeight = 24.dp, + viewportWidth = 24f, + viewportHeight = 24f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(24f) + verticalLineToRelative(24f) + horizontalLineToRelative(-24f) + close() + } + ) { + path( + fill = SolidColor(Color.White), + fillAlpha = 0.4f, + strokeAlpha = 0.4f + ) { + moveTo(12f, 12f) + curveTo(14.761f, 12f, 17f, 9.761f, 17f, 7f) + curveTo(17f, 4.239f, 14.761f, 2f, 12f, 2f) + curveTo(9.239f, 2f, 7f, 4.239f, 7f, 7f) + curveTo(7f, 9.761f, 9.239f, 12f, 12f, 12f) + close() + } + path(fill = SolidColor(Color.White)) { + moveTo(12f, 14.5f) + curveTo(6.99f, 14.5f, 2.91f, 17.86f, 2.91f, 22f) + curveTo(2.91f, 22.28f, 3.13f, 22.5f, 3.41f, 22.5f) + horizontalLineTo(20.59f) + curveTo(20.87f, 22.5f, 21.09f, 22.28f, 21.09f, 22f) + curveTo(21.09f, 17.86f, 17.01f, 14.5f, 12f, 14.5f) + close() + } + } + }.build() + + return _User!! + } + +@Suppress("ObjectPropertyName") +private var _User: ImageVector? = null diff --git a/composeApp/src/commonTest/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/additionals/DESTest.kt b/composeApp/src/commonTest/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/additionals/DESTest.kt new file mode 100644 index 00000000..81472ed7 --- /dev/null +++ b/composeApp/src/commonTest/kotlin/dev/krtirtho/spotube/core/zipline/host_apis/additionals/DESTest.kt @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline.host_apis.additionals + +import dev.krtirtho.plugin_interfaces.host_apis.PaddingTypes +import dev.krtirtho.plugin_interfaces.host_apis.SymmetricModes +import kotlinx.coroutines.test.runTest +import kotlin.test.Test +import kotlin.test.assertContentEquals +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +class DESTest { + + @Test + fun `encrypt and decrypt roundtrip with 8-byte key`() = runTest { + val key = "12345678".encodeToByteArray() + val plaintext = "Hello!!!".encodeToByteArray() + + val encrypted = DES.encrypt(plaintext, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + val decrypted = DES.decrypt(encrypted, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + + assertContentEquals(plaintext, decrypted) + } + + @Test + fun `encrypt and decrypt roundtrip with longer plaintext`() = runTest { + val key = "38346591".encodeToByteArray() + val plaintext = "This is a longer message that spans multiple blocks!".encodeToByteArray() + + val encrypted = DES.encrypt(plaintext, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + val decrypted = DES.decrypt(encrypted, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + + assertContentEquals(plaintext, decrypted) + } + + @Test + fun `encrypt and decrypt roundtrip with exact 8-byte plaintext`() = runTest { + val key = "testkey1".encodeToByteArray() + val plaintext = "12345678".encodeToByteArray() + + val encrypted = DES.encrypt(plaintext, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + assertEquals(16, encrypted.size) + val decrypted = DES.decrypt(encrypted, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + + assertContentEquals(plaintext, decrypted) + } + + @Test + fun `encrypt and decrypt with no padding`() = runTest { + val key = "12345678".encodeToByteArray() + val plaintext = "12345678".encodeToByteArray() + + val encrypted = DES.encrypt(plaintext, key, SymmetricModes.ECB, PaddingTypes.NONE) + val decrypted = DES.decrypt(encrypted, key, SymmetricModes.ECB, PaddingTypes.NONE) + + assertContentEquals(plaintext, decrypted) + } + + @Test + fun `decrypt with string key 38346591`() = runTest { + val key = "38346591".encodeToByteArray() + assertEquals(8, key.size) + + val plaintext = "SecretData".encodeToByteArray() + val encrypted = DES.encrypt(plaintext, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + val decrypted = DES.decrypt(encrypted, key, SymmetricModes.ECB, PaddingTypes.PKCS7) + + assertContentEquals(plaintext, decrypted) + } + + @Test + fun `key must be exactly 8 bytes`() = runTest { + val shortKey = "1234567".encodeToByteArray() + val data = "testdata".encodeToByteArray() + + try { + DES.encrypt(data, shortKey) + throw AssertionError("Should have thrown IllegalArgumentException") + } catch (e: IllegalArgumentException) { + assertEquals("DES key must be exactly 8 bytes (64 bits)", e.message) + } + } + + @Test + fun `ciphertext must be multiple of 8 bytes`() = runTest { + val key = "12345678".encodeToByteArray() + val badCiphertext = byteArrayOf(1, 2, 3) + + try { + DES.decrypt(badCiphertext, key) + throw AssertionError("Should have thrown IllegalArgumentException") + } catch (e: IllegalArgumentException) { + assertTrue(e.message!!.contains("multiple of 8")) + } + } +} diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/MainViewController.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/MainViewController.kt new file mode 100644 index 00000000..a17253b2 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/MainViewController.kt @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.window.ComposeUIViewController +import com.yushosei.newpipe.extractor.NewPipe +import com.yushosei.newpipe.util.DefaultDownloaderImpl +import dev.krtirtho.spotube.core.di.initKoin +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject + + +fun MainViewController() = ComposeUIViewController(configure = { + initKoin() +}) { InitNewPipe { App() } } + +@Composable +fun InitNewPipe( + content: @Composable () -> Unit +) { + var isInitialized by rememberSaveable { mutableStateOf(false) } + + LaunchedEffect(Unit) { + NewPipe.init(DefaultDownloaderImpl.initDefault()) + isInitialized = true + } + + if (isInitialized) { + content() + } +} \ No newline at end of file diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/Platform.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/Platform.ios.kt new file mode 100644 index 00000000..a585c5bb --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/Platform.ios.kt @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import platform.UIKit.UIDevice + +class IOSPlatform: Platform { + override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion + override val type: PlatformType = PlatformType.IOS +} + +actual fun getPlatform(): Platform = IOSPlatform() \ No newline at end of file diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.ios.kt new file mode 100644 index 00000000..f4e6c621 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.ios.kt @@ -0,0 +1,349 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +@file:OptIn(ExperimentalForeignApi::class) + +package dev.krtirtho.spotube.core.audioplayer + +import kotlinx.cinterop.CValue +import kotlinx.cinterop.ExperimentalForeignApi +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import platform.AVFoundation.AVPlayer +import platform.AVFoundation.AVPlayerItem +import platform.AVFoundation.AVPlayerTimeControlStatus +import platform.AVFoundation.AVPlayerTimeControlStatusPaused +import platform.AVFoundation.AVPlayerTimeControlStatusPlaying +import platform.AVFoundation.AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate +import platform.AVFoundation.addPeriodicTimeObserverForInterval +import platform.AVFoundation.currentItem +import platform.AVFoundation.duration +import platform.AVFoundation.loadedTimeRanges +import platform.AVFoundation.pause +import platform.AVFoundation.play +import platform.AVFoundation.rate +import platform.AVFoundation.replaceCurrentItemWithPlayerItem +import platform.AVFoundation.seekToTime +import platform.AVFoundation.timeControlStatus +import platform.AVFoundation.volume +import platform.CoreMedia.CMTime +import platform.CoreMedia.CMTimeGetSeconds +import platform.Foundation.NSURL +import kotlin.time.Duration +import kotlin.time.Duration.Companion.seconds + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +actual class AudioPlayer actual constructor(context: Any) { + + actual val context: Any = context + + private val avPlayer: AVPlayer = AVPlayer() + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + + private var disposed = false + + private val currentPlaylist = mutableListOf() + private val urlIndexMap = mutableMapOf() + + private val _playerState = MutableStateFlow(PlayerState.IDLE) + private val _currentMediaItem = MutableStateFlow(null) + private val _playlist = MutableStateFlow>(emptyList()) + private val _duration = MutableStateFlow(Duration.ZERO) + private val _position = MutableStateFlow(Duration.ZERO) + private val _bufferingPosition = MutableStateFlow(Duration.ZERO) + private val _loopState = MutableStateFlow(LoopState.NONE) + private val _shuffleMode = MutableStateFlow(false) + private val _playbackSpeed = MutableStateFlow(1.0f) + private val _volume = MutableStateFlow(1.0f) + private val _completion = MutableSharedFlow(extraBufferCapacity = 1) + private val _error = MutableSharedFlow(extraBufferCapacity = 1) + + actual val playerStateFlow: StateFlow = _playerState.asStateFlow() + actual val currentMediaItemFlow: StateFlow = _currentMediaItem.asStateFlow() + actual val playlistFlow: StateFlow> = _playlist.asStateFlow() + actual val durationFlow: StateFlow = _duration.asStateFlow() + actual val positionFlow: StateFlow = _position.asStateFlow() + actual val bufferingPositionFlow: StateFlow = _bufferingPosition.asStateFlow() + actual val loopStateFlow: StateFlow = _loopState.asStateFlow() + actual val shuffleModeFlow: StateFlow = _shuffleMode.asStateFlow() + actual val playbackSpeedFlow: StateFlow = _playbackSpeed.asStateFlow() + actual val volumeFlow: StateFlow = _volume.asStateFlow() + actual val completionFlow: Flow = _completion.asSharedFlow() + actual val errorFlow: Flow = _error.asSharedFlow() + + private var lastTimeControlStatus: AVPlayerTimeControlStatus? = null + + init { + avPlayer.addPeriodicTimeObserverForInterval( + interval = CMTimeMake(1, 4), + queue = null + ) { time -> + if (!disposed) { + val seconds = CMTimeGetSeconds(time) + _position.tryEmit(seconds.seconds) + + avPlayer.currentItem?.let { item -> + val durationSeconds = CMTimeGetSeconds(item.duration) + if (durationSeconds > 0) { + _duration.tryEmit(durationSeconds.seconds) + } + val loadedRanges = item.loadedTimeRanges +// if (loadedRanges.count() > 0u) { +// val range = loadedRanges.objectAtIndex(0u) +// } + } + } + } + + scope.launch { + while (!disposed) { + syncTimeControlStatus() + delay(500) + } + } + } + + private fun syncTimeControlStatus() { + val status = avPlayer.timeControlStatus + if (status == lastTimeControlStatus) return + lastTimeControlStatus = status + + val playerState = when (status) { + AVPlayerTimeControlStatusPlaying -> PlayerState.PLAYING + AVPlayerTimeControlStatusPaused -> PlayerState.PAUSED + AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate -> PlayerState.BUFFERING + else -> PlayerState.IDLE + } + _playerState.tryEmit(playerState) + + if (avPlayer.currentItem == null) { + _playerState.tryEmit(PlayerState.IDLE) + } + } + + private fun resolveState(): PlayerState { + return when (avPlayer.timeControlStatus) { + AVPlayerTimeControlStatusPlaying -> PlayerState.PLAYING + AVPlayerTimeControlStatusPaused -> PlayerState.PAUSED + AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate -> PlayerState.BUFFERING + else -> PlayerState.IDLE + } + } + + private fun buildAVPlayerItem(url: String): AVPlayerItem? { + val nsUrl = NSURL.URLWithString(url) ?: return null + return AVPlayerItem(nsUrl) + } + + actual suspend fun play() { + avPlayer.play() + } + + actual suspend fun pause() { + avPlayer.pause() + } + + actual suspend fun stop() { + avPlayer.pause() + avPlayer.seekToTime(CMTimeMake(0, 1)) + _playerState.tryEmit(PlayerState.IDLE) + } + + actual suspend fun seekTo(position: Duration) { + val seconds = position.inWholeMilliseconds / 1000.0 + val cmTime = CMTimeMakeWithSeconds(seconds, 1000) + avPlayer.seekToTime(cmTime) + _position.tryEmit(position) + } + + actual suspend fun loop(state: LoopState) { + _loopState.tryEmit(state) + } + + actual suspend fun shuffle(enabled: Boolean) { + _shuffleMode.tryEmit(enabled) + } + + actual suspend fun load( + playlist: List, + autoPlay: Boolean, + startPosition: Int + ) { + currentPlaylist.clear() + currentPlaylist.addAll(playlist) + urlIndexMap.clear() + playlist.forEachIndexed { index, item -> + urlIndexMap[item.url] = index + } + _playlist.tryEmit(currentPlaylist.toList()) + + if (playlist.isEmpty()) { + _playerState.tryEmit(PlayerState.IDLE) + _currentMediaItem.tryEmit(null) + _position.tryEmit(Duration.ZERO) + _duration.tryEmit(Duration.ZERO) + return + } + + val safeIndex = startPosition.coerceIn(0, playlist.lastIndex) + val item = playlist[safeIndex] + val avItem = buildAVPlayerItem(item.url) + + if (avItem == null) { + _error.tryEmit(IllegalArgumentException("Invalid URL: ${item.url}")) + _playerState.tryEmit(PlayerState.IDLE) + return + } + + avPlayer.replaceCurrentItemWithPlayerItem(avItem) + _currentMediaItem.tryEmit(item) + + if (autoPlay) { + avPlayer.play() + } + } + + actual suspend fun addMediaItem(mediaItem: MediaItem) { + currentPlaylist.add(mediaItem) + urlIndexMap[mediaItem.url] = currentPlaylist.lastIndex + _playlist.tryEmit(currentPlaylist.toList()) + } + + actual suspend fun insertMediaItemAtNextIndex(mediaItem: MediaItem) { + val currentIndex = currentPlaylist.indexOfFirst { + it.url == _currentMediaItem.value?.url + } + val insertIndex = if (currentIndex >= 0) currentIndex + 1 else currentPlaylist.size + currentPlaylist.add(insertIndex, mediaItem) + urlIndexMap.clear() + currentPlaylist.forEachIndexed { index, item -> + urlIndexMap[item.url] = index + } + _playlist.tryEmit(currentPlaylist.toList()) + } + + actual suspend fun removeMediaItem(mediaItem: MediaItem) { + val index = urlIndexMap[mediaItem.url] ?: return + currentPlaylist.removeAt(index) + urlIndexMap.clear() + currentPlaylist.forEachIndexed { i, item -> + urlIndexMap[item.url] = i + } + _playlist.tryEmit(currentPlaylist.toList()) + } + + actual suspend fun moveMediaItem(fromIndex: Int, toIndex: Int) { + if (fromIndex !in currentPlaylist.indices || toIndex !in currentPlaylist.indices || fromIndex == toIndex) return + val item = currentPlaylist.removeAt(fromIndex) + currentPlaylist.add(toIndex, item) + urlIndexMap.clear() + currentPlaylist.forEachIndexed { i, it -> + urlIndexMap[it.url] = i + } + _playlist.tryEmit(currentPlaylist.toList()) + } + + actual suspend fun skipToNext() { + val currentIndex = currentPlaylist.indexOfFirst { + it.url == _currentMediaItem.value?.url + } + val nextIndex = currentIndex + 1 + if (nextIndex < currentPlaylist.size) { + val nextItem = currentPlaylist[nextIndex] + val avItem = buildAVPlayerItem(nextItem.url) + if (avItem != null) { + avPlayer.replaceCurrentItemWithPlayerItem(avItem) + _currentMediaItem.tryEmit(nextItem) + avPlayer.play() + } + } + } + + actual suspend fun skipToPrevious() { + val currentIndex = currentPlaylist.indexOfFirst { + it.url == _currentMediaItem.value?.url + } + val prevIndex = currentIndex - 1 + if (prevIndex >= 0) { + val prevItem = currentPlaylist[prevIndex] + val avItem = buildAVPlayerItem(prevItem.url) + if (avItem != null) { + avPlayer.replaceCurrentItemWithPlayerItem(avItem) + _currentMediaItem.tryEmit(prevItem) + avPlayer.play() + } + } + } + + actual suspend fun jumpTo(index: Int) { + if (index in currentPlaylist.indices) { + val item = currentPlaylist[index] + val avItem = buildAVPlayerItem(item.url) + if (avItem != null) { + avPlayer.replaceCurrentItemWithPlayerItem(avItem) + _currentMediaItem.tryEmit(item) + } + } + } + + actual suspend fun setVolume(volume: Float) { + val clamped = volume.coerceIn(0f, 1f) + avPlayer.volume = clamped + _volume.tryEmit(clamped) + } + + actual suspend fun setPlaybackSpeed(speed: Float) { + val clamped = speed.coerceIn(0.25f, 4f) + avPlayer.rate = clamped + _playbackSpeed.tryEmit(clamped) + } + + actual fun isDisposed(): Boolean = disposed + + actual fun dispose() { + disposed = true + avPlayer.pause() + avPlayer.replaceCurrentItemWithPlayerItem(null) + currentPlaylist.clear() + urlIndexMap.clear() + + _playerState.tryEmit(PlayerState.IDLE) + _currentMediaItem.tryEmit(null) + _playlist.tryEmit(emptyList()) + _duration.tryEmit(Duration.ZERO) + _position.tryEmit(Duration.ZERO) + _bufferingPosition.tryEmit(Duration.ZERO) + } +} + +private fun CMTimeMake(value: Long, timescale: Int): CValue { + return platform.CoreMedia.CMTimeMake(value, timescale) +} + + +private fun CMTimeMakeWithSeconds(seconds: Double, preferredTimescale: Int): CValue { + return platform.CoreMedia.CMTimeMakeWithSeconds(seconds, preferredTimescale) +} diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/di/Modules.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/di/Modules.ios.kt new file mode 100644 index 00000000..cd4c0116 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/di/Modules.ios.kt @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.di + +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.core.share.IosShareService +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.core.webview.WebViewController +import dev.krtirtho.spotube.modules.library.local_tracks.media.IosLocalMediaDiscoveryService +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaDiscoveryService +import org.koin.core.module.dsl.singleOf +import org.koin.dsl.module + +actual val platformModules = module { + singleOf(::Paths) + singleOf(::WebViewController) + single { AudioPlayer(Unit) } + single { IosLocalMediaDiscoveryService() } + single { IosShareService() } +} diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.ios.kt new file mode 100644 index 00000000..9c07b0ed --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/newpipe/NewPipeService.ios.kt @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.newpipe + +import com.yushosei.newpipe.extractor.ServiceList.YouTube +import com.yushosei.newpipe.extractor.stream.AudioStream +import com.yushosei.newpipe.extractor.stream.StreamInfoItem +import com.yushosei.newpipe.extractor.youtube.linkHandler.YoutubeSearchQueryHandlerFactory +import io.ktor.http.Url +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO +import kotlinx.coroutines.withContext + +actual class NewPipeService { + actual suspend fun searchVideos(query: String): List { + return withContext(Dispatchers.IO) { + val extractor = YouTube.getSearchExtractor( + query, + mutableListOf(YoutubeSearchQueryHandlerFactory.MUSIC_SONGS), + "" + ) + extractor.fetchPage() + val results = extractor.initialPage + + results.items.mapNotNull { item -> + if (item is StreamInfoItem) { + VideoSearchResult( + title = item.name, + url = item.url, + uploader = item.uploaderName ?: "Unknown", + durationMs = item.duration, + thumbnailUrl = item.thumbnails.first().url, + id = Url(item.url).parameters["v"] + ?: throw IllegalArgumentException("Invalid YouTube URL: ${item.url}") + ) + } else { + null + } + } + } + } + + actual suspend fun getVideoInfo(id: String): VideoInfo { + return withContext(Dispatchers.IO) { + val extractor = YouTube.getStreamExtractor("https://www.youtube.com/watch?v=$id") + extractor.fetchPage() + VideoInfo( + title = extractor.name ?: "Unknown", + url = extractor.url ?: "https://www.youtube.com/watch?v=$id", + uploader = extractor.uploaderName, + durationMs = extractor.length, + thumbnailUrl = extractor.thumbnails.first().url, + audioStreams = extractor.audioStreams() + .filter { stream -> stream.isUrl() && stream.format != null } + .map { stream -> + dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioStream.Lossy( + url = stream.content, + codec = stream.codec ?: "unknown", + bitrate = stream.bitrate, + container = stream.format?.suffix ?: "unknown", + ) + }, + videoStreams = listOf(), // Not yet supported + id = id + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.ios.kt new file mode 100644 index 00000000..0cde016d --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.ios.kt @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.paths + +import kotlinx.cinterop.ExperimentalForeignApi +import platform.Foundation.NSCachesDirectory +import platform.Foundation.NSDocumentDirectory +import platform.Foundation.NSDownloadsDirectory +import platform.Foundation.NSFileManager +import platform.Foundation.NSURL +import platform.Foundation.NSUserDomainMask + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +@OptIn(ExperimentalForeignApi::class) +actual class Paths { + actual fun getApplicationCacheDirPath(): String { + // Return ios cache dir + val cacheDirectory: NSURL? = NSFileManager.defaultManager.URLForDirectory( + directory = NSCachesDirectory, + inDomain = NSUserDomainMask, + appropriateForURL = null, + create = false, + error = null, + ) + + return requireNotNull(cacheDirectory?.path) + } + + actual fun getApplicationDataDirPath(): String { + // Return ios document dir + val documentDirectory: NSURL? = NSFileManager.defaultManager.URLForDirectory( + directory = NSDocumentDirectory, + inDomain = NSUserDomainMask, + appropriateForURL = null, + create = false, + error = null, + ) + + return requireNotNull(documentDirectory?.path) + } + + actual fun getUserDownloadsDirPath(): String { + val downloadsDirectory: NSURL? = NSFileManager.defaultManager.URLForDirectory( + directory = NSDownloadsDirectory, + inDomain = NSUserDomainMask, + appropriateForURL = null, + create = false, + error = null, + ) + + return (downloadsDirectory?.path ?: getApplicationDataDirPath()) + "/Spotube" + } + + actual fun getMusicCacheDirPath(): String { + return getApplicationCacheDirPath() + "/music_cache" + } +} \ No newline at end of file diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/share/IosShareService.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/share/IosShareService.kt new file mode 100644 index 00000000..8a22a3c2 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/share/IosShareService.kt @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.share + +import dev.krtirtho.spotube.core.share.ShareService +import platform.Foundation.NSURL +import platform.UIKit.UIActivityViewController +import platform.UIKit.UIApplication + +class IosShareService : ShareService { + override fun share(url: String, title: String) { + val nsUrl = NSURL.URLWithString(url) ?: return + val rootViewController = UIApplication.sharedApplication.keyWindow?.rootViewController ?: return + val activityViewController = UIActivityViewController(listOf(title, url, nsUrl), null) + rootViewController.presentViewController(activityViewController, true, null) + } +} diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.ios.kt new file mode 100644 index 00000000..13ee072b --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.ios.kt @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.webview + +import io.github.kdroidfilter.webview.web.WebViewState + +actual fun platformWebviewConfig(webView: WebViewState) { +} \ No newline at end of file diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.ios.kt new file mode 100644 index 00000000..7c0a21e4 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.ios.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import kotlinx.coroutines.DelicateCoroutinesApi +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.newSingleThreadContext + +@OptIn(ExperimentalCoroutinesApi::class, DelicateCoroutinesApi::class) +actual fun createZiplineDispatcher(): ZiplineDispatcher { + // On iOS/native, thread stack sizes are typically 8 MiB by default, + // so newSingleThreadContext is sufficient. + val ctx = newSingleThreadContext("Zipline") + return ZiplineDispatcher(ctx) { + ctx.close() + } +} + diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/IosLocalMediaDiscoveryService.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/IosLocalMediaDiscoveryService.kt new file mode 100644 index 00000000..f47d02dd --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/IosLocalMediaDiscoveryService.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +class IosLocalMediaDiscoveryService : LocalMediaDiscoveryService { + override suspend fun discoverFolders(roots: List): List { + return emptyList() + } + + override fun observeChanges( + roots: List, + onChanged: LocalMediaChangeCallback, + ): LocalMediaObservation? { + return null + } +} diff --git a/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.ios.kt b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.ios.kt new file mode 100644 index 00000000..24a2efe0 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.ios.kt @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import androidx.compose.runtime.Composable + +@Composable +actual fun rememberLocalMediaPermissionState(): LocalMediaPermissionState { + return LocalMediaPermissionState( + isGranted = true, + requestPermission = {}, + ) +} diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/Platform.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/Platform.jvm.kt new file mode 100644 index 00000000..afe8388f --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/Platform.jvm.kt @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +class JVMPlatform : Platform { + override val name: String = "Java ${System.getProperty("java.version")}" + override val type: PlatformType = System.getProperty("os.name").let { osName -> + when { + osName.contains("win", ignoreCase = true) -> PlatformType.Windows + osName.contains("mac", ignoreCase = true) -> PlatformType.MacOS + osName.contains("nix", ignoreCase = true) || osName.contains( + "nux", + ignoreCase = true + ) || osName.contains("aix", ignoreCase = true) -> PlatformType.Linux + + else -> PlatformType.Unknown + } + } +} + +actual fun getPlatform(): Platform = JVMPlatform() \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.jvm.kt new file mode 100644 index 00000000..990248de --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/audioplayer/AudioPlayer.jvm.kt @@ -0,0 +1,612 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.audioplayer + +import dev.krtirtho.spotube.core.di.injectLogger +import dev.krtirtho.spotube.core.generated.VLCBundleLoaderGenerated +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.isActive +import kotlinx.coroutines.launch +import org.koin.core.component.KoinComponent +import uk.co.caprica.vlcj.factory.MediaPlayerFactory +import uk.co.caprica.vlcj.factory.discovery.NativeDiscovery +import uk.co.caprica.vlcj.medialist.MediaList +import uk.co.caprica.vlcj.player.base.MediaPlayer +import uk.co.caprica.vlcj.player.base.State +import uk.co.caprica.vlcj.player.component.AudioListPlayerComponent +import uk.co.caprica.vlcj.player.list.MediaListPlayer +import uk.co.caprica.vlcj.player.list.PlaybackMode +import java.util.concurrent.locks.ReentrantLock +import kotlin.concurrent.withLock +import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +actual class AudioPlayer actual constructor(context: Any) : KoinComponent { + actual val context: Any = context + + private val logger by injectLogger() + private val lock = ReentrantLock() + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + + private var mediaPlayerFactory: MediaPlayerFactory + + private var audioListPlayerComponent: AudioListPlayerComponent + + private var mediaListPlayer: MediaListPlayer + private var mediaPlayer: MediaPlayer + private var mediaList: MediaList + + private val originalPlaylist = mutableListOf() + private val currentPlaylist = mutableListOf() + + private var currentIndex = -1 + private var pendingNextIndex: Int? = null + private var shuffleEnabled = false + private var disposed = false + private var hasStartedPlayback = false + private var positionPollingJob: Job? = null + + private val _playerState = MutableStateFlow(PlayerState.IDLE) + private val _currentMediaItem = MutableStateFlow(null) + private val _playlist = MutableStateFlow>(emptyList()) + private val _duration = MutableStateFlow(Duration.ZERO) + private val _position = MutableStateFlow(Duration.ZERO) + private val _bufferingPosition = MutableStateFlow(Duration.ZERO) + private val _loopState = MutableStateFlow(LoopState.NONE) + private val _shuffleMode = MutableStateFlow(false) + private val _playbackSpeed = MutableStateFlow(1.0f) + private val _volume = MutableStateFlow(1.0f) + private val _completion = MutableSharedFlow(extraBufferCapacity = 1) + private val _error = MutableSharedFlow(extraBufferCapacity = 1) + + actual val playerStateFlow: StateFlow = _playerState.asStateFlow() + actual val currentMediaItemFlow: StateFlow = _currentMediaItem.asStateFlow() + actual val playlistFlow: StateFlow> = _playlist.asStateFlow() + actual val durationFlow: StateFlow = _duration.asStateFlow() + actual val positionFlow: StateFlow = _position.asStateFlow() + actual val bufferingPositionFlow: StateFlow = _bufferingPosition.asStateFlow() + actual val loopStateFlow: StateFlow = _loopState.asStateFlow() + actual val shuffleModeFlow: StateFlow = _shuffleMode.asStateFlow() + actual val playbackSpeedFlow: StateFlow = _playbackSpeed.asStateFlow() + actual val volumeFlow: StateFlow = _volume.asStateFlow() + actual val completionFlow: Flow = _completion.asSharedFlow() + actual val errorFlow: Flow = _error.asSharedFlow() + + init { + VLCBundleLoaderGenerated.getVerifiedPath() + mediaPlayerFactory = MediaPlayerFactory( + null as NativeDiscovery?, + "--no-video", + "--vout=dummy", + "--aout=any", + "--no-osd", + "--no-snapshot-preview", +// "--verbose=2" +// "--quiet" + ) + audioListPlayerComponent = object : AudioListPlayerComponent(mediaPlayerFactory) { + override fun opening(mediaPlayer: MediaPlayer) { + _playerState.tryEmit(PlayerState.BUFFERING) + } + + override fun buffering( + mediaPlayer: MediaPlayer, + newCache: Float + ) { + val durationMs = mediaPlayer.status().length() + _bufferingPosition.tryEmit( + if (durationMs > 0) (durationMs * (newCache / 100f)).toLong().milliseconds else Duration.ZERO, + ) + _playerState.tryEmit(if (newCache < 100f) PlayerState.BUFFERING else PlayerState.READY) + } + + override fun playing(mediaPlayer: MediaPlayer) { + hasStartedPlayback = true + _playerState.tryEmit(PlayerState.PLAYING) + } + + override fun paused(mediaPlayer: MediaPlayer) { + _playerState.tryEmit(PlayerState.PAUSED) + } + + override fun stopped(mediaPlayer: MediaPlayer) { + _playerState.tryEmit(PlayerState.IDLE) + } + + override fun finished(mediaPlayer: MediaPlayer) { + _playerState.tryEmit(PlayerState.COMPLETED) + _completion.tryEmit(Unit) + } + + override fun timeChanged( + mediaPlayer: MediaPlayer, + newTime: Long + ) { + if (newTime >= 0) { + _position.tryEmit(newTime.milliseconds) + } + } + + override fun mediaDurationChanged( + mediaPlayer: uk.co.caprica.vlcj.media.Media, + newDuration: Long + ) { + logger.d { "Media duration changed: ${newDuration}ms" } + if (newDuration > 0) { + _duration.tryEmit(newDuration.milliseconds) + } + } + + override fun lengthChanged(mediaPlayer: MediaPlayer?, newLength: Long) { + logger.d { "Media length changed: ${newLength}ms" } + if (newLength > 0) { + _duration.tryEmit(newLength.milliseconds) + } + } + + override fun volumeChanged( + mediaPlayer: MediaPlayer, + volume: Float + ) { + _volume.tryEmit(normalizeVlcVolume(volume)) + } + + override fun error(mediaPlayer: MediaPlayer) { + _playerState.tryEmit(PlayerState.IDLE) + _error.tryEmit(IllegalStateException("VLC encountered a playback error")) + } + + override fun nextItem( + mediaListPlayer: uk.co.caprica.vlcj.player.list.MediaListPlayer, + item: uk.co.caprica.vlcj.media.MediaRef, + ) { + lock.withLock { + val targetIndex = pendingNextIndex ?: run { + val currentMrl = runCatching { + val media = item.newMedia() + try { + media.info().mrl() + } finally { + media.release() + } + }.getOrNull() + + if (currentMrl != null) { + currentPlaylist.indexOfFirst { it.toMrl() == currentMrl } + } else { + -1 + } + } + + if (targetIndex >= 0 && targetIndex < currentPlaylist.size) { + logger.d { "nextItem: updating currentIndex from $currentIndex to $targetIndex" } + currentIndex = targetIndex + _currentMediaItem.tryEmit(currentPlaylist[targetIndex]) + } else { + logger.w { "nextItem: invalid targetIndex=$targetIndex, currentIndex remains $currentIndex" } + } + + pendingNextIndex = null + } + } + + override fun mediaListPlayerFinished(mediaListPlayer: uk.co.caprica.vlcj.player.list.MediaListPlayer) { + _playerState.tryEmit(PlayerState.COMPLETED) + _completion.tryEmit(Unit) + } + + override fun stopped(mediaListPlayer: uk.co.caprica.vlcj.player.list.MediaListPlayer) { + _playerState.tryEmit(PlayerState.IDLE) + } + + override fun mediaPlayerReady(mediaPlayer: MediaPlayer?) { + _duration.tryEmit( + mediaPlayer?.media()?.info()?.duration()?.milliseconds ?: Duration.ZERO + ) + } + } + + mediaListPlayer = audioListPlayerComponent.mediaListPlayer() + mediaPlayer = audioListPlayerComponent.mediaPlayer() + mediaList = mediaPlayerFactory.media().newMediaList() + + mediaListPlayer.list().setMediaList(mediaList.newMediaListRef()) + startPositionPolling() + } + + actual suspend fun play() { + lock.withLock { + if (disposed || currentPlaylist.isEmpty()) return + if (currentIndex !in currentPlaylist.indices) { + currentIndex = 0 + } + if (hasStartedPlayback) { + mediaListPlayer.controls().setPause(false) + } else { + mediaListPlayer.controls().play(currentIndex) + } + } + } + + actual suspend fun pause() { + lock.withLock { + if (disposed) return + mediaListPlayer.controls().pause() + } + } + + actual suspend fun stop() { + lock.withLock { + if (disposed) return + mediaListPlayer.controls().stop() + hasStartedPlayback = false + _position.tryEmit(Duration.ZERO) + } + } + + actual suspend fun seekTo(position: Duration) { + lock.withLock { + if (disposed) return + val maxMs = _duration.value.inWholeMilliseconds + val targetMs = if (maxMs > 0) { + position.inWholeMilliseconds.coerceIn(0, maxMs) + } else { + position.inWholeMilliseconds.coerceAtLeast(0) + } + mediaPlayer.controls().setTime(targetMs) + if (maxMs > 0) { + mediaPlayer.controls() + .setPosition((targetMs.toFloat() / maxMs.toFloat()).coerceIn(0f, 1f)) + } + _position.tryEmit(targetMs.milliseconds) + } + } + + actual suspend fun loop(state: LoopState) { + lock.withLock { + if (disposed) return + val vlcMode = when (state) { + LoopState.NONE -> PlaybackMode.DEFAULT + LoopState.ONE -> PlaybackMode.REPEAT + LoopState.ALL -> PlaybackMode.LOOP + } + mediaListPlayer.controls().setMode(vlcMode) + _loopState.tryEmit(state) + } + } + + actual suspend fun shuffle(enabled: Boolean) { + lock.withLock { + if (disposed || currentPlaylist.isEmpty() || shuffleEnabled == enabled) return + + val wasPlaying = _playerState.value == PlayerState.PLAYING + val wasPaused = _playerState.value == PlayerState.PAUSED + val currentItem = _currentMediaItem.value + + val rebuilt = if (enabled) { + if (currentItem != null) { + val rest = originalPlaylist.filterNot { it.url == currentItem.url }.shuffled() + listOf(currentItem) + rest + } else { + originalPlaylist.shuffled() + } + } else { + originalPlaylist.toList() + } + + currentPlaylist.clear() + currentPlaylist.addAll(rebuilt) + rebuildVlcMediaListLocked() + + shuffleEnabled = enabled + _shuffleMode.tryEmit(enabled) + _playlist.tryEmit(currentPlaylist.toList()) + + val nextIndex = when { + currentItem == null -> if (currentPlaylist.isEmpty()) -1 else 0 + enabled -> 0 + else -> currentPlaylist.indexOfFirst { it.url == currentItem.url } + .takeIf { it >= 0 } ?: 0 + } + + currentIndex = nextIndex + _currentMediaItem.tryEmit(currentPlaylist.getOrNull(nextIndex)) + + if (nextIndex >= 0 && (wasPlaying || wasPaused)) { + mediaListPlayer.controls().play(nextIndex) + if (wasPaused) { + mediaListPlayer.controls().setPause(true) + } + } + } + } + + actual suspend fun load(playlist: List, autoPlay: Boolean, startPosition: Int) { + lock.withLock { + if (disposed) return + + originalPlaylist.clear() + originalPlaylist.addAll(playlist) + currentPlaylist.clear() + currentPlaylist.addAll(playlist) + shuffleEnabled = false + + _shuffleMode.tryEmit(false) + rebuildVlcMediaListLocked() + _playlist.tryEmit(currentPlaylist.toList()) + + if (currentPlaylist.isEmpty()) { + currentIndex = -1 + _currentMediaItem.tryEmit(null) + _playerState.tryEmit(PlayerState.IDLE) + _duration.tryEmit(Duration.ZERO) + _position.tryEmit(Duration.ZERO) + _bufferingPosition.tryEmit(Duration.ZERO) + return + } + + val normalizedStartPosition = startPosition.coerceIn(0, currentPlaylist.lastIndex) + currentIndex = normalizedStartPosition + _currentMediaItem.tryEmit(currentPlaylist[normalizedStartPosition]) + + hasStartedPlayback = false + if (autoPlay) { + mediaListPlayer.controls().play(normalizedStartPosition) + } else { + _playerState.tryEmit(PlayerState.PAUSED) + } + } + } + + actual suspend fun addMediaItem(mediaItem: MediaItem) { + lock.withLock { + if (disposed) return + originalPlaylist.add(mediaItem) + currentPlaylist.add(mediaItem) + mediaList.media().add(mediaItem.toMrl()) + _playlist.tryEmit(currentPlaylist.toList()) + if (currentIndex == -1) { + currentIndex = 0 + _currentMediaItem.tryEmit(currentPlaylist.firstOrNull()) + } + } + } + + actual suspend fun insertMediaItemAtNextIndex(mediaItem: MediaItem) { + lock.withLock { + if (disposed) return + val insertIndex = if (currentIndex >= 0) currentIndex + 1 else 0 + originalPlaylist.add(insertIndex, mediaItem) + currentPlaylist.add(insertIndex, mediaItem) + mediaList.media().clear() + currentPlaylist.forEach { item -> + mediaList.media().add(item.toMrl()) + } + _playlist.tryEmit(currentPlaylist.toList()) + if (currentIndex == -1) { + currentIndex = 0 + _currentMediaItem.tryEmit(currentPlaylist.firstOrNull()) + } + } + } + + actual suspend fun removeMediaItem(mediaItem: MediaItem) { + lock.withLock { + if (disposed || currentPlaylist.isEmpty()) return + + originalPlaylist.removeAll { it.url == mediaItem.url } + val removalIndices = currentPlaylist.withIndex() + .filter { it.value.url == mediaItem.url } + .map { it.index } + + if (removalIndices.isEmpty()) return + + removalIndices.asReversed().forEach { index -> + mediaList.media().remove(index) + currentPlaylist.removeAt(index) + } + + if (currentPlaylist.isEmpty()) { + currentIndex = -1 + _currentMediaItem.tryEmit(null) + mediaListPlayer.controls().stop() + _playerState.tryEmit(PlayerState.IDLE) + } else { + currentIndex = currentIndex.coerceIn(0, currentPlaylist.lastIndex) + _currentMediaItem.tryEmit(currentPlaylist.getOrNull(currentIndex)) + } + + _playlist.tryEmit(currentPlaylist.toList()) + } + } + + actual suspend fun moveMediaItem(fromIndex: Int, toIndex: Int) { + lock.withLock { + if (disposed) return + if (fromIndex !in currentPlaylist.indices || toIndex !in currentPlaylist.indices || fromIndex == toIndex) return + + val item = currentPlaylist.removeAt(fromIndex) + currentPlaylist.add(toIndex, item) + + if (!shuffleEnabled && fromIndex in originalPlaylist.indices && toIndex in originalPlaylist.indices) { + val originalItem = originalPlaylist.removeAt(fromIndex) + originalPlaylist.add(toIndex, originalItem) + } + + val currentItemUrl = _currentMediaItem.value?.url + rebuildVlcMediaListLocked() + currentIndex = currentItemUrl?.let { url -> + currentPlaylist.indexOfFirst { it.url == url }.takeIf { it >= 0 } + } ?: currentIndex.coerceIn(0, currentPlaylist.lastIndex) + + _playlist.tryEmit(currentPlaylist.toList()) + _currentMediaItem.tryEmit(currentPlaylist.getOrNull(currentIndex)) + } + } + + actual suspend fun skipToNext() { + lock.withLock { + if (disposed || currentPlaylist.isEmpty()) return + val nextIndex = (currentIndex + 1).coerceAtMost(currentPlaylist.lastIndex) + logger.d { "skipToNext: currentIndex=$currentIndex, targetIndex=$nextIndex" } + pendingNextIndex = nextIndex + mediaListPlayer.controls().playNext() + } + } + + actual suspend fun skipToPrevious() { + lock.withLock { + if (disposed || currentPlaylist.isEmpty()) return + val prevIndex = (currentIndex - 1).coerceAtLeast(0) + logger.d { "skipToPrevious: currentIndex=$currentIndex, targetIndex=$prevIndex" } + pendingNextIndex = prevIndex + mediaListPlayer.controls().playPrevious() + } + } + + actual suspend fun jumpTo(index: Int) { + lock.withLock { + if (disposed || index !in currentPlaylist.indices) return + currentIndex = index + _currentMediaItem.tryEmit(currentPlaylist[index]) + mediaListPlayer.controls().play(index) + } + } + + actual suspend fun setVolume(volume: Float) { + lock.withLock { + if (disposed) return + val clamped = volume.coerceIn(0f, 1f) + mediaPlayer.audio().setVolume((clamped * 100).toInt()) + _volume.tryEmit(clamped) + } + } + + actual suspend fun setPlaybackSpeed(speed: Float) { + lock.withLock { + if (disposed) return + val clamped = speed.coerceIn(0.25f, 4f) + val updated = mediaPlayer.controls().setRate(clamped) + if (updated) { + _playbackSpeed.tryEmit(clamped) + } else { + logger.w { "Failed to set VLC playback speed to $clamped" } + } + } + } + + actual fun isDisposed(): Boolean = disposed + + actual fun dispose() { + lock.withLock { + if (disposed) return + disposed = true + } + + positionPollingJob?.cancel() + scope.cancel() + + runCatching { mediaListPlayer.controls().stop() } + runCatching { mediaList.release() } + runCatching { audioListPlayerComponent.release() } + runCatching { mediaPlayerFactory.release() } + + lock.withLock { + originalPlaylist.clear() + currentPlaylist.clear() + currentIndex = -1 + hasStartedPlayback = false + } + + _playerState.tryEmit(PlayerState.IDLE) + _currentMediaItem.tryEmit(null) + _playlist.tryEmit(emptyList()) + _duration.tryEmit(Duration.ZERO) + _position.tryEmit(Duration.ZERO) + _bufferingPosition.tryEmit(Duration.ZERO) + } + + private fun rebuildVlcMediaListLocked() { + mediaList.media().clear() + currentPlaylist.forEach { mediaItem -> + mediaList.media().add(mediaItem.toMrl()) + } + } + + private fun startPositionPolling() { + positionPollingJob = scope.launch { + try { + while (isActive) { + if (!disposed) { + val status = mediaPlayer.status() + val time = status.time() + val duration = status.length() + if (time >= 0) { + _position.tryEmit(time.milliseconds) + } + if (duration > 0) { + _duration.tryEmit(duration.milliseconds) + } + _playerState.tryEmit(status.state().toPlayerState()) + } + delay(250.milliseconds) + } + } catch (e: Throwable) { + logger.e(e) { "Error in position polling loop" } + _error.tryEmit(e) + } + } + } + + private fun State.toPlayerState(): PlayerState { + return when (this) { + State.NOTHING_SPECIAL -> PlayerState.IDLE + State.OPENING -> PlayerState.BUFFERING + State.BUFFERING -> PlayerState.BUFFERING + State.PLAYING -> PlayerState.PLAYING + State.PAUSED -> PlayerState.PAUSED + State.STOPPED -> PlayerState.IDLE + State.ENDED -> PlayerState.COMPLETED + State.ERROR -> PlayerState.IDLE + } + } + + private fun MediaItem.toMrl(): String { + return url + } + + private fun normalizeVlcVolume(rawVolume: Float): Float { + return if (rawVolume <= 1f) { + rawVolume.coerceIn(0f, 1f) + } else { + (rawVolume / 100f).coerceIn(0f, 1f) + } + } +} diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/di/Modules.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/di/Modules.jvm.kt new file mode 100644 index 00000000..5c7baf17 --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/di/Modules.jvm.kt @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.di + +import dev.krtirtho.spotube.core.audioplayer.AudioPlayer +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.core.share.JvmShareService +import dev.krtirtho.spotube.core.share.ShareService +import dev.krtirtho.spotube.modules.library.local_tracks.media.JvmLocalMediaDiscoveryService +import dev.krtirtho.spotube.modules.library.local_tracks.media.LocalMediaDiscoveryService +import org.koin.core.module.dsl.singleOf +import org.koin.dsl.module + +actual val platformModules = module { + singleOf(::Paths) + single { AudioPlayer(Unit) } + single { JvmLocalMediaDiscoveryService() } + single { JvmShareService() } +} diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.jvm.kt new file mode 100644 index 00000000..652081af --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/paths/Paths.jvm.kt @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.paths + +import net.harawata.appdirs.AppDirsFactory + +@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +actual class Paths { + actual fun getApplicationCacheDirPath(): String { + return AppDirsFactory.getInstance().getUserCacheDir("Spotube", null, "Spotube") + } + + actual fun getApplicationDataDirPath(): String { + return AppDirsFactory.getInstance().getUserDataDir("Spotube", null, "Spotube") + } + + actual fun getUserDownloadsDirPath(): String { + return AppDirsFactory.getInstance().getUserDownloadsDir("Spotube", null, null) + } + + actual fun getMusicCacheDirPath(): String { + return AppDirsFactory.getInstance().getUserCacheDir("Spotube", null, "Spotube") + "/music_cache" + } +} \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/share/JvmShareService.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/share/JvmShareService.kt new file mode 100644 index 00000000..a56407e7 --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/share/JvmShareService.kt @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.share + +import dev.krtirtho.spotube.core.share.ShareService +import java.awt.Toolkit +import java.awt.datatransfer.StringSelection + +class JvmShareService : ShareService { + override fun share(url: String, title: String) { + val selection = StringSelection(url) + Toolkit.getDefaultToolkit().systemClipboard.setContents(selection, null) + } +} diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.jvm.kt new file mode 100644 index 00000000..4687b6ea --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.jvm.kt @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.window.WindowDraggableArea +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.TopAppBar +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.ApplicationScope +import androidx.compose.ui.window.WindowPlacement +import compose.icons.FeatherIcons +import compose.icons.feathericons.Maximize2 +import compose.icons.feathericons.Minimize2 +import compose.icons.feathericons.Minus +import compose.icons.feathericons.X + + +@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) +@Composable +actual fun ApplicationMainBar( + title: @Composable (() -> Unit), + subtitle: @Composable () -> Unit, + actions: @Composable (RowScope.() -> Unit), + backButton: Boolean, +) { + LocalWindowScope.current.WindowDraggableArea { + Box( + modifier = Modifier.fillMaxWidth() + ) { + TopAppBar( + title = title, + actions = { + actions() + }, + navigationIcon = { + if (backButton) { + ApplicationBackButton() + } + }, + subtitle = subtitle, + modifier = Modifier.padding(end = 125.dp) // To avoid overlap with window buttons + ) + WindowButtons( + modifier = Modifier.align(Alignment.TopEnd) + ) + } + } +} + +@Composable +private fun WindowButtons(modifier: Modifier = Modifier) { + val window = LocalWindowScope.current.window + val applicationScope = LocalApplicationScope.current + + Row( + modifier = modifier, + horizontalArrangement = Arrangement.SpaceBetween + ) { + IconButton( + onClick = { + window.isMinimized = true + }) { + Icon( + FeatherIcons.Minus, "Minimize", modifier = Modifier.size(14.dp) + ) + } + IconButton( + onClick = { + window.placement = if (window.placement == WindowPlacement.Maximized) { + WindowPlacement.Floating + } else { + WindowPlacement.Maximized + } + }) { + if (window.placement == WindowPlacement.Floating) { + Icon( + FeatherIcons.Maximize2, "Maximize", modifier = Modifier.size(14.dp) + ) + } else { + Icon( + FeatherIcons.Minimize2, "Restore", modifier = Modifier.size(14.dp) + ) + } + } + IconButton( + onClick = { + applicationScope.exitApplication() + }) { + Icon( + FeatherIcons.X, "Close", modifier = Modifier.size(14.dp) + ) + } + } +} \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/LocalApplication.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/LocalApplication.kt new file mode 100644 index 00000000..a4cb687e --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/LocalApplication.kt @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.runtime.staticCompositionLocalOf +import androidx.compose.ui.window.ApplicationScope + +val LocalApplicationScope = staticCompositionLocalOf { + error("No ApplicationScope found in LocalApplicationScope") +} \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/LocalWindow.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/LocalWindow.kt new file mode 100644 index 00000000..1d9ebd64 --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/LocalWindow.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.runtime.compositionLocalOf +import androidx.compose.ui.window.FrameWindowScope + +// LocalWindow is a LocalComposition that provides access to the current Window instance in the composition hierarchy. +val LocalWindowScope = compositionLocalOf { + error("No Window found in LocalWindowScope") +} \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.jvm.kt new file mode 100644 index 00000000..e38e6397 --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.jvm.kt @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.VerticalScrollbar +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyListState +import androidx.compose.foundation.rememberScrollbarAdapter +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +@Composable +actual fun VerticalScrollbar( + listState: LazyListState, + modifier: Modifier +) { + VerticalScrollbar( + adapter = rememberScrollbarAdapter(listState), + modifier = modifier.fillMaxHeight() + .padding(end = 2.dp) + .padding(vertical = 16.dp) + .width(12.dp), + ) +} \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.jvm.kt new file mode 100644 index 00000000..eff8380e --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/webview/PlatformWebviewConfig.jvm.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.webview + +import dev.krtirtho.spotube.core.paths.Paths +import io.github.kdroidfilter.webview.web.WebViewState +import io.github.vinceglb.filekit.utils.div +import io.github.vinceglb.filekit.utils.toPath +import org.koin.core.context.GlobalContext + +actual fun platformWebviewConfig(webView: WebViewState) { + val paths = GlobalContext.get().get() + + webView.webSettings.desktopWebSettings.dataDirectory = + (paths.getApplicationCacheDirPath().toPath() / "webview_data").toString() +} \ No newline at end of file diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.jvm.kt new file mode 100644 index 00000000..b05bcc5e --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/core/zipline/ZiplineDispatcher.jvm.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.zipline + +import kotlinx.coroutines.asCoroutineDispatcher +import java.util.concurrent.Executors + +actual fun createZiplineDispatcher(): ZiplineDispatcher { + val executor = Executors.newSingleThreadExecutor { runnable -> + Thread(null, runnable, "Zipline", 8L * 1024 * 1024) // 8 MiB stack for QuickJS compile() + } + val dispatcher = executor.asCoroutineDispatcher() + return ZiplineDispatcher(dispatcher) { + dispatcher.close() + executor.shutdown() + } +} + diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/main.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/main.kt new file mode 100644 index 00000000..7666aaeb --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/main.kt @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube + +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.ExperimentalComposeUiApi +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Window +import androidx.compose.ui.window.WindowDecoration +import androidx.compose.ui.window.application +import androidx.compose.ui.window.rememberWindowState +import dev.krtirtho.spotube.core.di.initKoin +import dev.krtirtho.spotube.core.newpipe.NewPipeDownloader +import dev.krtirtho.spotube.core.paths.Paths +import dev.krtirtho.spotube.core.ui.component.LocalApplicationScope +import dev.krtirtho.spotube.core.ui.component.LocalWindowScope +import io.github.vinceglb.filekit.FileKit +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import org.koin.core.component.KoinComponent +import org.koin.core.component.get + +object KoinPathsProvider : KoinComponent { + val paths: Paths get() = get() +} + +@OptIn(ExperimentalComposeUiApi::class) +fun main() { + FileKit.init(appId = "dev.krtirtho.spotube") + initKoin() + NewPipeDownloader.init(KoinPathsProvider.paths) + val appScope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + + application { + val windowState = rememberWindowState( + width = 1080.dp, + height = 720.dp + ) + + Window( + state = windowState, + onCloseRequest = { + appScope.cancel() + exitApplication() + }, + title = "Spotube", + decoration = WindowDecoration.Undecorated(), + ) { + CompositionLocalProvider( + LocalApplicationScope provides this@application, + LocalWindowScope provides this@Window, + ) { + App() + } + } + } +} diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/JvmLocalMediaDiscoveryService.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/JvmLocalMediaDiscoveryService.kt new file mode 100644 index 00000000..16718db9 --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/JvmLocalMediaDiscoveryService.kt @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import java.nio.file.FileSystems +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.StandardWatchEventKinds +import java.nio.file.WatchKey +import java.util.Locale +import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicLong +import kotlin.io.path.absolutePathString +import kotlin.io.path.exists +import kotlin.io.path.extension +import kotlin.io.path.isDirectory +import kotlin.io.path.nameWithoutExtension + +class JvmLocalMediaDiscoveryService : LocalMediaDiscoveryService { + override suspend fun discoverFolders(roots: List): List = withContext(Dispatchers.IO) { + val resolvedRoots = resolveRoots(roots) + if (resolvedRoots.isEmpty()) { + return@withContext emptyList() + } + + val folders = linkedMapOf>() + val scanned = AtomicLong(0) + + resolvedRoots.forEach { root -> + try { + Files.walk(root).use { stream -> + stream + .filter { path -> !Files.isDirectory(path) } + .filter { path -> isSupportedAudioExtension(path.extension) } + .forEach { filePath -> + if (scanned.incrementAndGet() > MAX_FILES_PER_SCAN) return@forEach + val parent = filePath.parent?.absolutePathString() ?: return@forEach + val trackPath = filePath.toAbsolutePath().toString() + println("Debug: Found track path = $trackPath") + val track = LocalMediaTrack( + path = trackPath, + name = filePath.nameWithoutExtension.ifBlank { + filePath.fileName.toString() + }, + artists = emptyList(), + durationMs = 0L, + album = null, + coverBytes = null, + ) + folders.getOrPut(parent) { mutableListOf() }.add(track) + } + } + } catch (e: Exception) { + println("Debug: Skipping unreadable directory ${root}: ${e.message}") + } + } + + folders.entries + .map { (path, tracks) -> + LocalMediaFolder( + path = path, + name = Path.of(path).fileName?.toString().orEmpty().ifBlank { path }, + tracks = tracks.sortedBy { it.name.lowercase(Locale.getDefault()) }, + ) + } + .sortedBy { it.name.lowercase(Locale.getDefault()) } + } + + override fun observeChanges( + roots: List, + onChanged: LocalMediaChangeCallback, + ): LocalMediaObservation? { + val resolvedRoots = resolveRoots(roots) + if (resolvedRoots.isEmpty()) return null + + val watchService = FileSystems.getDefault().newWatchService() + val watchedDirs = mutableSetOf() + resolvedRoots.forEach { root -> + try { + Files.walk(root).use { stream -> + stream.filter { it.isDirectory() }.forEach { dir -> + if (watchedDirs.add(dir)) { + dir.register( + watchService, + StandardWatchEventKinds.ENTRY_CREATE, + StandardWatchEventKinds.ENTRY_DELETE, + StandardWatchEventKinds.ENTRY_MODIFY, + ) + } + } + } + } catch (e: Exception) { + println("Debug: Skipping unwatchable directory ${root}: ${e.message}") + } + } + + val executor = Executors.newSingleThreadExecutor() + val lastTriggeredAt = AtomicLong(0) + executor.submit { + while (!Thread.currentThread().isInterrupted) { + val key: WatchKey = try { + watchService.poll(500, TimeUnit.MILLISECONDS) ?: continue + } catch (_: InterruptedException) { + Thread.currentThread().interrupt() + break + } + + if (key.pollEvents().isNotEmpty()) { + val now = System.currentTimeMillis() + val previous = lastTriggeredAt.get() + if (now - previous >= WATCH_DEBOUNCE_MS && lastTriggeredAt.compareAndSet(previous, now)) { + onChanged() + } + } + + if (!key.reset()) { + break + } + } + } + + return LocalMediaObservation { + executor.shutdownNow() + runCatching { watchService.close() } + } + } + + private fun isSupportedAudioExtension(extension: String): Boolean { + return extension.lowercase(Locale.getDefault()) in SUPPORTED_EXTENSIONS + } + + private fun resolveRoots(roots: List): List { + val customRoots = roots + .asSequence() + .map { it.trim() } + .filter { it.isNotBlank() } + .map { Path.of(it) } + .distinct() + .toList() + + val home = System.getProperty("user.home").orEmpty() + val defaults = if (home.isBlank()) { + emptyList() + } else { + listOf( + Path.of(home, "Music"), + Path.of(home, "Downloads"), + ) + } + + return (defaults + customRoots) + .distinct() + .filter { it.exists() && it.isDirectory() && Files.isReadable(it) } + } + + companion object { + private const val WATCH_DEBOUNCE_MS = 2_500L + private const val MAX_FILES_PER_SCAN = 100_000L + private val SUPPORTED_EXTENSIONS = setOf( + "mp3", + "m4a", + "aac", + "flac", + "wav", + "ogg", + "opus", + "wma", + ) + } +} diff --git a/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.jvm.kt new file mode 100644 index 00000000..24a2efe0 --- /dev/null +++ b/composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/modules/library/local_tracks/media/LocalMediaPermission.jvm.kt @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.modules.library.local_tracks.media + +import androidx.compose.runtime.Composable + +@Composable +actual fun rememberLocalMediaPermissionState(): LocalMediaPermissionState { + return LocalMediaPermissionState( + isGranted = true, + requestPermission = {}, + ) +} diff --git a/composeApp/src/mobileMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.mobile.kt b/composeApp/src/mobileMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.mobile.kt new file mode 100644 index 00000000..47639afc --- /dev/null +++ b/composeApp/src/mobileMain/kotlin/dev/krtirtho/spotube/core/ui/component/ApplicationMainBar.mobile.kt @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.layout.RowScope +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.TopAppBar +import androidx.compose.runtime.Composable + +@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) +@Composable +actual fun ApplicationMainBar( + title: @Composable (() -> Unit), + subtitle: @Composable () -> Unit, + actions: @Composable (RowScope.() -> Unit), + backButton: Boolean +) { + return TopAppBar( + title = title, + subtitle = subtitle, + actions = actions, + navigationIcon = { + if (backButton) { + ApplicationBackButton() + } + } + ) +} \ No newline at end of file diff --git a/composeApp/src/mobileMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.mobile.kt b/composeApp/src/mobileMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.mobile.kt new file mode 100644 index 00000000..080a02ea --- /dev/null +++ b/composeApp/src/mobileMain/kotlin/dev/krtirtho/spotube/core/ui/component/VerticalScrollbar.mobile.kt @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package dev.krtirtho.spotube.core.ui.component + +import androidx.compose.foundation.lazy.LazyListState +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +@Composable +actual fun VerticalScrollbar( + listState: LazyListState, + modifier: Modifier +) { + // No-op on mobile targets. +} \ No newline at end of file diff --git a/devtools_options.yaml b/devtools_options.yaml deleted file mode 100644 index 7e7e7f67..00000000 --- a/devtools_options.yaml +++ /dev/null @@ -1 +0,0 @@ -extensions: diff --git a/distribute_options.yaml b/distribute_options.yaml deleted file mode 100644 index 153677e9..00000000 --- a/distribute_options.yaml +++ /dev/null @@ -1,41 +0,0 @@ -output: dist/ - -releases: - - name: dev - jobs: - # Generating a debian binary - - name: release-dev-linux-zip - package: - platform: linux - target: zip - build_args: - dart-define: - APP_ENV: dev - - name: release-dev-linux-deb - package: - platform: linux - target: deb - build_args: - dart-define: - APP_ENV: dev - - name: release-dev-linux-appimage - package: - platform: linux - target: appimage - build_args: - dart-define: - APP_ENV: dev - - name: release-dev-windows-exe - package: - platform: windows - target: exe - build_args: - dart-define: - APP_ENV: dev - - name: release-dev-macos-dmg - package: - platform: macos - target: dmg - build_args: - dart-define: - APP_ENV: dev diff --git a/drift_schemas/app_db/drift_schema_v1.json b/drift_schemas/app_db/drift_schema_v1.json deleted file mode 100644 index b894446c..00000000 --- a/drift_schemas/app_db/drift_schema_v1.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Blue:0xFF2196F3\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[6],"type":"table","data":{"name":"playlist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_player_state_id","getter_name":"audioPlayerStateId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES audio_player_state_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES audio_player_state_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"index","getter_name":"index","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[7],"type":"table","data":{"name":"playlist_media_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playlist_id","getter_name":"playlistId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES playlist_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES playlist_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"uri","getter_name":"uri","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extras","getter_name":"extras","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}},{"name":"http_headers","getter_name":"httpHeaders","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":12,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v10.json b/drift_schemas/app_db/drift_schema_v10.json deleted file mode 100644 index 5fb86d25..00000000 --- a/drift_schemas/app_db/drift_schema_v10.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Slate:0xff64748b\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source_id","getter_name":"audioSourceId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"youtube_client_engine","getter_name":"youtubeClientEngine","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(YoutubeClientEngine.youtubeExplode.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(YoutubeClientEngine.values)","dart_type_name":"YoutubeClientEngine"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"connect_port","getter_name":"connectPort","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(-1)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_info","getter_name":"sourceInfo","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"{}\")","default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"tracks","getter_name":"tracks","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"[]\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeTrackObjectListConverter()","dart_type_name":"List"}},{"name":"current_index","getter_name":"currentIndex","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(0)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"plugins_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[{"allowed-lengths":{"min":1,"max":50}}]},{"name":"description","getter_name":"description","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"version","getter_name":"version","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"author","getter_name":"author","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"entry_point","getter_name":"entryPoint","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"apis","getter_name":"apis","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"abilities","getter_name":"abilities","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"selected_for_metadata","getter_name":"selectedForMetadata","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"selected_for_metadata\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"selected_for_metadata\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"selected_for_audio_source","getter_name":"selectedForAudioSource","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"selected_for_audio_source\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"selected_for_audio_source\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"repository","getter_name":"repository","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"plugin_api_version","getter_name":"pluginApiVersion","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('2.0.0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":11,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_info","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v2.json b/drift_schemas/app_db/drift_schema_v2.json deleted file mode 100644 index 668afb3f..00000000 --- a/drift_schemas/app_db/drift_schema_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Blue:0xFF2196F3\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[6],"type":"table","data":{"name":"playlist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_player_state_id","getter_name":"audioPlayerStateId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES audio_player_state_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES audio_player_state_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"index","getter_name":"index","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[7],"type":"table","data":{"name":"playlist_media_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playlist_id","getter_name":"playlistId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES playlist_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES playlist_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"uri","getter_name":"uri","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extras","getter_name":"extras","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}},{"name":"http_headers","getter_name":"httpHeaders","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":12,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v3.json b/drift_schemas/app_db/drift_schema_v3.json deleted file mode 100644 index 93e0ef1b..00000000 --- a/drift_schemas/app_db/drift_schema_v3.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Blue:0xFF2196F3\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[6],"type":"table","data":{"name":"playlist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_player_state_id","getter_name":"audioPlayerStateId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES audio_player_state_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES audio_player_state_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"index","getter_name":"index","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[7],"type":"table","data":{"name":"playlist_media_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playlist_id","getter_name":"playlistId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES playlist_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES playlist_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"uri","getter_name":"uri","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extras","getter_name":"extras","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}},{"name":"http_headers","getter_name":"httpHeaders","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":12,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v4.json b/drift_schemas/app_db/drift_schema_v4.json deleted file mode 100644 index fc50a6f8..00000000 --- a/drift_schemas/app_db/drift_schema_v4.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Blue:0xFF2196F3\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"youtube_client_engine","getter_name":"youtubeClientEngine","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(YoutubeClientEngine.youtubeExplode.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(YoutubeClientEngine.values)","dart_type_name":"YoutubeClientEngine"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[6],"type":"table","data":{"name":"playlist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_player_state_id","getter_name":"audioPlayerStateId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES audio_player_state_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES audio_player_state_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"index","getter_name":"index","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[7],"type":"table","data":{"name":"playlist_media_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playlist_id","getter_name":"playlistId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES playlist_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES playlist_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"uri","getter_name":"uri","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extras","getter_name":"extras","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}},{"name":"http_headers","getter_name":"httpHeaders","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":12,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v5.json b/drift_schemas/app_db/drift_schema_v5.json deleted file mode 100644 index eefe0205..00000000 --- a/drift_schemas/app_db/drift_schema_v5.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Orange:0xFFf97315\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"youtube_client_engine","getter_name":"youtubeClientEngine","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(YoutubeClientEngine.youtubeExplode.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(YoutubeClientEngine.values)","dart_type_name":"YoutubeClientEngine"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[6],"type":"table","data":{"name":"playlist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_player_state_id","getter_name":"audioPlayerStateId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES audio_player_state_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES audio_player_state_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"index","getter_name":"index","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[7],"type":"table","data":{"name":"playlist_media_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playlist_id","getter_name":"playlistId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES playlist_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES playlist_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"uri","getter_name":"uri","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extras","getter_name":"extras","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}},{"name":"http_headers","getter_name":"httpHeaders","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":12,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v6.json b/drift_schemas/app_db/drift_schema_v6.json deleted file mode 100644 index 8a646be1..00000000 --- a/drift_schemas/app_db/drift_schema_v6.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Orange:0xFFf97315\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"youtube_client_engine","getter_name":"youtubeClientEngine","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(YoutubeClientEngine.youtubeExplode.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(YoutubeClientEngine.values)","dart_type_name":"YoutubeClientEngine"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"connect_port","getter_name":"connectPort","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(-1)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[6],"type":"table","data":{"name":"playlist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_player_state_id","getter_name":"audioPlayerStateId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES audio_player_state_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES audio_player_state_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"index","getter_name":"index","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[7],"type":"table","data":{"name":"playlist_media_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playlist_id","getter_name":"playlistId","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES playlist_table (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES playlist_table (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"uri","getter_name":"uri","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extras","getter_name":"extras","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}},{"name":"http_headers","getter_name":"httpHeaders","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":12,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v7.json b/drift_schemas/app_db/drift_schema_v7.json deleted file mode 100644 index d6644857..00000000 --- a/drift_schemas/app_db/drift_schema_v7.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Orange:0xFFf97315\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"youtube_client_engine","getter_name":"youtubeClientEngine","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(YoutubeClientEngine.youtubeExplode.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(YoutubeClientEngine.values)","dart_type_name":"YoutubeClientEngine"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"connect_port","getter_name":"connectPort","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(-1)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"tracks","getter_name":"tracks","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"[]\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeTrackObjectListConverter()","dart_type_name":"List"}},{"name":"current_index","getter_name":"currentIndex","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(0)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"metadata_plugins_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[{"allowed-lengths":{"min":1,"max":50}}]},{"name":"description","getter_name":"description","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"version","getter_name":"version","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"author","getter_name":"author","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"entry_point","getter_name":"entryPoint","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"apis","getter_name":"apis","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"abilities","getter_name":"abilities","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"selected","getter_name":"selected","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"selected\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"selected\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"repository","getter_name":"repository","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"plugin_api_version","getter_name":"pluginApiVersion","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":11,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/drift_schemas/app_db/drift_schema_v8.json b/drift_schemas/app_db/drift_schema_v8.json deleted file mode 100644 index eba4c46e..00000000 --- a/drift_schemas/app_db/drift_schema_v8.json +++ /dev/null @@ -1,1143 +0,0 @@ -{ - "_meta": { - "description": "This file contains a serialized version of schema entities for drift.", - "version": "1.2.0" - }, - "options": { "store_date_time_values_as_text": false }, - "entities": [ - { - "id": 0, - "references": [], - "type": "table", - "data": { - "name": "authentication_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "cookie", - "getter_name": "cookie", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "EncryptedTextConverter()", - "dart_type_name": "DecryptedText" - } - }, - { - "name": "access_token", - "getter_name": "accessToken", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "EncryptedTextConverter()", - "dart_type_name": "DecryptedText" - } - }, - { - "name": "expiration", - "getter_name": "expiration", - "moor_type": "dateTime", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 1, - "references": [], - "type": "table", - "data": { - "name": "blacklist_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "name", - "getter_name": "name", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "element_type", - "getter_name": "elementType", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(BlacklistedType.values)", - "dart_type_name": "BlacklistedType" - } - }, - { - "name": "element_id", - "getter_name": "elementId", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 2, - "references": [], - "type": "table", - "data": { - "name": "preferences_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "audio_quality", - "getter_name": "audioQuality", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(SourceQualities.high.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(SourceQualities.values)", - "dart_type_name": "SourceQualities" - } - }, - { - "name": "album_color_sync", - "getter_name": "albumColorSync", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"album_color_sync\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"album_color_sync\" IN (0, 1))" - }, - "default_dart": "const Constant(true)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "amoled_dark_theme", - "getter_name": "amoledDarkTheme", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"amoled_dark_theme\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"amoled_dark_theme\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "check_update", - "getter_name": "checkUpdate", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"check_update\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"check_update\" IN (0, 1))" - }, - "default_dart": "const Constant(true)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "normalize_audio", - "getter_name": "normalizeAudio", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"normalize_audio\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"normalize_audio\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "show_system_tray_icon", - "getter_name": "showSystemTrayIcon", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"show_system_tray_icon\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"show_system_tray_icon\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "system_title_bar", - "getter_name": "systemTitleBar", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"system_title_bar\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"system_title_bar\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "skip_non_music", - "getter_name": "skipNonMusic", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"skip_non_music\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"skip_non_music\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "close_behavior", - "getter_name": "closeBehavior", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(CloseBehavior.close.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(CloseBehavior.values)", - "dart_type_name": "CloseBehavior" - } - }, - { - "name": "accent_color_scheme", - "getter_name": "accentColorScheme", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(\"Slate:0xff64748b\")", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const SpotubeColorConverter()", - "dart_type_name": "SpotubeColor" - } - }, - { - "name": "layout_mode", - "getter_name": "layoutMode", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(LayoutMode.adaptive.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(LayoutMode.values)", - "dart_type_name": "LayoutMode" - } - }, - { - "name": "locale", - "getter_name": "locale", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const LocaleConverter()", - "dart_type_name": "Locale" - } - }, - { - "name": "market", - "getter_name": "market", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(Market.US.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(Market.values)", - "dart_type_name": "Market" - } - }, - { - "name": "search_mode", - "getter_name": "searchMode", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(SearchMode.youtube.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(SearchMode.values)", - "dart_type_name": "SearchMode" - } - }, - { - "name": "download_location", - "getter_name": "downloadLocation", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(\"\")", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "local_library_location", - "getter_name": "localLibraryLocation", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(\"\")", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const StringListConverter()", - "dart_type_name": "List" - } - }, - { - "name": "piped_instance", - "getter_name": "pipedInstance", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(\"https://pipedapi.kavin.rocks\")", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "invidious_instance", - "getter_name": "invidiousInstance", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(\"https://inv.nadeko.net\")", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "theme_mode", - "getter_name": "themeMode", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(ThemeMode.system.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(ThemeMode.values)", - "dart_type_name": "ThemeMode" - } - }, - { - "name": "audio_source", - "getter_name": "audioSource", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(AudioSource.youtube.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(AudioSource.values)", - "dart_type_name": "AudioSource" - } - }, - { - "name": "youtube_client_engine", - "getter_name": "youtubeClientEngine", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(YoutubeClientEngine.youtubeExplode.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(YoutubeClientEngine.values)", - "dart_type_name": "YoutubeClientEngine" - } - }, - { - "name": "stream_music_codec", - "getter_name": "streamMusicCodec", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(SourceCodecs.weba.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(SourceCodecs.values)", - "dart_type_name": "SourceCodecs" - } - }, - { - "name": "download_music_codec", - "getter_name": "downloadMusicCodec", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(SourceCodecs.m4a.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(SourceCodecs.values)", - "dart_type_name": "SourceCodecs" - } - }, - { - "name": "discord_presence", - "getter_name": "discordPresence", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"discord_presence\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"discord_presence\" IN (0, 1))" - }, - "default_dart": "const Constant(true)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "endless_playback", - "getter_name": "endlessPlayback", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"endless_playback\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"endless_playback\" IN (0, 1))" - }, - "default_dart": "const Constant(true)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "enable_connect", - "getter_name": "enableConnect", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"enable_connect\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"enable_connect\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "connect_port", - "getter_name": "connectPort", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(-1)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "cache_music", - "getter_name": "cacheMusic", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"cache_music\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"cache_music\" IN (0, 1))" - }, - "default_dart": "const Constant(true)", - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 3, - "references": [], - "type": "table", - "data": { - "name": "scrobbler_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "created_at", - "getter_name": "createdAt", - "moor_type": "dateTime", - "nullable": false, - "customConstraints": null, - "default_dart": "currentDateAndTime", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "username", - "getter_name": "username", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "password_hash", - "getter_name": "passwordHash", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "EncryptedTextConverter()", - "dart_type_name": "DecryptedText" - } - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 4, - "references": [], - "type": "table", - "data": { - "name": "skip_segment_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "start", - "getter_name": "start", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "end", - "getter_name": "end", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "track_id", - "getter_name": "trackId", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "created_at", - "getter_name": "createdAt", - "moor_type": "dateTime", - "nullable": false, - "customConstraints": null, - "default_dart": "currentDateAndTime", - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 5, - "references": [], - "type": "table", - "data": { - "name": "source_match_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "track_id", - "getter_name": "trackId", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "source_id", - "getter_name": "sourceId", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "source_type", - "getter_name": "sourceType", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "Constant(SourceType.youtube.name)", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(SourceType.values)", - "dart_type_name": "SourceType" - } - }, - { - "name": "created_at", - "getter_name": "createdAt", - "moor_type": "dateTime", - "nullable": false, - "customConstraints": null, - "default_dart": "currentDateAndTime", - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 6, - "references": [], - "type": "table", - "data": { - "name": "audio_player_state_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "playing", - "getter_name": "playing", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"playing\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"playing\" IN (0, 1))" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "loop_mode", - "getter_name": "loopMode", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(PlaylistMode.values)", - "dart_type_name": "PlaylistMode" - } - }, - { - "name": "shuffled", - "getter_name": "shuffled", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"shuffled\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"shuffled\" IN (0, 1))" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "collections", - "getter_name": "collections", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const StringListConverter()", - "dart_type_name": "List" - } - }, - { - "name": "tracks", - "getter_name": "tracks", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(\"[]\")", - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const SpotubeTrackObjectListConverter()", - "dart_type_name": "List" - } - }, - { - "name": "current_index", - "getter_name": "currentIndex", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant(0)", - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 7, - "references": [], - "type": "table", - "data": { - "name": "history_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "created_at", - "getter_name": "createdAt", - "moor_type": "dateTime", - "nullable": false, - "customConstraints": null, - "default_dart": "currentDateAndTime", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "type", - "getter_name": "type", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const EnumNameConverter(HistoryEntryType.values)", - "dart_type_name": "HistoryEntryType" - } - }, - { - "name": "item_id", - "getter_name": "itemId", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "data", - "getter_name": "data", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const MapTypeConverter()", - "dart_type_name": "Map" - } - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 8, - "references": [], - "type": "table", - "data": { - "name": "lyrics_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "track_id", - "getter_name": "trackId", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "data", - "getter_name": "data", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "SubtitleTypeConverter()", - "dart_type_name": "SubtitleSimple" - } - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 9, - "references": [], - "type": "table", - "data": { - "name": "metadata_plugins_table", - "was_declared_in_moor": false, - "columns": [ - { - "name": "id", - "getter_name": "id", - "moor_type": "int", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", - "dialectAwareDefaultConstraints": { - "sqlite": "PRIMARY KEY AUTOINCREMENT" - }, - "default_dart": null, - "default_client_dart": null, - "dsl_features": ["auto-increment"] - }, - { - "name": "name", - "getter_name": "name", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [{ "allowed-lengths": { "min": 1, "max": 50 } }] - }, - { - "name": "description", - "getter_name": "description", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "version", - "getter_name": "version", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "author", - "getter_name": "author", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "entry_point", - "getter_name": "entryPoint", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "apis", - "getter_name": "apis", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const StringListConverter()", - "dart_type_name": "List" - } - }, - { - "name": "abilities", - "getter_name": "abilities", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [], - "type_converter": { - "dart_expr": "const StringListConverter()", - "dart_type_name": "List" - } - }, - { - "name": "selected", - "getter_name": "selected", - "moor_type": "bool", - "nullable": false, - "customConstraints": null, - "defaultConstraints": "CHECK (\"selected\" IN (0, 1))", - "dialectAwareDefaultConstraints": { - "sqlite": "CHECK (\"selected\" IN (0, 1))" - }, - "default_dart": "const Constant(false)", - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "repository", - "getter_name": "repository", - "moor_type": "string", - "nullable": true, - "customConstraints": null, - "default_dart": null, - "default_client_dart": null, - "dsl_features": [] - }, - { - "name": "plugin_api_version", - "getter_name": "pluginApiVersion", - "moor_type": "string", - "nullable": false, - "customConstraints": null, - "default_dart": "const Constant('1.0.0')", - "default_client_dart": null, - "dsl_features": [] - } - ], - "is_virtual": false, - "without_rowid": false, - "constraints": [] - } - }, - { - "id": 10, - "references": [1], - "type": "index", - "data": { - "on": 1, - "name": "unique_blacklist", - "sql": null, - "unique": true, - "columns": ["element_type", "element_id"] - } - }, - { - "id": 11, - "references": [5], - "type": "index", - "data": { - "on": 5, - "name": "uniq_track_match", - "sql": null, - "unique": true, - "columns": ["track_id", "source_id", "source_type"] - } - } - ] -} diff --git a/drift_schemas/app_db/drift_schema_v9.json b/drift_schemas/app_db/drift_schema_v9.json deleted file mode 100644 index 73af2588..00000000 --- a/drift_schemas/app_db/drift_schema_v9.json +++ /dev/null @@ -1 +0,0 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"authentication_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"cookie","getter_name":"cookie","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"access_token","getter_name":"accessToken","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}},{"name":"expiration","getter_name":"expiration","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"blacklist_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"element_type","getter_name":"elementType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BlacklistedType.values)","dart_type_name":"BlacklistedType"}},{"name":"element_id","getter_name":"elementId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"preferences_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"audio_quality","getter_name":"audioQuality","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceQualities.high.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceQualities.values)","dart_type_name":"SourceQualities"}},{"name":"album_color_sync","getter_name":"albumColorSync","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"album_color_sync\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"album_color_sync\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"amoled_dark_theme","getter_name":"amoledDarkTheme","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"amoled_dark_theme\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"amoled_dark_theme\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"check_update","getter_name":"checkUpdate","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"check_update\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"check_update\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"normalize_audio","getter_name":"normalizeAudio","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"normalize_audio\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"normalize_audio\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"show_system_tray_icon","getter_name":"showSystemTrayIcon","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"show_system_tray_icon\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"show_system_tray_icon\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"system_title_bar","getter_name":"systemTitleBar","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"system_title_bar\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"system_title_bar\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"skip_non_music","getter_name":"skipNonMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"skip_non_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"skip_non_music\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"close_behavior","getter_name":"closeBehavior","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(CloseBehavior.close.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(CloseBehavior.values)","dart_type_name":"CloseBehavior"}},{"name":"accent_color_scheme","getter_name":"accentColorScheme","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"Slate:0xff64748b\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeColorConverter()","dart_type_name":"SpotubeColor"}},{"name":"layout_mode","getter_name":"layoutMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(LayoutMode.adaptive.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LayoutMode.values)","dart_type_name":"LayoutMode"}},{"name":"locale","getter_name":"locale","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('{\"languageCode\":\"system\",\"countryCode\":\"system\"}')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const LocaleConverter()","dart_type_name":"Locale"}},{"name":"market","getter_name":"market","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(Market.US.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(Market.values)","dart_type_name":"Market"}},{"name":"search_mode","getter_name":"searchMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SearchMode.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SearchMode.values)","dart_type_name":"SearchMode"}},{"name":"download_location","getter_name":"downloadLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[]},{"name":"local_library_location","getter_name":"localLibraryLocation","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"piped_instance","getter_name":"pipedInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://pipedapi.kavin.rocks\")","default_client_dart":null,"dsl_features":[]},{"name":"invidious_instance","getter_name":"invidiousInstance","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"https://inv.nadeko.net\")","default_client_dart":null,"dsl_features":[]},{"name":"theme_mode","getter_name":"themeMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(ThemeMode.system.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeMode.values)","dart_type_name":"ThemeMode"}},{"name":"audio_source","getter_name":"audioSource","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(AudioSource.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(AudioSource.values)","dart_type_name":"AudioSource"}},{"name":"youtube_client_engine","getter_name":"youtubeClientEngine","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(YoutubeClientEngine.youtubeExplode.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(YoutubeClientEngine.values)","dart_type_name":"YoutubeClientEngine"}},{"name":"stream_music_codec","getter_name":"streamMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.weba.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"download_music_codec","getter_name":"downloadMusicCodec","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceCodecs.m4a.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceCodecs.values)","dart_type_name":"SourceCodecs"}},{"name":"discord_presence","getter_name":"discordPresence","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"discord_presence\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"discord_presence\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"endless_playback","getter_name":"endlessPlayback","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"endless_playback\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"endless_playback\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]},{"name":"enable_connect","getter_name":"enableConnect","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"enable_connect\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"enable_connect\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"connect_port","getter_name":"connectPort","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(-1)","default_client_dart":null,"dsl_features":[]},{"name":"cache_music","getter_name":"cacheMusic","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"cache_music\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"cache_music\" IN (0, 1))"},"default_dart":"const Constant(true)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"scrobbler_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"username","getter_name":"username","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"password_hash","getter_name":"passwordHash","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"EncryptedTextConverter()","dart_type_name":"DecryptedText"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":4,"references":[],"type":"table","data":{"name":"skip_segment_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"start","getter_name":"start","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"end","getter_name":"end","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":5,"references":[],"type":"table","data":{"name":"source_match_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_id","getter_name":"sourceId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"Constant(SourceType.youtube.name)","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(SourceType.values)","dart_type_name":"SourceType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":6,"references":[],"type":"table","data":{"name":"audio_player_state_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"playing","getter_name":"playing","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"playing\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"playing\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"loop_mode","getter_name":"loopMode","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(PlaylistMode.values)","dart_type_name":"PlaylistMode"}},{"name":"shuffled","getter_name":"shuffled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"shuffled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"shuffled\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"collections","getter_name":"collections","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"tracks","getter_name":"tracks","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant(\"[]\")","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const SpotubeTrackObjectListConverter()","dart_type_name":"List"}},{"name":"current_index","getter_name":"currentIndex","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const Constant(0)","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":7,"references":[],"type":"table","data":{"name":"history_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"currentDateAndTime","default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(HistoryEntryType.values)","dart_type_name":"HistoryEntryType"}},{"name":"item_id","getter_name":"itemId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const MapTypeConverter()","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":8,"references":[],"type":"table","data":{"name":"lyrics_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"track_id","getter_name":"trackId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"SubtitleTypeConverter()","dart_type_name":"SubtitleSimple"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":9,"references":[],"type":"table","data":{"name":"plugins_table","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[{"allowed-lengths":{"min":1,"max":50}}]},{"name":"description","getter_name":"description","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"version","getter_name":"version","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"author","getter_name":"author","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"entry_point","getter_name":"entryPoint","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"apis","getter_name":"apis","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"abilities","getter_name":"abilities","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const StringListConverter()","dart_type_name":"List"}},{"name":"selected_for_metadata","getter_name":"selectedForMetadata","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"selected_for_metadata\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"selected_for_metadata\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"selected_for_audio_source","getter_name":"selectedForAudioSource","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"selected_for_audio_source\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"selected_for_audio_source\" IN (0, 1))"},"default_dart":"const Constant(false)","default_client_dart":null,"dsl_features":[]},{"name":"repository","getter_name":"repository","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"plugin_api_version","getter_name":"pluginApiVersion","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const Constant('2.0.0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":10,"references":[1],"type":"index","data":{"on":1,"name":"unique_blacklist","sql":null,"unique":true,"columns":["element_type","element_id"]}},{"id":11,"references":[5],"type":"index","data":{"on":5,"name":"uniq_track_match","sql":null,"unique":true,"columns":["track_id","source_id","source_type"]}}]} \ No newline at end of file diff --git a/flutter_launcher_icons-nightly.yaml b/flutter_launcher_icons-nightly.yaml deleted file mode 100644 index 9e4e805c..00000000 --- a/flutter_launcher_icons-nightly.yaml +++ /dev/null @@ -1,6 +0,0 @@ -flutter_launcher_icons: - android: true - ios: true - image_path: "assets/branding/spotube-nightly-logo.png" - adaptive_icon_foreground: "assets/branding/spotube-nightly-logo-foreground.png" - adaptive_icon_background: "#242832" diff --git a/flutter_launcher_icons.yaml b/flutter_launcher_icons.yaml deleted file mode 100644 index e5b26882..00000000 --- a/flutter_launcher_icons.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# flutter pub run flutter_launcher_icons -flutter_launcher_icons: - image_path: "assets/branding/spotube-logo.png" - - android: true - # image_path_android: "assets/branding/icon/icon.png" - min_sdk_android: 21 # android min sdk min:16, default 21 - adaptive_icon_background: "#242832" - adaptive_icon_foreground: "assets/branding/spotube-logo-foreground.png" - # adaptive_icon_monochrome: "assets/branding/icon/monochrome.png" - - ios: true - # image_path_ios: "assets/branding/icon/icon.png" - remove_alpha_channel_ios: true - # image_path_ios_dark_transparent: "assets/branding/icon/icon_dark.png" - # image_path_ios_tinted_grayscale: "assets/branding/icon/icon_tinted.png" - # desaturate_tinted_to_grayscale_ios: true - - web: - generate: false - - windows: - generate: true - image_path: "assets/branding/spotube-logo.png" - icon_size: 48 # min:48, max:256, default: 48 - - macos: - generate: true - image_path: "assets/branding/spotube-logo-macos.png" diff --git a/flutter_native_splash-nightly.yaml b/flutter_native_splash-nightly.yaml deleted file mode 100644 index 3b7daeec..00000000 --- a/flutter_native_splash-nightly.yaml +++ /dev/null @@ -1,9 +0,0 @@ -flutter_native_splash: - background_image: assets/images/bengali-patterns-bg.jpg - image: assets/branding/spotube-nightly-logo.png - branding: assets/branding/branding.png - android_12: - image: assets/branding/spotube-nightly-logo_android12.png - branding: assets/branding/branding.png - color: "#000000" - icon_background_color: "#000000" diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..b96a5a61 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,30 @@ +# +# Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +#Kotlin +kotlin.code.style=official +kotlin.daemon.jvmargs=-Xmx3072M +kotlin.mpp.stability.nowarn=true + +#Gradle +org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8 +org.gradle.configuration-cache=true +org.gradle.caching=true + +#Android +android.nonTransitiveRClass=true +android.useAndroidX=true \ No newline at end of file diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties new file mode 100644 index 00000000..1d5bfcc0 --- /dev/null +++ b/gradle/gradle-daemon-jvm.properties @@ -0,0 +1,30 @@ +# +# Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +#This file is generated by updateDaemonJvm +toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/402983f310a88ac68b3e883c7c91c760/redirect +toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/e50b80b5a11d194a898bc3e6211b7c4b/redirect +toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/402983f310a88ac68b3e883c7c91c760/redirect +toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/e50b80b5a11d194a898bc3e6211b7c4b/redirect +toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/f257be9f04bfdf169051808541767806/redirect +toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/1dcbacacca32618bd21ec5465779ade1/redirect +toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/402983f310a88ac68b3e883c7c91c760/redirect +toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/e50b80b5a11d194a898bc3e6211b7c4b/redirect +toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/476d3c08f4989328dee56d22e202d98d/redirect +toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/5a88b04b5e582b332d2e6bc12b45f1b9/redirect +toolchainVendor=ADOPTIUM +toolchainVersion=21 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..dbc5c8f1 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,177 @@ +# Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +[versions] +agp = "8.13.2" +android-compileSdk = "37" +android-minSdk = "28" +android-targetSdk = "36" +androidx-activity = "1.13.0" +androidx-appcompat = "1.7.1" +androidx-core = "1.18.0" +androidx-espresso = "3.7.0" +androidx-lifecycle = "2.10.0" +androidx-testExt = "1.3.0" +appdirs = "1.5.0" +cache4k = "0.14.0" +carApp = "1.7.0" +composeHotReload = "1.1.0" +composeMultiplatform = "1.10.3" +coil = "3.4.0" +composePlaceholderMaterial3 = "1.0.12" +composeShimmer = "1.5.0-beta02" +desugar_jdk_libs = "2.1.5" +haze = "2.0.0-alpha01" +jna = "5.18.1" +junit = "4.13.2" +kermit = "2.1.0" +kmpZip = "0.10.0" +kotlin = "2.3.21" +kotlinx-coroutines = "1.10.2" +kotlinx-io = "0.9.0" +material3 = "1.10.0-alpha05" +kotlinx-serialization-json = "1.11.0" +materialKolor = "4.1.1" +murmurhash = "0.4.2" +newpipeextractor = "v0.26.2" +newpipeExtractorKmp = "1.2.1" +semver = "2.1.0" +vlcj = "4.12.1" +vlcjNative = "4.12.0" +ziplineVersion = "1.27.0" +ktor = "3.4.3" +jetbrainsKotlinJvm = "2.3.21" +kotlinStdlib = "2.3.21" +runner = "1.7.0" +core = "1.7.0" +filekit = "0.13.0" +compose-webview = "0.1.0-SNAPSHOT" +koin = "4.2.1" +multiplatform-nav3-ui = "1.0.0-alpha06" +compose-multiplatform-adaptive = "1.3.0-alpha02" +compose-multiplatform-lifecycle = "2.10.0-alpha05" +feather-icons = "1.1.1" +material3-window-size = "1.9.0" +kotlinx-datetime = "0.7.1" +media3 = "1.8.0" +androidx-datastore = "1.2.1" +kmpgen = "1.3.0" +ksp = "2.3.5" +spotube-gradle = "0.1.0" +cryptography = "0.6.0" +reorderable = "3.1.0" +vlcjBundler = "0.1.0" + +[libraries] +appdirs = { module = "net.harawata:appdirs", version.ref = "appdirs" } +cache4k = { module = "io.github.reactivecircus.cache4k:cache4k", version.ref = "cache4k" } +androidx-car-app = { module = "androidx.car.app:app", version.ref = "carApp" } +compose-placeholder-material3 = { module = "com.eygraber:compose-placeholder-material3", version.ref = "composePlaceholderMaterial3" } +compose-shimmer = { module = "com.valentinilk.shimmer:compose-shimmer", version.ref = "composeShimmer" } +desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" } +haze = { module = "dev.chrisbanes.haze:haze", version.ref = "haze" } +haze-materials = { module = "dev.chrisbanes.haze:haze-blur-materials", version.ref = "haze" } +haze-blur = { module = "dev.chrisbanes.haze:haze-blur", version.ref = "haze" } +jna = { module = "net.java.dev.jna:jna", version.ref = "jna" } +kermit = { module = "co.touchlab:kermit", version.ref = "kermit" } +kermit-koin = { module = "co.touchlab:kermit-koin", version.ref = "kermit" } +kmp-zip = { module = "no.synth:kmp-zip", version.ref = "kmpZip" } +kmp-zip-kotlinx = { module = "no.synth:kmp-zip-kotlinx", version.ref = "kmpZip" } +kmp-zip-okio = { module = "no.synth:kmp-zip-okio", version.ref = "kmpZip" } +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } +kotlin-testJunit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } +junit = { module = "junit:junit", version.ref = "junit" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core" } +androidx-testExt-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-testExt" } +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx-espresso" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" } +compose-uiTooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "composeMultiplatform" } +androidx-lifecycle-viewmodelCompose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } +androidx-lifecycle-runtimeCompose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" } +compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "composeMultiplatform" } +compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "composeMultiplatform" } +compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "material3" } +compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "composeMultiplatform" } +coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" } +coil-network-ktor3 = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coil" } +compose-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "composeMultiplatform" } +compose-uiToolingPreview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "composeMultiplatform" } +kotlinx-coroutinesSwing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" } +ktor-server-cio = { module = "io.ktor:ktor-server-cio", version.ref = "ktor" } +ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "ktor" } +material-kolor = { module = "com.materialkolor:material-kolor", version.ref = "materialKolor" } +murmurhash = { module = "com.goncalossilva:murmurhash", version.ref = "murmurhash" } +newpipe-extractor-kmp = { module = "io.github.yushosei:newpipe-extractor-kmp", version.ref = "newpipeExtractorKmp" } +newpipeextractor = { module = "com.github.teamnewpipe:NewPipeExtractor", version.ref = "newpipeextractor" } +semver = { module = "net.swiftzer.semver:semver", version.ref = "semver" } +vlcj = { module = "uk.co.caprica:vlcj", version.ref = "vlcj" } +vlcj-natives = { module = "uk.co.caprica:vlcj-natives", version.ref = "vlcjNative" } +zipline-core = { module = "app.cash.zipline:zipline", version.ref = "ziplineVersion" } +zipline-loader = { module = "app.cash.zipline:zipline-loader", version.ref = "ziplineVersion" } +ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } +ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } +ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } +ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } +ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } +kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinStdlib" } +androidx-runner = { group = "androidx.test", name = "runner", version.ref = "runner" } +androidx-core = { group = "androidx.test", name = "core", version.ref = "core" } +filekit-core = { group = "io.github.vinceglb", name = "filekit-core", version.ref = "filekit" } +filekit-dialogs = { group = "io.github.vinceglb", name = "filekit-dialogs", version.ref = "filekit" } +filekit-dialogs-compose = { group = "io.github.vinceglb", name = "filekit-dialogs-compose", version.ref = "filekit" } +compose-webview = { module = "io.github.kdroidfilter:composewebview", version.ref = "compose-webview" } +koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } +koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin" } +koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin" } +koin-compose-navigation3 = { module = "io.insert-koin:koin-compose-navigation3", version.ref = "koin" } +jetbrains-navigation3-ui = { module = "org.jetbrains.androidx.navigation3:navigation3-ui", version.ref = "multiplatform-nav3-ui" } +jetbrains-material3-adaptiveNavigation3 = { module = "org.jetbrains.compose.material3.adaptive:adaptive-navigation3", version.ref = "compose-multiplatform-adaptive" } +jetbrains-lifecycle-viewmodelNavigation3 = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "compose-multiplatform-lifecycle" } +jetbrains-material3-window-size = { module = "org.jetbrains.compose.material3:material3-window-size-class", version.ref = "material3-window-size" } +jetbrains-material3-adaptive-suite = { module = "org.jetbrains.compose.material3:material3-adaptive-navigation-suite", version.ref = "material3-window-size" } +jetbrains-material3-adaptive = { module = "org.jetbrains.compose.material3.adaptive:adaptive", version.ref = "compose-multiplatform-adaptive" } +jetbrains-material3-adaptive-layout = { module = "org.jetbrains.compose.material3.adaptive:adaptive-layout", version.ref = "compose-multiplatform-adaptive" } +feather-icons = { module = "br.com.devsrsouza.compose.icons:feather", version.ref = "feather-icons" } +kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" } +androidx-datastore = { module = "androidx.datastore:datastore", version.ref = "androidx-datastore" } +androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "androidx-datastore" } +kotlinx-io-okio = { module = "org.jetbrains.kotlinx:kotlinx-io-okio", version.ref = "kotlinx-io" } +cryptography-core = { module = "dev.whyoleg.cryptography:cryptography-core", version.ref = "cryptography" } +cryptography-provider-optimal = { module = "dev.whyoleg.cryptography:cryptography-provider-optimal", version.ref = "cryptography" } +reorderable = { module = "sh.calvin.reorderable:reorderable", version.ref = "reorderable" } +media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "media3" } +media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" } +media3-session = { module = "androidx.media3:media3-session", version.ref = "media3" } + +[plugins] +androidApplication = { id = "com.android.application", version.ref = "agp" } +androidLibrary = { id = "com.android.library", version.ref = "agp" } +composeHotReload = { id = "org.jetbrains.compose.hot-reload", version.ref = "composeHotReload" } +composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } +composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +jetbrainsKotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "jetbrainsKotlinJvm" } +androidKotlinMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } +zipline-gradle-plugin = { id = "app.cash.zipline", version.ref = "ziplineVersion" } +kmpgen = { id = "com.kroegerama.openapi-kmp-gen", version.ref = "kmpgen" } +mavenPublish = { id = "maven-publish" } +spotubeGradle = { id = "dev.krtirtho.spotube.gradle-plugin", version.ref = "spotube-gradle" } +vlcjBundler = { id = "dev.krtirtho.vlcj-bundler.gradle-plugin", version.ref = "vlcjBundler" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..1b33c55b Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties similarity index 73% rename from android/gradle/wrapper/gradle-wrapper.properties rename to gradle/wrapper/gradle-wrapper.properties index bf6b7385..d4081da4 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Fri Dec 13 21:53:13 BDT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 00000000..23d15a93 --- /dev/null +++ b/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..db3a6ac2 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart deleted file mode 100644 index 619844b9..00000000 --- a/integration_test/app_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -import 'package:spotube/main.dart' as app; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('end-to-end test', () { - testWidgets('check if app is successfully starting', (tester) async { - await app.main([]); - await tester.pumpAndSettle(); - - expect(find.byType(MaterialApp), findsOneWidget); - }); - }); -} diff --git a/ios/.gitignore b/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 7c569640..00000000 --- a/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 12.0 - - diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f..00000000 --- a/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe..00000000 --- a/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/ios/HomePlayerWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/ios/HomePlayerWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/ios/HomePlayerWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/HomePlayerWidget/HomePlayerWidget.swift b/ios/HomePlayerWidget/HomePlayerWidget.swift deleted file mode 100644 index 8808aae1..00000000 --- a/ios/HomePlayerWidget/HomePlayerWidget.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// HomePlayerWidget.swift -// HomePlayerWidget -// -// Created by Kingkor Roy Tirtho on 15/12/24. -// - -import WidgetKit -import SwiftUI - -private let widgetGroupId = "group.spotube_home_player_widget" - -struct Provider: TimelineProvider { - func placeholder(in context: Context) -> SimpleEntry { - SimpleEntry(date: Date(), emoji: "😀") - } - - func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) { - let entry = SimpleEntry(date: Date(), emoji: "😀") - completion(entry) - } - - func getTimeline(in context: Context, completion: @escaping (Timeline) -> ()) { - var entries: [SimpleEntry] = [] - - // Generate a timeline consisting of five entries an hour apart, starting from the current date. - let currentDate = Date() - for hourOffset in 0 ..< 5 { - let entryDate = Calendar.current.date(byAdding: .hour, value: hourOffset, to: currentDate)! - let entry = SimpleEntry(date: entryDate, emoji: "😀") - entries.append(entry) - } - - let timeline = Timeline(entries: entries, policy: .atEnd) - completion(timeline) - } - -// func relevances() async -> WidgetRelevances { -// // Generate a list containing the contexts this widget is relevant in. -// } -} - -struct SimpleEntry: TimelineEntry { - let date: Date - let emoji: String -} - -struct HomePlayerWidgetEntryView : View { - var entry: Provider.Entry - - var body: some View { - VStack { - Text("Time:") - Text(entry.date, style: .time) - - Text("Emoji:") - Text(entry.emoji) - } - } -} - -struct HomePlayerWidget: Widget { - let kind: String = "HomePlayerWidget" - - var body: some WidgetConfiguration { - StaticConfiguration(kind: kind, provider: Provider()) { entry in - if #available(iOS 17.0, *) { - HomePlayerWidgetEntryView(entry: entry) - .containerBackground(.fill.tertiary, for: .widget) - } else { - HomePlayerWidgetEntryView(entry: entry) - .padding() - .background() - } - } - .configurationDisplayName("My Widget") - .description("This is an example widget.") - } -} - -#Preview(as: .systemSmall) { - HomePlayerWidget() -} timeline: { - SimpleEntry(date: .now, emoji: "😀") - SimpleEntry(date: .now, emoji: "🤩") -} diff --git a/ios/HomePlayerWidget/HomePlayerWidgetBundle.swift b/ios/HomePlayerWidget/HomePlayerWidgetBundle.swift deleted file mode 100644 index 68158b53..00000000 --- a/ios/HomePlayerWidget/HomePlayerWidgetBundle.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// HomePlayerWidgetBundle.swift -// HomePlayerWidget -// -// Created by Kingkor Roy Tirtho on 15/12/24. -// - -import WidgetKit -import SwiftUI - -@main -struct HomePlayerWidgetBundle: WidgetBundle { - var body: some Widget { - HomePlayerWidget() - } -} diff --git a/ios/HomePlayerWidget/Info.plist b/ios/HomePlayerWidget/Info.plist deleted file mode 100644 index 0f118fb7..00000000 --- a/ios/HomePlayerWidget/Info.plist +++ /dev/null @@ -1,11 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/ios/HomePlayerWidgetExtension.entitlements b/ios/HomePlayerWidgetExtension.entitlements deleted file mode 100644 index 58165678..00000000 --- a/ios/HomePlayerWidgetExtension.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.spotube_home_player_widget - - - diff --git a/ios/Podfile b/ios/Podfile deleted file mode 100644 index 7235f482..00000000 --- a/ios/Podfile +++ /dev/null @@ -1,69 +0,0 @@ -# Uncomment this line to define a global platform for your project -platform :ios, '13.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -target 'dev' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -target 'stable' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -target 'nightly' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - # Just Audio Config - target.build_configurations.each do |config| - config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ - '$(inherited)', - 'AUDIO_SESSION_MICROPHONE=0' - ] - end - end -end diff --git a/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index 2ff415a0..00000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,293 +0,0 @@ -PODS: - - app_links (6.4.1): - - Flutter - - audio_service (0.0.1): - - Flutter - - FlutterMacOS - - audio_session (0.0.1): - - Flutter - - bonsoir_darwin (0.0.1): - - Flutter - - FlutterMacOS - - connectivity_plus (0.0.1): - - Flutter - - device_info_plus (0.0.1): - - Flutter - - DKImagePickerController/Core (4.3.4): - - DKImagePickerController/ImageDataManager - - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.4) - - DKImagePickerController/PhotoGallery (4.3.4): - - DKImagePickerController/Core - - DKPhotoGallery - - DKImagePickerController/Resource (4.3.4) - - DKPhotoGallery (0.0.17): - - DKPhotoGallery/Core (= 0.0.17) - - DKPhotoGallery/Model (= 0.0.17) - - DKPhotoGallery/Preview (= 0.0.17) - - DKPhotoGallery/Resource (= 0.0.17) - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Core (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Preview - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Model (0.0.17): - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Preview (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Resource - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Resource (0.0.17): - - SDWebImage - - SwiftyGif - - file_picker (0.0.1): - - DKImagePickerController/PhotoGallery - - Flutter - - file_selector_ios (0.0.1): - - Flutter - - fk_user_agent (2.0.0): - - Flutter - - Flutter (1.0.0) - - flutter_broadcasts (0.0.1): - - Flutter - - flutter_discord_rpc (0.0.1): - - Flutter - - flutter_inappwebview_ios (0.0.1): - - Flutter - - flutter_inappwebview_ios/Core (= 0.0.1) - - OrderedSet (~> 6.0.3) - - flutter_inappwebview_ios/Core (0.0.1): - - Flutter - - OrderedSet (~> 6.0.3) - - flutter_native_splash (2.4.3): - - Flutter - - flutter_secure_storage (6.0.0): - - Flutter - - flutter_sharing_intent (0.0.1): - - Flutter - - flutter_timezone (0.0.1): - - Flutter - - home_widget (0.0.1): - - Flutter - - image_picker_ios (0.0.1): - - Flutter - - integration_test (0.0.1): - - Flutter - - irondash_engine_context (0.0.1): - - Flutter - - media_kit_libs_ios_audio (1.0.4): - - Flutter - - metadata_god (0.0.1): - - Flutter - - open_file_ios (0.0.1): - - Flutter - - OrderedSet (6.0.3) - - package_info_plus (0.4.5): - - Flutter - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - permission_handler_apple (9.3.0): - - Flutter - - SDWebImage (5.18.8): - - SDWebImage/Core (= 5.18.8) - - SDWebImage/Core (5.18.8) - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - - sqflite_darwin (0.0.4): - - Flutter - - FlutterMacOS - - sqlite3 (3.50.4): - - sqlite3/common (= 3.50.4) - - sqlite3/common (3.50.4) - - sqlite3/dbstatvtab (3.50.4): - - sqlite3/common - - sqlite3/fts5 (3.50.4): - - sqlite3/common - - sqlite3/math (3.50.4): - - sqlite3/common - - sqlite3/perf-threadsafe (3.50.4): - - sqlite3/common - - sqlite3/rtree (3.50.4): - - sqlite3/common - - sqlite3/session (3.50.4): - - sqlite3/common - - sqlite3_flutter_libs (0.0.1): - - Flutter - - FlutterMacOS - - sqlite3 (~> 3.50.4) - - sqlite3/dbstatvtab - - sqlite3/fts5 - - sqlite3/math - - sqlite3/perf-threadsafe - - sqlite3/rtree - - sqlite3/session - - super_native_extensions (0.0.1): - - Flutter - - SwiftyGif (5.4.4) - - system_theme (0.0.1): - - Flutter - - url_launcher_ios (0.0.1): - - Flutter - -DEPENDENCIES: - - app_links (from `.symlinks/plugins/app_links/ios`) - - audio_service (from `.symlinks/plugins/audio_service/darwin`) - - audio_session (from `.symlinks/plugins/audio_session/ios`) - - bonsoir_darwin (from `.symlinks/plugins/bonsoir_darwin/darwin`) - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - - file_picker (from `.symlinks/plugins/file_picker/ios`) - - file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`) - - fk_user_agent (from `.symlinks/plugins/fk_user_agent/ios`) - - Flutter (from `Flutter`) - - flutter_broadcasts (from `.symlinks/plugins/flutter_broadcasts/ios`) - - flutter_discord_rpc (from `.symlinks/plugins/flutter_discord_rpc/ios`) - - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - - flutter_sharing_intent (from `.symlinks/plugins/flutter_sharing_intent/ios`) - - flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`) - - home_widget (from `.symlinks/plugins/home_widget/ios`) - - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - - integration_test (from `.symlinks/plugins/integration_test/ios`) - - irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`) - - media_kit_libs_ios_audio (from `.symlinks/plugins/media_kit_libs_ios_audio/ios`) - - metadata_god (from `.symlinks/plugins/metadata_god/ios`) - - open_file_ios (from `.symlinks/plugins/open_file_ios/ios`) - - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) - - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`) - - super_native_extensions (from `.symlinks/plugins/super_native_extensions/ios`) - - system_theme (from `.symlinks/plugins/system_theme/ios`) - - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - -SPEC REPOS: - trunk: - - DKImagePickerController - - DKPhotoGallery - - OrderedSet - - SDWebImage - - sqlite3 - - SwiftyGif - -EXTERNAL SOURCES: - app_links: - :path: ".symlinks/plugins/app_links/ios" - audio_service: - :path: ".symlinks/plugins/audio_service/darwin" - audio_session: - :path: ".symlinks/plugins/audio_session/ios" - bonsoir_darwin: - :path: ".symlinks/plugins/bonsoir_darwin/darwin" - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/ios" - device_info_plus: - :path: ".symlinks/plugins/device_info_plus/ios" - file_picker: - :path: ".symlinks/plugins/file_picker/ios" - file_selector_ios: - :path: ".symlinks/plugins/file_selector_ios/ios" - fk_user_agent: - :path: ".symlinks/plugins/fk_user_agent/ios" - Flutter: - :path: Flutter - flutter_broadcasts: - :path: ".symlinks/plugins/flutter_broadcasts/ios" - flutter_discord_rpc: - :path: ".symlinks/plugins/flutter_discord_rpc/ios" - flutter_inappwebview_ios: - :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" - flutter_native_splash: - :path: ".symlinks/plugins/flutter_native_splash/ios" - flutter_secure_storage: - :path: ".symlinks/plugins/flutter_secure_storage/ios" - flutter_sharing_intent: - :path: ".symlinks/plugins/flutter_sharing_intent/ios" - flutter_timezone: - :path: ".symlinks/plugins/flutter_timezone/ios" - home_widget: - :path: ".symlinks/plugins/home_widget/ios" - image_picker_ios: - :path: ".symlinks/plugins/image_picker_ios/ios" - integration_test: - :path: ".symlinks/plugins/integration_test/ios" - irondash_engine_context: - :path: ".symlinks/plugins/irondash_engine_context/ios" - media_kit_libs_ios_audio: - :path: ".symlinks/plugins/media_kit_libs_ios_audio/ios" - metadata_god: - :path: ".symlinks/plugins/metadata_god/ios" - open_file_ios: - :path: ".symlinks/plugins/open_file_ios/ios" - package_info_plus: - :path: ".symlinks/plugins/package_info_plus/ios" - path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/darwin" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" - shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - sqflite_darwin: - :path: ".symlinks/plugins/sqflite_darwin/darwin" - sqlite3_flutter_libs: - :path: ".symlinks/plugins/sqlite3_flutter_libs/darwin" - super_native_extensions: - :path: ".symlinks/plugins/super_native_extensions/ios" - system_theme: - :path: ".symlinks/plugins/system_theme/ios" - url_launcher_ios: - :path: ".symlinks/plugins/url_launcher_ios/ios" - -SPEC CHECKSUMS: - app_links: 3dbc685f76b1693c66a6d9dd1e9ab6f73d97dc0a - audio_service: aa99a6ba2ae7565996015322b0bb024e1d25c6fd - audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0 - bonsoir_darwin: 29c7ccf356646118844721f36e1de4b61f6cbd0e - connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd - device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe - DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac - DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 - file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517 - file_selector_ios: f92e583d43608aebc2e4a18daac30b8902845502 - fk_user_agent: 137145b086229251761678fe034da53753f4ce59 - Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - flutter_broadcasts: 7bb7cc1024900a7f85e98b6faab795290b7c2339 - flutter_discord_rpc: 0572e8227ea730c5afe5876a37c08c728ce95f3a - flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99 - flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf - flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13 - flutter_sharing_intent: afdc98985814d2c01d8c0956a177d6b6dfbdc373 - flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544 - home_widget: f169fc41fd807b4d46ab6615dc44d62adbf9f64f - image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a - integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e - irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486 - media_kit_libs_ios_audio: 905e6323b72e65c63ab9262b2e473f52c024a3a8 - metadata_god: 018b59c2f3617569928550dcbd17481591557c1d - open_file_ios: 5ff7526df64e4394b4fe207636b67a95e83078bb - OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 - package_info_plus: 580e9a5f1b6ca5594e7c9ed5f92d1dfb2a66b5e1 - path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 - permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d - SDWebImage: a81bbb3ba4ea5f810f4069c68727cb118467a04a - shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 - sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0 - sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b - sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1 - super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4 - SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f - system_theme: a94f91f49eeb97cfa768c7d5a9b2f6aa51b00494 - url_launcher_ios: 694010445543906933d732453a59da0a173ae33d - -PODFILE CHECKSUM: 0659b64ac6e9e96b61d8550decffa8bff51a957e - -COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 88a40d6f..00000000 --- a/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,3393 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 051977801F58E8DBB6712352 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7E9EBDD27997A73A4D38EE1 /* Pods_Runner.framework */; }; - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 17438EB903776D8D0E926C9B /* Pods_nightly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAC36FC304DBD4E8A8C00694 /* Pods_nightly.framework */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 46249B26D47C5DB81A4F972E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7E9EBDD27997A73A4D38EE1 /* Pods_Runner.framework */; }; - 4E86E0C42011EDB42C34AF9A /* Pods_stable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5F91A319C771EEC978B238A /* Pods_stable.framework */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - B536BD902B405DB1009B3CE4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - B536BD912B405DB1009B3CE4 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - B536BD952B405DB1009B3CE4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - B536BD962B405DB1009B3CE4 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - B536BD972B405DB1009B3CE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - B536BD982B405DB1009B3CE4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - B536BDAE2B405FDE009B3CE4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - B536BDAF2B405FDE009B3CE4 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - B536BDB22B405FDE009B3CE4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - B536BDB32B405FDE009B3CE4 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - B536BDB42B405FDE009B3CE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - B536BDB52B405FDE009B3CE4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - B536BDD02B4060B3009B3CE4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - B536BDD12B4060B3009B3CE4 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - B536BDD42B4060B3009B3CE4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - B536BDD52B4060B3009B3CE4 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - B536BDD62B4060B3009B3CE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - B536BDD72B4060B3009B3CE4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - C36A05AD330BBFAED75A62D5 /* Pods_dev.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4238A4985255EC9F93067739 /* Pods_dev.framework */; }; - E612EC3B2D0F07A90022720C /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E612EC3A2D0F07A90022720C /* WidgetKit.framework */; }; - E612EC3D2D0F07A90022720C /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E612EC3C2D0F07A90022720C /* SwiftUI.framework */; }; - E612EC482D0F07AD0022720C /* HomePlayerWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = E612EC392D0F07A90022720C /* HomePlayerWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - E612EC462D0F07AD0022720C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = E612EC382D0F07A80022720C; - remoteInfo = HomePlayerWidgetExtension; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - B536BD992B405DB1009B3CE4 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDB62B405FDE009B3CE4 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDD82B4060B3009B3CE4 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - E612EC492D0F07AD0022720C /* Embed Foundation Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - E612EC482D0F07AD0022720C /* HomePlayerWidgetExtension.appex in Embed Foundation Extensions */, - ); - name = "Embed Foundation Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 04C104D3779B4D1635D939BF /* Pods-Runner.profile-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile-nightly.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile-nightly.xcconfig"; sourceTree = ""; }; - 0F8FB58820FF492BD3CF9315 /* Pods-nightly.debug-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.debug-stable.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.debug-stable.xcconfig"; sourceTree = ""; }; - 126B91CED32FAD3C40A67A23 /* Pods-dev.debug-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.debug-stable.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.debug-stable.xcconfig"; sourceTree = ""; }; - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 171073CFF94F5751BC2B78DD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 1C9810F8B3FD927ED8C94791 /* Pods-dev.profile-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.profile-nightly.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.profile-nightly.xcconfig"; sourceTree = ""; }; - 21C0B1DEE0F0BFD3F3651F79 /* Pods-stable.debug-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.debug-nightly.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.debug-nightly.xcconfig"; sourceTree = ""; }; - 261A31AC0DBA2D93BD1910D9 /* Pods-nightly.profile-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.profile-nightly.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.profile-nightly.xcconfig"; sourceTree = ""; }; - 285DE2278D380EE2A6647CA9 /* Pods-nightly.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.debug.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.debug.xcconfig"; sourceTree = ""; }; - 29304D1832AA30DE0C33E05C /* Pods-dev.profile-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.profile-stable.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.profile-stable.xcconfig"; sourceTree = ""; }; - 2DA87118BE2AF25875B7C376 /* Pods-stable.release-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.release-stable.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.release-stable.xcconfig"; sourceTree = ""; }; - 2F9AD76AF35FFC693C051CE1 /* Pods-dev.release-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.release-nightly.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.release-nightly.xcconfig"; sourceTree = ""; }; - 39E15EE1745C9266FDB59558 /* Pods-stable.debug-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.debug-dev.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.debug-dev.xcconfig"; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3E262038FF3BDA3B8A7BDAC3 /* Pods-Runner.release-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release-dev.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release-dev.xcconfig"; sourceTree = ""; }; - 3F754C793C1BC0E8B8FFB5B7 /* Pods-stable.profile-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.profile-stable.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.profile-stable.xcconfig"; sourceTree = ""; }; - 4238A4985255EC9F93067739 /* Pods_dev.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_dev.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 46E04A5AA989356A32CD8E66 /* Pods-dev.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.profile.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.profile.xcconfig"; sourceTree = ""; }; - 48E7E801EAE1B520AA5F35DD /* Pods-dev.profile-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.profile-dev.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.profile-dev.xcconfig"; sourceTree = ""; }; - 4BDAF8FFADB62CA017755094 /* Pods-stable.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.profile.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.profile.xcconfig"; sourceTree = ""; }; - 5014E8BD9F7181E528538444 /* Pods-stable.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.release.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.release.xcconfig"; sourceTree = ""; }; - 53AD516AAEB9A1331C99CBAE /* Pods-stable.profile-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.profile-dev.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.profile-dev.xcconfig"; sourceTree = ""; }; - 5A8B64E98ADDA28FB63AA32C /* Pods-Runner.release-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release-nightly.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release-nightly.xcconfig"; sourceTree = ""; }; - 636F4A85470D9E3B4CC8AFB8 /* Pods-nightly.profile-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.profile-dev.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.profile-dev.xcconfig"; sourceTree = ""; }; - 66F649AFA6E49EA44F469DA3 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 68BE49B58C0EBB578948D773 /* Pods-nightly.release-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.release-dev.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.release-dev.xcconfig"; sourceTree = ""; }; - 6AE8151F4499707FA23C8223 /* Pods-dev.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.debug.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.debug.xcconfig"; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 77EFEBB27B276DD5F6B01B4B /* Pods-Runner.debug-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-nightly.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-nightly.xcconfig"; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 864AC9150518DFBA85A46A15 /* Pods-stable.release-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.release-dev.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.release-dev.xcconfig"; sourceTree = ""; }; - 869E7B97AE866F2BCA2E5A6A /* Pods-Runner.release-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release-stable.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release-stable.xcconfig"; sourceTree = ""; }; - 89CD409D60E1362C529707A4 /* Pods-nightly.release-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.release-nightly.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.release-nightly.xcconfig"; sourceTree = ""; }; - 8AD587044EF2C6A6FA3059DC /* Pods-stable.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.debug.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.debug.xcconfig"; sourceTree = ""; }; - 8B9DFB8E20C11066C3AB696A /* Pods-dev.debug-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.debug-nightly.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.debug-nightly.xcconfig"; sourceTree = ""; }; - 8CF39CF9464623571B63D15B /* Pods-nightly.release-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.release-stable.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.release-stable.xcconfig"; sourceTree = ""; }; - 9232DBE472C8CEA1101843D9 /* Pods-nightly.profile-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.profile-stable.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.profile-stable.xcconfig"; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9878519B106548FD75CA15C0 /* Pods-nightly.debug-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.debug-dev.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.debug-dev.xcconfig"; sourceTree = ""; }; - A59B7A01EEC476AF3141B518 /* Pods-Runner.debug-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-dev.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig"; sourceTree = ""; }; - B38E6C7315D66215AFD8B218 /* Pods-stable.profile-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.profile-nightly.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.profile-nightly.xcconfig"; sourceTree = ""; }; - B536BDA02B405DB1009B3CE4 /* stable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = stable.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B536BDA12B405DB1009B3CE4 /* stable-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "stable-Info.plist"; path = "/Users/xiaobowen/Documents/GitHub/spotube/ios/stable-Info.plist"; sourceTree = ""; }; - B536BDBF2B405FDE009B3CE4 /* dev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = dev.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B536BDC02B405FDE009B3CE4 /* dev-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "dev-Info.plist"; path = "/Users/xiaobowen/Documents/GitHub/spotube/ios/dev-Info.plist"; sourceTree = ""; }; - B536BDE42B4060B3009B3CE4 /* nightly.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = nightly.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B536BDE52B4060B3009B3CE4 /* nightly-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "nightly-Info.plist"; path = "/Users/xiaobowen/Documents/GitHub/spotube/ios/nightly-Info.plist"; sourceTree = ""; }; - B5F91A319C771EEC978B238A /* Pods_stable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_stable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B95530D9046F7F9BA07D2ADD /* Pods-Runner.profile-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile-stable.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile-stable.xcconfig"; sourceTree = ""; }; - BAC36FC304DBD4E8A8C00694 /* Pods_nightly.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_nightly.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BDE1B62C8A5219CAA5D19583 /* Pods-nightly.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.release.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.release.xcconfig"; sourceTree = ""; }; - C3F494F4E243EAE21CEC5765 /* Pods-Runner.profile-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile-dev.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile-dev.xcconfig"; sourceTree = ""; }; - C63F01302EF00EAECE6BEA7C /* Pods-dev.release-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.release-dev.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.release-dev.xcconfig"; sourceTree = ""; }; - CA0F4EAB0789E68A7C771A07 /* Pods-nightly.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.profile.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.profile.xcconfig"; sourceTree = ""; }; - CE8646F5A4BCC46B0416DC84 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - D32BAE0F55672DD7669755B8 /* Pods-Runner.debug-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-stable.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-stable.xcconfig"; sourceTree = ""; }; - D9A69004587D01A7C68666CF /* Pods-dev.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.release.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.release.xcconfig"; sourceTree = ""; }; - E0EAB4380EE7C7EA7A350B6F /* Pods-stable.release-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.release-nightly.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.release-nightly.xcconfig"; sourceTree = ""; }; - E612EC392D0F07A90022720C /* HomePlayerWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = HomePlayerWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - E612EC3A2D0F07A90022720C /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - E612EC3C2D0F07A90022720C /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - E6F17DB92D0F34E500BC2FA2 /* HomePlayerWidgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HomePlayerWidgetExtension.entitlements; sourceTree = ""; }; - E6F17DBA2D0F352C00BC2FA2 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - E6F17DBB2D0F356700BC2FA2 /* stable.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = stable.entitlements; sourceTree = ""; }; - E6F17DBC2D0F357500BC2FA2 /* dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = dev.entitlements; sourceTree = ""; }; - E6F17DBD2D0F357F00BC2FA2 /* nightly.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = nightly.entitlements; sourceTree = ""; }; - E81F11471FD7D807286E33D6 /* Pods-dev.debug-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.debug-dev.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.debug-dev.xcconfig"; sourceTree = ""; }; - EB7783C1029CEC13F4B05D36 /* Pods-nightly.debug-nightly.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nightly.debug-nightly.xcconfig"; path = "Target Support Files/Pods-nightly/Pods-nightly.debug-nightly.xcconfig"; sourceTree = ""; }; - EBBED0A8DE0D0E230CD03613 /* Pods-dev.release-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-dev.release-stable.xcconfig"; path = "Target Support Files/Pods-dev/Pods-dev.release-stable.xcconfig"; sourceTree = ""; }; - F6F397A82E788E50B186ADC7 /* Pods-stable.debug-stable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-stable.debug-stable.xcconfig"; path = "Target Support Files/Pods-stable/Pods-stable.debug-stable.xcconfig"; sourceTree = ""; }; - F7E9EBDD27997A73A4D38EE1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ - E612EC562D0F07AD0022720C /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { - isa = PBXFileSystemSynchronizedBuildFileExceptionSet; - membershipExceptions = ( - Info.plist, - ); - target = E612EC382D0F07A80022720C /* HomePlayerWidgetExtension */; - }; -/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ - -/* Begin PBXFileSystemSynchronizedRootGroup section */ - E612EC3E2D0F07A90022720C /* HomePlayerWidget */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (E612EC562D0F07AD0022720C /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = HomePlayerWidget; sourceTree = ""; }; -/* End PBXFileSystemSynchronizedRootGroup section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 46249B26D47C5DB81A4F972E /* Pods_Runner.framework in Frameworks */, - 051977801F58E8DBB6712352 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BD922B405DB1009B3CE4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4E86E0C42011EDB42C34AF9A /* Pods_stable.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDB02B405FDE009B3CE4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C36A05AD330BBFAED75A62D5 /* Pods_dev.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDD22B4060B3009B3CE4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 17438EB903776D8D0E926C9B /* Pods_nightly.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E612EC362D0F07A80022720C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E612EC3D2D0F07A90022720C /* SwiftUI.framework in Frameworks */, - E612EC3B2D0F07A90022720C /* WidgetKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0E0B839C4E103F896209E822 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F7E9EBDD27997A73A4D38EE1 /* Pods_Runner.framework */, - 4238A4985255EC9F93067739 /* Pods_dev.framework */, - BAC36FC304DBD4E8A8C00694 /* Pods_nightly.framework */, - B5F91A319C771EEC978B238A /* Pods_stable.framework */, - E612EC3A2D0F07A90022720C /* WidgetKit.framework */, - E612EC3C2D0F07A90022720C /* SwiftUI.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 67CBFE209DF24C94A9837AD5 /* Pods */ = { - isa = PBXGroup; - children = ( - 66F649AFA6E49EA44F469DA3 /* Pods-Runner.debug.xcconfig */, - CE8646F5A4BCC46B0416DC84 /* Pods-Runner.release.xcconfig */, - 171073CFF94F5751BC2B78DD /* Pods-Runner.profile.xcconfig */, - D32BAE0F55672DD7669755B8 /* Pods-Runner.debug-stable.xcconfig */, - 869E7B97AE866F2BCA2E5A6A /* Pods-Runner.release-stable.xcconfig */, - B95530D9046F7F9BA07D2ADD /* Pods-Runner.profile-stable.xcconfig */, - A59B7A01EEC476AF3141B518 /* Pods-Runner.debug-dev.xcconfig */, - 3E262038FF3BDA3B8A7BDAC3 /* Pods-Runner.release-dev.xcconfig */, - C3F494F4E243EAE21CEC5765 /* Pods-Runner.profile-dev.xcconfig */, - 77EFEBB27B276DD5F6B01B4B /* Pods-Runner.debug-nightly.xcconfig */, - 5A8B64E98ADDA28FB63AA32C /* Pods-Runner.release-nightly.xcconfig */, - 04C104D3779B4D1635D939BF /* Pods-Runner.profile-nightly.xcconfig */, - 6AE8151F4499707FA23C8223 /* Pods-dev.debug.xcconfig */, - 8B9DFB8E20C11066C3AB696A /* Pods-dev.debug-nightly.xcconfig */, - E81F11471FD7D807286E33D6 /* Pods-dev.debug-dev.xcconfig */, - 126B91CED32FAD3C40A67A23 /* Pods-dev.debug-stable.xcconfig */, - D9A69004587D01A7C68666CF /* Pods-dev.release.xcconfig */, - 2F9AD76AF35FFC693C051CE1 /* Pods-dev.release-nightly.xcconfig */, - C63F01302EF00EAECE6BEA7C /* Pods-dev.release-dev.xcconfig */, - EBBED0A8DE0D0E230CD03613 /* Pods-dev.release-stable.xcconfig */, - 46E04A5AA989356A32CD8E66 /* Pods-dev.profile.xcconfig */, - 1C9810F8B3FD927ED8C94791 /* Pods-dev.profile-nightly.xcconfig */, - 48E7E801EAE1B520AA5F35DD /* Pods-dev.profile-dev.xcconfig */, - 29304D1832AA30DE0C33E05C /* Pods-dev.profile-stable.xcconfig */, - 285DE2278D380EE2A6647CA9 /* Pods-nightly.debug.xcconfig */, - EB7783C1029CEC13F4B05D36 /* Pods-nightly.debug-nightly.xcconfig */, - 9878519B106548FD75CA15C0 /* Pods-nightly.debug-dev.xcconfig */, - 0F8FB58820FF492BD3CF9315 /* Pods-nightly.debug-stable.xcconfig */, - BDE1B62C8A5219CAA5D19583 /* Pods-nightly.release.xcconfig */, - 89CD409D60E1362C529707A4 /* Pods-nightly.release-nightly.xcconfig */, - 68BE49B58C0EBB578948D773 /* Pods-nightly.release-dev.xcconfig */, - 8CF39CF9464623571B63D15B /* Pods-nightly.release-stable.xcconfig */, - CA0F4EAB0789E68A7C771A07 /* Pods-nightly.profile.xcconfig */, - 261A31AC0DBA2D93BD1910D9 /* Pods-nightly.profile-nightly.xcconfig */, - 636F4A85470D9E3B4CC8AFB8 /* Pods-nightly.profile-dev.xcconfig */, - 9232DBE472C8CEA1101843D9 /* Pods-nightly.profile-stable.xcconfig */, - 8AD587044EF2C6A6FA3059DC /* Pods-stable.debug.xcconfig */, - 21C0B1DEE0F0BFD3F3651F79 /* Pods-stable.debug-nightly.xcconfig */, - 39E15EE1745C9266FDB59558 /* Pods-stable.debug-dev.xcconfig */, - F6F397A82E788E50B186ADC7 /* Pods-stable.debug-stable.xcconfig */, - 5014E8BD9F7181E528538444 /* Pods-stable.release.xcconfig */, - E0EAB4380EE7C7EA7A350B6F /* Pods-stable.release-nightly.xcconfig */, - 864AC9150518DFBA85A46A15 /* Pods-stable.release-dev.xcconfig */, - 2DA87118BE2AF25875B7C376 /* Pods-stable.release-stable.xcconfig */, - 4BDAF8FFADB62CA017755094 /* Pods-stable.profile.xcconfig */, - B38E6C7315D66215AFD8B218 /* Pods-stable.profile-nightly.xcconfig */, - 53AD516AAEB9A1331C99CBAE /* Pods-stable.profile-dev.xcconfig */, - 3F754C793C1BC0E8B8FFB5B7 /* Pods-stable.profile-stable.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - E6F17DBD2D0F357F00BC2FA2 /* nightly.entitlements */, - E6F17DBC2D0F357500BC2FA2 /* dev.entitlements */, - E6F17DBB2D0F356700BC2FA2 /* stable.entitlements */, - E6F17DB92D0F34E500BC2FA2 /* HomePlayerWidgetExtension.entitlements */, - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - E612EC3E2D0F07A90022720C /* HomePlayerWidget */, - 97C146EF1CF9000F007C117D /* Products */, - 67CBFE209DF24C94A9837AD5 /* Pods */, - 0E0B839C4E103F896209E822 /* Frameworks */, - B536BDA12B405DB1009B3CE4 /* stable-Info.plist */, - B536BDC02B405FDE009B3CE4 /* dev-Info.plist */, - B536BDE52B4060B3009B3CE4 /* nightly-Info.plist */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - B536BDA02B405DB1009B3CE4 /* stable.app */, - B536BDBF2B405FDE009B3CE4 /* dev.app */, - B536BDE42B4060B3009B3CE4 /* nightly.app */, - E612EC392D0F07A90022720C /* HomePlayerWidgetExtension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - E6F17DBA2D0F352C00BC2FA2 /* Runner.entitlements */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 2AF6C7D149EE8481703D5255 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 6E9FEF583EA597C8B76255B2 /* [CP] Embed Pods Frameworks */, - 46F6EB27C31C41D86428A28B /* [CP] Copy Pods Resources */, - E612EC492D0F07AD0022720C /* Embed Foundation Extensions */, - E63F9CBC2D10709D00CD9E72 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - E612EC472D0F07AD0022720C /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; - B536BD8C2B405DB1009B3CE4 /* stable */ = { - isa = PBXNativeTarget; - buildConfigurationList = B536BD9C2B405DB1009B3CE4 /* Build configuration list for PBXNativeTarget "stable" */; - buildPhases = ( - F0C8BA10A27CA77E18F842E7 /* [CP] Check Pods Manifest.lock */, - B536BD8E2B405DB1009B3CE4 /* Run Script */, - B536BD8F2B405DB1009B3CE4 /* Sources */, - B536BD922B405DB1009B3CE4 /* Frameworks */, - B536BD942B405DB1009B3CE4 /* Resources */, - B536BD992B405DB1009B3CE4 /* Embed Frameworks */, - B536BD9A2B405DB1009B3CE4 /* Thin Binary */, - A6D446F111DE4C4A202BE7F7 /* [CP] Embed Pods Frameworks */, - 2DEF3CF18D30E819C0FF4BCE /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = stable; - productName = Runner; - productReference = B536BDA02B405DB1009B3CE4 /* stable.app */; - productType = "com.apple.product-type.application"; - }; - B536BDAB2B405FDE009B3CE4 /* dev */ = { - isa = PBXNativeTarget; - buildConfigurationList = B536BDB82B405FDE009B3CE4 /* Build configuration list for PBXNativeTarget "dev" */; - buildPhases = ( - 6228176255365EAC646F2745 /* [CP] Check Pods Manifest.lock */, - B536BDAC2B405FDE009B3CE4 /* Run Script */, - B536BDAD2B405FDE009B3CE4 /* Sources */, - B536BDB02B405FDE009B3CE4 /* Frameworks */, - B536BDB12B405FDE009B3CE4 /* Resources */, - B536BDB62B405FDE009B3CE4 /* Embed Frameworks */, - B536BDB72B405FDE009B3CE4 /* Thin Binary */, - 244D41CE80E4BC0FFD63F8C6 /* [CP] Embed Pods Frameworks */, - 4DD66E9E53D92195290872BE /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = dev; - productName = Runner; - productReference = B536BDBF2B405FDE009B3CE4 /* dev.app */; - productType = "com.apple.product-type.application"; - }; - B536BDCD2B4060B3009B3CE4 /* nightly */ = { - isa = PBXNativeTarget; - buildConfigurationList = B536BDDA2B4060B3009B3CE4 /* Build configuration list for PBXNativeTarget "nightly" */; - buildPhases = ( - 5CD4405E93760FBD048E36E2 /* [CP] Check Pods Manifest.lock */, - B536BDCE2B4060B3009B3CE4 /* Run Script */, - B536BDCF2B4060B3009B3CE4 /* Sources */, - B536BDD22B4060B3009B3CE4 /* Frameworks */, - B536BDD32B4060B3009B3CE4 /* Resources */, - B536BDD82B4060B3009B3CE4 /* Embed Frameworks */, - B536BDD92B4060B3009B3CE4 /* Thin Binary */, - D566C841A84D807A607F6DE5 /* [CP] Embed Pods Frameworks */, - 5C9D945D6569D9C3AC420285 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = nightly; - productName = Runner; - productReference = B536BDE42B4060B3009B3CE4 /* nightly.app */; - productType = "com.apple.product-type.application"; - }; - E612EC382D0F07A80022720C /* HomePlayerWidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = E612EC572D0F07AD0022720C /* Build configuration list for PBXNativeTarget "HomePlayerWidgetExtension" */; - buildPhases = ( - E612EC352D0F07A80022720C /* Sources */, - E612EC362D0F07A80022720C /* Frameworks */, - E612EC372D0F07A80022720C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - fileSystemSynchronizedGroups = ( - E612EC3E2D0F07A90022720C /* HomePlayerWidget */, - ); - name = HomePlayerWidgetExtension; - packageProductDependencies = ( - ); - productName = HomePlayerWidgetExtension; - productReference = E612EC392D0F07A90022720C /* HomePlayerWidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1620; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - E612EC382D0F07A80022720C = { - CreatedOnToolsVersion = 16.2; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - B536BD8C2B405DB1009B3CE4 /* stable */, - B536BDAB2B405FDE009B3CE4 /* dev */, - B536BDCD2B4060B3009B3CE4 /* nightly */, - E612EC382D0F07A80022720C /* HomePlayerWidgetExtension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BD942B405DB1009B3CE4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B536BD952B405DB1009B3CE4 /* LaunchScreen.storyboard in Resources */, - B536BD962B405DB1009B3CE4 /* AppFrameworkInfo.plist in Resources */, - B536BD972B405DB1009B3CE4 /* Assets.xcassets in Resources */, - B536BD982B405DB1009B3CE4 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDB12B405FDE009B3CE4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B536BDB22B405FDE009B3CE4 /* LaunchScreen.storyboard in Resources */, - B536BDB32B405FDE009B3CE4 /* AppFrameworkInfo.plist in Resources */, - B536BDB42B405FDE009B3CE4 /* Assets.xcassets in Resources */, - B536BDB52B405FDE009B3CE4 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDD32B4060B3009B3CE4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B536BDD42B4060B3009B3CE4 /* LaunchScreen.storyboard in Resources */, - B536BDD52B4060B3009B3CE4 /* AppFrameworkInfo.plist in Resources */, - B536BDD62B4060B3009B3CE4 /* Assets.xcassets in Resources */, - B536BDD72B4060B3009B3CE4 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E612EC372D0F07A80022720C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 244D41CE80E4BC0FFD63F8C6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-dev/Pods-dev-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-dev/Pods-dev-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-dev/Pods-dev-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 2AF6C7D149EE8481703D5255 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 2DEF3CF18D30E819C0FF4BCE /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-stable/Pods-stable-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-stable/Pods-stable-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-stable/Pods-stable-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 46F6EB27C31C41D86428A28B /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 4DD66E9E53D92195290872BE /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-dev/Pods-dev-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-dev/Pods-dev-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-dev/Pods-dev-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5C9D945D6569D9C3AC420285 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-nightly/Pods-nightly-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-nightly/Pods-nightly-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-nightly/Pods-nightly-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5CD4405E93760FBD048E36E2 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-nightly-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 6228176255365EAC646F2745 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-dev-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 6E9FEF583EA597C8B76255B2 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; - }; - A6D446F111DE4C4A202BE7F7 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-stable/Pods-stable-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-stable/Pods-stable-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-stable/Pods-stable-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - B536BD8E2B405DB1009B3CE4 /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - B536BD9A2B405DB1009B3CE4 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - B536BDAC2B405FDE009B3CE4 /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - B536BDB72B405FDE009B3CE4 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - B536BDCE2B4060B3009B3CE4 /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - B536BDD92B4060B3009B3CE4 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - D566C841A84D807A607F6DE5 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-nightly/Pods-nightly-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-nightly/Pods-nightly-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-nightly/Pods-nightly-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E63F9CBC2D10709D00CD9E72 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Type a script or drag a sgeneratedPath=\"$SRCROOT/Flutter/Generated.xcconfig\"\n\n# Read and trim versionNumber and buildNumber\nversionNumber=$(grep FLUTTER_BUILD_NAME \"$generatedPath\" | cut -d '=' -f2 | xargs)\nbuildNumber=$(grep FLUTTER_BUILD_NUMBER \"$generatedPath\" | cut -d '=' -f2 | xargs)\n\ninfoPlistPath=\"$SRCROOT/HomePlayerWidget/Info.plist\"\n\n# Check and add CFBundleVersion if it does not exist\n/usr/libexec/PlistBuddy -c \"Print :CFBundleVersion\" \"$infoPlistPath\" 2>/dev/null\nif [ $? != 0 ]; then\n /usr/libexec/PlistBuddy -c \"Add :CFBundleVersion string $buildNumber\" \"$infoPlistPath\"\nelse\n /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$infoPlistPath\"\nfi\n\n# Check and add CFBundleShortVersionString if it does not exist\n/usr/libexec/PlistBuddy -c \"Print :CFBundleShortVersionString\" \"$infoPlistPath\" 2>/dev/null\nif [ $? != 0 ]; then\n /usr/libexec/PlistBuddy -c \"Add :CFBundleShortVersionString string $versionNumber\" \"$infoPlistPath\"\nelse\n /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $versionNumber\" \"$infoPlistPath\"\nfi\n\ncript file from your workspace to insert its path.\n"; - }; - F0C8BA10A27CA77E18F842E7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-stable-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BD8F2B405DB1009B3CE4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B536BD902B405DB1009B3CE4 /* AppDelegate.swift in Sources */, - B536BD912B405DB1009B3CE4 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDAD2B405FDE009B3CE4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B536BDAE2B405FDE009B3CE4 /* AppDelegate.swift in Sources */, - B536BDAF2B405FDE009B3CE4 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B536BDCF2B4060B3009B3CE4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B536BDD02B4060B3009B3CE4 /* AppDelegate.swift in Sources */, - B536BDD12B4060B3009B3CE4 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E612EC352D0F07A80022720C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - E612EC472D0F07AD0022720C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = E612EC382D0F07A80022720C /* HomePlayerWidgetExtension */; - targetProxy = E612EC462D0F07AD0022720C /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - B536BD9D2B405DB1009B3CE4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - B536BD9E2B405DB1009B3CE4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - B536BD9F2B405DB1009B3CE4 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - B536BDA22B405E06009B3CE4 /* Debug-stable */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug-stable"; - }; - B536BDA32B405E06009B3CE4 /* Debug-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-stable"; - }; - B536BDA42B405E06009B3CE4 /* Debug-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-stable"; - }; - B536BDA52B405E19009B3CE4 /* Release-stable */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Release-stable"; - }; - B536BDA62B405E19009B3CE4 /* Release-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-stable"; - }; - B536BDA72B405E19009B3CE4 /* Release-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-stable"; - }; - B536BDA82B405E1F009B3CE4 /* Profile-stable */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Profile-stable"; - }; - B536BDA92B405E1F009B3CE4 /* Profile-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-stable"; - }; - B536BDAA2B405E1F009B3CE4 /* Profile-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-stable"; - }; - B536BDB92B405FDE009B3CE4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - B536BDBA2B405FDE009B3CE4 /* Debug-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-stable"; - }; - B536BDBB2B405FDE009B3CE4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - B536BDBC2B405FDE009B3CE4 /* Release-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-stable"; - }; - B536BDBD2B405FDE009B3CE4 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - B536BDBE2B405FDE009B3CE4 /* Profile-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-stable"; - }; - B536BDC12B406014009B3CE4 /* Debug-dev */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug-dev"; - }; - B536BDC22B406014009B3CE4 /* Debug-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-dev"; - }; - B536BDC32B406014009B3CE4 /* Debug-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-dev"; - }; - B536BDC42B406014009B3CE4 /* Debug-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-dev"; - }; - B536BDC52B40601C009B3CE4 /* Release-dev */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Release-dev"; - }; - B536BDC62B40601C009B3CE4 /* Release-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-dev"; - }; - B536BDC72B40601C009B3CE4 /* Release-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-dev"; - }; - B536BDC82B40601C009B3CE4 /* Release-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-dev"; - }; - B536BDC92B406021009B3CE4 /* Profile-dev */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Profile-dev"; - }; - B536BDCA2B406021009B3CE4 /* Profile-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-dev"; - }; - B536BDCB2B406021009B3CE4 /* Profile-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-dev"; - }; - B536BDCC2B406021009B3CE4 /* Profile-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-dev"; - }; - B536BDDB2B4060B3009B3CE4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - B536BDDC2B4060B3009B3CE4 /* Debug-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-dev"; - }; - B536BDDD2B4060B3009B3CE4 /* Debug-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-stable"; - }; - B536BDDE2B4060B3009B3CE4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - B536BDDF2B4060B3009B3CE4 /* Release-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-dev"; - }; - B536BDE02B4060B3009B3CE4 /* Release-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-stable"; - }; - B536BDE12B4060B3009B3CE4 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - B536BDE22B4060B3009B3CE4 /* Profile-dev */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-dev"; - }; - B536BDE32B4060B3009B3CE4 /* Profile-stable */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-stable"; - }; - B536BDE62B4060FE009B3CE4 /* Debug-nightly */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug-nightly"; - }; - B536BDE72B4060FE009B3CE4 /* Debug-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-nightly"; - }; - B536BDE82B4060FE009B3CE4 /* Debug-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-nightly"; - }; - B536BDE92B4060FE009B3CE4 /* Debug-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-nightly"; - }; - B536BDEA2B4060FE009B3CE4 /* Debug-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Debug-nightly"; - }; - B536BDEB2B406105009B3CE4 /* Release-nightly */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Release-nightly"; - }; - B536BDEC2B406105009B3CE4 /* Release-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-nightly"; - }; - B536BDED2B406105009B3CE4 /* Release-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-nightly"; - }; - B536BDEE2B406105009B3CE4 /* Release-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-nightly"; - }; - B536BDEF2B406105009B3CE4 /* Release-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Release-nightly"; - }; - B536BDF02B40610B009B3CE4 /* Profile-nightly */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = "Profile-nightly"; - }; - B536BDF12B40610B009B3CE4 /* Profile-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-nightly"; - }; - B536BDF22B40610B009B3CE4 /* Profile-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = stable.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "stable-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.stable; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-nightly"; - }; - B536BDF32B40610B009B3CE4 /* Profile-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = dev.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "dev-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.dev; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-nightly"; - }; - B536BDF42B40610B009B3CE4 /* Profile-nightly */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = nightly.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "nightly-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.nightly; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = "Profile-nightly"; - }; - E612EC4A2D0F07AD0022720C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - E612EC4B2D0F07AD0022720C /* Debug-nightly */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug-nightly"; - }; - E612EC4C2D0F07AD0022720C /* Debug-dev */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug-dev"; - }; - E612EC4D2D0F07AD0022720C /* Debug-stable */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Debug-stable"; - }; - E612EC4E2D0F07AD0022720C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - E612EC4F2D0F07AD0022720C /* Release-nightly */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Release-nightly"; - }; - E612EC502D0F07AD0022720C /* Release-dev */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Release-dev"; - }; - E612EC512D0F07AD0022720C /* Release-stable */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Release-stable"; - }; - E612EC522D0F07AD0022720C /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Profile; - }; - E612EC532D0F07AD0022720C /* Profile-nightly */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Profile-nightly"; - }; - E612EC542D0F07AD0022720C /* Profile-dev */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Profile-dev"; - }; - E612EC552D0F07AD0022720C /* Profile-stable */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = HomePlayerWidgetExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 88NVGSJ5N3; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HomePlayerWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = HomePlayerWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = oss.krtirtho.spotube.HomePlayerWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = "Profile-stable"; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - B536BDE62B4060FE009B3CE4 /* Debug-nightly */, - B536BDC12B406014009B3CE4 /* Debug-dev */, - B536BDA22B405E06009B3CE4 /* Debug-stable */, - 97C147041CF9000F007C117D /* Release */, - B536BDEB2B406105009B3CE4 /* Release-nightly */, - B536BDC52B40601C009B3CE4 /* Release-dev */, - B536BDA52B405E19009B3CE4 /* Release-stable */, - 249021D3217E4FDB00AE95B9 /* Profile */, - B536BDF02B40610B009B3CE4 /* Profile-nightly */, - B536BDC92B406021009B3CE4 /* Profile-dev */, - B536BDA82B405E1F009B3CE4 /* Profile-stable */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - B536BDE72B4060FE009B3CE4 /* Debug-nightly */, - B536BDC22B406014009B3CE4 /* Debug-dev */, - B536BDA32B405E06009B3CE4 /* Debug-stable */, - 97C147071CF9000F007C117D /* Release */, - B536BDEC2B406105009B3CE4 /* Release-nightly */, - B536BDC62B40601C009B3CE4 /* Release-dev */, - B536BDA62B405E19009B3CE4 /* Release-stable */, - 249021D4217E4FDB00AE95B9 /* Profile */, - B536BDF12B40610B009B3CE4 /* Profile-nightly */, - B536BDCA2B406021009B3CE4 /* Profile-dev */, - B536BDA92B405E1F009B3CE4 /* Profile-stable */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B536BD9C2B405DB1009B3CE4 /* Build configuration list for PBXNativeTarget "stable" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B536BD9D2B405DB1009B3CE4 /* Debug */, - B536BDE82B4060FE009B3CE4 /* Debug-nightly */, - B536BDC32B406014009B3CE4 /* Debug-dev */, - B536BDA42B405E06009B3CE4 /* Debug-stable */, - B536BD9E2B405DB1009B3CE4 /* Release */, - B536BDED2B406105009B3CE4 /* Release-nightly */, - B536BDC72B40601C009B3CE4 /* Release-dev */, - B536BDA72B405E19009B3CE4 /* Release-stable */, - B536BD9F2B405DB1009B3CE4 /* Profile */, - B536BDF22B40610B009B3CE4 /* Profile-nightly */, - B536BDCB2B406021009B3CE4 /* Profile-dev */, - B536BDAA2B405E1F009B3CE4 /* Profile-stable */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B536BDB82B405FDE009B3CE4 /* Build configuration list for PBXNativeTarget "dev" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B536BDB92B405FDE009B3CE4 /* Debug */, - B536BDE92B4060FE009B3CE4 /* Debug-nightly */, - B536BDC42B406014009B3CE4 /* Debug-dev */, - B536BDBA2B405FDE009B3CE4 /* Debug-stable */, - B536BDBB2B405FDE009B3CE4 /* Release */, - B536BDEE2B406105009B3CE4 /* Release-nightly */, - B536BDC82B40601C009B3CE4 /* Release-dev */, - B536BDBC2B405FDE009B3CE4 /* Release-stable */, - B536BDBD2B405FDE009B3CE4 /* Profile */, - B536BDF32B40610B009B3CE4 /* Profile-nightly */, - B536BDCC2B406021009B3CE4 /* Profile-dev */, - B536BDBE2B405FDE009B3CE4 /* Profile-stable */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B536BDDA2B4060B3009B3CE4 /* Build configuration list for PBXNativeTarget "nightly" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B536BDDB2B4060B3009B3CE4 /* Debug */, - B536BDEA2B4060FE009B3CE4 /* Debug-nightly */, - B536BDDC2B4060B3009B3CE4 /* Debug-dev */, - B536BDDD2B4060B3009B3CE4 /* Debug-stable */, - B536BDDE2B4060B3009B3CE4 /* Release */, - B536BDEF2B406105009B3CE4 /* Release-nightly */, - B536BDDF2B4060B3009B3CE4 /* Release-dev */, - B536BDE02B4060B3009B3CE4 /* Release-stable */, - B536BDE12B4060B3009B3CE4 /* Profile */, - B536BDF42B40610B009B3CE4 /* Profile-nightly */, - B536BDE22B4060B3009B3CE4 /* Profile-dev */, - B536BDE32B4060B3009B3CE4 /* Profile-stable */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E612EC572D0F07AD0022720C /* Build configuration list for PBXNativeTarget "HomePlayerWidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E612EC4A2D0F07AD0022720C /* Debug */, - E612EC4B2D0F07AD0022720C /* Debug-nightly */, - E612EC4C2D0F07AD0022720C /* Debug-dev */, - E612EC4D2D0F07AD0022720C /* Debug-stable */, - E612EC4E2D0F07AD0022720C /* Release */, - E612EC4F2D0F07AD0022720C /* Release-nightly */, - E612EC502D0F07AD0022720C /* Release-dev */, - E612EC512D0F07AD0022720C /* Release-stable */, - E612EC522D0F07AD0022720C /* Profile */, - E612EC532D0F07AD0022720C /* Profile-nightly */, - E612EC542D0F07AD0022720C /* Profile-dev */, - E612EC552D0F07AD0022720C /* Profile-stable */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index c53e2b31..00000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme deleted file mode 100644 index 1ccca8e1..00000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/nightly.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/nightly.xcscheme deleted file mode 100644 index 7ec18a73..00000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/nightly.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/stable.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/stable.xcscheme deleted file mode 100644 index ddc19e2e..00000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/stable.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift deleted file mode 100644 index f512ac86..00000000 --- a/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,18 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - // Add this to get Documents directory path - if let documentsPath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.path { - UserDefaults.standard.set(documentsPath, forKey: "download_path") - } - - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-1024x1024@1x.png deleted file mode 100644 index 2185c35d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@1x.png deleted file mode 100644 index 172bc383..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@2x.png deleted file mode 100644 index 876617d9..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@3x.png deleted file mode 100644 index fec86d87..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@1x.png deleted file mode 100644 index fbb0f45a..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@2x.png deleted file mode 100644 index 854e1e45..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@3x.png deleted file mode 100644 index 420d2a17..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@1x.png deleted file mode 100644 index 876617d9..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@2x.png deleted file mode 100644 index 6b7a608d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@3x.png deleted file mode 100644 index d871fa3f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-50x50@1x.png deleted file mode 100644 index e77b38df..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-50x50@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-50x50@2x.png deleted file mode 100644 index 358cb28f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-50x50@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-57x57@1x.png deleted file mode 100644 index 87f4290b..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-57x57@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-57x57@2x.png deleted file mode 100644 index 53c10a09..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-57x57@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-60x60@2x.png deleted file mode 100644 index d871fa3f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-60x60@3x.png deleted file mode 100644 index 4bb39789..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-72x72@1x.png deleted file mode 100644 index 8164cc67..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-72x72@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-72x72@2x.png deleted file mode 100644 index e58ef25f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-72x72@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-76x76@1x.png deleted file mode 100644 index f5e1ae5a..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-76x76@2x.png deleted file mode 100644 index 99bd36c9..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-83.5x83.5@2x.png deleted file mode 100644 index 8d199658..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/AppIcon-nightly-83.5x83.5@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/Contents.json deleted file mode 100644 index 1ce0f517..00000000 --- a/ios/Runner/Assets.xcassets/AppIcon-nightly.appiconset/Contents.json +++ /dev/null @@ -1 +0,0 @@ -{"images":[{"size":"20x20","idiom":"iphone","filename":"AppIcon-nightly-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"AppIcon-nightly-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"AppIcon-nightly-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"AppIcon-nightly-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"AppIcon-nightly-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"AppIcon-nightly-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"AppIcon-nightly-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"AppIcon-nightly-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"AppIcon-nightly-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"AppIcon-nightly-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"AppIcon-nightly-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"AppIcon-nightly-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"AppIcon-nightly-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"AppIcon-nightly-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"AppIcon-nightly-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"AppIcon-nightly-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"AppIcon-nightly-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"AppIcon-nightly-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"AppIcon-nightly-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"AppIcon-nightly-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"AppIcon-nightly-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"AppIcon-nightly-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"AppIcon-nightly-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"AppIcon-nightly-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"AppIcon-nightly-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-1024x1024@1x.png deleted file mode 100644 index aaf8f69b..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png deleted file mode 100644 index 2ac9068e..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png deleted file mode 100644 index d0a01485..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png deleted file mode 100644 index 693f7baa..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png deleted file mode 100644 index 033019fc..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png deleted file mode 100644 index 809668c3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png deleted file mode 100644 index eaa1de13..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png deleted file mode 100644 index d0a01485..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png deleted file mode 100644 index ffb602b3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png deleted file mode 100644 index 77d37d5d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-50x50@1x.png deleted file mode 100644 index a26cd088..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-50x50@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-50x50@2x.png deleted file mode 100644 index 8d860f15..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-50x50@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-57x57@1x.png deleted file mode 100644 index 6a480baf..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-57x57@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-57x57@2x.png deleted file mode 100644 index d8b55615..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-57x57@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png deleted file mode 100644 index 77d37d5d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png deleted file mode 100644 index 2b587235..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-72x72@1x.png deleted file mode 100644 index efac11ba..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-72x72@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-72x72@2x.png deleted file mode 100644 index a73fe33c..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-72x72@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png deleted file mode 100644 index e8ac9032..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png deleted file mode 100644 index e1859a0d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png deleted file mode 100644 index f863a923..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d0d98aa1..00000000 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1 +0,0 @@ -{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 59407b44..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 5eacaa5f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index bbb9f839..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 28d0d8a8..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index b1df0e72..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index 24b76e25..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index 5c0b6d57..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index bbb9f839..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index bdc5656b..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index c03c89fe..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png deleted file mode 100644 index 40b88968..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png deleted file mode 100644 index 2050f427..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png deleted file mode 100644 index d1ccab30..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png deleted file mode 100644 index 47c629f3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index c03c89fe..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 22d28c12..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png deleted file mode 100644 index c9e5cfad..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png deleted file mode 100644 index 3450fb00..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index 3dd3eda3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 2e69c843..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index f769eb6e..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage.png b/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage@2x.png b/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage@2x.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage@3x.png b/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage@3x.png deleted file mode 100644 index d301093a..00000000 Binary files a/ios/Runner/Assets.xcassets/BrandingImage.imageset/BrandingImage@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/BrandingImage.imageset/Contents.json deleted file mode 100644 index 12712275..00000000 --- a/ios/Runner/Assets.xcassets/BrandingImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "BrandingImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "BrandingImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "BrandingImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage.png b/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage.png deleted file mode 100644 index 3ff2a2da..00000000 Binary files a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage@2x.png b/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage@2x.png deleted file mode 100644 index 8e2bb197..00000000 Binary files a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage@3x.png b/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage@3x.png deleted file mode 100644 index d301093a..00000000 Binary files a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/BrandingImage@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/Contents.json b/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/Contents.json deleted file mode 100644 index 12712275..00000000 --- a/ios/Runner/Assets.xcassets/BrandingImageNightly.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "BrandingImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "BrandingImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "BrandingImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json deleted file mode 100644 index 9f447e1b..00000000 --- a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "background.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png deleted file mode 100644 index 4bebb9de..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchBackgroundNightly.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackgroundNightly.imageset/Contents.json deleted file mode 100644 index 9f447e1b..00000000 --- a/ios/Runner/Assets.xcassets/LaunchBackgroundNightly.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "background.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchBackgroundNightly.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackgroundNightly.imageset/background.png deleted file mode 100644 index 4bebb9de..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchBackgroundNightly.imageset/background.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 00cabce8..00000000 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "LaunchImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 6e04efdc..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 51a669aa..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index cc79cb85..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/Contents.json deleted file mode 100644 index 00cabce8..00000000 --- a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "LaunchImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage.png deleted file mode 100644 index d8f7cc0e..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage@2x.png deleted file mode 100644 index 17a2c373..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage@3x.png deleted file mode 100644 index db53f016..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImageNightly.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index ec8a1de3..00000000 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/Base.lproj/LaunchScreenNightly.storyboard b/ios/Runner/Base.lproj/LaunchScreenNightly.storyboard deleted file mode 100644 index 645a417f..00000000 --- a/ios/Runner/Base.lproj/LaunchScreenNightly.storyboard +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist deleted file mode 100644 index 8d6c09a2..00000000 --- a/ios/Runner/Info.plist +++ /dev/null @@ -1,82 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Spotube - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - spotube - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsArbitraryLoadsForMedia - - - NSCameraUsageDescription - This app require access to the device camera - NSMicrophoneUsageDescription - This app does not require access to the device microphone - NSPhotoLibraryUsageDescription - This app require access to the photo library - UIApplicationSupportsIndirectInputEvents - - UIBackgroundModes - - audio - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocalNetworkUsageDescription - To allow other devices on the network control playback of Spotube securely. - NSBonjourServices - - _spotube._tcp - - UIFileSharingEnabled - - LSSupportsOpeningDocumentsInPlace - - UISupportsDocumentBrowser - - - diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements deleted file mode 100644 index 58165678..00000000 --- a/ios/Runner/Runner.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.spotube_home_player_widget - - - diff --git a/ios/build/.last_build_id b/ios/build/.last_build_id deleted file mode 100644 index ee73fd53..00000000 --- a/ios/build/.last_build_id +++ /dev/null @@ -1 +0,0 @@ -6f5ed64a4065df2d43bfb5b18863018c \ No newline at end of file diff --git a/ios/dev-Info.plist b/ios/dev-Info.plist deleted file mode 100644 index 3581787b..00000000 --- a/ios/dev-Info.plist +++ /dev/null @@ -1,70 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Spotube Dev - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - spotube - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsArbitraryLoadsForMedia - - - NSCameraUsageDescription - This app require access to the device camera - NSMicrophoneUsageDescription - This app does not require access to the device microphone - NSPhotoLibraryUsageDescription - This app require access to the photo library - UIApplicationSupportsIndirectInputEvents - - UIBackgroundModes - - audio - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/ios/dev.entitlements b/ios/dev.entitlements deleted file mode 100644 index 58165678..00000000 --- a/ios/dev.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.spotube_home_player_widget - - - diff --git a/ios/nightly-Info.plist b/ios/nightly-Info.plist deleted file mode 100644 index e1db8f01..00000000 --- a/ios/nightly-Info.plist +++ /dev/null @@ -1,70 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Spotube - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - spotube - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsArbitraryLoadsForMedia - - - NSCameraUsageDescription - This app require access to the device camera - NSMicrophoneUsageDescription - This app does not require access to the device microphone - NSPhotoLibraryUsageDescription - This app require access to the photo library - UIApplicationSupportsIndirectInputEvents - - UIBackgroundModes - - audio - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/ios/nightly.entitlements b/ios/nightly.entitlements deleted file mode 100644 index 58165678..00000000 --- a/ios/nightly.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.spotube_home_player_widget - - - diff --git a/ios/stable-Info.plist b/ios/stable-Info.plist deleted file mode 100644 index e1db8f01..00000000 --- a/ios/stable-Info.plist +++ /dev/null @@ -1,70 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Spotube - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - spotube - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsArbitraryLoadsForMedia - - - NSCameraUsageDescription - This app require access to the device camera - NSMicrophoneUsageDescription - This app does not require access to the device microphone - NSPhotoLibraryUsageDescription - This app require access to the photo library - UIApplicationSupportsIndirectInputEvents - - UIBackgroundModes - - audio - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/ios/stable.entitlements b/ios/stable.entitlements deleted file mode 100644 index 58165678..00000000 --- a/ios/stable.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.spotube_home_player_widget - - - diff --git a/iosApp/Configuration/Config.xcconfig b/iosApp/Configuration/Config.xcconfig new file mode 100644 index 00000000..3cef6a96 --- /dev/null +++ b/iosApp/Configuration/Config.xcconfig @@ -0,0 +1,7 @@ +TEAM_ID= + +PRODUCT_NAME=Spotube +PRODUCT_BUNDLE_IDENTIFIER=dev.krtirtho.spotube.Spotube$(TEAM_ID) + +CURRENT_PROJECT_VERSION=1 +MARKETING_VERSION=1.0 \ No newline at end of file diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj new file mode 100644 index 00000000..0eb68270 --- /dev/null +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -0,0 +1,373 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXFileReference section */ + 11DF02E4B44E5BCF61736473 /* Spotube.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Spotube.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + FC0CC9A88AED959E9CE9C913 /* Exceptions for "iosApp" folder in "iosApp" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = CBFC97515810713C553A7541 /* iosApp */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 5BB730BF90365122B74925FF /* iosApp */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + FC0CC9A88AED959E9CE9C913 /* Exceptions for "iosApp" folder in "iosApp" target */, + ); + path = iosApp; + sourceTree = ""; + }; + E265D0F6D10F52F5C1374EEB /* Configuration */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = Configuration; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + EFCF243BC7D8246E008EF23D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + EFA169D322B90F32841D602F = { + isa = PBXGroup; + children = ( + E265D0F6D10F52F5C1374EEB /* Configuration */, + 5BB730BF90365122B74925FF /* iosApp */, + 835615636B5FE86AA850B7DB /* Products */, + ); + sourceTree = ""; + }; + 835615636B5FE86AA850B7DB /* Products */ = { + isa = PBXGroup; + children = ( + 11DF02E4B44E5BCF61736473 /* Spotube.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + CBFC97515810713C553A7541 /* iosApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6F8AC65FA015674062B91E20 /* Build configuration list for PBXNativeTarget "iosApp" */; + buildPhases = ( + 6413B0F29E004BC8B0C4D22A /* Compile Kotlin Framework */, + 314349EF3C4149F4A4A72378 /* Sources */, + EFCF243BC7D8246E008EF23D /* Frameworks */, + ED9557BFD7438D37A5E9513D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 5BB730BF90365122B74925FF /* iosApp */, + ); + name = iosApp; + packageProductDependencies = ( + ); + productName = iosApp; + productReference = 11DF02E4B44E5BCF61736473 /* Spotube.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B056E79C138AE849968965F1 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1620; + LastUpgradeCheck = 1620; + TargetAttributes = { + CBFC97515810713C553A7541 = { + CreatedOnToolsVersion = 16.2; + }; + }; + }; + buildConfigurationList = 79A44D8DEA428263AC7DC2E1 /* Build configuration list for PBXProject "iosApp" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = EFA169D322B90F32841D602F; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 835615636B5FE86AA850B7DB /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + CBFC97515810713C553A7541 /* iosApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + ED9557BFD7438D37A5E9513D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 6413B0F29E004BC8B0C4D22A /* Compile Kotlin Framework */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Compile Kotlin Framework"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 314349EF3C4149F4A4A72378 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + AF5828948B37FEEF5EF7F345 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReferenceAnchor = E265D0F6D10F52F5C1374EEB /* Configuration */; + baseConfigurationReferenceRelativePath = Config.xcconfig; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 1C42200356BD14712FAE1CFA /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReferenceAnchor = E265D0F6D10F52F5C1374EEB /* Configuration */; + baseConfigurationReferenceRelativePath = Config.xcconfig; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AC996E9458BD3DAE9610EA49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; + DEVELOPMENT_TEAM = "${TEAM_ID}"; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = iosApp/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4FB276594B17F1A0D71D2462 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; + DEVELOPMENT_TEAM = "${TEAM_ID}"; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = iosApp/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 79A44D8DEA428263AC7DC2E1 /* Build configuration list for PBXProject "iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AF5828948B37FEEF5EF7F345 /* Debug */, + 1C42200356BD14712FAE1CFA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6F8AC65FA015674062B91E20 /* Build configuration list for PBXNativeTarget "iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AC996E9458BD3DAE9610EA49 /* Debug */, + 4FB276594B17F1A0D71D2462 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B056E79C138AE849968965F1 /* Project object */; +} \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/iosApp/iosApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to iosApp/iosApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/HomePlayerWidget/Assets.xcassets/AccentColor.colorset/Contents.json b/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from ios/HomePlayerWidget/Assets.xcassets/AccentColor.colorset/Contents.json rename to iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/ios/HomePlayerWidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 93% rename from ios/HomePlayerWidget/Assets.xcassets/AppIcon.appiconset/Contents.json rename to iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json index 23058801..4e8d485b 100644 --- a/ios/HomePlayerWidget/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "app-icon-1024.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png new file mode 100644 index 00000000..53fc536f Binary files /dev/null and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png differ diff --git a/ios/HomePlayerWidget/Assets.xcassets/Contents.json b/iosApp/iosApp/Assets.xcassets/Contents.json similarity index 100% rename from ios/HomePlayerWidget/Assets.xcassets/Contents.json rename to iosApp/iosApp/Assets.xcassets/Contents.json diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift new file mode 100644 index 00000000..445341b2 --- /dev/null +++ b/iosApp/iosApp/ContentView.swift @@ -0,0 +1,36 @@ +// Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +import UIKit +import SwiftUI +import ComposeApp + +struct ComposeView: UIViewControllerRepresentable { + func makeUIViewController(context: Context) -> UIViewController { + MainViewControllerKt.MainViewController() + } + + func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} +} + +struct ContentView: View { + var body: some View { + ComposeView() + .ignoresSafeArea() + } +} + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/iosApp/iosApp/Info.plist similarity index 80% rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to iosApp/iosApp/Info.plist index 18d98100..11845e1d 100644 --- a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ b/iosApp/iosApp/Info.plist @@ -2,7 +2,7 @@ - IDEDidComputeMac32BitWarning + CADisableMinimumFrameDurationOnPhone diff --git a/ios/Runner/Assets.xcassets/Contents.json b/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/Contents.json rename to iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/iosApp/iosApp/iOSApp.swift b/iosApp/iosApp/iOSApp.swift new file mode 100644 index 00000000..08b58d47 --- /dev/null +++ b/iosApp/iosApp/iOSApp.swift @@ -0,0 +1,25 @@ +// Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +import SwiftUI + +@main +struct iOSApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} \ No newline at end of file diff --git a/js_plugin_example/.gitignore b/js_plugin_example/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/js_plugin_example/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/js_plugin_example/LICENSE b/js_plugin_example/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/js_plugin_example/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/js_plugin_example/build.gradle.kts b/js_plugin_example/build.gradle.kts new file mode 100644 index 00000000..ac43b30d --- /dev/null +++ b/js_plugin_example/build.gradle.kts @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin +import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension + +plugins { + alias(libs.plugins.kotlinMultiplatform) + alias(libs.plugins.kotlinSerialization) + alias(libs.plugins.zipline.gradle.plugin) + alias(libs.plugins.spotubeGradle) +} + +kotlin { + applyDefaultHierarchyTemplate() + + js { + browser() + binaries.executable() + } + + sourceSets { + commonMain.dependencies { + implementation(project(":plugin_interfaces")) + + api(libs.zipline.core) + api(libs.kotlinx.coroutines.core) + api(libs.semver) + } + + jsMain.dependencies {} + } +} + +zipline { + mainFunction.set("dev.krtirtho.js_plugin_example.main") +} + +plugins.withType { + the().yarnLockAutoReplace = true +} + +//fun registerPackageTask(flavor: String, compileTaskName: String) { +// val capitalizedFlavor = flavor.replaceFirstChar { it.uppercase() } +// +// tasks.register("package${capitalizedFlavor}Plugin") { +// group = "distribution" +// description = "Packages the $flavor Zipline executable and plugin.json into a smplug." +// +// // 1. Depend on the Zipline compilation task +// val compileTask = tasks.named(compileTaskName) +// dependsOn(compileTask) +// +// // 2. Set the output location and name +// archiveFileName.set("plugin-$flavor.smplug") +// destinationDirectory.set(layout.buildDirectory.dir("distributions")) +// +// // 3. Include the Zipline outputs +// // We use a provider/closure to ensure the directory exists when the task runs +// from(layout.buildDirectory.dir("zipline/$capitalizedFlavor")) { +// // This preserves subdirectories if Zipline generated any +// include("**/*") +// } +// +// // 4. Include plugin.json +// // Use layout.projectDirectory.file() to reach the root JSON +// from(layout.projectDirectory.file("plugin.json")) +// +// // Set inputs for incremental build support +// inputs.file(layout.projectDirectory.file("plugin.json")) +// } +//} +// +//registerPackageTask("development", "compileDevelopmentExecutableKotlinJsZipline") +//registerPackageTask("production", "compileProductionExecutableKotlinJsZipline") \ No newline at end of file diff --git a/js_plugin_example/plugin.json b/js_plugin_example/plugin.json new file mode 100644 index 00000000..58cf95e5 --- /dev/null +++ b/js_plugin_example/plugin.json @@ -0,0 +1,18 @@ +{ + "name": "js_plugin_example", + "version": "1.0.0", + "description": "A simple JavaScript plugin example.", + "apiVersion": "0.0.1", + "author": "Kingkor Roy Tirtho", + "capabilities": [ + "PERSISTENT_STORAGE", + "NETWORK_REQUESTS", + "WEBVIEW" + ], + "abilities": [ + "METADATA", + "AUDIO", + "LYRICS", + "SCROBBLE" + ] +} \ No newline at end of file diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/js.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/js.kt new file mode 100644 index 00000000..bb238dd4 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/js.kt @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example + +import app.cash.zipline.Zipline +import dev.krtirtho.js_plugin_example.plugin_apis.audio.RealAudioAPI +import dev.krtirtho.js_plugin_example.plugin_apis.core.RealCoreAPI +import dev.krtirtho.js_plugin_example.plugin_apis.lyrics.RealLyricsAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataAlbumAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataArtistAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataBrowseAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataPlaylistAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataSearchAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataTrackAPI +import dev.krtirtho.js_plugin_example.plugin_apis.metadata.RealMetadataUserAPI +import dev.krtirtho.js_plugin_example.plugin_apis.scrobble.RealScrobbleAPI +import dev.krtirtho.plugin_interfaces.host_apis.HttpClientAPI +import dev.krtirtho.plugin_interfaces.host_apis.HttpClientAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI +import dev.krtirtho.plugin_interfaces.host_apis.PersistedStorageAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.host_apis.WebViewAPI +import dev.krtirtho.plugin_interfaces.host_apis.WebViewAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI_SERVICE_NAME +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleAPI_SERVICE_NAME +import kotlin.js.Date + +private val zipline by lazy { Zipline.get() } + +@OptIn(ExperimentalJsExport::class) +@JsExport +fun main() { + zipline.take(HttpClientAPI_SERVICE_NAME) + zipline.take(WebViewAPI_SERVICE_NAME) + zipline.take(PersistedStorageAPI_SERVICE_NAME) + console.log("Epoch Time: ${Date.now()}") + + zipline.bind(CoreAPI_SERVICE_NAME, RealCoreAPI()) + zipline.bind(AudioAPI_SERVICE_NAME, RealAudioAPI()) + zipline.bind(LyricsAPI_SERVICE_NAME, RealLyricsAPI()) + zipline.bind(ScrobbleAPI_SERVICE_NAME, RealScrobbleAPI()) + + zipline.bind(MetadataAlbumAPI_SERVICE_NAME, RealMetadataAlbumAPI()) + zipline.bind(MetadataArtistAPI_SERVICE_NAME, RealMetadataArtistAPI()) + zipline.bind(MetadataBrowseAPI_SERVICE_NAME, RealMetadataBrowseAPI()) + zipline.bind(MetadataPlaylistAPI_SERVICE_NAME, RealMetadataPlaylistAPI()) + zipline.bind(MetadataSearchAPI_SERVICE_NAME, RealMetadataSearchAPI()) + zipline.bind(MetadataTrackAPI_SERVICE_NAME, RealMetadataTrackAPI()) + zipline.bind(MetadataUserAPI_SERVICE_NAME, RealMetadataUserAPI()) +} \ No newline at end of file diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/audio/RealAudioAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/audio/RealAudioAPI.kt new file mode 100644 index 00000000..ca6e0332 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/audio/RealAudioAPI.kt @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.audio + +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioFormat +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioQuality +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioSource +import dev.krtirtho.plugin_interfaces.plugin_apis.audio.AudioStream +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack + +val urls = listOf( + "https://cdn.pixabay.com/audio/2024/02/28/audio_d1a9995fc3.mp3", + "https://cdn.pixabay.com/audio/2024/05/29/audio_f3a1d24f19.mp3", + "https://cdn.pixabay.com/audio/2025/03/18/audio_9c95eb2557.mp3", + "https://cdn.pixabay.com/audio/2023/06/02/audio_320a2e0f57.mp3", + "https://cdn.pixabay.com/audio/2024/06/30/audio_0eb1f1f4ec.mp3", + "https://cdn.pixabay.com/audio/2023/08/12/audio_5cdd274d4b.mp3", + "https://cdn.pixabay.com/audio/2025/03/17/audio_a71887c1b8.mp3", + "https://cdn.pixabay.com/audio/2026/03/25/audio_19c3c36ce2.mp3", + "https://cdn.pixabay.com/audio/2023/06/25/audio_ded864e440.mp3" +) + +class RealAudioAPI : AudioAPI { + override val supportedQualities: List = listOf( + AudioFormat( + codec = "mp3", container = "mp3", qualities = listOf( + AudioQuality.Lossy(bitrate = 128), + AudioQuality.Lossy(bitrate = 320), + ) + ), + AudioFormat( + codec = "mp3", container = "mp3", qualities = listOf( + AudioQuality.Lossy(bitrate = 128), + AudioQuality.Lossy(bitrate = 320), + ) + ), + AudioFormat( + codec = "aac", container = "aac", qualities = listOf( + AudioQuality.Lossy(bitrate = 160), + ) + ), + ) + + override suspend fun getStreamsByTrack(track: MetadataTrack): List { + val title = track.title.ifBlank { "Unknown Track" } + val artist = track.artists.firstOrNull()?.name ?: "Unknown Artist" + val album = track.album?.title?.ifBlank { null } + + return listOf( + AudioSource.Basic( + id = "${track.id}-source-1", + title = title, + artist = artist, + album = album, + thumbnails = track.album?.thumbnails.orEmpty(), + externalUri = track.externalUri, + confidence = 0.98f, + ), + AudioSource.Basic( + id = "${track.id}-source-2", + title = "$title (Alternative)", + artist = artist, + album = album, + thumbnails = track.album?.thumbnails.orEmpty(), + externalUri = track.externalUri, + confidence = 0.92f, + ) + ) + } + + override suspend fun getStreamsOfAudioSource(source: AudioSource.Basic): List { + val defaultDuration = 180_000L + val primary = AudioSource.Streamed( + id = source.id, + title = source.title, + artist = source.artist, + album = source.album, + thumbnails = source.thumbnails, + externalUri = source.externalUri, + confidence = source.confidence, + streams = listOf( + AudioStream.Lossy( + url = urls.random(), + codec = "mp3", + bitrate = 256000, + container = "mp3", + ), + ).shuffled() + ) + + return listOf(primary) + } +} \ No newline at end of file diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/core/RealCoreAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/core/RealCoreAPI.kt new file mode 100644 index 00000000..085d0c6d --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/core/RealCoreAPI.kt @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.core + +import dev.krtirtho.plugin_interfaces.plugin_apis.core.CoreAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.core.PluginUpdateInfo +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow + +class RealCoreAPI: CoreAPI { + override suspend fun checkPluginUpdates(currentVersion: net.swiftzer.semver.SemVer): PluginUpdateInfo? { + return null + } + + override fun supportMarkdownText(currentVersion: net.swiftzer.semver.SemVer): String { + return "Support us please!" + } + + override val requiresAuthentication = true + + private val stateFlow = MutableStateFlow(false) + override val loggedInFlow: StateFlow = stateFlow.asStateFlow() + + override suspend fun login() { + stateFlow.value = true + } + + override suspend fun logout() { + stateFlow.value = false + } + +} \ No newline at end of file diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/lyrics/RealLyricsAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/lyrics/RealLyricsAPI.kt new file mode 100644 index 00000000..95edfc72 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/lyrics/RealLyricsAPI.kt @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.lyrics + +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricType +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.LyricsAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.lyrics.SyncLyricsLine + +class RealLyricsAPI : LyricsAPI { + override val supportedLyricTypes: List = listOf(LyricType.STATIC, LyricType.SYNCED) + + override suspend fun getStaticLyrics(trackId: String): String { + return """ + Dummy lyrics for track $trackId + + Verse 1: + This is a placeholder line + Singing through the test design + + Chorus: + La la la, plugin sample song + Everything compiles all along + """.trimIndent() + } + + override suspend fun getSyncedLyrics(trackId: String): List { + return listOf( + SyncLyricsLine(time = 0L, text = "[$trackId] Intro"), + SyncLyricsLine(time = 10_000L, text = "This is a synced dummy lyric line"), + SyncLyricsLine(time = 20_000L, text = "Another line appears right on time"), + SyncLyricsLine(time = 30_000L, text = "Chorus: La la la, plugin sample song"), + SyncLyricsLine(time = 40_000L, text = "Outro: End of demo lyrics") + ) + } +} \ No newline at end of file diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/FakeMetadataStore.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/FakeMetadataStore.kt new file mode 100644 index 00000000..84d7a2b2 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/FakeMetadataStore.kt @@ -0,0 +1,595 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumType +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseSection +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.Thumbnail +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser + +private data class ArtistEntity( + val id: String, + val name: String, + val genres: List, + val biography: String, + val followersCount: Int, +) + +private data class AlbumEntity( + val id: String, + val title: String, + val description: String, + val albumType: MetadataAlbumType, + val artistIds: List, + val releaseDate: String, + val genres: List, + val trackIds: MutableList, +) + +private data class TrackEntity( + val id: String, + val title: String, + val durationMs: Long, + val trackNumber: Int, + val discNumber: Int, + val artistIds: List, + val albumId: String, + val explicit: Boolean, + val popularity: Int, + val isrcCode: String, +) + +private data class UserEntity( + val id: String, + val username: String, + var displayName: String, +) + +private data class PlaylistEntity( + val id: String, + var title: String, + var description: String?, + var ownerId: String, + var thumbnail: String, + var isPublic: Boolean, + var isCollaborating: Boolean, + val trackIds: MutableList, +) + +object FakeMetadataStore { + const val SECTION_NEW_RELEASES = "new-releases" + const val SECTION_TOP_ARTISTS = "top-artists" + const val SECTION_FEATURED_PLAYLISTS = "featured-playlists" + + private const val CURRENT_USER_ID = "user-1" + + private val artists = linkedMapOf() + private val albums = linkedMapOf() + private val tracks = linkedMapOf() + private val users = linkedMapOf() + private val playlists = linkedMapOf() + + private val savedTrackIds = linkedSetOf() + private val savedAlbumIds = linkedSetOf() + private val savedArtistIds = linkedSetOf() + private val savedPlaylistIds = linkedSetOf() + + private var playlistCounter = 1000 + + init { + seed() + } + + fun getUser(id: String): MetadataUser? = users[id]?.toModel() + + fun getTrack(id: String): MetadataTrack = tracks[id]?.toModel() + ?: error("Track not found: $id") + + fun getAlbum(id: String): MetadataAlbum.Detailed = albums[id]?.toDetailedModel() + ?: error("Album not found: $id") + + fun getArtist(id: String): MetadataArtist.Detailed = artists[id]?.toDetailedModel() + ?: error("Artist not found: $id") + + fun getArtistTopTracks(id: String): List { + return tracks.values + .filter { id in it.artistIds } + .sortedByDescending { it.popularity } + .take(10) + .map { it.toModel() } + } + + fun getArtistAlbums(id: String): List { + return albums.values + .filter { id in it.artistIds } + .sortedByDescending { it.releaseDate } + .map { it.toDetailedModel() } + } + + fun getAlbumTracks(id: String): List { + val album = albums[id] ?: error("Album not found: $id") + return album.trackIds.mapNotNull { trackId -> tracks[trackId]?.toModel() } + } + + fun getPlaylist(id: String): MetadataPlaylist = playlists[id]?.toModel() + ?: error("Playlist not found: $id") + + fun getPlaylistTracks(id: String): List { + val playlist = playlists[id] ?: error("Playlist not found: $id") + return playlist.trackIds.mapNotNull { trackId -> tracks[trackId]?.toModel() } + } + + fun getFeaturedItems(): List { + val featuredTrack = tracks.values.maxByOrNull { it.popularity }?.toModel() + val featuredAlbum = albums.values.maxByOrNull { it.trackIds.size }?.toBasicModel() + val featuredArtist = artists.values.maxByOrNull { it.followersCount }?.toBasicModel() + val featuredPlaylist = playlists.values.firstOrNull()?.toModel() + + return listOfNotNull( + featuredTrack?.let { MetadataBrowseItem.Track(it) }, + featuredAlbum?.let { MetadataBrowseItem.Album(it) }, + featuredArtist?.let { MetadataBrowseItem.Artist(it) }, + featuredPlaylist?.let { MetadataBrowseItem.Playlist(it) }, + ) + } + + fun getBrowseSections(): List { + val newReleases = albums.values + .sortedByDescending { it.releaseDate } + .take(8) + .map { MetadataBrowseItem.Album(it.toBasicModel()) } + + val topArtists = artists.values + .sortedByDescending { it.followersCount } + .take(8) + .map { MetadataBrowseItem.Artist(it.toBasicModel()) } + + val featuredPlaylists = playlists.values + .take(8) + .map { MetadataBrowseItem.Playlist(it.toModel()) } + + return listOf( + MetadataBrowseSection( + title = "New Releases", + description = "Recently released albums", + items = newReleases, + moreLink = "https://example.com/new-releases", + ), + MetadataBrowseSection( + title = "Top Artists", + description = "Trending artists in this simulation", + items = topArtists, + moreLink = "https://example.com/top-artists", + ), + MetadataBrowseSection( + title = "Featured Playlists", + description = "Curated playlists from linked track data", + items = featuredPlaylists, + moreLink = "https://example.com/featured-playlists", + ), + ) + } + + fun getBrowseSublist(sectionId: String): List { + return when (sectionId) { + SECTION_NEW_RELEASES -> albums.values + .sortedByDescending { it.releaseDate } + .map { MetadataBrowseItem.Album(it.toBasicModel()) } + + SECTION_TOP_ARTISTS -> artists.values + .sortedByDescending { it.followersCount } + .map { MetadataBrowseItem.Artist(it.toBasicModel()) } + + SECTION_FEATURED_PLAYLISTS -> playlists.values + .map { MetadataBrowseItem.Playlist(it.toModel()) } + + else -> tracks.values + .sortedByDescending { it.popularity } + .map { MetadataBrowseItem.Track(it.toModel()) } + } + } + + fun search(query: String): List { + val q = query.trim().lowercase() + val trackHit = tracks.values.firstOrNull { it.title.lowercase().contains(q) } + val artistHit = artists.values.firstOrNull { it.name.lowercase().contains(q) } + val albumHit = albums.values.firstOrNull { it.title.lowercase().contains(q) } + val playlistHit = playlists.values.firstOrNull { it.title.lowercase().contains(q) } + val userHit = users.values.firstOrNull { + it.username.lowercase().contains(q) || it.displayName.lowercase().contains(q) + } + + return listOfNotNull( + trackHit?.let { MetadataSearchResult.Track(it.toModel()) }, + artistHit?.let { MetadataSearchResult.Artist(it.toBasicModel()) }, + albumHit?.let { MetadataSearchResult.Album(it.toBasicModel()) }, + playlistHit?.let { MetadataSearchResult.Playlist(it.toModel()) }, + userHit?.let { MetadataSearchResult.User(it.toModel()) }, + ) + } + + fun searchTracks(query: String): List { + val q = query.trim().lowercase() + return tracks.values + .filter { it.title.lowercase().contains(q) } + .map { MetadataSearchResult.Track(it.toModel()) } + } + + fun searchArtists(query: String): List { + val q = query.trim().lowercase() + return artists.values + .filter { it.name.lowercase().contains(q) } + .map { MetadataSearchResult.Artist(it.toBasicModel()) } + } + + fun searchAlbums(query: String): List { + val q = query.trim().lowercase() + return albums.values + .filter { it.title.lowercase().contains(q) } + .map { MetadataSearchResult.Album(it.toBasicModel()) } + } + + fun searchPlaylists(query: String): List { + val q = query.trim().lowercase() + return playlists.values + .filter { it.title.lowercase().contains(q) } + .map { MetadataSearchResult.Playlist(it.toModel()) } + } + + fun searchUsers(query: String): List { + val q = query.trim().lowercase() + return users.values + .filter { + it.username.lowercase().contains(q) || it.displayName.lowercase().contains(q) + } + .map { MetadataSearchResult.User(it.toModel()) } + } + + fun savedTracks(): List { + return savedTrackIds + .mapNotNull { trackId -> tracks[trackId]?.toModel() } + } + + fun savedAlbums(): List { + return savedAlbumIds + .mapNotNull { albumId -> albums[albumId]?.toDetailedModel() } + } + + fun savedArtists(): List { + return savedArtistIds + .mapNotNull { artistId -> artists[artistId]?.toDetailedModel() } + } + + fun savedPlaylists(): List { + return savedPlaylistIds + .mapNotNull { playlistId -> playlists[playlistId]?.toModel() } + } + + fun isSavedTracks(ids: List): List = ids.map { it in savedTrackIds } + fun isSavedAlbums(ids: List): List = ids.map { it in savedAlbumIds } + fun isSavedArtists(ids: List): List = ids.map { it in savedArtistIds } + fun isSavedPlaylists(ids: List): List = ids.map { it in savedPlaylistIds } + + fun saveTracks(ids: List) { + ids.filterTo(savedTrackIds) { it in tracks } + } + + fun removeSavedTracks(ids: List) { + savedTrackIds.removeAll(ids.toSet()) + } + + fun saveAlbums(ids: List) { + ids.filterTo(savedAlbumIds) { it in albums } + } + + fun removeSavedAlbums(ids: List) { + savedAlbumIds.removeAll(ids.toSet()) + } + + fun saveArtists(ids: List) { + ids.filterTo(savedArtistIds) { it in artists } + } + + fun removeSavedArtists(ids: List) { + savedArtistIds.removeAll(ids.toSet()) + } + + fun savePlaylists(ids: List) { + ids.filterTo(savedPlaylistIds) { it in playlists } + } + + fun removeSavedPlaylists(ids: List) { + savedPlaylistIds.removeAll(ids.toSet()) + } + + fun createPlaylist( + name: String, + description: String?, + isPublic: Boolean, + isCollaborating: Boolean, + imageBase64: String, + trackIds: List, + ): MetadataPlaylist { + val id = "playlist-${playlistCounter++}" + val resolvedTracks = trackIds.filter { it in tracks } + playlists[id] = PlaylistEntity( + id = id, + title = name, + description = description, + ownerId = CURRENT_USER_ID, + thumbnail = imageBase64.takeIf { it.isNotBlank() } + ?: "https://picsum.photos/seed/$id/300/300", + isPublic = isPublic, + isCollaborating = isCollaborating, + trackIds = resolvedTracks.toMutableList(), + ) + return playlists.getValue(id).toModel() + } + + fun updatePlaylist( + id: String, + name: String?, + description: String?, + isPublic: Boolean?, + isCollaborating: Boolean?, + imageBase64: String?, + trackIds: List?, + ): MetadataPlaylist { + val playlist = playlists[id] ?: error("Playlist not found: $id") + if (name != null) playlist.title = name + if (description != null) playlist.description = description + if (isPublic != null) playlist.isPublic = isPublic + if (isCollaborating != null) playlist.isCollaborating = isCollaborating + if (imageBase64 != null) playlist.thumbnail = imageBase64 + if (trackIds != null) { + playlist.trackIds.clear() + playlist.trackIds.addAll(trackIds.filter { it in tracks }) + } + return playlist.toModel() + } + + fun deletePlaylist(id: String) { + playlists.remove(id) + savedPlaylistIds.remove(id) + } + + fun recommendationsBasedOnTracks(seedTrackIds: List, limit: Int): List { + if (tracks.isEmpty()) return emptyList() + val seedTracks = seedTrackIds.mapNotNull { tracks[it] } + val seedArtistIds = seedTracks.flatMap { it.artistIds }.toSet() + val seedAlbumIds = seedTracks.map { it.albumId }.toSet() + + val ranked = tracks.values + .asSequence() + .filter { it.id !in seedTrackIds.toSet() } + .sortedWith( + compareByDescending { track -> + track.artistIds.count { it in seedArtistIds } * 10 + + (if (track.albumId in seedAlbumIds) 3 else 0) + + track.popularity + } + ) + .take(limit) + .map { it.toModel() } + .toList() + + return if (ranked.isEmpty()) { + tracks.values.take(limit).map { it.toModel() } + } else ranked + } + + fun paginate( + items: List, + pagination: PaginationStrategy? = PaginationStrategy.Offset(0, 20) + ): PaginationResult { + if (pagination is PaginationStrategy.Offset) { + val safeOffset = pagination.offset.coerceAtLeast(0) + val safePageSize = pagination.limit.coerceAtLeast(1) + val paged = items.drop(safeOffset).take(safePageSize) + val nextOffset = + if (safeOffset + paged.size < items.size) safeOffset + paged.size else null + return PaginationResult( + items = paged, + totalCount = items.size, + nextPagination = PaginationStrategy.Offset(nextOffset ?: 0, safePageSize) + ) + } + return PaginationResult( + items = items, + totalCount = items.size, + nextPagination = null + ) + } + + private fun seed() { + users["user-1"] = UserEntity("user-1", "demo_user", "Demo User") + users["user-2"] = UserEntity("user-2", "mixmaster", "Mix Master") + + repeat(6) { index -> + val id = "artist-${index + 1}" + artists[id] = ArtistEntity( + id = id, + name = "Sim Artist ${index + 1}", + genres = listOf("Pop", "Electronic", "Rock").shuffled().take(2), + biography = "Simulated biography for ${index + 1}.", + followersCount = 50_000 * (index + 1), + ) + } + + var trackCounter = 1 + var albumCounter = 1 + artists.values.forEachIndexed { idx, artist -> + repeat(2) { releaseIndex -> + val albumId = "album-$albumCounter" + val albumTrackIds = mutableListOf() + val album = AlbumEntity( + id = albumId, + title = "${artist.name} Album ${releaseIndex + 1}", + description = "Simulated album ${releaseIndex + 1} by ${artist.name}", + albumType = if (releaseIndex == 0) MetadataAlbumType.Album else MetadataAlbumType.Single, + artistIds = listOf(artist.id), + releaseDate = "202${idx % 4 + 1}-0${releaseIndex + 1}-15", + genres = artist.genres, + trackIds = albumTrackIds, + ) + albums[albumId] = album + + repeat(5) { trackIndex -> + val trackId = "track-$trackCounter" + tracks[trackId] = TrackEntity( + id = trackId, + title = "${artist.name} Track ${trackIndex + 1}", + durationMs = 180_000L + (trackIndex * 12_000L), + trackNumber = trackIndex + 1, + discNumber = 1, + artistIds = listOf(artist.id), + albumId = albumId, + explicit = trackIndex % 4 == 0, + popularity = (95 - trackCounter).coerceAtLeast(35), + isrcCode = "USSIM${trackCounter.toString().padStart(6, '0')}", + ) + albumTrackIds += trackId + trackCounter++ + } + albumCounter++ + } + } + + playlists["playlist-1"] = PlaylistEntity( + id = "playlist-1", + title = "Morning Flow", + description = "A smooth mix to start the day.", + ownerId = "user-2", + thumbnail = "https://picsum.photos/seed/playlist-1/300/300", + isPublic = true, + isCollaborating = false, + trackIds = tracks.keys.take(10).toMutableList(), + ) + + playlists["playlist-2"] = PlaylistEntity( + id = "playlist-2", + title = "Workout Pulse", + description = "Higher energy tracks for workouts.", + ownerId = "user-1", + thumbnail = "https://picsum.photos/seed/playlist-2/300/300", + isPublic = true, + isCollaborating = true, + trackIds = tracks.keys.drop(8).take(12).toMutableList(), + ) + + savedTrackIds += tracks.keys.take(5) + savedAlbumIds += albums.keys.take(2) + savedArtistIds += artists.keys.take(2) + savedPlaylistIds += playlists.keys.take(1) + } + + private fun ArtistEntity.toBasicModel(): MetadataArtist.Basic { + return MetadataArtist.Basic( + id = id, + name = name, + thumbnails = listOf(Thumbnail("https://picsum.photos/seed/$id/200/200", 200, 200)), + externalUri = "https://example.com/artist/$id", + ) + } + + private fun ArtistEntity.toDetailedModel(): MetadataArtist.Detailed { + return MetadataArtist.Detailed( + id = id, + name = name, + thumbnails = listOf(Thumbnail("https://picsum.photos/seed/$id/200/200", 200, 200)), + externalUri = "https://example.com/artist/$id", + genres = genres, + biography = biography, + followersCount = followersCount, + ) + } + + private fun AlbumEntity.toBasicModel(): MetadataAlbum.Basic { + return MetadataAlbum.Basic( + id = id, + title = title, + description = description, + thumbnails = listOf(Thumbnail("https://picsum.photos/seed/$id/300/300", 300, 300)), + albumType = albumType, + artists = artistIds.mapNotNull { artists[it]?.toBasicModel() }, + externalUri = "https://example.com/album/$id", + ) + } + + private fun AlbumEntity.toDetailedModel(): MetadataAlbum.Detailed { + return MetadataAlbum.Detailed( + id = id, + title = title, + description = description, + thumbnails = listOf(Thumbnail("https://picsum.photos/seed/$id/300/300", 300, 300)), + albumType = albumType, + artists = artistIds.mapNotNull { artists[it]?.toBasicModel() }, + externalUri = "https://example.com/album/$id", + releaseDate = releaseDate, + genres = genres, + trackCount = trackIds.size, + ) + } + + private fun TrackEntity.toModel(): MetadataTrack { + return MetadataTrack( + id = id, + title = title, + durationMs = durationMs, + trackNumber = trackNumber, + discNumber = discNumber, + artists = artistIds.mapNotNull { artists[it]?.toBasicModel() }, + album = albums.getValue(albumId).toDetailedModel(), + explicit = explicit, + popularity = popularity, + isrcCode = isrcCode, + externalUri = "https://example.com/track/$id", + thumbnails = null + ) + } + + private fun UserEntity.toModel(): MetadataUser { + return MetadataUser( + id = id, + username = username, + displayName = displayName, + thumbnails = listOf(Thumbnail("https://picsum.photos/seed/$id/100/100", 100, 100)), + externalUri = "https://example.com/user/$id", + ) + } + + private fun PlaylistEntity.toModel(): MetadataPlaylist { + return MetadataPlaylist( + id = id, + title = title, + description = description, + thumbnails = listOf(Thumbnail(thumbnail, 300, 300)), + trackCount = trackIds.count { it in tracks }, + externalUri = "https://example.com/playlist/$id", + owner = users[ownerId]?.toModel(), + ) + } +} + diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataAlbumAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataAlbumAPI.kt new file mode 100644 index 00000000..3d1025bc --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataAlbumAPI.kt @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbumAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack + +class RealMetadataAlbumAPI : MetadataAlbumAPI { + + override suspend fun getAlbum(id: String): MetadataAlbum.Detailed { + return FakeMetadataStore.getAlbum(id) + } + + override suspend fun getTrackAlbum(track: MetadataTrack): MetadataAlbum.Detailed { + TODO("Not yet implemented") + } + + override suspend fun getAlbumTracks( + id: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.getAlbumTracks(id), pagination) + } + + override suspend fun savedAlbums( + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.savedAlbums(), pagination) + } + + override suspend fun isSavedAlbums(ids: List): List { + return FakeMetadataStore.isSavedAlbums(ids) + } + + override suspend fun saveAlbums(ids: List) { + FakeMetadataStore.saveAlbums(ids) + } + + override suspend fun removeSavedAlbums(ids: List) { + FakeMetadataStore.removeSavedAlbums(ids) + } +} diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataArtistAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataArtistAPI.kt new file mode 100644 index 00000000..1cc61edf --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataArtistAPI.kt @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.album.MetadataAlbum +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.artist.MetadataArtistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack + +class RealMetadataArtistAPI : MetadataArtistAPI { + + override suspend fun getArtist(id: String): MetadataArtist.Detailed { + return FakeMetadataStore.getArtist(id) + } + + override suspend fun getArtistTop10Tracks(id: String): List { + return FakeMetadataStore.getArtistTopTracks(id) + } + + override suspend fun getArtistAlbums( + id: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.getArtistAlbums(id), pagination) + } + + override suspend fun savedArtists( + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.savedArtists(), pagination) + } + + override suspend fun isSavedArtists(ids: List): List { + return FakeMetadataStore.isSavedArtists(ids) + } + + override suspend fun saveArtists(ids: List) { + FakeMetadataStore.saveArtists(ids) + } + + override suspend fun removeSavedArtists(ids: List) { + FakeMetadataStore.removeSavedArtists(ids) + } +} diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataBrowseAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataBrowseAPI.kt new file mode 100644 index 00000000..b1df8827 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataBrowseAPI.kt @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseItem +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.browse.MetadataBrowseSection +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult + +class RealMetadataBrowseAPI : MetadataBrowseAPI { + + override suspend fun featured(): List { + return FakeMetadataStore.getFeaturedItems() + } + + override suspend fun list(pagination: PaginationStrategy?): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.getBrowseSections(), pagination) + } + + override suspend fun sublist( + sectionId: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.getBrowseSublist(sectionId), pagination) + } +} diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataPlaylistAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataPlaylistAPI.kt new file mode 100644 index 00000000..bec4bb77 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataPlaylistAPI.kt @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylist +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.playlist.MetadataPlaylistAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack + +class RealMetadataPlaylistAPI : MetadataPlaylistAPI { + + override suspend fun getPlaylist(id: String): MetadataPlaylist { + return FakeMetadataStore.getPlaylist(id) + } + + override suspend fun getPlaylistTracks( + id: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.getPlaylistTracks(id), pagination) + } + + override suspend fun savedPlaylists( + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.savedPlaylists(), pagination) + } + + override suspend fun isSavedPlaylists(ids: List): List { + return FakeMetadataStore.isSavedPlaylists(ids) + } + + override suspend fun savePlaylists(ids: List) { + FakeMetadataStore.savePlaylists(ids) + } + + override suspend fun removeSavedPlaylists(ids: List) { + FakeMetadataStore.removeSavedPlaylists(ids) + } + + override suspend fun createPlaylist( + name: String, + description: String?, + isPublic: Boolean, + isCollaborating: Boolean, + imageBase64: String, + trackIds: List + ): MetadataPlaylist { + return FakeMetadataStore.createPlaylist( + name = name, + description = description, + isPublic = isPublic, + isCollaborating = isCollaborating, + imageBase64 = imageBase64, + trackIds = trackIds, + ) + } + + override suspend fun updatePlaylist( + id: String, + name: String?, + description: String?, + isPublic: Boolean?, + isCollaborating: Boolean?, + imageBase64: String?, + trackIds: List? + ): MetadataPlaylist { + return FakeMetadataStore.updatePlaylist( + id = id, + name = name, + description = description, + isPublic = isPublic, + isCollaborating = isCollaborating, + imageBase64 = imageBase64, + trackIds = trackIds, + ) + } + + override suspend fun deletePlaylist(id: String) { + FakeMetadataStore.deletePlaylist(id) + } + + override suspend fun addTracksToPlaylist( + playlistId: String, + trackIds: List + ) { + TODO("Not yet implemented") + } + + override suspend fun removeTracksFromPlaylist( + playlistId: String, + trackIds: List + ) { + TODO("Not yet implemented") + } +} diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataSearchAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataSearchAPI.kt new file mode 100644 index 00000000..51fbbae1 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataSearchAPI.kt @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSearchResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.search.MetadataSupportedSearchType + +class RealMetadataSearchAPI : MetadataSearchAPI { + + override val supportedSearchTypes: List = listOf( + MetadataSupportedSearchType.ALL, + MetadataSupportedSearchType.TRACK, + MetadataSupportedSearchType.ARTIST, + MetadataSupportedSearchType.ALBUM, + MetadataSupportedSearchType.PLAYLIST, + MetadataSupportedSearchType.USER, + ) + + override suspend fun search(query: String): List { + return FakeMetadataStore.search(query) + } + + override suspend fun searchTracks( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.searchTracks(query), pagination) + } + + override suspend fun searchArtists( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.searchArtists(query), pagination) + } + + override suspend fun searchAlbums( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.searchAlbums(query), pagination) + } + + override suspend fun searchPlaylists( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.searchPlaylists(query), pagination) + } + + override suspend fun searchUsers( + query: String, + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.searchUsers(query), pagination) + } +} diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataTrackAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataTrackAPI.kt new file mode 100644 index 00000000..47281507 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataTrackAPI.kt @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationStrategy +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.common.PaginationResult +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrack +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.track.MetadataTrackAPI + +class RealMetadataTrackAPI : MetadataTrackAPI { + + override suspend fun getTrack(id: String): MetadataTrack { + return FakeMetadataStore.getTrack(id) + } + + override suspend fun savedTracks( + pagination: PaginationStrategy? + ): PaginationResult { + return FakeMetadataStore.paginate(FakeMetadataStore.savedTracks(), pagination) + } + + override suspend fun isSavedTracks(ids: List): List { + return FakeMetadataStore.isSavedTracks(ids) + } + + override suspend fun saveTracks(ids: List) { + FakeMetadataStore.saveTracks(ids) + } + + override suspend fun removeSavedTracks(ids: List) { + FakeMetadataStore.removeSavedTracks(ids) + } + + override suspend fun recommendationsBasedOnTracks( + seedTrackIds: List, + limit: Int + ): List { + return FakeMetadataStore.recommendationsBasedOnTracks(seedTrackIds, limit) + } +} diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataUserAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataUserAPI.kt new file mode 100644 index 00000000..cc86648d --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/metadata/RealMetadataUserAPI.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.metadata + +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUser +import dev.krtirtho.plugin_interfaces.plugin_apis.metadata.user.MetadataUserAPI + +class RealMetadataUserAPI : MetadataUserAPI { + override suspend fun getUser(id: String): MetadataUser? { + return FakeMetadataStore.getUser(id) + } +} \ No newline at end of file diff --git a/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/scrobble/RealScrobbleAPI.kt b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/scrobble/RealScrobbleAPI.kt new file mode 100644 index 00000000..2ecf0394 --- /dev/null +++ b/js_plugin_example/src/jsMain/kotlin/dev/krtirtho/js_plugin_example/plugin_apis/scrobble/RealScrobbleAPI.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 Kingkor Roy Tirtho and Spotube Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.krtirtho.js_plugin_example.plugin_apis.scrobble + +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleAPI +import dev.krtirtho.plugin_interfaces.plugin_apis.scrobble.ScrobbleTrack + +class RealScrobbleAPI: ScrobbleAPI { + override suspend fun scrobble(track: ScrobbleTrack) { + // No Op + } +} \ No newline at end of file diff --git a/l10n.yaml b/l10n.yaml deleted file mode 100644 index d5911fe1..00000000 --- a/l10n.yaml +++ /dev/null @@ -1,4 +0,0 @@ -arb-dir: lib/l10n -template-arb-file: app_en.arb -output-dir: lib/l10n/generated -untranslated-messages-file: untranslated_messages.json diff --git a/lefthook.yaml b/lefthook.yaml new file mode 100644 index 00000000..6171a1d1 --- /dev/null +++ b/lefthook.yaml @@ -0,0 +1,31 @@ +# Copyright 2026 Kingkor Roy Tirtho and Spotube Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +pre-commit: + parallel: true + commands: + # 1. Protect the AGPL Core (Exclude the Apache libraries) + agpl-headers: + glob: "*.{kt,kts,xml}" + exclude: "(js_plugin_example|plugin_interfaces)/" + run: addlicense -f .github/agpl_header.txt {staged_files} + stage_fixed: true + + # 2. Protect the Apache Libraries (Only include those folders) + apache-headers: + glob: "(js_plugin_example|plugin_interfaces)/**/*.{kt,kts,xml}" + run: addlicense -f .github/apache_header.txt {staged_files} + stage_fixed: true \ No newline at end of file diff --git a/lib/collections/assets.gen.dart b/lib/collections/assets.gen.dart deleted file mode 100644 index 7ab0ad03..00000000 --- a/lib/collections/assets.gen.dart +++ /dev/null @@ -1,228 +0,0 @@ -// dart format width=80 - -/// GENERATED CODE - DO NOT MODIFY BY HAND -/// ***************************************************** -/// FlutterGen -/// ***************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import - -import 'package:flutter/widgets.dart'; - -class $AssetsBrandingGen { - const $AssetsBrandingGen(); - - /// File path: assets/branding/spotube-logo-light.png - AssetGenImage get spotubeLogoLight => - const AssetGenImage('assets/branding/spotube-logo-light.png'); - - /// File path: assets/branding/spotube-logo.ico - String get spotubeLogoIco => 'assets/branding/spotube-logo.ico'; - - /// File path: assets/branding/spotube-logo.png - AssetGenImage get spotubeLogoPng => - const AssetGenImage('assets/branding/spotube-logo.png'); - - /// List of all assets - List get values => - [spotubeLogoLight, spotubeLogoIco, spotubeLogoPng]; -} - -class $AssetsImagesGen { - const $AssetsImagesGen(); - - /// File path: assets/images/album-placeholder.png - AssetGenImage get albumPlaceholder => - const AssetGenImage('assets/images/album-placeholder.png'); - - /// File path: assets/images/bengali-patterns-bg.jpg - AssetGenImage get bengaliPatternsBg => - const AssetGenImage('assets/images/bengali-patterns-bg.jpg'); - - /// File path: assets/images/liked-tracks.jpg - AssetGenImage get likedTracks => - const AssetGenImage('assets/images/liked-tracks.jpg'); - - /// Directory path: assets/images/logos - $AssetsImagesLogosGen get logos => const $AssetsImagesLogosGen(); - - /// File path: assets/images/placeholder.png - AssetGenImage get placeholder => - const AssetGenImage('assets/images/placeholder.png'); - - /// File path: assets/images/user-placeholder.png - AssetGenImage get userPlaceholder => - const AssetGenImage('assets/images/user-placeholder.png'); - - /// List of all assets - List get values => [ - albumPlaceholder, - bengaliPatternsBg, - likedTracks, - placeholder, - userPlaceholder - ]; -} - -class $AssetsPluginsGen { - const $AssetsPluginsGen(); - - /// Directory path: assets/plugins/spotube-plugin-musicbrainz-listenbrainz - $AssetsPluginsSpotubePluginMusicbrainzListenbrainzGen - get spotubePluginMusicbrainzListenbrainz => - const $AssetsPluginsSpotubePluginMusicbrainzListenbrainzGen(); - - /// Directory path: assets/plugins/spotube-plugin-youtube-audio - $AssetsPluginsSpotubePluginYoutubeAudioGen get spotubePluginYoutubeAudio => - const $AssetsPluginsSpotubePluginYoutubeAudioGen(); -} - -class $AssetsImagesLogosGen { - const $AssetsImagesLogosGen(); - - /// File path: assets/images/logos/dab-music.png - AssetGenImage get dabMusic => - const AssetGenImage('assets/images/logos/dab-music.png'); - - /// File path: assets/images/logos/invidious.jpg - AssetGenImage get invidious => - const AssetGenImage('assets/images/logos/invidious.jpg'); - - /// File path: assets/images/logos/jiosaavn.png - AssetGenImage get jiosaavn => - const AssetGenImage('assets/images/logos/jiosaavn.png'); - - /// List of all assets - List get values => [dabMusic, invidious, jiosaavn]; -} - -class $AssetsPluginsSpotubePluginMusicbrainzListenbrainzGen { - const $AssetsPluginsSpotubePluginMusicbrainzListenbrainzGen(); - - /// File path: assets/plugins/spotube-plugin-musicbrainz-listenbrainz/plugin.smplug - String get plugin => - 'assets/plugins/spotube-plugin-musicbrainz-listenbrainz/plugin.smplug'; - - /// List of all assets - List get values => [plugin]; -} - -class $AssetsPluginsSpotubePluginYoutubeAudioGen { - const $AssetsPluginsSpotubePluginYoutubeAudioGen(); - - /// File path: assets/plugins/spotube-plugin-youtube-audio/plugin.smplug - String get plugin => - 'assets/plugins/spotube-plugin-youtube-audio/plugin.smplug'; - - /// List of all assets - List get values => [plugin]; -} - -class Assets { - const Assets._(); - - static const String license = 'LICENSE'; - static const $AssetsBrandingGen branding = $AssetsBrandingGen(); - static const $AssetsImagesGen images = $AssetsImagesGen(); - static const $AssetsPluginsGen plugins = $AssetsPluginsGen(); - - /// List of all assets - static List get values => [license]; -} - -class AssetGenImage { - const AssetGenImage( - this._assetName, { - this.size, - this.flavors = const {}, - this.animation, - }); - - final String _assetName; - - final Size? size; - final Set flavors; - final AssetGenImageAnimation? animation; - - Image image({ - Key? key, - AssetBundle? bundle, - ImageFrameBuilder? frameBuilder, - ImageErrorWidgetBuilder? errorBuilder, - String? semanticLabel, - bool excludeFromSemantics = false, - double? scale, - double? width, - double? height, - Color? color, - Animation? opacity, - BlendMode? colorBlendMode, - BoxFit? fit, - AlignmentGeometry alignment = Alignment.center, - ImageRepeat repeat = ImageRepeat.noRepeat, - Rect? centerSlice, - bool matchTextDirection = false, - bool gaplessPlayback = true, - bool isAntiAlias = false, - String? package, - FilterQuality filterQuality = FilterQuality.medium, - int? cacheWidth, - int? cacheHeight, - }) { - return Image.asset( - _assetName, - key: key, - bundle: bundle, - frameBuilder: frameBuilder, - errorBuilder: errorBuilder, - semanticLabel: semanticLabel, - excludeFromSemantics: excludeFromSemantics, - scale: scale, - width: width, - height: height, - color: color, - opacity: opacity, - colorBlendMode: colorBlendMode, - fit: fit, - alignment: alignment, - repeat: repeat, - centerSlice: centerSlice, - matchTextDirection: matchTextDirection, - gaplessPlayback: gaplessPlayback, - isAntiAlias: isAntiAlias, - package: package, - filterQuality: filterQuality, - cacheWidth: cacheWidth, - cacheHeight: cacheHeight, - ); - } - - ImageProvider provider({ - AssetBundle? bundle, - String? package, - }) { - return AssetImage( - _assetName, - bundle: bundle, - package: package, - ); - } - - String get path => _assetName; - - String get keyName => _assetName; -} - -class AssetGenImageAnimation { - const AssetGenImageAnimation({ - required this.isAnimation, - required this.duration, - required this.frames, - }); - - final bool isAnimation; - final Duration duration; - final int frames; -} diff --git a/lib/collections/env.dart b/lib/collections/env.dart deleted file mode 100644 index 52ef2bbf..00000000 --- a/lib/collections/env.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:envied/envied.dart'; -import 'package:spotube/utils/platform.dart'; - -part 'env.g.dart'; - -enum ReleaseChannel { - nightly, - stable, -} - -@Envied(obfuscate: true, requireEnvFile: true, path: ".env") -abstract class Env { - @EnviedField(varName: 'LASTFM_API_KEY') - static final String lastFmApiKey = _Env.lastFmApiKey; - - @EnviedField(varName: 'LASTFM_API_SECRET') - static final String lastFmApiSecret = _Env.lastFmApiSecret; - - @EnviedField(varName: 'HIDE_DONATIONS', defaultValue: "0") - static final int _hideDonations = _Env._hideDonations; - - static bool get hideDonations => _hideDonations == 1; - - @EnviedField(varName: 'ENABLE_UPDATE_CHECK', defaultValue: "1") - static final String _enableUpdateChecker = _Env._enableUpdateChecker; - - @EnviedField(varName: "RELEASE_CHANNEL", defaultValue: "nightly") - static final String _releaseChannel = _Env._releaseChannel; - - static ReleaseChannel get releaseChannel => _releaseChannel == "stable" - ? ReleaseChannel.stable - : ReleaseChannel.nightly; - - static bool get enableUpdateChecker => - kIsFlatpak || _enableUpdateChecker == "1"; - - static String discordAppId = "1176718791388975124"; -} diff --git a/lib/collections/fake.dart b/lib/collections/fake.dart deleted file mode 100644 index 7d201ae2..00000000 --- a/lib/collections/fake.dart +++ /dev/null @@ -1,141 +0,0 @@ -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/history/summary.dart'; - -abstract class FakeData { - static final SpotubeImageObject image = SpotubeImageObject( - height: 100, - width: 100, - url: "https://dummyimage.com/100x100/cfcfcf/cfcfcf.jpg", - ); - - static final SpotubeFullArtistObject artist = SpotubeFullArtistObject( - id: "1", - name: "What an artist", - externalUri: "https://example.com", - followers: 10000, - genres: ["genre"], - images: [ - SpotubeImageObject( - height: 100, - width: 100, - url: "https://dummyimage.com/100x100/cfcfcf/cfcfcf.jpg", - ), - ], - ); - - static final SpotubeFullAlbumObject album = SpotubeFullAlbumObject( - id: "1", - name: "A good album", - externalUri: "https://example.com", - artists: [artistSimple], - releaseDate: "2021-01-01", - albumType: SpotubeAlbumType.album, - images: [image], - totalTracks: 10, - genres: ["genre"], - recordLabel: "Record Label", - ); - - static final SpotubeSimpleArtistObject artistSimple = - SpotubeSimpleArtistObject( - id: "1", - name: "What an artist", - externalUri: "https://example.com", - images: null, - ); - - static final SpotubeSimpleAlbumObject albumSimple = SpotubeSimpleAlbumObject( - albumType: SpotubeAlbumType.album, - artists: [], - externalUri: "https://example.com", - id: "1", - name: "A good album", - releaseDate: "2021-01-01", - images: [ - SpotubeImageObject( - height: 1, - width: 1, - url: "https://dummyimage.com/100x100/cfcfcf/cfcfcf.jpg", - ) - ], - ); - - static final SpotubeFullTrackObject track = SpotubeTrackObject.full( - id: "1", - name: "A good track", - externalUri: "https://example.com", - album: albumSimple, - durationMs: 3 * 60 * 1000, // 3 minutes - isrc: "USUM72112345", - explicit: false, - ) as SpotubeFullTrackObject; - - static final SpotubeUserObject user = SpotubeUserObject( - id: "1", - name: "User Name", - externalUri: "https://example.com", - images: [image], - ); - - static final SpotubeFullPlaylistObject playlist = SpotubeFullPlaylistObject( - id: "1", - name: "A good playlist", - description: "A very good playlist description", - externalUri: "https://example.com", - collaborative: false, - public: true, - owner: user, - images: [image], - collaborators: [user]); - - static final SpotubeSimplePlaylistObject playlistSimple = - SpotubeSimplePlaylistObject( - id: "1", - name: "A good playlist", - description: "A very good playlist description", - externalUri: "https://example.com", - owner: user, - images: [image], - ); - - static final SpotubeBrowseSectionObject browseSection = - SpotubeBrowseSectionObject( - id: "section-id", - title: "Browse Section", - browseMore: true, - externalUri: "https://example.com/browse/section", - items: [playlistSimple, playlistSimple, playlistSimple]); - - static const historySummary = PlaybackHistorySummary( - albums: 1, - artists: 1, - duration: Duration(seconds: 1), - playlists: 1, - tracks: 1, - fees: 1, - ); - - static final historyRecentlyPlayedPlaylist = HistoryTableData( - id: 0, - type: HistoryEntryType.track, - createdAt: DateTime.now(), - itemId: "1", - data: playlist.toJson(), - ); - - static final historyRecentlyPlayedAlbum = HistoryTableData( - id: 0, - type: HistoryEntryType.track, - createdAt: DateTime.now(), - itemId: "1", - data: album.toJson(), - ); - - static final historyRecentlyPlayedItems = List.generate( - 10, - (index) => index % 2 == 0 - ? historyRecentlyPlayedPlaylist - : historyRecentlyPlayedAlbum, - ); -} diff --git a/lib/collections/fonts.gen.dart b/lib/collections/fonts.gen.dart deleted file mode 100644 index d2c68231..00000000 --- a/lib/collections/fonts.gen.dart +++ /dev/null @@ -1,25 +0,0 @@ -// dart format width=80 -/// GENERATED CODE - DO NOT MODIFY BY HAND -/// ***************************************************** -/// FlutterGen -/// ***************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import - -class FontFamily { - FontFamily._(); - - /// Font family: BootstrapIcons - static const String bootstrapIcons = 'BootstrapIcons'; - - /// Font family: Cookie - static const String cookie = 'Cookie'; - - /// Font family: RadixIcons - static const String radixIcons = 'RadixIcons'; - - /// Font family: Ubuntu Mono - static const String ubuntuMono = 'Ubuntu Mono'; -} diff --git a/lib/collections/formatters.dart b/lib/collections/formatters.dart deleted file mode 100644 index 0aed9e9f..00000000 --- a/lib/collections/formatters.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:intl/intl.dart'; - -final compactNumberFormatter = NumberFormat.compact(); -final usdFormatter = NumberFormat.compactCurrency( - locale: 'en-US', - symbol: r"$", - decimalDigits: 2, -); diff --git a/lib/collections/gradients.dart b/lib/collections/gradients.dart deleted file mode 100644 index a7936ee2..00000000 --- a/lib/collections/gradients.dart +++ /dev/null @@ -1,232 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -const gradients = [ - LinearGradient(colors: [ - Color.fromRGBO(123, 102, 255, 1), - Color.fromRGBO(95, 189, 255, 1), - Color.fromRGBO(150, 239, 255, 1), - Color.fromRGBO(197, 255, 248, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(245, 204, 160, 1), - Color.fromRGBO(228, 143, 69, 1), - Color.fromRGBO(153, 77, 28, 1), - Color.fromRGBO(107, 36, 12, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(243, 243, 243, 1), - Color.fromRGBO(197, 232, 152, 1), - Color.fromRGBO(41, 173, 178, 1), - Color.fromRGBO(7, 102, 173, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(240, 89, 65, 1), - Color.fromRGBO(190, 49, 68, 1), - Color.fromRGBO(135, 35, 65, 1), - Color.fromRGBO(34, 9, 44, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(119, 107, 93, 1), - Color.fromRGBO(176, 166, 149, 1), - Color.fromRGBO(235, 227, 213, 1), - Color.fromRGBO(243, 238, 234, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(208, 162, 247, 1), - Color.fromRGBO(220, 191, 255, 1), - Color.fromRGBO(229, 212, 255, 1), - Color.fromRGBO(241, 234, 255, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(221, 242, 253, 1), - Color.fromRGBO(155, 190, 200, 1), - Color.fromRGBO(66, 125, 157, 1), - Color.fromRGBO(22, 72, 99, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(119, 67, 219, 1), - Color.fromRGBO(195, 172, 208, 1), - Color.fromRGBO(247, 239, 229, 1), - Color.fromRGBO(255, 251, 245, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(194, 217, 255, 1), - Color.fromRGBO(142, 143, 250, 1), - Color.fromRGBO(119, 82, 254, 1), - Color.fromRGBO(25, 4, 130, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(104, 126, 255, 1), - Color.fromRGBO(128, 179, 255, 1), - Color.fromRGBO(152, 228, 255, 1), - Color.fromRGBO(182, 255, 250, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(176, 87, 141, 1), - Color.fromRGBO(217, 136, 185, 1), - Color.fromRGBO(250, 203, 234, 1), - Color.fromRGBO(255, 228, 214, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(190, 255, 247, 1), - Color.fromRGBO(166, 246, 255, 1), - Color.fromRGBO(158, 221, 255, 1), - Color.fromRGBO(100, 153, 233, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(245, 252, 205, 1), - Color.fromRGBO(120, 214, 198, 1), - Color.fromRGBO(65, 145, 151, 1), - Color.fromRGBO(18, 72, 107, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(229, 207, 247, 1), - Color.fromRGBO(157, 118, 193, 1), - Color.fromRGBO(113, 58, 190, 1), - Color.fromRGBO(91, 8, 136, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(249, 222, 201, 1), - Color.fromRGBO(247, 140, 162, 1), - Color.fromRGBO(216, 0, 50, 1), - Color.fromRGBO(61, 12, 17, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(242, 247, 161, 1), - Color.fromRGBO(53, 162, 159, 1), - Color.fromRGBO(8, 131, 149, 1), - Color.fromRGBO(7, 25, 82, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(243, 159, 90, 1), - Color.fromRGBO(174, 68, 90, 1), - Color.fromRGBO(102, 37, 73, 1), - Color.fromRGBO(69, 25, 82, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(255, 200, 200, 1), - Color.fromRGBO(255, 155, 130, 1), - Color.fromRGBO(255, 63, 164, 1), - Color.fromRGBO(87, 55, 93, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(238, 238, 238, 1), - Color.fromRGBO(100, 204, 197, 1), - Color.fromRGBO(23, 107, 135, 1), - Color.fromRGBO(5, 59, 80, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(198, 61, 47, 1), - Color.fromRGBO(226, 94, 62, 1), - Color.fromRGBO(255, 155, 80, 1), - Color.fromRGBO(255, 187, 92, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(236, 83, 176, 1), - Color.fromRGBO(157, 68, 192, 1), - Color.fromRGBO(77, 45, 183, 1), - Color.fromRGBO(14, 33, 160, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(242, 236, 190, 1), - Color.fromRGBO(226, 199, 153, 1), - Color.fromRGBO(192, 130, 97, 1), - Color.fromRGBO(154, 59, 59, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(255, 253, 140, 1), - Color.fromRGBO(151, 255, 244, 1), - Color.fromRGBO(112, 145, 245, 1), - Color.fromRGBO(121, 63, 223, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(67, 83, 52, 1), - Color.fromRGBO(158, 179, 132, 1), - Color.fromRGBO(206, 222, 189, 1), - Color.fromRGBO(250, 241, 228, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(250, 240, 230, 1), - Color.fromRGBO(185, 180, 199, 1), - Color.fromRGBO(92, 84, 112, 1), - Color.fromRGBO(53, 47, 68, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(255, 186, 134, 1), - Color.fromRGBO(246, 99, 92, 1), - Color.fromRGBO(194, 51, 115, 1), - Color.fromRGBO(121, 21, 91, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(213, 255, 208, 1), - Color.fromRGBO(64, 248, 255, 1), - Color.fromRGBO(39, 158, 255, 1), - Color.fromRGBO(12, 53, 106, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(131, 96, 150, 1), - Color.fromRGBO(237, 123, 123, 1), - Color.fromRGBO(240, 184, 110, 1), - Color.fromRGBO(235, 231, 108, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(63, 29, 56, 1), - Color.fromRGBO(77, 60, 119, 1), - Color.fromRGBO(162, 103, 138, 1), - Color.fromRGBO(225, 152, 152, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(254, 123, 229, 1), - Color.fromRGBO(151, 78, 195, 1), - Color.fromRGBO(80, 64, 153, 1), - Color.fromRGBO(49, 56, 102, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(248, 222, 34, 1), - Color.fromRGBO(249, 76, 16, 1), - Color.fromRGBO(199, 0, 57, 1), - Color.fromRGBO(144, 12, 63, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(101, 69, 31, 1), - Color.fromRGBO(118, 88, 39, 1), - Color.fromRGBO(200, 174, 125, 1), - Color.fromRGBO(234, 198, 150, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(255, 246, 224, 1), - Color.fromRGBO(216, 217, 218, 1), - Color.fromRGBO(97, 103, 122, 1), - Color.fromRGBO(39, 40, 41, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(145, 109, 179, 1), - Color.fromRGBO(228, 133, 134, 1), - Color.fromRGBO(252, 186, 173, 1), - Color.fromRGBO(253, 229, 236, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(124, 115, 192, 1), - Color.fromRGBO(148, 173, 215, 1), - Color.fromRGBO(172, 250, 223, 1), - Color.fromRGBO(232, 255, 206, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(174, 216, 204, 1), - Color.fromRGBO(205, 102, 136, 1), - Color.fromRGBO(122, 49, 111, 1), - Color.fromRGBO(70, 25, 89, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(237, 228, 255, 1), - Color.fromRGBO(215, 187, 245, 1), - Color.fromRGBO(160, 118, 249, 1), - Color.fromRGBO(101, 40, 247, 1) - ]), - LinearGradient(colors: [ - Color.fromRGBO(255, 236, 175, 1), - Color.fromRGBO(255, 176, 127, 1), - Color.fromRGBO(255, 82, 162, 1), - Color.fromRGBO(243, 21, 89, 1) - ]), -]; diff --git a/lib/collections/http-override.dart b/lib/collections/http-override.dart deleted file mode 100644 index 3bf4f30e..00000000 --- a/lib/collections/http-override.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'dart:io'; - -const allowList = [ - "spotify.com", -]; - -class BadCertificateAllowlistOverrides extends HttpOverrides { - @override - HttpClient createHttpClient(SecurityContext? context) { - return super.createHttpClient(context) - ..badCertificateCallback = (X509Certificate cert, String host, int port) { - return allowList.any((allowedHost) { - return host.endsWith(allowedHost); - }); - }; - } -} diff --git a/lib/collections/initializers.dart b/lib/collections/initializers.dart deleted file mode 100644 index 976661fc..00000000 --- a/lib/collections/initializers.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'dart:io'; - -import 'package:spotube/utils/platform.dart'; -import 'package:win32_registry/win32_registry.dart'; - -Future registerWindowsScheme(String scheme) async { - if (!kIsWindows) return; - String appPath = Platform.resolvedExecutable; - - String protocolRegKey = 'Software\\Classes\\$scheme'; - RegistryValue protocolRegValue = const RegistryValue( - 'URL Protocol', - RegistryValueType.string, - '', - ); - String protocolCmdRegKey = 'shell\\open\\command'; - RegistryValue protocolCmdRegValue = RegistryValue( - '', - RegistryValueType.string, - '"$appPath" "%1"', - ); - - final regKey = Registry.currentUser.createKey(protocolRegKey); - regKey.createValue(protocolRegValue); - regKey.createKey(protocolCmdRegKey).createValue(protocolCmdRegValue); -} diff --git a/lib/collections/intents.dart b/lib/collections/intents.dart deleted file mode 100644 index 42c580ca..00000000 --- a/lib/collections/intents.dart +++ /dev/null @@ -1,140 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/modules/player/player_controls.dart'; -import 'package:spotube/provider/audio_player/querying_track_info.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/utils/platform.dart'; - -class PlayPauseIntent extends Intent { - final WidgetRef ref; - const PlayPauseIntent(this.ref); -} - -class PlayPauseAction extends Action { - @override - invoke(intent) async { - if (PlayerControls.focusNode.canRequestFocus) { - PlayerControls.focusNode.requestFocus(); - } - - if (!audioPlayer.isPlaying) { - await audioPlayer.resume(); - } else { - await audioPlayer.pause(); - } - return null; - } -} - -class NavigationIntent extends Intent { - final AppRouter router; - final String path; - const NavigationIntent(this.router, this.path); -} - -class NavigationAction extends Action { - @override - invoke(intent) { - intent.router.navigateNamed(intent.path); - return null; - } -} - -enum HomeTabs { - browse, - search, - - lyrics, - userPlaylists, - userArtists, - userAlbums, - userLocalLibrary, - userDownloads, -} - -class HomeTabIntent extends Intent { - final AppRouter router; - final HomeTabs tab; - const HomeTabIntent(this.router, {required this.tab}); -} - -class HomeTabAction extends Action { - @override - invoke(intent) { - final router = intent.router; - switch (intent.tab) { - case HomeTabs.browse: - router.navigate(const HomeRoute()); - break; - case HomeTabs.search: - router.navigate(const SearchRoute()); - break; - case HomeTabs.lyrics: - router.navigate(const LyricsRoute()); - break; - case HomeTabs.userPlaylists: - router.navigate(const UserPlaylistsRoute()); - break; - case HomeTabs.userArtists: - router.navigate(const UserArtistsRoute()); - break; - case HomeTabs.userAlbums: - router.navigate(const UserAlbumsRoute()); - break; - case HomeTabs.userLocalLibrary: - router.navigate(const UserLocalLibraryRoute()); - break; - case HomeTabs.userDownloads: - router.navigate(const UserDownloadsRoute()); - break; - } - return null; - } -} - -class SeekIntent extends Intent { - final WidgetRef ref; - final bool forward; - const SeekIntent(this.ref, this.forward); -} - -class SeekAction extends Action { - @override - invoke(intent) async { - final isFetchingActiveTrack = intent.ref.read(queryingTrackInfoProvider); - if (isFetchingActiveTrack) { - DirectionalFocusAction().invoke( - DirectionalFocusIntent( - intent.forward ? TraversalDirection.right : TraversalDirection.left, - ), - ); - return null; - } - final position = audioPlayer.position.inSeconds; - await audioPlayer.seek( - Duration( - seconds: intent.forward ? position + 5 : position - 5, - ), - ); - return null; - } -} - -class CloseAppIntent extends Intent {} - -class CloseAppAction extends Action { - @override - invoke(intent) { - if (kIsDesktop) { - exit(0); - } else { - SystemNavigator.pop(); - } - return null; - } -} diff --git a/lib/collections/language_codes.dart b/lib/collections/language_codes.dart deleted file mode 100644 index b5d3f7c8..00000000 --- a/lib/collections/language_codes.dart +++ /dev/null @@ -1,765 +0,0 @@ -class ISOLanguageName { - final String name; - final String nativeName; - - const ISOLanguageName({ - required this.name, - required this.nativeName, - }); - - @override - String toString() { - return "$name ($nativeName)"; - } -} - -// Uncomment the languages as we add support for them -// Currently supported: bn,en,fr,hi,zh -abstract class LanguageLocals { - static final Map isoLangs = { - // "ab": const ISOLanguageName( - // name: "Abkhaz", - // nativeName: "аҧсуа", - // ), - // "aa": const ISOLanguageName( - // name: "Afar", - // nativeName: "Afaraf", - // ), - // "af": const ISOLanguageName( - // name: "Afrikaans", - // nativeName: "Afrikaans", - // ), - // "ak": const ISOLanguageName( - // name: "Akan", - // nativeName: "Akan", - // ), - // "sq": const ISOLanguageName( - // name: "Albanian", - // nativeName: "Shqip", - // ), - // "am": const ISOLanguageName( - // name: "Amharic", - // nativeName: "አማርኛ", - // ), - "ar": const ISOLanguageName( - name: "Arabic", - nativeName: "العربية", - ), - // "an": const ISOLanguageName( - // name: "Aragonese", - // nativeName: "Aragonés", - // ), - // "hy": const ISOLanguageName( - // name: "Armenian", - // nativeName: "Հայերեն", - // ), - // "as": const ISOLanguageName( - // name: "Assamese", - // nativeName: "অসমীয়া", - // ), - // "av": const ISOLanguageName( - // name: "Avaric", - // nativeName: "авар мацӀ, магӀарул мацӀ", - // ), - // "ae": const ISOLanguageName( - // name: "Avestan", - // nativeName: "avesta", - // ), - // "ay": const ISOLanguageName( - // name: "Aymara", - // nativeName: "aymar aru", - // ), - // "az": const ISOLanguageName( - // name: "Azerbaijani", - // nativeName: "azərbaycan dili", - // ), - // "bm": const ISOLanguageName( - // name: "Bambara", - // nativeName: "bamanankan", - // ), - // "ba": const ISOLanguageName( - // name: "Bashkir", - // nativeName: "башҡорт теле", - // ), - "eu": const ISOLanguageName( - name: "Basque", - nativeName: "Euskara", - ), - // "be": const ISOLanguageName( - // name: "Belarusian", - // nativeName: "Беларуская", - // ), - "bn": const ISOLanguageName( - name: "Bengali", - nativeName: "বাংলা", - ), - // "bh": const ISOLanguageName( - // name: "Bihari", - // nativeName: "भोजपुरी", - // ), - // "bi": const ISOLanguageName( - // name: "Bislama", - // nativeName: "Bislama", - // ), - // "bs": const ISOLanguageName( - // name: "Bosnian", - // nativeName: "bosanski jezik", - // ), - // "br": const ISOLanguageName( - // name: "Breton", - // nativeName: "brezhoneg", - // ), - // "bg": const ISOLanguageName( - // name: "Bulgarian", - // nativeName: "български език", - // ), - // "my": const ISOLanguageName( - // name: "Burmese", - // nativeName: "ဗမာစာ", - // ), - "ca": const ISOLanguageName( - name: "Catalan", - nativeName: "Català", - ), - // "ch": const ISOLanguageName( - // name: "Chamorro", - // nativeName: "Chamoru", - // ), - // "ce": const ISOLanguageName( - // name: "Chechen", - // nativeName: "нохчийн мотт", - // ), - // "ny": const ISOLanguageName( - // name: "Chichewa", - // nativeName: "chiCheŵa", - // ), - "zh_CN": const ISOLanguageName( - name: "Simplified Chinese", - nativeName: "简体中文", - ), - "zh_TW": const ISOLanguageName( - name: "Traditional Chinese", - nativeName: "繁體中文(台灣)", - ), - // "cv": const ISOLanguageName( - // name: "Chuvash", - // nativeName: "чӑваш чӗлхи", - // ), - // "kw": const ISOLanguageName( - // name: "Cornish", - // nativeName: "Kernewek", - // ), - // "co": const ISOLanguageName( - // name: "Corsican", - // nativeName: "lingua corsa", - // ), - // "cr": const ISOLanguageName( - // name: "Cree", - // nativeName: "ᓀᐦᐃᔭᐍᐏᐣ", - // ), - // "hr": const ISOLanguageName( - // name: "Croatian", - // nativeName: "hrvatski", - // ), - "cs": const ISOLanguageName( - name: "Czech", - nativeName: "česky, čeština", - ), - // "da": const ISOLanguageName( - // name: "Danish", - // nativeName: "dansk", - // ), - // "dv": const ISOLanguageName( - // name: "Maldivian;", - // nativeName: "ދިވެހި", - // ), - "nl": const ISOLanguageName( - name: "Dutch", - nativeName: "Nederlands", - ), - "en": const ISOLanguageName( - name: "English", - nativeName: "English", - ), - // "eo": const ISOLanguageName( - // name: "Esperanto", - // nativeName: "Esperanto", - // ), - // "et": const ISOLanguageName( - // name: "Estonian", - // nativeName: "eesti", - // ), - // "ee": const ISOLanguageName( - // name: "Ewe", - // nativeName: "Eʋegbe", - // ), - // "fo": const ISOLanguageName( - // name: "Faroese", - // nativeName: "føroyskt", - // ), - // "fj": const ISOLanguageName( - // name: "Fijian", - // nativeName: "vosa Vakaviti", - // ), - "fi": const ISOLanguageName( - name: "Finnish", - nativeName: "suomi", - ), - "fr": const ISOLanguageName( - name: "French", - nativeName: "français", - ), - // "ff": const ISOLanguageName( - // name: "Fula; Fulah; Pulaar; Pular", - // nativeName: "Fulfulde, Pulaar, Pular", - // ), - // "gl": const ISOLanguageName( - // name: "Galician", - // nativeName: "Galego", - // ), - "ka": const ISOLanguageName( - name: "Georgian", - nativeName: "ქართული", - ), - "de": const ISOLanguageName( - name: "German", - nativeName: "Deutsch", - ), - // "el": const ISOLanguageName( - // name: "Greek, Modern", - // nativeName: "Ελληνικά", - // ), - // "gn": const ISOLanguageName( - // name: "Guaraní", - // nativeName: "Avañeẽ", - // ), - // "gu": const ISOLanguageName( - // name: "Gujarati", - // nativeName: "ગુજરાતી", - // ), - // "ht": const ISOLanguageName( - // name: "Haitian; Haitian Creole", - // nativeName: "Kreyòl ayisyen", - // ), - // "ha": const ISOLanguageName( - // name: "Hausa", - // nativeName: "Hausa, هَوُسَ", - // ), - // "he": const ISOLanguageName( - // name: "Hebrew (modern)", - // nativeName: "עברית", - // ), - // "hz": const ISOLanguageName( - // name: "Herero", - // nativeName: "Otjiherero", - // ), - "hi": const ISOLanguageName( - name: "Hindi", - nativeName: "हिन्दी, हिंदी", - ), - // "ho": const ISOLanguageName( - // name: "Hiri Motu", - // nativeName: "Hiri Motu", - // ), - // "hu": const ISOLanguageName( - // name: "Hungarian", - // nativeName: "Magyar", - // ), - // "ia": const ISOLanguageName( - // name: "Interlingua", - // nativeName: "Interlingua", - // ), - "id": const ISOLanguageName( - name: "Indonesian", - nativeName: "Bahasa Indonesia", - ), - // "ie": const ISOLanguageName( - // name: "Interlingue", - // nativeName: "Occidental", - // ), - // "ga": const ISOLanguageName( - // name: "Irish", - // nativeName: "Gaeilge", - // ), - // "ig": const ISOLanguageName( - // name: "Igbo", - // nativeName: "Asụsụ Igbo", - // ), - // "ik": const ISOLanguageName( - // name: "Inupiaq", - // nativeName: "Iñupiaq, Iñupiatun", - // ), - // "io": const ISOLanguageName( - // name: "Ido", - // nativeName: "Ido", - // ), - // "is": const ISOLanguageName( - // name: "Icelandic", - // nativeName: "Íslenska", - // ), - "it": const ISOLanguageName( - name: "Italian", - nativeName: "Italiano", - ), - // "iu": const ISOLanguageName( - // name: "Inuktitut", - // nativeName: "ᐃᓄᒃᑎᑐᑦ", - // ), - "ja": const ISOLanguageName( - name: "Japanese", - nativeName: "日本語", - ), - // "jv": const ISOLanguageName( - // name: "Javanese", - // nativeName: "basa Jawa", - // ), - // "kl": const ISOLanguageName( - // name: "Kalaallisut, Greenlandic", - // nativeName: "kalaallisut, kalaallit oqaasii", - // ), - // "kn": const ISOLanguageName( - // name: "Kannada", - // nativeName: "ಕನ್ನಡ", - // ), - // "kr": const ISOLanguageName( - // name: "Kanuri", - // nativeName: "Kanuri", - // ), - // "ks": const ISOLanguageName( - // name: "Kashmiri", - // nativeName: "कश्मीरी, كشميري‎", - // ), - // "kk": const ISOLanguageName( - // name: "Kazakh", - // nativeName: "Қазақ тілі", - // ), - // "km": const ISOLanguageName( - // name: "Khmer", - // nativeName: "ភាសាខ្មែរ", - // ), - // "ki": const ISOLanguageName( - // name: "Kikuyu, Gikuyu", - // nativeName: "Gĩkũyũ", - // ), - // "rw": const ISOLanguageName( - // name: "Kinyarwanda", - // nativeName: "Ikinyarwanda", - // ), - // "ky": const ISOLanguageName( - // name: "Kirghiz, Kyrgyz", - // nativeName: "кыргыз тили", - // ), - // "kv": const ISOLanguageName( - // name: "Komi", - // nativeName: "коми кыв", - // ), - // "kg": const ISOLanguageName( - // name: "Kongo", - // nativeName: "KiKongo", - // ), - "ko": const ISOLanguageName( - name: "Korean", - nativeName: "한국어 (韓國語), 조선말 (朝鮮語)", - ), - // "ku": const ISOLanguageName( - // name: "Kurdish", - // nativeName: "Kurdî, كوردی‎", - // ), - // "kj": const ISOLanguageName( - // name: "Kwanyama, Kuanyama", - // nativeName: "Kuanyama", - // ), - // "la": const ISOLanguageName( - // name: "Latin", - // nativeName: "latine, lingua latina", - // ), - // "lb": const ISOLanguageName( - // name: "Luxembourgish, Letzeburgesch", - // nativeName: "Lëtzebuergesch", - // ), - // "lg": const ISOLanguageName( - // name: "Luganda", - // nativeName: "Luganda", - // ), - // "li": const ISOLanguageName( - // name: "Limburgish, Limburgan, Limburger", - // nativeName: "Limburgs", - // ), - // "ln": const ISOLanguageName( - // name: "Lingala", - // nativeName: "Lingála", - // ), - // "lo": const ISOLanguageName( - // name: "Lao", - // nativeName: "ພາສາລາວ", - // ), - // "lt": const ISOLanguageName( - // name: "Lithuanian", - // nativeName: "lietuvių kalba", - // ), - // "lu": const ISOLanguageName( - // name: "Luba-Katanga", - // nativeName: "", - // ), - // "lv": const ISOLanguageName( - // name: "Latvian", - // nativeName: "latviešu valoda", - // ), - // "gv": const ISOLanguageName( - // name: "Manx", - // nativeName: "Gaelg, Gailck", - // ), - // "mk": const ISOLanguageName( - // name: "Macedonian", - // nativeName: "македонски јазик", - // ), - // "mg": const ISOLanguageName( - // name: "Malagasy", - // nativeName: "Malagasy fiteny", - // ), - // "ms": const ISOLanguageName( - // name: "Malay", - // nativeName: "bahasa Melayu, بهاس ملايو‎", - // ), - // "ml": const ISOLanguageName( - // name: "Malayalam", - // nativeName: "മലയാളം", - // ), - // "mt": const ISOLanguageName( - // name: "Maltese", - // nativeName: "Malti", - // ), - // "mi": const ISOLanguageName( - // name: "Māori", - // nativeName: "te reo Māori", - // ), - // "mr": const ISOLanguageName( - // name: "Marathi (Marāṭhī)", - // nativeName: "मराठी", - // ), - // "mh": const ISOLanguageName( - // name: "Marshallese", - // nativeName: "Kajin M̧ajeļ", - // ), - // "mn": const ISOLanguageName( - // name: "Mongolian", - // nativeName: "монгол", - // ), - // "na": const ISOLanguageName( - // name: "Nauru", - // nativeName: "Ekakairũ Naoero", - // ), - // "nv": const ISOLanguageName( - // name: "Navajo, Navaho", - // nativeName: "Diné bizaad, Dinékʼehǰí", - // ), - // "nb": const ISOLanguageName( - // name: "Norwegian Bokmål", - // nativeName: "Norsk bokmål", - // ), - // "nd": const ISOLanguageName( - // name: "North Ndebele", - // nativeName: "isiNdebele", - // ), - "ne": const ISOLanguageName( - name: "Nepali", - nativeName: "नेपाली", - ), - // "ng": const ISOLanguageName( - // name: "Ndonga", - // nativeName: "Owambo", - // ), - // "nn": const ISOLanguageName( - // name: "Norwegian Nynorsk", - // nativeName: "Norsk nynorsk", - // ), - // "no": const ISOLanguageName( - // name: "Norwegian", - // nativeName: "Norsk", - // ), - // "ii": const ISOLanguageName( - // name: "Nuosu", - // nativeName: "ꆈꌠ꒿ Nuosuhxop", - // ), - // "nr": const ISOLanguageName( - // name: "South Ndebele", - // nativeName: "isiNdebele", - // ), - // "oc": const ISOLanguageName( - // name: "Occitan", - // nativeName: "Occitan", - // ), - // "oj": const ISOLanguageName( - // name: "Ojibwe, Ojibwa", - // nativeName: "ᐊᓂᔑᓈᐯᒧᐎᓐ", - // ), - // "cu": const ISOLanguageName( - // name: "Old Church Slavonic", - // nativeName: "ѩзыкъ словѣньскъ", - // ), - // "om": const ISOLanguageName( - // name: "Oromo", - // nativeName: "Afaan Oromoo", - // ), - // "or": const ISOLanguageName( - // name: "Oriya", - // nativeName: "ଓଡ଼ିଆ", - // ), - // "os": const ISOLanguageName( - // name: "Ossetian, Ossetic", - // nativeName: "ирон æвзаг", - // ), - // "pa": const ISOLanguageName( - // name: "Panjabi, Punjabi", - // nativeName: "ਪੰਜਾਬੀ, پنجابی‎", - // ), - // "pi": const ISOLanguageName( - // name: "Pāli", - // nativeName: "पाऴि", - // ), - "fa": const ISOLanguageName( - name: "Persian", - nativeName: "فارسی", - ), - "pl": const ISOLanguageName( - name: "Polish", - nativeName: "polski", - ), - // "ps": const ISOLanguageName( - // name: "Pashto, Pushto", - // nativeName: "پښتو", - // ), - "pt": const ISOLanguageName( - name: "Portuguese", - nativeName: "Português", - ), - // "qu": const ISOLanguageName( - // name: "Quechua", - // nativeName: "Runa Simi, Kichwa", - // ), - // "rm": const ISOLanguageName( - // name: "Romansh", - // nativeName: "rumantsch grischun", - // ), - // "rn": const ISOLanguageName( - // name: "Kirundi", - // nativeName: "kiRundi", - // ), - // "ro": const ISOLanguageName( - // name: "Romanian, Moldavian, Moldovan", - // nativeName: "română", - // ), - "ru": const ISOLanguageName( - name: "Russian", - nativeName: "русский язык", - ), - // "sa": const ISOLanguageName( - // name: "Sanskrit (Saṁskṛta)", - // nativeName: "संस्कृतम्", - // ), - // "sc": const ISOLanguageName( - // name: "Sardinian", - // nativeName: "sardu", - // ), - // "sd": const ISOLanguageName( - // name: "Sindhi", - // nativeName: "सिन्धी, سنڌي، سندھی‎", - // ), - // "se": const ISOLanguageName( - // name: "Northern Sami", - // nativeName: "Davvisámegiella", - // ), - // "sm": const ISOLanguageName( - // name: "Samoan", - // nativeName: "gagana faa Samoa", - // ), - // "sg": const ISOLanguageName( - // name: "Sango", - // nativeName: "yângâ tî sängö", - // ), - // "sr": const ISOLanguageName( - // name: "Serbian", - // nativeName: "српски језик", - // ), - // "gd": const ISOLanguageName( - // name: "Scottish Gaelic; Gaelic", - // nativeName: "Gàidhlig", - // ), - // "sn": const ISOLanguageName( - // name: "Shona", - // nativeName: "chiShona", - // ), - // "si": const ISOLanguageName( - // name: "Sinhala, Sinhalese", - // nativeName: "සිංහල", - // ), - // "sk": const ISOLanguageName( - // name: "Slovak", - // nativeName: "slovenčina", - // ), - // "sl": const ISOLanguageName( - // name: "Slovene", - // nativeName: "slovenščina", - // ), - // "so": const ISOLanguageName( - // name: "Somali", - // nativeName: "Soomaaliga, af Soomaali", - // ), - // "st": const ISOLanguageName( - // name: "Southern Sotho", - // nativeName: "Sesotho", - // ), - "es": const ISOLanguageName( - name: "Spanish", - nativeName: "español", - ), - // "su": const ISOLanguageName( - // name: "Sundanese", - // nativeName: "Basa Sunda", - // ), - // "sw": const ISOLanguageName( - // name: "Swahili", - // nativeName: "Kiswahili", - // ), - // "ss": const ISOLanguageName( - // name: "Swati", - // nativeName: "SiSwati", - // ), - // "sv": const ISOLanguageName( - // name: "Swedish", - // nativeName: "svenska", - // ), - "ta": const ISOLanguageName( - name: "Tamil", - nativeName: "தமிழ்", - ), - // "te": const ISOLanguageName( - // name: "Telugu", - // nativeName: "తెలుగు", - // ), - // "tg": const ISOLanguageName( - // name: "Tajik", - // nativeName: "тоҷикӣ, toğikī, تاجیکی‎", - // ), - "th": const ISOLanguageName( - name: "Thai", - nativeName: "ไทย", - ), - // "ti": const ISOLanguageName( - // name: "Tigrinya", - // nativeName: "ትግርኛ", - // ), - // "bo": const ISOLanguageName( - // name: "Tibetan Standard, Tibetan, Central", - // nativeName: "བོད་ཡིག", - // ), - // "tk": const ISOLanguageName( - // name: "Turkmen", - // nativeName: "Türkmen, Түркмен", - // ), - "tl": const ISOLanguageName( - name: "Tagalog", - nativeName: "Wikang Tagalog", - ), - // "tn": const ISOLanguageName( - // name: "Tswana", - // nativeName: "Setswana", - // ), - // "to": const ISOLanguageName( - // name: "Tonga (Tonga Islands)", - // nativeName: "faka Tonga", - // ), - "tr": const ISOLanguageName( - name: "Turkish", - nativeName: "Türkçe", - ), - // "ts": const ISOLanguageName( - // name: "Tsonga", - // nativeName: "Xitsonga", - // ), - // "tt": const ISOLanguageName( - // name: "Tatar", - // nativeName: "татарча, tatarça, تاتارچا‎", - // ), - // "tw": const ISOLanguageName( - // name: "Twi", - // nativeName: "Twi", - // ), - // "ty": const ISOLanguageName( - // name: "Tahitian", - // nativeName: "Reo Tahiti", - // ), - // "ug": const ISOLanguageName( - // name: "Uighur, Uyghur", - // nativeName: "Uyƣurqə, ئۇيغۇرچە‎", - // ), - "uk": const ISOLanguageName( - name: "Ukrainian", - nativeName: "українська", - ), - // "ur": const ISOLanguageName( - // name: "Urdu", - // nativeName: "اردو", - // ), - // "uz": const ISOLanguageName( - // name: "Uzbek", - // nativeName: "zbek, Ўзбек, أۇزبېك‎", - // ), - // "ve": const ISOLanguageName( - // name: "Venda", - // nativeName: "Tshivenḓa", - // ), - "vi": const ISOLanguageName( - name: "Vietnamese", - nativeName: "Tiếng Việt", - ), - // "vo": const ISOLanguageName( - // name: "Volapük", - // nativeName: "Volapük", - // ), - // "wa": const ISOLanguageName( - // name: "Walloon", - // nativeName: "Walon", - // ), - // "cy": const ISOLanguageName( - // name: "Welsh", - // nativeName: "Cymraeg", - // ), - // "wo": const ISOLanguageName( - // name: "Wolof", - // nativeName: "Wollof", - // ), - // "fy": const ISOLanguageName( - // name: "Western Frisian", - // nativeName: "Frysk", - // ), - // "xh": const ISOLanguageName( - // name: "Xhosa", - // nativeName: "isiXhosa", - // ), - // "yi": const ISOLanguageName( - // name: "Yiddish", - // nativeName: "ייִדיש", - // ), - // "yo": const ISOLanguageName( - // name: "Yoruba", - // nativeName: "Yorùbá", - // ), - // "za": const ISOLanguageName( - // name: "Zhuang, Chuang", - // nativeName: "Saɯ cueŋƅ, Saw cuengh", - // ) - }; - - static ISOLanguageName getDisplayLanguage(String key, String? countryCode) { - if (isoLangs.containsKey(key)) { - return isoLangs[key]!; - } else if (countryCode != null && - countryCode.isNotEmpty && - isoLangs.containsKey("${key}_$countryCode")) { - return isoLangs["${key}_$countryCode"]!; - } else { - throw Exception("Language key incorrect"); - } - } -} diff --git a/lib/collections/markets.dart b/lib/collections/markets.dart deleted file mode 100644 index 8398c662..00000000 --- a/lib/collections/markets.dart +++ /dev/null @@ -1,189 +0,0 @@ -// Country Codes contributed by momobobe - -import 'package:spotube/models/metadata/market.dart'; - -final marketsMap = [ - (Market.AL, "Albania (AL)"), - (Market.DZ, "Algeria (DZ)"), - (Market.AD, "Andorra (AD)"), - (Market.AO, "Angola (AO)"), - (Market.AG, "Antigua and Barbuda (AG)"), - (Market.AR, "Argentina (AR)"), - (Market.AM, "Armenia (AM)"), - (Market.AU, "Australia (AU)"), - (Market.AT, "Austria (AT)"), - (Market.AZ, "Azerbaijan (AZ)"), - (Market.BH, "Bahrain (BH)"), - (Market.BD, "Bangladesh (BD)"), - (Market.BB, "Barbados (BB)"), - (Market.BY, "Belarus (BY)"), - (Market.BE, "Belgium (BE)"), - (Market.BZ, "Belize (BZ)"), - (Market.BJ, "Benin (BJ)"), - (Market.BT, "Bhutan (BT)"), - (Market.BO, "Bolivia (BO)"), - (Market.BA, "Bosnia and Herzegovina (BA)"), - (Market.BW, "Botswana (BW)"), - (Market.BR, "Brazil (BR)"), - (Market.BN, "Brunei Darussalam (BN)"), - (Market.BG, "Bulgaria (BG)"), - (Market.BF, "Burkina Faso (BF)"), - (Market.BI, "Burundi (BI)"), - (Market.CV, "Cabo Verde / Cape Verde (CV)"), - (Market.KH, "Cambodia (KH)"), - (Market.CM, "Cameroon (CM)"), - (Market.CA, "Canada (CA)"), - (Market.TD, "Chad (TD)"), - (Market.CL, "Chile (CL)"), - (Market.CO, "Colombia (CO)"), - (Market.KM, "Comoros (KM)"), - (Market.CR, "Costa Rica (CR)"), - (Market.HR, "Croatia (HR)"), - (Market.CW, "Curaçao (CW)"), - (Market.CY, "Cyprus (CY)"), - (Market.CZ, "Czech Republic (CZ)"), - (Market.CI, "Ivory Coast (CI)"), - (Market.CD, "Congo (CD)"), - (Market.DK, "Denmark (DK)"), - (Market.DJ, "Djibouti (DJ)"), - (Market.DM, "Dominica (DM)"), - (Market.DO, "Dominican Republic (DO)"), - (Market.EC, "Ecuador (EC)"), - (Market.EG, "Egypt (EG)"), - (Market.SV, "El Salvador (SV)"), - (Market.GQ, "Equatorial Guinea (GQ)"), - (Market.EE, "Estonia (EE)"), - (Market.SZ, "Eswatini (SZ)"), - (Market.FJ, "Fiji (FJ)"), - (Market.FI, "Finland (FI)"), - (Market.FR, "France (FR)"), - (Market.GA, "Gabon (GA)"), - (Market.GE, "Georgia (GE)"), - (Market.DE, "Germany (DE)"), - (Market.GH, "Ghana (GH)"), - (Market.GR, "Greece (GR)"), - (Market.GD, "Grenada (GD)"), - (Market.GT, "Guatemala (GT)"), - (Market.GN, "Guinea (GN)"), - (Market.GW, "Guinea-Bissau (GW)"), - (Market.GY, "Guyana (GY)"), - (Market.HT, "Haiti (HT)"), - (Market.HN, "Honduras (HN)"), - (Market.HK, "Hong Kong (HK)"), - (Market.HU, "Hungary (HU)"), - (Market.IS, "Iceland (IS)"), - (Market.IN, "India (IN)"), - (Market.ID, "Indonesia (ID)"), - (Market.IQ, "Iraq (IQ)"), - (Market.IE, "Ireland (IE)"), - (Market.IL, "Israel (IL)"), - (Market.IT, "Italy (IT)"), - (Market.JM, "Jamaica (JM)"), - (Market.JP, "Japan (JP)"), - (Market.JO, "Jordan (JO)"), - (Market.KZ, "Kazakhstan (KZ)"), - (Market.KE, "Kenya (KE)"), - (Market.KI, "Kiribati (KI)"), - (Market.XK, "Kosovo (XK)"), - (Market.KW, "Kuwait (KW)"), - (Market.KG, "Kyrgyzstan (KG)"), - (Market.LA, "Laos (LA)"), - (Market.LV, "Latvia (LV)"), - (Market.LB, "Lebanon (LB)"), - (Market.LS, "Lesotho (LS)"), - (Market.LR, "Liberia (LR)"), - (Market.LY, "Libya (LY)"), - (Market.LI, "Liechtenstein (LI)"), - (Market.LT, "Lithuania (LT)"), - (Market.LU, "Luxembourg (LU)"), - (Market.MO, "Macao / Macau (MO)"), - (Market.MG, "Madagascar (MG)"), - (Market.MW, "Malawi (MW)"), - (Market.MY, "Malaysia (MY)"), - (Market.MV, "Maldives (MV)"), - (Market.ML, "Mali (ML)"), - (Market.MT, "Malta (MT)"), - (Market.MH, "Marshall Islands (MH)"), - (Market.MR, "Mauritania (MR)"), - (Market.MU, "Mauritius (MU)"), - (Market.MX, "Mexico (MX)"), - (Market.FM, "Micronesia (FM)"), - (Market.MD, "Moldova (MD)"), - (Market.MC, "Monaco (MC)"), - (Market.MN, "Mongolia (MN)"), - (Market.ME, "Montenegro (ME)"), - (Market.MA, "Morocco (MA)"), - (Market.MZ, "Mozambique (MZ)"), - (Market.NA, "Namibia (NA)"), - (Market.NR, "Nauru (NR)"), - (Market.NP, "Nepal (NP)"), - (Market.NL, "Netherlands (NL)"), - (Market.NZ, "New Zealand (NZ)"), - (Market.NI, "Nicaragua (NI)"), - (Market.NE, "Niger (NE)"), - (Market.NG, "Nigeria (NG)"), - (Market.MK, "North Macedonia (MK)"), - (Market.NO, "Norway (NO)"), - (Market.OM, "Oman (OM)"), - (Market.PK, "Pakistan (PK)"), - (Market.PW, "Palau (PW)"), - (Market.PS, "Palestine (PS)"), - (Market.PA, "Panama (PA)"), - (Market.PG, "Papua New Guinea (PG)"), - (Market.PY, "Paraguay (PY)"), - (Market.PE, "Peru (PE)"), - (Market.PH, "Philippines (PH)"), - (Market.PL, "Poland (PL)"), - (Market.PT, "Portugal (PT)"), - (Market.QA, "Qatar (QA)"), - (Market.CG, "Congo (CG)"), - (Market.RO, "Romania (RO)"), - (Market.RU, "Russia (RU)"), - (Market.RW, "Rwanda (RW)"), - (Market.WS, "Samoa (WS)"), - (Market.SM, "San Marino (SM)"), - (Market.SA, "Saudi Arabia (SA)"), - (Market.SN, "Senegal (SN)"), - (Market.RS, "Serbia (RS)"), - (Market.SC, "Seychelles (SC)"), - (Market.SL, "Sierra Leone (SL)"), - (Market.SG, "Singapore (SG)"), - (Market.SK, "Slovakia (SK)"), - (Market.SI, "Slovenia (SI)"), - (Market.SB, "Solomon Islands (SB)"), - (Market.ZA, "South Africa (ZA)"), - (Market.KR, "South Korea (KR)"), - (Market.ES, "Spain (ES)"), - (Market.LK, "Sri Lanka (LK)"), - (Market.KN, "St. Kitts and Nevis (KN)"), - (Market.LC, "St. Lucia (LC)"), - (Market.SR, "Suriname (SR)"), - (Market.SE, "Sweden (SE)"), - (Market.CH, "Switzerland (CH)"), - (Market.ST, "São Tomé and Príncipe (ST)"), - (Market.TW, "Taiwan (TW)"), - (Market.TJ, "Tajikistan (TJ)"), - (Market.TZ, "Tanzania (TZ)"), - (Market.TH, "Thailand (TH)"), - (Market.BS, "The Bahamas (BS)"), - (Market.GM, "The Gambia (GM)"), - (Market.TL, "East Timor (TL)"), - (Market.TG, "Togo (TG)"), - (Market.TO, "Tonga (TO)"), - (Market.TT, "Trinidad and Tobago (TT)"), - (Market.TN, "Tunisia (TN)"), - (Market.TR, "Turkey (TR)"), - (Market.TV, "Tuvalu (TV)"), - (Market.UG, "Uganda (UG)"), - (Market.UA, "Ukraine (UA)"), - (Market.AE, "United Arab Emirates (AE)"), - (Market.GB, "United Kingdom (GB)"), - (Market.US, "United States (US)"), - (Market.UY, "Uruguay (UY)"), - (Market.UZ, "Uzbekistan (UZ)"), - (Market.VU, "Vanuatu (VU)"), - (Market.VE, "Venezuela (VE)"), - (Market.VN, "Vietnam (VN)"), - (Market.ZM, "Zambia (ZM)"), - (Market.ZW, "Zimbabwe (ZW)"), -]; diff --git a/lib/collections/routes.dart b/lib/collections/routes.dart deleted file mode 100644 index 4dcd9657..00000000 --- a/lib/collections/routes.dart +++ /dev/null @@ -1,227 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; - -final rootNavigatorKey = GlobalKey(); - -@AutoRouterConfig(replaceInRouteName: 'Screen|Page,Route') -class AppRouter extends RootStackRouter { - final WidgetRef ref; - - AppRouter(this.ref) : super(navigatorKey: rootNavigatorKey); - - @override - List get routes => [ - AutoRoute( - page: RootAppRoute.page, - path: "/", - initial: true, - children: [ - AutoRoute( - path: "home", - page: HomeRoute.page, - initial: true, - guards: [ - AutoRouteGuardCallback( - (resolver, router) async { - final authenticated = await ref - .read(metadataPluginAuthenticatedProvider.future); - - if (!authenticated && !KVStoreService.doneGettingStarted) { - resolver.redirect(const GettingStartedRoute()); - } else { - resolver.next(true); - } - }, - ), - ], - ), - AutoRoute( - path: "home/sections/:sectionId", - page: HomeBrowseSectionItemsRoute.page, - ), - AutoRoute( - path: "search", - page: SearchRoute.page, - ), - AutoRoute( - path: "library", - page: LibraryRoute.page, - children: [ - AutoRoute( - path: "playlists", - page: UserPlaylistsRoute.page, - ), - AutoRoute( - path: "artists", - page: UserArtistsRoute.page, - ), - AutoRoute( - path: "albums", - page: UserAlbumsRoute.page, - ), - AutoRoute( - path: "local", - page: UserLocalLibraryRoute.page, - ), - AutoRoute( - path: "downloads", - page: UserDownloadsRoute.page, - ), - ], - ), - AutoRoute( - path: "local/folder", - page: LocalLibraryRoute.page, - // parentNavigatorKey: shellRouteNavigatorKey, - ), - AutoRoute( - path: "lyrics", - page: LyricsRoute.page, - ), - AutoRoute( - path: "settings", - page: SettingsRoute.page, - ), - AutoRoute( - path: "settings/metadata-provider", - page: SettingsMetadataProviderRoute.page, - ), - AutoRoute( - path: "settings/metadata-provider/metadata-form", - page: SettingsMetadataProviderFormRoute.page, - ), - AutoRoute( - path: "settings/blacklist", - page: BlackListRoute.page, - ), - if (!kIsWeb) - AutoRoute( - path: "settings/logs", - page: LogsRoute.page, - ), - AutoRoute( - path: "settings/about", - page: AboutSpotubeRoute.page, - ), - AutoRoute( - path: "settings/scrobbling", - page: SettingsScrobblingRoute.page, - ), - AutoRoute( - path: "album/:id", - page: AlbumRoute.page, - ), - AutoRoute( - path: "artist/:id", - page: ArtistRoute.page, - ), - AutoRoute( - path: "liked-tracks", - page: LikedPlaylistRoute.page, - ), - AutoRoute( - path: "playlist/:id", - page: PlaylistRoute.page, - guards: [ - AutoRouteGuard.redirect( - (resolver) { - final PlaylistRouteArgs(:id, :playlist) = - resolver.route.args as PlaylistRouteArgs; - if (id == "user-liked-tracks") { - return LikedPlaylistRoute(playlist: playlist); - } - - return null; - }, - ), - ], - ), - AutoRoute( - path: "track/:id", - page: TrackRoute.page, - ), - AutoRoute( - path: "connect", - page: ConnectRoute.page, - ), - AutoRoute( - path: "connect/control", - page: ConnectControlRoute.page, - ), - AutoRoute( - path: "profile", - page: ProfileRoute.page, - ), - AutoRoute( - path: "stats", - page: StatsRoute.page, - ), - AutoRoute( - path: "stats/minutes", - page: StatsMinutesRoute.page, - ), - AutoRoute( - path: "stats/streams", - page: StatsStreamsRoute.page, - ), - AutoRoute( - path: "stats/fees", - page: StatsStreamFeesRoute.page, - ), - AutoRoute( - path: "stats/artists", - page: StatsArtistsRoute.page, - ), - AutoRoute( - path: "stats/albums", - page: StatsAlbumsRoute.page, - ), - AutoRoute( - path: "stats/playlists", - page: StatsPlaylistsRoute.page, - ), - ], - ), - CustomRoute( - transitionsBuilder: TransitionsBuilders.slideBottom, - durationInMilliseconds: 200, - reverseDurationInMilliseconds: 200, - path: "/player/queue", - page: PlayerQueueRoute.page, - ), - CustomRoute( - transitionsBuilder: TransitionsBuilders.slideBottom, - durationInMilliseconds: 200, - reverseDurationInMilliseconds: 200, - path: "/player/sources", - page: PlayerTrackSourcesRoute.page, - ), - CustomRoute( - transitionsBuilder: TransitionsBuilders.slideBottom, - durationInMilliseconds: 200, - reverseDurationInMilliseconds: 200, - path: "/player/lyrics", - page: PlayerLyricsRoute.page, - ), - AutoRoute( - path: "/mini-player", - page: MiniLyricsRoute.page, - // parentNavigatorKey: rootNavigatorKey, - ), - AutoRoute( - path: "/getting-started", - page: GettingStartedRoute.page, - // parentNavigatorKey: rootNavigatorKey, - ), - AutoRoute( - path: "/lastfm-login", - page: LastFMLoginRoute.page, - // parentNavigatorKey: rootNavigatorKey, - ), - ]; -} diff --git a/lib/collections/routes.gr.dart b/lib/collections/routes.gr.dart deleted file mode 100644 index f5ff24bf..00000000 --- a/lib/collections/routes.gr.dart +++ /dev/null @@ -1,960 +0,0 @@ -// dart format width=80 -// GENERATED CODE - DO NOT MODIFY BY HAND - -// ************************************************************************** -// AutoRouterGenerator -// ************************************************************************** - -// ignore_for_file: type=lint -// coverage:ignore-file - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:auto_route/auto_route.dart' as _i41; -import 'package:flutter/material.dart' as _i42; -import 'package:shadcn_flutter/shadcn_flutter.dart' as _i44; -import 'package:spotube/models/metadata/metadata.dart' as _i43; -import 'package:spotube/pages/album/album.dart' as _i2; -import 'package:spotube/pages/artist/artist.dart' as _i3; -import 'package:spotube/pages/connect/connect.dart' as _i6; -import 'package:spotube/pages/connect/control/control.dart' as _i5; -import 'package:spotube/pages/getting_started/getting_started.dart' as _i7; -import 'package:spotube/pages/home/home.dart' as _i9; -import 'package:spotube/pages/home/sections/section_items.dart' as _i8; -import 'package:spotube/pages/lastfm_login/lastfm_login.dart' as _i10; -import 'package:spotube/pages/library/library.dart' as _i11; -import 'package:spotube/pages/library/user_albums.dart' as _i36; -import 'package:spotube/pages/library/user_artists.dart' as _i37; -import 'package:spotube/pages/library/user_downloads.dart' as _i38; -import 'package:spotube/pages/library/user_local_tracks/local_folder.dart' - as _i13; -import 'package:spotube/pages/library/user_local_tracks/user_local_tracks.dart' - as _i39; -import 'package:spotube/pages/library/user_playlists.dart' as _i40; -import 'package:spotube/pages/lyrics/lyrics.dart' as _i15; -import 'package:spotube/pages/lyrics/mini_lyrics.dart' as _i16; -import 'package:spotube/pages/player/lyrics.dart' as _i17; -import 'package:spotube/pages/player/queue.dart' as _i18; -import 'package:spotube/pages/player/sources.dart' as _i19; -import 'package:spotube/pages/playlist/liked_playlist.dart' as _i12; -import 'package:spotube/pages/playlist/playlist.dart' as _i20; -import 'package:spotube/pages/profile/profile.dart' as _i21; -import 'package:spotube/pages/root/root_app.dart' as _i22; -import 'package:spotube/pages/search/search.dart' as _i23; -import 'package:spotube/pages/settings/about.dart' as _i1; -import 'package:spotube/pages/settings/blacklist.dart' as _i4; -import 'package:spotube/pages/settings/logs.dart' as _i14; -import 'package:spotube/pages/settings/metadata/metadata_form.dart' as _i24; -import 'package:spotube/pages/settings/metadata_plugins.dart' as _i25; -import 'package:spotube/pages/settings/scrobbling/scrobbling.dart' as _i27; -import 'package:spotube/pages/settings/settings.dart' as _i26; -import 'package:spotube/pages/stats/albums/albums.dart' as _i28; -import 'package:spotube/pages/stats/artists/artists.dart' as _i29; -import 'package:spotube/pages/stats/fees/fees.dart' as _i33; -import 'package:spotube/pages/stats/minutes/minutes.dart' as _i30; -import 'package:spotube/pages/stats/playlists/playlists.dart' as _i32; -import 'package:spotube/pages/stats/stats.dart' as _i31; -import 'package:spotube/pages/stats/streams/streams.dart' as _i34; -import 'package:spotube/pages/track/track.dart' as _i35; - -/// generated route for -/// [_i1.AboutSpotubePage] -class AboutSpotubeRoute extends _i41.PageRouteInfo { - const AboutSpotubeRoute({List<_i41.PageRouteInfo>? children}) - : super(AboutSpotubeRoute.name, initialChildren: children); - - static const String name = 'AboutSpotubeRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i1.AboutSpotubePage(); - }, - ); -} - -/// generated route for -/// [_i2.AlbumPage] -class AlbumRoute extends _i41.PageRouteInfo { - AlbumRoute({ - _i42.Key? key, - required String id, - required _i43.SpotubeSimpleAlbumObject album, - List<_i41.PageRouteInfo>? children, - }) : super( - AlbumRoute.name, - args: AlbumRouteArgs(key: key, id: id, album: album), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'AlbumRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i2.AlbumPage(key: args.key, id: args.id, album: args.album); - }, - ); -} - -class AlbumRouteArgs { - const AlbumRouteArgs({this.key, required this.id, required this.album}); - - final _i42.Key? key; - - final String id; - - final _i43.SpotubeSimpleAlbumObject album; - - @override - String toString() { - return 'AlbumRouteArgs{key: $key, id: $id, album: $album}'; - } -} - -/// generated route for -/// [_i3.ArtistPage] -class ArtistRoute extends _i41.PageRouteInfo { - ArtistRoute({ - required String artistId, - _i42.Key? key, - List<_i41.PageRouteInfo>? children, - }) : super( - ArtistRoute.name, - args: ArtistRouteArgs(artistId: artistId, key: key), - rawPathParams: {'id': artistId}, - initialChildren: children, - ); - - static const String name = 'ArtistRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => ArtistRouteArgs(artistId: pathParams.getString('id')), - ); - return _i3.ArtistPage(args.artistId, key: args.key); - }, - ); -} - -class ArtistRouteArgs { - const ArtistRouteArgs({required this.artistId, this.key}); - - final String artistId; - - final _i42.Key? key; - - @override - String toString() { - return 'ArtistRouteArgs{artistId: $artistId, key: $key}'; - } -} - -/// generated route for -/// [_i4.BlackListPage] -class BlackListRoute extends _i41.PageRouteInfo { - const BlackListRoute({List<_i41.PageRouteInfo>? children}) - : super(BlackListRoute.name, initialChildren: children); - - static const String name = 'BlackListRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i4.BlackListPage(); - }, - ); -} - -/// generated route for -/// [_i5.ConnectControlPage] -class ConnectControlRoute extends _i41.PageRouteInfo { - const ConnectControlRoute({List<_i41.PageRouteInfo>? children}) - : super(ConnectControlRoute.name, initialChildren: children); - - static const String name = 'ConnectControlRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i5.ConnectControlPage(); - }, - ); -} - -/// generated route for -/// [_i6.ConnectPage] -class ConnectRoute extends _i41.PageRouteInfo { - const ConnectRoute({List<_i41.PageRouteInfo>? children}) - : super(ConnectRoute.name, initialChildren: children); - - static const String name = 'ConnectRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i6.ConnectPage(); - }, - ); -} - -/// generated route for -/// [_i7.GettingStartedPage] -class GettingStartedRoute extends _i41.PageRouteInfo { - const GettingStartedRoute({List<_i41.PageRouteInfo>? children}) - : super(GettingStartedRoute.name, initialChildren: children); - - static const String name = 'GettingStartedRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i7.GettingStartedPage(); - }, - ); -} - -/// generated route for -/// [_i8.HomeBrowseSectionItemsPage] -class HomeBrowseSectionItemsRoute - extends _i41.PageRouteInfo { - HomeBrowseSectionItemsRoute({ - _i44.Key? key, - required String sectionId, - required _i43.SpotubeBrowseSectionObject section, - List<_i41.PageRouteInfo>? children, - }) : super( - HomeBrowseSectionItemsRoute.name, - args: HomeBrowseSectionItemsRouteArgs( - key: key, - sectionId: sectionId, - section: section, - ), - rawPathParams: {'sectionId': sectionId}, - initialChildren: children, - ); - - static const String name = 'HomeBrowseSectionItemsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i8.HomeBrowseSectionItemsPage( - key: args.key, - sectionId: args.sectionId, - section: args.section, - ); - }, - ); -} - -class HomeBrowseSectionItemsRouteArgs { - const HomeBrowseSectionItemsRouteArgs({ - this.key, - required this.sectionId, - required this.section, - }); - - final _i44.Key? key; - - final String sectionId; - - final _i43.SpotubeBrowseSectionObject section; - - @override - String toString() { - return 'HomeBrowseSectionItemsRouteArgs{key: $key, sectionId: $sectionId, section: $section}'; - } -} - -/// generated route for -/// [_i9.HomePage] -class HomeRoute extends _i41.PageRouteInfo { - const HomeRoute({List<_i41.PageRouteInfo>? children}) - : super(HomeRoute.name, initialChildren: children); - - static const String name = 'HomeRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i9.HomePage(); - }, - ); -} - -/// generated route for -/// [_i10.LastFMLoginPage] -class LastFMLoginRoute extends _i41.PageRouteInfo { - const LastFMLoginRoute({List<_i41.PageRouteInfo>? children}) - : super(LastFMLoginRoute.name, initialChildren: children); - - static const String name = 'LastFMLoginRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i10.LastFMLoginPage(); - }, - ); -} - -/// generated route for -/// [_i11.LibraryPage] -class LibraryRoute extends _i41.PageRouteInfo { - const LibraryRoute({List<_i41.PageRouteInfo>? children}) - : super(LibraryRoute.name, initialChildren: children); - - static const String name = 'LibraryRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i11.LibraryPage(); - }, - ); -} - -/// generated route for -/// [_i12.LikedPlaylistPage] -class LikedPlaylistRoute extends _i41.PageRouteInfo { - LikedPlaylistRoute({ - _i42.Key? key, - required _i43.SpotubeSimplePlaylistObject playlist, - List<_i41.PageRouteInfo>? children, - }) : super( - LikedPlaylistRoute.name, - args: LikedPlaylistRouteArgs(key: key, playlist: playlist), - initialChildren: children, - ); - - static const String name = 'LikedPlaylistRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i12.LikedPlaylistPage(key: args.key, playlist: args.playlist); - }, - ); -} - -class LikedPlaylistRouteArgs { - const LikedPlaylistRouteArgs({this.key, required this.playlist}); - - final _i42.Key? key; - - final _i43.SpotubeSimplePlaylistObject playlist; - - @override - String toString() { - return 'LikedPlaylistRouteArgs{key: $key, playlist: $playlist}'; - } -} - -/// generated route for -/// [_i13.LocalLibraryPage] -class LocalLibraryRoute extends _i41.PageRouteInfo { - LocalLibraryRoute({ - required String location, - _i42.Key? key, - bool isDownloads = false, - bool isCache = false, - List<_i41.PageRouteInfo>? children, - }) : super( - LocalLibraryRoute.name, - args: LocalLibraryRouteArgs( - location: location, - key: key, - isDownloads: isDownloads, - isCache: isCache, - ), - initialChildren: children, - ); - - static const String name = 'LocalLibraryRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i13.LocalLibraryPage( - args.location, - key: args.key, - isDownloads: args.isDownloads, - isCache: args.isCache, - ); - }, - ); -} - -class LocalLibraryRouteArgs { - const LocalLibraryRouteArgs({ - required this.location, - this.key, - this.isDownloads = false, - this.isCache = false, - }); - - final String location; - - final _i42.Key? key; - - final bool isDownloads; - - final bool isCache; - - @override - String toString() { - return 'LocalLibraryRouteArgs{location: $location, key: $key, isDownloads: $isDownloads, isCache: $isCache}'; - } -} - -/// generated route for -/// [_i14.LogsPage] -class LogsRoute extends _i41.PageRouteInfo { - const LogsRoute({List<_i41.PageRouteInfo>? children}) - : super(LogsRoute.name, initialChildren: children); - - static const String name = 'LogsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i14.LogsPage(); - }, - ); -} - -/// generated route for -/// [_i15.LyricsPage] -class LyricsRoute extends _i41.PageRouteInfo { - const LyricsRoute({List<_i41.PageRouteInfo>? children}) - : super(LyricsRoute.name, initialChildren: children); - - static const String name = 'LyricsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i15.LyricsPage(); - }, - ); -} - -/// generated route for -/// [_i16.MiniLyricsPage] -class MiniLyricsRoute extends _i41.PageRouteInfo { - MiniLyricsRoute({ - _i44.Key? key, - required _i44.Size prevSize, - List<_i41.PageRouteInfo>? children, - }) : super( - MiniLyricsRoute.name, - args: MiniLyricsRouteArgs(key: key, prevSize: prevSize), - initialChildren: children, - ); - - static const String name = 'MiniLyricsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i16.MiniLyricsPage(key: args.key, prevSize: args.prevSize); - }, - ); -} - -class MiniLyricsRouteArgs { - const MiniLyricsRouteArgs({this.key, required this.prevSize}); - - final _i44.Key? key; - - final _i44.Size prevSize; - - @override - String toString() { - return 'MiniLyricsRouteArgs{key: $key, prevSize: $prevSize}'; - } -} - -/// generated route for -/// [_i17.PlayerLyricsPage] -class PlayerLyricsRoute extends _i41.PageRouteInfo { - const PlayerLyricsRoute({List<_i41.PageRouteInfo>? children}) - : super(PlayerLyricsRoute.name, initialChildren: children); - - static const String name = 'PlayerLyricsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i17.PlayerLyricsPage(); - }, - ); -} - -/// generated route for -/// [_i18.PlayerQueuePage] -class PlayerQueueRoute extends _i41.PageRouteInfo { - const PlayerQueueRoute({List<_i41.PageRouteInfo>? children}) - : super(PlayerQueueRoute.name, initialChildren: children); - - static const String name = 'PlayerQueueRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i18.PlayerQueuePage(); - }, - ); -} - -/// generated route for -/// [_i19.PlayerTrackSourcesPage] -class PlayerTrackSourcesRoute extends _i41.PageRouteInfo { - const PlayerTrackSourcesRoute({List<_i41.PageRouteInfo>? children}) - : super(PlayerTrackSourcesRoute.name, initialChildren: children); - - static const String name = 'PlayerTrackSourcesRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i19.PlayerTrackSourcesPage(); - }, - ); -} - -/// generated route for -/// [_i20.PlaylistPage] -class PlaylistRoute extends _i41.PageRouteInfo { - PlaylistRoute({ - _i42.Key? key, - required String id, - required _i43.SpotubeSimplePlaylistObject playlist, - List<_i41.PageRouteInfo>? children, - }) : super( - PlaylistRoute.name, - args: PlaylistRouteArgs(key: key, id: id, playlist: playlist), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'PlaylistRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i20.PlaylistPage( - key: args.key, - id: args.id, - playlist: args.playlist, - ); - }, - ); -} - -class PlaylistRouteArgs { - const PlaylistRouteArgs({this.key, required this.id, required this.playlist}); - - final _i42.Key? key; - - final String id; - - final _i43.SpotubeSimplePlaylistObject playlist; - - @override - String toString() { - return 'PlaylistRouteArgs{key: $key, id: $id, playlist: $playlist}'; - } -} - -/// generated route for -/// [_i21.ProfilePage] -class ProfileRoute extends _i41.PageRouteInfo { - const ProfileRoute({List<_i41.PageRouteInfo>? children}) - : super(ProfileRoute.name, initialChildren: children); - - static const String name = 'ProfileRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i21.ProfilePage(); - }, - ); -} - -/// generated route for -/// [_i22.RootAppPage] -class RootAppRoute extends _i41.PageRouteInfo { - const RootAppRoute({List<_i41.PageRouteInfo>? children}) - : super(RootAppRoute.name, initialChildren: children); - - static const String name = 'RootAppRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i22.RootAppPage(); - }, - ); -} - -/// generated route for -/// [_i23.SearchPage] -class SearchRoute extends _i41.PageRouteInfo { - const SearchRoute({List<_i41.PageRouteInfo>? children}) - : super(SearchRoute.name, initialChildren: children); - - static const String name = 'SearchRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i23.SearchPage(); - }, - ); -} - -/// generated route for -/// [_i24.SettingsMetadataProviderFormPage] -class SettingsMetadataProviderFormRoute - extends _i41.PageRouteInfo { - SettingsMetadataProviderFormRoute({ - _i44.Key? key, - required String title, - required List<_i43.MetadataFormFieldObject> fields, - List<_i41.PageRouteInfo>? children, - }) : super( - SettingsMetadataProviderFormRoute.name, - args: SettingsMetadataProviderFormRouteArgs( - key: key, - title: title, - fields: fields, - ), - initialChildren: children, - ); - - static const String name = 'SettingsMetadataProviderFormRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return _i24.SettingsMetadataProviderFormPage( - key: args.key, - title: args.title, - fields: args.fields, - ); - }, - ); -} - -class SettingsMetadataProviderFormRouteArgs { - const SettingsMetadataProviderFormRouteArgs({ - this.key, - required this.title, - required this.fields, - }); - - final _i44.Key? key; - - final String title; - - final List<_i43.MetadataFormFieldObject> fields; - - @override - String toString() { - return 'SettingsMetadataProviderFormRouteArgs{key: $key, title: $title, fields: $fields}'; - } -} - -/// generated route for -/// [_i25.SettingsMetadataProviderPage] -class SettingsMetadataProviderRoute extends _i41.PageRouteInfo { - const SettingsMetadataProviderRoute({List<_i41.PageRouteInfo>? children}) - : super(SettingsMetadataProviderRoute.name, initialChildren: children); - - static const String name = 'SettingsMetadataProviderRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i25.SettingsMetadataProviderPage(); - }, - ); -} - -/// generated route for -/// [_i26.SettingsPage] -class SettingsRoute extends _i41.PageRouteInfo { - const SettingsRoute({List<_i41.PageRouteInfo>? children}) - : super(SettingsRoute.name, initialChildren: children); - - static const String name = 'SettingsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i26.SettingsPage(); - }, - ); -} - -/// generated route for -/// [_i27.SettingsScrobblingPage] -class SettingsScrobblingRoute extends _i41.PageRouteInfo { - const SettingsScrobblingRoute({List<_i41.PageRouteInfo>? children}) - : super(SettingsScrobblingRoute.name, initialChildren: children); - - static const String name = 'SettingsScrobblingRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i27.SettingsScrobblingPage(); - }, - ); -} - -/// generated route for -/// [_i28.StatsAlbumsPage] -class StatsAlbumsRoute extends _i41.PageRouteInfo { - const StatsAlbumsRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsAlbumsRoute.name, initialChildren: children); - - static const String name = 'StatsAlbumsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i28.StatsAlbumsPage(); - }, - ); -} - -/// generated route for -/// [_i29.StatsArtistsPage] -class StatsArtistsRoute extends _i41.PageRouteInfo { - const StatsArtistsRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsArtistsRoute.name, initialChildren: children); - - static const String name = 'StatsArtistsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i29.StatsArtistsPage(); - }, - ); -} - -/// generated route for -/// [_i30.StatsMinutesPage] -class StatsMinutesRoute extends _i41.PageRouteInfo { - const StatsMinutesRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsMinutesRoute.name, initialChildren: children); - - static const String name = 'StatsMinutesRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i30.StatsMinutesPage(); - }, - ); -} - -/// generated route for -/// [_i31.StatsPage] -class StatsRoute extends _i41.PageRouteInfo { - const StatsRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsRoute.name, initialChildren: children); - - static const String name = 'StatsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i31.StatsPage(); - }, - ); -} - -/// generated route for -/// [_i32.StatsPlaylistsPage] -class StatsPlaylistsRoute extends _i41.PageRouteInfo { - const StatsPlaylistsRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsPlaylistsRoute.name, initialChildren: children); - - static const String name = 'StatsPlaylistsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i32.StatsPlaylistsPage(); - }, - ); -} - -/// generated route for -/// [_i33.StatsStreamFeesPage] -class StatsStreamFeesRoute extends _i41.PageRouteInfo { - const StatsStreamFeesRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsStreamFeesRoute.name, initialChildren: children); - - static const String name = 'StatsStreamFeesRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i33.StatsStreamFeesPage(); - }, - ); -} - -/// generated route for -/// [_i34.StatsStreamsPage] -class StatsStreamsRoute extends _i41.PageRouteInfo { - const StatsStreamsRoute({List<_i41.PageRouteInfo>? children}) - : super(StatsStreamsRoute.name, initialChildren: children); - - static const String name = 'StatsStreamsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i34.StatsStreamsPage(); - }, - ); -} - -/// generated route for -/// [_i35.TrackPage] -class TrackRoute extends _i41.PageRouteInfo { - TrackRoute({ - _i44.Key? key, - required String trackId, - List<_i41.PageRouteInfo>? children, - }) : super( - TrackRoute.name, - args: TrackRouteArgs(key: key, trackId: trackId), - rawPathParams: {'id': trackId}, - initialChildren: children, - ); - - static const String name = 'TrackRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => TrackRouteArgs(trackId: pathParams.getString('id')), - ); - return _i35.TrackPage(key: args.key, trackId: args.trackId); - }, - ); -} - -class TrackRouteArgs { - const TrackRouteArgs({this.key, required this.trackId}); - - final _i44.Key? key; - - final String trackId; - - @override - String toString() { - return 'TrackRouteArgs{key: $key, trackId: $trackId}'; - } -} - -/// generated route for -/// [_i36.UserAlbumsPage] -class UserAlbumsRoute extends _i41.PageRouteInfo { - const UserAlbumsRoute({List<_i41.PageRouteInfo>? children}) - : super(UserAlbumsRoute.name, initialChildren: children); - - static const String name = 'UserAlbumsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i36.UserAlbumsPage(); - }, - ); -} - -/// generated route for -/// [_i37.UserArtistsPage] -class UserArtistsRoute extends _i41.PageRouteInfo { - const UserArtistsRoute({List<_i41.PageRouteInfo>? children}) - : super(UserArtistsRoute.name, initialChildren: children); - - static const String name = 'UserArtistsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i37.UserArtistsPage(); - }, - ); -} - -/// generated route for -/// [_i38.UserDownloadsPage] -class UserDownloadsRoute extends _i41.PageRouteInfo { - const UserDownloadsRoute({List<_i41.PageRouteInfo>? children}) - : super(UserDownloadsRoute.name, initialChildren: children); - - static const String name = 'UserDownloadsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i38.UserDownloadsPage(); - }, - ); -} - -/// generated route for -/// [_i39.UserLocalLibraryPage] -class UserLocalLibraryRoute extends _i41.PageRouteInfo { - const UserLocalLibraryRoute({List<_i41.PageRouteInfo>? children}) - : super(UserLocalLibraryRoute.name, initialChildren: children); - - static const String name = 'UserLocalLibraryRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i39.UserLocalLibraryPage(); - }, - ); -} - -/// generated route for -/// [_i40.UserPlaylistsPage] -class UserPlaylistsRoute extends _i41.PageRouteInfo { - const UserPlaylistsRoute({List<_i41.PageRouteInfo>? children}) - : super(UserPlaylistsRoute.name, initialChildren: children); - - static const String name = 'UserPlaylistsRoute'; - - static _i41.PageInfo page = _i41.PageInfo( - name, - builder: (data) { - return const _i40.UserPlaylistsPage(); - }, - ); -} diff --git a/lib/collections/side_bar_tiles.dart b/lib/collections/side_bar_tiles.dart deleted file mode 100644 index c647c9fb..00000000 --- a/lib/collections/side_bar_tiles.dart +++ /dev/null @@ -1,114 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/l10n/l10n.dart'; - -class SideBarTiles { - final IconData icon; - final String title; - final String id; - final String pathPrefix; - final PageRouteInfo route; - - SideBarTiles({ - required this.icon, - required this.title, - required this.id, - required this.route, - required this.pathPrefix, - }); -} - -List getSidebarTileList(AppLocalizations l10n) => [ - SideBarTiles( - id: "home", - pathPrefix: "/home", - route: const HomeRoute(), - icon: SpotubeIcons.home, - title: l10n.browse, - ), - SideBarTiles( - id: "search", - pathPrefix: "/search", - route: const SearchRoute(), - icon: SpotubeIcons.search, - title: l10n.search, - ), - SideBarTiles( - id: "lyrics", - pathPrefix: "/lyrics", - route: const LyricsRoute(), - icon: SpotubeIcons.music, - title: l10n.lyrics, - ), - SideBarTiles( - id: "stats", - pathPrefix: "/stats", - route: const StatsRoute(), - icon: SpotubeIcons.chart, - title: l10n.stats, - ), - ]; - -List getSidebarLibraryTileList(AppLocalizations l10n) => [ - SideBarTiles( - id: "playlists", - pathPrefix: "/library/playlists", - title: l10n.playlists, - route: const UserPlaylistsRoute(), - icon: SpotubeIcons.playlist, - ), - SideBarTiles( - id: "artists", - pathPrefix: "/library/artists", - title: l10n.artists, - route: const UserArtistsRoute(), - icon: SpotubeIcons.artist, - ), - SideBarTiles( - id: "albums", - pathPrefix: "/library/albums", - title: l10n.albums, - route: const UserAlbumsRoute(), - icon: SpotubeIcons.album, - ), - SideBarTiles( - id: "local_library", - pathPrefix: "/library/local", - title: l10n.local_library, - route: const UserLocalLibraryRoute(), - icon: SpotubeIcons.device, - ), - ]; - -List getNavbarTileList(AppLocalizations l10n) => [ - SideBarTiles( - id: "home", - pathPrefix: "/home", - route: const HomeRoute(), - icon: SpotubeIcons.home, - title: l10n.browse, - ), - SideBarTiles( - id: "search", - pathPrefix: "/search", - route: const SearchRoute(), - icon: SpotubeIcons.search, - title: l10n.search, - ), - SideBarTiles( - id: "library", - pathPrefix: "/library", - route: const UserPlaylistsRoute(), - icon: SpotubeIcons.library, - title: l10n.library, - ), - SideBarTiles( - id: "stats", - pathPrefix: "/stats", - route: const StatsRoute(), - icon: SpotubeIcons.chart, - title: l10n.stats, - ), - ]; diff --git a/lib/collections/spotube_icons.dart b/lib/collections/spotube_icons.dart deleted file mode 100644 index 99d9ff74..00000000 --- a/lib/collections/spotube_icons.dart +++ /dev/null @@ -1,143 +0,0 @@ -import 'package:fluentui_system_icons/fluentui_system_icons.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_feather_icons/flutter_feather_icons.dart'; -import 'package:simple_icons/simple_icons.dart'; - -abstract class SpotubeIcons { - static const home = FluentIcons.home_12_regular; - static const search = FeatherIcons.search; - static const library = FluentIcons.library_16_regular; - static const music = FeatherIcons.music; - static const play = FluentIcons.play_12_regular; - static const pause = FeatherIcons.pause; - static const skipForward = FeatherIcons.skipForward; - static const skipBack = FeatherIcons.skipBack; - static const stop = FeatherIcons.square; - static const filter = FeatherIcons.filter; - static const refresh = FeatherIcons.refreshCw; - static const settings = FeatherIcons.settings; - static const shuffle = FeatherIcons.shuffle; - static const repeat = FluentIcons.arrow_repeat_all_16_regular; - static const repeatOne = Icons.repeat_one_rounded; - static const remove = FeatherIcons.minus; - static const removeFilled = FeatherIcons.minusCircle; - static const add = FeatherIcons.plus; - static const addFilled = FeatherIcons.plusSquare; - static const heart = FeatherIcons.heart; - static const heartFilled = Icons.favorite_rounded; - static const queue = Icons.queue_music_rounded; - static const queueAdd = Icons.add_to_photos_outlined; - static const queueRemove = Icons.remove_outlined; - static const download = FeatherIcons.download; - static const done = FeatherIcons.checkCircle; - static const alternativeRoute = Icons.alt_route_rounded; - static const sort = Icons.sort_rounded; - static const moreVertical = FeatherIcons.moreVertical; - static const moreHorizontal = FeatherIcons.moreHorizontal; - static const share = FeatherIcons.share2; - static const playlistAdd = Icons.playlist_add_rounded; - static const playlistRemove = Icons.playlist_remove_rounded; - static const playlist = Icons.playlist_play_rounded; - static const trash = FeatherIcons.trash2; - static const clock = FeatherIcons.clock; - static const lyrics = Icons.lyrics_rounded; - static const lyricsOff = Icons.lyrics_outlined; - static const noLyrics = Icons.music_off_outlined; - static const logout = FeatherIcons.logOut; - static const login = FeatherIcons.logIn; - static const dashboard = FeatherIcons.grid; - static const darkMode = FeatherIcons.moon; - static const platform = FeatherIcons.smartphone; - static const palette = Icons.palette_outlined; - static const colorBucket = Icons.format_color_fill_rounded; - static const album = FeatherIcons.disc; - static const artist = FeatherIcons.user; - static const audioQuality = Icons.multitrack_audio_rounded; - static const fastForward = FeatherIcons.fastForward; - static const angleRight = FeatherIcons.chevronRight; - static const angleLeft = FeatherIcons.chevronLeft; - static const angleDown = FeatherIcons.chevronDown; - static const shoppingBag = FeatherIcons.shoppingBag; - static const screenSearch = Icons.screen_search_desktop_outlined; - static const save = FeatherIcons.save; - static const barChart = FeatherIcons.barChart2; - static const folder = FeatherIcons.folder; - static const update = FeatherIcons.refreshCcw; - static const info = FeatherIcons.info; - static const userRemove = FeatherIcons.userX; - static const close = FeatherIcons.x; - static const minimize = FeatherIcons.chevronDown; - static const personalized = FeatherIcons.star; - static const genres = FeatherIcons.music; - static const zoomIn = FeatherIcons.zoomIn; - static const zoomOut = FeatherIcons.zoomOut; - static const tray = FeatherIcons.chevronDown; - static const miniPlayer = Icons.picture_in_picture_rounded; - static const maximize = FeatherIcons.maximize2; - static const pinOn = Icons.push_pin_rounded; - static const pinOff = Icons.push_pin_outlined; - static const hoverOn = Icons.back_hand_rounded; - static const hoverOff = Icons.back_hand_outlined; - static const dragHandle = Icons.drag_indicator; - static const lightning = Icons.flash_on_rounded; - static const lightningOutlined = FeatherIcons.zap; - static const colorSync = FeatherIcons.activity; - static const language = FeatherIcons.globe; - static const error = FeatherIcons.alertTriangle; - static const piped = FeatherIcons.cloud; - static const magic = Icons.auto_fix_high_outlined; - static const selectionCheck = Icons.checklist_rounded; - static const volumeHigh = FeatherIcons.volume2; - static const volumeMedium = FeatherIcons.volume1; - static const volumeLow = FeatherIcons.volume; - static const volumeMute = FeatherIcons.volumeX; - static const timer = FeatherIcons.clock; - static const logs = FeatherIcons.fileText; - static const clipboard = FeatherIcons.clipboard; - static const api = FeatherIcons.database; - static const skip = FeatherIcons.fastForward; - static const noWifi = FeatherIcons.wifiOff; - static const wifi = FeatherIcons.wifi; - static const window = Icons.window_rounded; - static const user = FeatherIcons.user; - static const edit = FeatherIcons.edit; - static const web = FeatherIcons.globe; - static const amoled = FeatherIcons.sunset; - static const file = FeatherIcons.file; - static const stream = Icons.stream_rounded; - static const lastFm = SimpleIcons.lastdotfm; - static const eye = FeatherIcons.eye; - static const noEye = FeatherIcons.eyeOff; - static const normalize = FeatherIcons.barChart2; - static const wikipedia = SimpleIcons.wikipedia; - static const discord = SimpleIcons.discord; - static const youtube = SimpleIcons.youtube; - static const radio = FeatherIcons.radio; - static const github = SimpleIcons.github; - static const openCollective = SimpleIcons.opencollective; - static const anonymous = FeatherIcons.user; - static const history = FeatherIcons.clock; - static const connect = FeatherIcons.link; - static const speaker = FeatherIcons.speaker; - static const monitor = FeatherIcons.monitor; - static const power = FeatherIcons.power; - static const bluetooth = FeatherIcons.bluetooth; - static const chart = FeatherIcons.barChart2; - static const folderAdd = FeatherIcons.folderPlus; - static const folderRemove = FeatherIcons.folderMinus; - static const cache = FeatherIcons.hardDrive; - static const export = Icons.file_open_outlined; - static const delete = FeatherIcons.trash2; - static const open = FeatherIcons.externalLink; - static const radioChecked = Icons.radio_button_on_rounded; - static const radioUnchecked = Icons.radio_button_off_rounded; - static const grid = FeatherIcons.grid; - static const list = FeatherIcons.list; - static const device = FeatherIcons.smartphone; - static const engine = FeatherIcons.server; - static const extensions = Icons.extension_rounded; - static const message = FeatherIcons.send; - static const upload = FeatherIcons.uploadCloud; - static const plugin = Icons.extension_outlined; - static const warning = FeatherIcons.alertTriangle; -} diff --git a/lib/components/adaptive/adaptive_list_tile.dart b/lib/components/adaptive/adaptive_list_tile.dart deleted file mode 100644 index c6d00bd4..00000000 --- a/lib/components/adaptive/adaptive_list_tile.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/constrains.dart'; - -class AdaptiveListTile extends HookWidget { - final Widget Function(BuildContext, StateSetter?)? trailing; - final Widget? title; - final Widget? subtitle; - final Widget? leading; - final void Function()? onTap; - final bool? breakOn; - - const AdaptiveListTile({ - super.key, - this.trailing, - this.onTap, - this.title, - this.subtitle, - this.leading, - this.breakOn, - }); - - @override - Widget build(BuildContext context) { - final mediaQuery = MediaQuery.of(context); - - return ButtonTile( - title: title, - subtitle: subtitle, - trailing: breakOn ?? mediaQuery.smAndDown - ? null - : trailing?.call(context, null), - leading: leading, - enabled: breakOn ?? mediaQuery.smAndDown, - onPressed: () { - onTap?.call(); - showDialog( - context: context, - barrierDismissible: true, - builder: (context) { - return StatefulBuilder(builder: (context, update) { - return AlertDialog( - title: title != null - ? Row( - crossAxisAlignment: CrossAxisAlignment.center, - spacing: 5, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (leading != null) leading!, - Flexible(child: title!), - ], - ) - : const SizedBox.shrink(), - content: Center(child: trailing?.call(context, update)), - ); - }); - }, - ); - }, - ); - } -} diff --git a/lib/components/adaptive/adaptive_pop_sheet_list.dart b/lib/components/adaptive/adaptive_pop_sheet_list.dart deleted file mode 100644 index 6eba1148..00000000 --- a/lib/components/adaptive/adaptive_pop_sheet_list.dart +++ /dev/null @@ -1,191 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/constrains.dart'; - -class AdaptiveMenuButton extends MenuButton { - final T? value; - const AdaptiveMenuButton({ - super.key, - this.value, - required super.child, - super.subMenu, - super.onPressed, - super.trailing, - super.leading, - super.enabled = true, - super.focusNode, - super.autoClose = true, - super.popoverController, - }) : assert( - value != null || onPressed != null, - 'Either value or onPressed must be provided', - ); -} - -/// An adaptive widget that shows a [PopupMenuButton] when screen size is above -/// or equal to 640px -/// In smaller screen, a [IconButton] with a [openDrawer] is shown -class AdaptivePopSheetList extends StatelessWidget { - final List> Function(BuildContext context) items; - final Widget? icon; - final Widget? child; - final bool useRootNavigator; - - final List? headings; - final String tooltip; - final ValueChanged? onSelected; - - final Offset offset; - - final AbstractButtonStyle variance; - - const AdaptivePopSheetList({ - super.key, - required this.items, - this.icon, - this.child, - this.useRootNavigator = true, - this.headings, - this.onSelected, - required this.tooltip, - this.offset = Offset.zero, - this.variance = ButtonVariance.ghost, - }) : assert( - !(icon != null && child != null), - 'Either icon or child must be provided', - ); - - Future showDropdownMenu(BuildContext context, Offset position) async { - final mediaQuery = MediaQuery.of(context); - List childrenModified(BuildContext context) => - items(context).map((s) { - if (s.onPressed == null) { - return MenuButton( - key: s.key, - autoClose: s.autoClose, - enabled: s.enabled, - leading: s.leading, - focusNode: s.focusNode, - onPressed: (context) { - if (s.value != null) { - onSelected?.call(s.value as T); - } - }, - popoverController: s.popoverController, - subMenu: s.subMenu, - trailing: s.trailing, - child: s.child, - ); - } - return s; - }).toList(); - - if (mediaQuery.mdAndUp) { - await showDropdown( - context: context, - rootOverlay: useRootNavigator, - // heightConstraint: PopoverConstraint.anchorFixedSize, - // constraints: BoxConstraints( - // maxHeight: mediaQuery.size.height * 0.6, - // ), - position: position, - builder: (context) { - return WidgetStatesProvider.boundary( - child: DropdownMenu( - children: childrenModified(context), - ), - ); - }, - ).future; - return; - } - - await openDrawer( - context: context, - draggable: true, - showDragHandle: true, - position: OverlayPosition.bottom, - borderRadius: context.theme.borderRadiusMd, - transformBackdrop: false, - builder: (context) { - final children = childrenModified(context); - return ListView.builder( - itemCount: children.length, - shrinkWrap: true, - itemBuilder: (context, index) { - final data = children[index]; - - return Button( - enabled: data.enabled, - style: ButtonVariance.ghost.copyWith( - padding: (context, state, value) => const EdgeInsets.all(16), - ), - onPressed: () { - data.onPressed?.call(context); - if (data.autoClose) { - closeDrawer(context); - } - }, - leading: data.leading, - trailing: data.trailing, - alignment: Alignment.centerLeft, - child: data.child, - ); - }, - ); - }, - ); - } - - @override - Widget build(BuildContext context) { - final mediaQuery = MediaQuery.of(context); - - if (mediaQuery.mdAndUp) { - return Tooltip( - tooltip: TooltipContainer( - child: Text(tooltip), - ).call, - child: IconButton( - variance: variance, - icon: icon ?? const Icon(SpotubeIcons.moreVertical), - onPressed: () { - final renderBox = context.findRenderObject() as RenderBox; - final position = RelativeRect.fromRect( - Rect.fromPoints( - renderBox.localToGlobal(Offset.zero, - ancestor: context.findRenderObject()), - renderBox.localToGlobal(renderBox.size.bottomRight(Offset.zero), - ancestor: context.findRenderObject()), - ), - Offset.zero & mediaQuery.size, - ); - final offset = Offset(position.left, position.top); - showDropdownMenu(context, offset); - }, - ), - ); - } - - if (child != null) { - return Tooltip( - tooltip: TooltipContainer(child: Text(tooltip)).call, - child: Button( - onPressed: () => showDropdownMenu(context, Offset.zero), - style: variance, - child: IgnorePointer(child: child), - ), - ); - } - - return Tooltip( - tooltip: TooltipContainer(child: Text(tooltip)).call, - child: IconButton( - variance: variance, - icon: icon ?? const Icon(SpotubeIcons.moreVertical), - onPressed: () => showDropdownMenu(context, Offset.zero), - ), - ); - } -} diff --git a/lib/components/adaptive/adaptive_select_tile.dart b/lib/components/adaptive/adaptive_select_tile.dart deleted file mode 100644 index afa982af..00000000 --- a/lib/components/adaptive/adaptive_select_tile.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'package:flutter/material.dart' show ListTile, ListTileControlAffinity; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/constrains.dart'; - -class AdaptiveSelectTile extends HookWidget { - final Widget title; - final Widget? subtitle; - final Widget? secondary; - final List? trailing; - final ListTileControlAffinity? controlAffinity; - final T value; - final ValueChanged? onChanged; - - final List> options; - - /// Show the smaller value when the breakpoint is reached - /// - /// If false, the control will be hidden when the breakpoint is reached - /// - /// Defaults to `true` - final bool showValueWhenUnfolded; - - final bool? breakLayout; - - final BoxConstraints? popupConstraints; - final PopoverConstraint? popupWidthConstraint; - - const AdaptiveSelectTile({ - required this.title, - required this.value, - required this.onChanged, - required this.options, - this.controlAffinity = ListTileControlAffinity.trailing, - this.subtitle, - this.secondary, - this.trailing, - this.breakLayout, - this.showValueWhenUnfolded = true, - super.key, - this.popupConstraints, - this.popupWidthConstraint, - }); - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - final mediaQuery = MediaQuery.sizeOf(context); - - Widget? control = Select( - itemBuilder: (context, item) { - return options.firstWhere((element) => element.value == item).child; - }, - value: value, - onChanged: onChanged, - popupConstraints: popupConstraints ?? const BoxConstraints(maxWidth: 200), - popupWidthConstraint: popupWidthConstraint ?? PopoverConstraint.flexible, - autoClosePopover: true, - popup: (context) { - return SelectPopup( - autoClose: true, - items: SelectItemBuilder( - childCount: options.length, - builder: (context, index) { - return options[index]; - }, - ), - ); - }, - ); - - if (mediaQuery.smAndDown) { - if (showValueWhenUnfolded) { - control = OutlineBadge( - child: options.firstWhere((element) => element.value == value).child, - ); - } else { - control = null; - } - } - - return ListTile( - title: title, - subtitle: subtitle, - leading: controlAffinity != ListTileControlAffinity.leading - ? secondary - : control, - trailing: Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.end, - spacing: 5, - children: [ - ...?trailing, - if (controlAffinity == ListTileControlAffinity.leading && - secondary != null) - secondary! - else if (controlAffinity == ListTileControlAffinity.trailing && - control != null) - control, - ], - ), - onTap: breakLayout ?? mediaQuery.mdAndUp - ? null - : () { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Flexible( - child: ListView.builder( - shrinkWrap: true, - itemCount: options.length, - itemBuilder: (context, index) { - final item = options[index]; - - return ListTile( - iconColor: theme.colorScheme.primary, - leading: item.value == value - ? const Icon(SpotubeIcons.radioChecked) - : const Icon(SpotubeIcons.radioUnchecked), - title: item.child, - onTap: () { - onChanged?.call(item.value); - Navigator.of(context).pop(); - }, - ); - }, - ), - ), - ); - }, - ); - }, - ); - } -} diff --git a/lib/components/button/back_button.dart b/lib/components/button/back_button.dart deleted file mode 100644 index dc899616..00000000 --- a/lib/components/button/back_button.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; - -class BackButton extends StatelessWidget { - final Color? color; - final IconData icon; - const BackButton({ - super.key, - this.color, - this.icon = SpotubeIcons.angleLeft, - }); - - @override - Widget build(BuildContext context) { - return IconButton.ghost( - size: const ButtonSize(1.2), - icon: Icon(icon, color: color), - onPressed: () => Navigator.of(context).pop(), - ); - } -} diff --git a/lib/components/dialogs/confirm_download_dialog.dart b/lib/components/dialogs/confirm_download_dialog.dart deleted file mode 100644 index a2df0e9c..00000000 --- a/lib/components/dialogs/confirm_download_dialog.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; - -class ConfirmDownloadDialog extends StatelessWidget { - const ConfirmDownloadDialog({super.key}); - - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.sizeOf(context); - - return ConstrainedBox( - constraints: BoxConstraints(maxWidth: Breakpoints.sm), - child: AlertDialog( - title: Row( - spacing: 10, - children: [ - Text(context.l10n.are_you_sure), - const UniversalImage( - path: - "https://c.tenor.com/kHcmsxlKHEAAAAAM/rock-one-eyebrow-raised-rock-staring.gif", - height: 40, - width: 40, - ) - ], - ), - content: Expanded( - flex: screenSize.smAndUp ? 0 : 1, - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - context.l10n.download_warning, - textAlign: TextAlign.justify, - ), - const SizedBox(height: 10), - Text( - context.l10n.download_ip_ban_warning, - style: const TextStyle( - color: Colors.red, - fontWeight: FontWeight.bold, - ), - textAlign: TextAlign.justify, - ), - const SizedBox(height: 10), - Text( - context.l10n.by_clicking_accept_terms, - ), - const SizedBox(height: 10), - BulletPoint(context.l10n.download_agreement_1), - const SizedBox(height: 10), - BulletPoint(context.l10n.download_agreement_2), - const SizedBox(height: 10), - BulletPoint(context.l10n.download_agreement_3), - ], - ), - ), - ), - actions: [ - Button.outline( - child: Text(context.l10n.decline), - onPressed: () { - Navigator.pop(context, false); - }, - ), - Button.destructive( - onPressed: () => Navigator.of(context).pop(true), - child: Text(context.l10n.accept), - ), - ], - ), - ); - } -} - -class BulletPoint extends StatelessWidget { - final String text; - const BulletPoint(this.text, {super.key}); - - @override - Widget build(BuildContext context) { - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text("\u2022"), - const SizedBox(width: 5), - Flexible(child: Text(text)), - ], - ); - } -} diff --git a/lib/components/dialogs/link_open_permission_dialog.dart b/lib/components/dialogs/link_open_permission_dialog.dart deleted file mode 100644 index a7212d0a..00000000 --- a/lib/components/dialogs/link_open_permission_dialog.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -class LinkOpenPermissionDialog extends StatelessWidget { - final String? href; - const LinkOpenPermissionDialog({super.key, this.href}); - - @override - Widget build(BuildContext context) { - return ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 450), - child: AlertDialog( - title: Row( - spacing: 8, - children: [ - const Icon(SpotubeIcons.warning), - Text(context.l10n.open_link_in_browser), - ], - ), - content: Text.rich( - TextSpan( - children: [ - TextSpan( - text: - "${context.l10n.do_you_want_to_open_the_following_link}:\n", - ), - if (href != null) - TextSpan( - text: "$href\n\n", - style: const TextStyle(color: Colors.blue), - ), - TextSpan(text: context.l10n.unsafe_url_warning), - ], - ), - ), - actions: [ - Button.ghost( - onPressed: () => Navigator.of(context).pop(false), - child: Text(context.l10n.cancel), - ), - Button.ghost( - onPressed: () { - if (href != null) { - Clipboard.setData(ClipboardData(text: href!)); - } - Navigator.of(context).pop(false); - }, - child: Text(context.l10n.copy_link), - ), - Button.destructive( - onPressed: () { - if (href != null) { - launchUrlString( - href!, - mode: LaunchMode.externalApplication, - ); - } - Navigator.of(context).pop(true); - }, - child: Text(context.l10n.open), - ), - ], - ), - ); - } -} diff --git a/lib/components/dialogs/playlist_add_track_dialog.dart b/lib/components/dialogs/playlist_add_track_dialog.dart deleted file mode 100644 index 09d831ea..00000000 --- a/lib/components/dialogs/playlist_add_track_dialog.dart +++ /dev/null @@ -1,147 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -import 'package:spotube/modules/playlist/playlist_create_dialog.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; - -class PlaylistAddTrackDialog extends HookConsumerWidget { - /// The id of the playlist this dialog was opened from - final String? openFromPlaylist; - final List tracks; - const PlaylistAddTrackDialog({ - required this.tracks, - required this.openFromPlaylist, - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final typography = Theme.of(context).typography; - final userPlaylists = ref.watch(metadataPluginSavedPlaylistsProvider); - final favoritePlaylistsNotifier = - ref.watch(metadataPluginSavedPlaylistsProvider.notifier); - - final me = ref.watch(metadataPluginUserProvider); - - final filteredPlaylists = useMemoized( - () => - userPlaylists.asData?.value.items - .where( - (playlist) => - playlist.owner.id == me.asData?.value?.id && - playlist.id != openFromPlaylist, - ) - .toList() ?? - [], - [userPlaylists.asData?.value, me.asData?.value?.id, openFromPlaylist], - ); - - final playlistsCheck = useState({}); - - useEffect(() { - if (userPlaylists.asData?.value != null) { - favoritePlaylistsNotifier.fetchAll(); - } - return null; - }, [userPlaylists.asData?.value]); - - Future onAdd() async { - final selectedPlaylists = playlistsCheck.value.entries - .where((entry) => entry.value) - .map((entry) => entry.key); - - await Future.wait( - selectedPlaylists.map( - (playlistId) => favoritePlaylistsNotifier.addTracks( - playlistId, - tracks.map((e) => e.id).toList(), - ), - ), - ).then((_) => context.mounted ? Navigator.pop(context, true) : null); - } - - return ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 400), - child: AlertDialog( - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - context.l10n.add_to_playlist, - style: typography.large, - ), - const Spacer(), - const PlaylistCreateDialogButton(), - ], - ), - actions: [ - OutlineButton( - child: Text(context.l10n.cancel), - onPressed: () { - Navigator.pop(context, false); - }, - ), - PrimaryButton( - onPressed: onAdd, - child: Text(context.l10n.add), - ), - ], - content: SizedBox( - height: 300, - child: userPlaylists.isLoading - ? const Center(child: CircularProgressIndicator()) - : ListView.builder( - shrinkWrap: true, - itemCount: filteredPlaylists.length, - itemBuilder: (context, index) { - final playlist = filteredPlaylists.elementAt(index); - return Button.ghost( - style: ButtonVariance.ghost.copyWith( - padding: (context, _, __) { - return const EdgeInsets.symmetric(vertical: 8); - }, - ), - leading: Avatar( - initials: Avatar.getInitials(playlist.name), - provider: UniversalImage.imageProvider( - playlist.images.asUrlString( - placeholder: ImagePlaceholder.collection, - ), - ), - ), - trailing: Checkbox( - state: (playlistsCheck.value[playlist.id] ?? false) - ? CheckboxState.checked - : CheckboxState.unchecked, - onChanged: (val) { - playlistsCheck.value = { - ...playlistsCheck.value, - playlist.id: val == CheckboxState.checked, - }; - }, - ), - onPressed: () { - playlistsCheck.value = { - ...playlistsCheck.value, - playlist.id: - !(playlistsCheck.value[playlist.id] ?? false), - }; - }, - child: Padding( - padding: const EdgeInsets.only(left: 8.0), - child: Text(playlist.name), - ), - ); - }, - ), - ), - ), - ); - } -} diff --git a/lib/components/dialogs/prompt_dialog.dart b/lib/components/dialogs/prompt_dialog.dart deleted file mode 100644 index 3498bf02..00000000 --- a/lib/components/dialogs/prompt_dialog.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/extensions/context.dart'; - -Future showPromptDialog({ - required BuildContext context, - required String title, - required String message, - String okText = "Ok", - String? cancelText = "Cancel", -}) async { - return showDialog( - context: context, - builder: (context) { - return AlertDialog( - title: Text(title), - content: Text(message), - actions: [ - if (cancelText != null) - Button.outline( - onPressed: () => Navigator.of(context).pop(false), - child: Text( - cancelText == "Cancel" ? context.l10n.cancel : cancelText, - ), - ), - Button.primary( - child: Text(okText == "Ok" ? context.l10n.ok : okText), - onPressed: () => Navigator.of(context).pop(true), - ), - ], - ); - }, - ).then((value) => value ?? false); -} diff --git a/lib/components/dialogs/replace_downloaded_dialog.dart b/lib/components/dialogs/replace_downloaded_dialog.dart deleted file mode 100644 index 5b5b194e..00000000 --- a/lib/components/dialogs/replace_downloaded_dialog.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -final replaceDownloadedFileState = StateProvider((ref) => null); - -class ReplaceDownloadedDialog extends ConsumerWidget { - final SpotubeTrackObject track; - const ReplaceDownloadedDialog({required this.track, super.key}); - - @override - Widget build(BuildContext context, ref) { - final replaceAll = ref.watch(replaceDownloadedFileState); - - return AlertDialog( - title: Text(context.l10n.track_exists(track.name)), - content: RadioGroup( - value: replaceAll, - onChanged: (value) { - ref.read(replaceDownloadedFileState.notifier).state = value; - }, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(context.l10n.do_you_want_to_replace), - const Gap(16), - RadioItem( - value: true, - trailing: Text(context.l10n.replace_downloaded_tracks), - ), - const Gap(8), - RadioItem( - value: false, - trailing: Text(context.l10n.skip_download_tracks), - ), - ], - ), - ), - actions: [ - Button.outline( - onPressed: replaceAll == true - ? null - : () { - Navigator.pop(context, false); - }, - child: Text(context.l10n.skip), - ), - Button.primary( - onPressed: replaceAll == false - ? null - : () { - Navigator.pop(context, true); - }, - child: Text(context.l10n.replace), - ), - ], - ); - } -} diff --git a/lib/components/dialogs/select_device_dialog.dart b/lib/components/dialogs/select_device_dialog.dart deleted file mode 100644 index 5392a403..00000000 --- a/lib/components/dialogs/select_device_dialog.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/connect/clients.dart'; - -class SelectDeviceDialog extends HookConsumerWidget { - const SelectDeviceDialog({super.key}); - - @override - Widget build(BuildContext context, ref) { - final isRemoteService = useState(false); - - final connectClients = ref.watch(connectClientsProvider); - final remoteService = connectClients.asData!.value.resolvedService!; - - return AlertDialog( - title: Text(context.l10n.choose_the_device), - content: RadioGroup( - value: isRemoteService.value, - onChanged: (value) { - isRemoteService.value = value; - }, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(context.l10n.multiple_device_connected), - const Gap(16), - RadioItem( - trailing: Text(remoteService.name), - value: true, - ), - const Gap(8), - RadioItem( - trailing: Text(context.l10n.this_device), - value: false, - ), - ], - ), - ), - actions: [ - Button.primary( - onPressed: () { - Navigator.of(context).pop(isRemoteService.value); - }, - child: Text(context.l10n.select), - ), - ], - ); - } -} - -Future showSelectDeviceDialog( - BuildContext context, WidgetRef ref) async { - final connectClients = ref.read(connectClientsProvider); - - if (connectClients.asData?.value.resolvedService == null) { - return false; - } - - final isRemote = await showDialog( - context: context, - builder: (context) => const SelectDeviceDialog(), - ); - - return isRemote; -} diff --git a/lib/components/dialogs/track_details_dialog.dart b/lib/components/dialogs/track_details_dialog.dart deleted file mode 100644 index 9d35a6fb..00000000 --- a/lib/components/dialogs/track_details_dialog.dart +++ /dev/null @@ -1,149 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/links/hyper_link.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/duration.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; - -class TrackDetailsDialog extends HookConsumerWidget { - final SpotubeFullTrackObject track; - const TrackDetailsDialog({ - super.key, - required this.track, - }); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); - final sourcedTrack = ref.read(sourcedTrackProvider(track)); - - final detailsMap = { - context.l10n.title: track.name, - context.l10n.artist: ArtistLink( - artists: track.artists, - mainAxisAlignment: WrapAlignment.start, - textStyle: const TextStyle(color: Colors.blue), - hideOverflowArtist: false, - ), - // context.l10n.album: LinkText( - // track.album!.name!, - // AlbumRoute(album: track.album!, id: track.album!.id!), - // overflow: TextOverflow.ellipsis, - // style: const TextStyle(color: Colors.blue), - // ), - context.l10n.duration: sourcedTrack.asData != null - ? sourcedTrack.asData!.value.info.duration.toHumanReadableString() - : Duration(milliseconds: track.durationMs).toHumanReadableString(), - if (track.album.releaseDate != null) - context.l10n.released: track.album.releaseDate, - }; - - final sourceInfo = sourcedTrack.asData?.value.info; - - final ytTracksDetailsMap = sourceInfo == null - ? {} - : { - context.l10n.youtube: Hyperlink( - "https://piped.video/watch?v=${sourceInfo.id}", - "https://piped.video/watch?v=${sourceInfo.id}", - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - context.l10n.channel: Text(sourceInfo.artists.join(", ")), - if (sourcedTrack.asData?.value.url != null) - context.l10n.streamUrl: Hyperlink( - sourcedTrack.asData!.value.url ?? "", - sourcedTrack.asData!.value.url ?? "", - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - }; - - return AlertDialog( - surfaceBlur: 0, - surfaceOpacity: 1, - title: Row( - spacing: 8, - children: [ - const Icon(SpotubeIcons.info), - Text( - context.l10n.details, - style: theme.typography.h4, - ), - ], - ), - content: SizedBox( - width: mediaQuery.mdAndUp ? double.infinity : 700, - child: Table( - columnWidths: const { - 0: FixedTableSize(95), - 1: FixedTableSize(10), - 2: FlexTableSize(), - }, - theme: const TableTheme( - backgroundColor: Colors.transparent, - cellTheme: TableCellTheme( - backgroundColor: WidgetStatePropertyAll(Colors.transparent), - ), - ), - rowHeights: const {0: FixedTableSize(40)}, - rows: [ - for (final entry in detailsMap.entries) - TableRow( - cells: [ - TableCell( - child: Text( - entry.key, - style: theme.typography.bold, - ), - ), - const TableCell( - child: Text(":"), - ), - TableCell( - child: entry.value is Widget - ? entry.value as Widget - : (entry.value is String) - ? Text( - entry.value as String, - style: theme.typography.normal, - ) - : const Text(""), - ), - ], - ), - for (final entry in ytTracksDetailsMap.entries) - TableRow( - cells: [ - TableCell( - child: Text( - entry.key, - style: theme.typography.bold, - ), - ), - const TableCell( - child: Text(":"), - ), - TableCell( - child: entry.value is Widget - ? entry.value as Widget - : Text( - entry.value, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: theme.typography.normal, - ), - ), - ], - ), - ], - ), - ), - ); - } -} diff --git a/lib/components/expandable_search/expandable_search.dart b/lib/components/expandable_search/expandable_search.dart deleted file mode 100644 index 279a3e5f..00000000 --- a/lib/components/expandable_search/expandable_search.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; - -class ExpandableSearchField extends StatelessWidget { - final bool isFiltering; - final ValueChanged onChangeFiltering; - final TextEditingController searchController; - final FocusNode searchFocus; - - const ExpandableSearchField({ - super.key, - required this.isFiltering, - required this.onChangeFiltering, - required this.searchController, - required this.searchFocus, - }); - - @override - Widget build(BuildContext context) { - return AnimatedOpacity( - duration: const Duration(milliseconds: 200), - opacity: isFiltering ? 1 : 0, - child: AnimatedSize( - duration: const Duration(milliseconds: 200), - child: SizedBox( - height: isFiltering ? 50 : 0, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: CallbackShortcuts( - bindings: { - LogicalKeySet(LogicalKeyboardKey.escape): () { - onChangeFiltering(false); - searchController.clear(); - searchFocus.unfocus(); - } - }, - child: TextField( - focusNode: searchFocus, - controller: searchController, - placeholder: Text(context.l10n.search_tracks), - features: const [ - InputFeature.leading(Icon(SpotubeIcons.search)) - ], - ), - ), - ), - ), - ), - ); - } -} - -class ExpandableSearchButton extends StatelessWidget { - final bool isFiltering; - final FocusNode searchFocus; - final Widget icon; - final ValueChanged? onPressed; - - const ExpandableSearchButton({ - super.key, - required this.isFiltering, - required this.searchFocus, - this.icon = const Icon(SpotubeIcons.filter), - this.onPressed, - }); - - @override - Widget build(BuildContext context) { - return IconButton( - icon: icon, - variance: isFiltering ? ButtonVariance.secondary : ButtonVariance.outline, - onPressed: () { - if (isFiltering) { - searchFocus.requestFocus(); - } else { - searchFocus.unfocus(); - } - onPressed?.call(!isFiltering); - }, - ); - } -} diff --git a/lib/components/fallbacks/anonymous_fallback.dart b/lib/components/fallbacks/anonymous_fallback.dart deleted file mode 100644 index cb6028a7..00000000 --- a/lib/components/fallbacks/anonymous_fallback.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; - -import 'package:spotube/utils/platform.dart'; - -class AnonymousFallback extends ConsumerWidget { - final Widget? child; - const AnonymousFallback({ - super.key, - this.child, - }); - - @override - Widget build(BuildContext context, ref) { - final isLoggedIn = ref.watch(metadataPluginAuthenticatedProvider); - - if (isLoggedIn.isLoading) { - return const Center(child: CircularProgressIndicator()); - } - - if (isLoggedIn.asData?.value == true && child != null) return child!; - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 10, - children: [ - Undraw( - illustration: kIsMobile - ? UndrawIllustration.accessDenied - : UndrawIllustration.secureLogin, - height: 200 * context.theme.scaling, - color: context.theme.colorScheme.primary, - ), - Text(context.l10n.not_logged_in), - Button.primary( - child: Text(context.l10n.login), - onPressed: () => context.navigateTo(const SettingsRoute()), - ) - ], - ), - ); - } -} diff --git a/lib/components/fallbacks/error_box.dart b/lib/components/fallbacks/error_box.dart deleted file mode 100644 index fd56cb58..00000000 --- a/lib/components/fallbacks/error_box.dart +++ /dev/null @@ -1,138 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; - -class ErrorBox extends StatelessWidget { - final Object error; - final VoidCallback? onRetry; - const ErrorBox({ - super.key, - required this.error, - this.onRetry, - }); - - @override - Widget build(BuildContext context) { - // Make a monospace error log view. Make sure it's only 4 lines - return ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 400), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Card( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - spacing: 12, - children: [ - Basic( - leading: const Icon(SpotubeIcons.error), - contentSpacing: 8, - title: Text(context.l10n.an_error_occurred), - ), - Card( - padding: const EdgeInsets.all(8.0), - filled: true, - fillColor: context.theme.colorScheme.muted, - child: Text( - error.toString(), - style: TextStyle( - // Use monospace - fontFamily: 'Ubuntu Mono', - color: context.theme.colorScheme.mutedForeground, - fontSize: 14, - ), - maxLines: 6, - overflow: TextOverflow.ellipsis, - ), - ), - // Show a dialog with full log and a retry button as well - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Button.text( - leading: const Icon(SpotubeIcons.logs), - onPressed: () { - showDialog( - context: context, - builder: (context) { - return ConstrainedBox( - constraints: BoxConstraints( - maxWidth: 480, - maxHeight: - MediaQuery.of(context).size.height * 0.8, - ), - child: AlertDialog( - padding: const EdgeInsets.all(12), - title: Row( - spacing: 8, - children: [ - const Icon(SpotubeIcons.logs), - Text(context.l10n.logs), - const Spacer(), - IconButton.ghost( - icon: const Icon(SpotubeIcons.close), - onPressed: () => context.maybePop(), - ) - ], - ), - actions: [ - HookBuilder(builder: (context) { - final copied = useState(false); - - return Button.ghost( - leading: copied.value - ? const Icon(SpotubeIcons.done) - : const Icon(SpotubeIcons.clipboard), - child: Text(context.l10n.copy_to_clipboard), - onPressed: () { - Clipboard.setData( - ClipboardData(text: error.toString()), - ); - copied.value = true; - }, - ); - }) - ], - content: SingleChildScrollView( - child: Card( - padding: const EdgeInsets.all(8.0), - filled: true, - fillColor: context.theme.colorScheme.muted, - child: SelectableText( - error.toString(), - style: TextStyle( - // Use monospace - fontFamily: 'Ubuntu Mono', - color: context - .theme.colorScheme.mutedForeground, - fontSize: 16, - ), - ), - ), - ), - ), - ); - }, - ); - }, - child: Text(context.l10n.view_logs), - ), - if (onRetry != null) - Button.text( - leading: const Icon(SpotubeIcons.refresh), - onPressed: onRetry, - child: Text(context.l10n.retry), - ), - ], - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/components/fallbacks/no_default_metadata_plugin.dart b/lib/components/fallbacks/no_default_metadata_plugin.dart deleted file mode 100644 index 1cabcdb1..00000000 --- a/lib/components/fallbacks/no_default_metadata_plugin.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; - -class NoDefaultMetadataPlugin extends StatelessWidget { - const NoDefaultMetadataPlugin({super.key}); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.stars, - color: context.theme.colorScheme.primary, - ), - AutoSizeText( - context.l10n.no_default_metadata_provider_selected, - style: context.theme.typography.h4, - maxLines: 1, - ), - Button.primary( - leading: const Icon(SpotubeIcons.extensions), - child: Text(context.l10n.manage_metadata_providers), - onPressed: () { - context.pushRoute(const SettingsMetadataProviderRoute()); - }, - ), - ], - ), - ); - } -} diff --git a/lib/components/fallbacks/not_found.dart b/lib/components/fallbacks/not_found.dart deleted file mode 100644 index 9a994446..00000000 --- a/lib/components/fallbacks/not_found.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/extensions/context.dart'; - -class NotFound extends StatelessWidget { - const NotFound({super.key}); - - @override - Widget build(BuildContext context) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - Undraw( - illustration: UndrawIllustration.empty, - height: 200 * context.theme.scaling, - color: context.theme.colorScheme.primary, - ), - const Gap(10), - Text( - context.l10n.nothing_found, - textAlign: TextAlign.center, - ).muted().small() - ], - ); - } -} diff --git a/lib/components/form/checkbox_form_field.dart b/lib/components/form/checkbox_form_field.dart deleted file mode 100644 index 0e794833..00000000 --- a/lib/components/form/checkbox_form_field.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -class CheckboxFormBuilderField extends StatelessWidget { - final String name; - final FormFieldValidator? validator; - - final ValueChanged? onChanged; - final Widget? leading; - final Widget? trailing; - final bool tristate; - const CheckboxFormBuilderField({ - super.key, - required this.name, - this.validator, - this.onChanged, - this.leading, - this.trailing, - this.tristate = false, - }); - - @override - Widget build(BuildContext context) { - return FormBuilderField( - name: name, - validator: validator, - builder: (field) { - return Checkbox( - state: tristate && field.value == null - ? CheckboxState.indeterminate - : field.value == true - ? CheckboxState.checked - : CheckboxState.unchecked, - onChanged: (state) { - field.didChange(state == CheckboxState.checked); - onChanged?.call(state); - }, - leading: leading, - trailing: trailing, - tristate: tristate, - ); - }, - ); - } -} diff --git a/lib/components/form/text_form_field.dart b/lib/components/form/text_form_field.dart deleted file mode 100644 index dc92c257..00000000 --- a/lib/components/form/text_form_field.dart +++ /dev/null @@ -1,184 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -class TextFormBuilderField extends StatelessWidget { - final String name; - final FormFieldValidator? validator; - final Widget? label; - - final TextEditingController? controller; - final bool filled; - final Widget? placeholder; - // final AlignmentGeometry? placeholderAlignment; - // final AlignmentGeometry? leadingAlignment; - // final AlignmentGeometry? trailingAlignment; - final Border? border; - final List features; - final EdgeInsetsGeometry? padding; - final ValueChanged? onSubmitted; - final VoidCallback? onEditingComplete; - final FocusNode? focusNode; - final VoidCallback? onTap; - final bool enabled; - final bool readOnly; - final bool obscureText; - final String obscuringCharacter; - final String? initialValue; - final int? maxLength; - final MaxLengthEnforcement? maxLengthEnforcement; - final int? maxLines; - final int? minLines; - final BorderRadiusGeometry? borderRadius; - final TextAlign textAlign; - final bool expands; - final TextAlignVertical? textAlignVertical; - final UndoHistoryController? undoController; - final ValueChanged? onChanged; - final Iterable? autofillHints; - final void Function(PointerDownEvent event)? onTapOutside; - final List? inputFormatters; - final TextStyle? style; - // final EditableTextContextMenuBuilder? contextMenuBuilder; - // final bool useNativeContextMenu; - // final bool? isCollapsed; - final TextInputType? keyboardType; - final TextInputAction? textInputAction; - final Clip clipBehavior; - final bool autofocus; - final WidgetStatesController? statesController; - - const TextFormBuilderField({ - super.key, - required this.name, - this.label, - this.validator, - this.controller, - this.maxLength, - this.maxLengthEnforcement, - this.maxLines = 1, - this.minLines, - this.filled = false, - this.placeholder, - this.border, - this.padding, - this.onSubmitted, - this.onEditingComplete, - this.focusNode, - this.onTap, - this.enabled = true, - this.readOnly = false, - this.obscureText = false, - this.obscuringCharacter = '•', - this.initialValue, - this.borderRadius, - this.keyboardType, - this.textAlign = TextAlign.start, - this.expands = false, - this.textAlignVertical = TextAlignVertical.center, - this.autofillHints, - this.undoController, - this.onChanged, - this.onTapOutside, - this.inputFormatters, - this.style, - // this.contextMenuBuilder = TextField.defaultContextMenuBuilder, - // this.useNativeContextMenu = false, - // this.isCollapsed, - this.textInputAction, - this.clipBehavior = Clip.hardEdge, - this.autofocus = false, - // this.placeholderAlignment, - // this.leadingAlignment, - // this.trailingAlignment, - this.statesController, - this.features = const [], - }); - - @override - Widget build(BuildContext context) { - return FormBuilderField( - name: name, - validator: validator, - onChanged: (value) { - if (value == null) return; - onChanged?.call(value); - }, - builder: (field) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - spacing: 5, - children: [ - if (label != null) - DefaultTextStyle( - style: context.theme.typography.semiBold.copyWith( - color: field.hasError - ? context.theme.colorScheme.destructive - : context.theme.colorScheme.foreground, - ), - child: label!, - ), - TextField( - controller: controller, - maxLength: maxLength, - maxLengthEnforcement: maxLengthEnforcement, - maxLines: maxLines, - minLines: minLines, - filled: filled, - placeholder: placeholder, - border: border, - features: features, - padding: padding, - onSubmitted: (value) { - field.validate(); - field.save(); - onSubmitted?.call(value); - }, - onEditingComplete: () { - field.save(); - onEditingComplete?.call(); - }, - focusNode: focusNode, - onTap: onTap, - enabled: enabled, - readOnly: readOnly, - obscureText: obscureText, - obscuringCharacter: obscuringCharacter, - initialValue: field.value, - borderRadius: borderRadius, - textAlign: textAlign, - expands: expands, - textAlignVertical: textAlignVertical, - autofillHints: autofillHints, - undoController: undoController, - onChanged: (value) { - field.didChange(value); - }, - onTapOutside: onTapOutside, - inputFormatters: inputFormatters, - style: style, - // contextMenuBuilder: contextMenuBuilder, - // useNativeContextMenu: useNativeContextMenu, - // isCollapsed: isCollapsed, - keyboardType: keyboardType, - textInputAction: textInputAction, - clipBehavior: clipBehavior, - autofocus: autofocus, - // placeholderAlignment: placeholderAlignment, - // leadingAlignment: leadingAlignment, - // trailingAlignment: trailingAlignment, - statesController: statesController, - ), - if (field.hasError) - Text( - field.errorText ?? "", - style: TextStyle( - color: context.theme.colorScheme.destructive, - ), - ), - ], - ), - ); - } -} diff --git a/lib/components/framework/app_pop_scope.dart b/lib/components/framework/app_pop_scope.dart deleted file mode 100644 index fe923958..00000000 --- a/lib/components/framework/app_pop_scope.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'dart:io'; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -/// A temporary workaround for [WillPopScope] and [PopScope] not working in GoRouter -/// https://github.com/flutter/flutter/issues/140869#issuecomment-2247181468 -class AppPopScope extends StatefulWidget { - final Widget child; - - final PopInvokedCallback? onPopInvoked; - - final bool canPop; - - const AppPopScope({ - super.key, - required this.child, - this.canPop = true, - this.onPopInvoked, - }); - - @override - State createState() => _AppPopScopeState(); -} - -class _AppPopScopeState extends State { - final bool _enable = Platform.isAndroid; - ModalRoute? _route; - BackButtonDispatcher? _parentBackBtnDispatcher; - ChildBackButtonDispatcher? _backBtnDispatcher; - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - _route = ModalRoute.of(context); - _updateBackButtonDispatcher(); - } - - @override - void activate() { - super.activate(); - _updateBackButtonDispatcher(); - } - - @override - void deactivate() { - super.deactivate(); - _disposeBackBtnDispatcher(); - } - - @override - void dispose() { - _disposeBackBtnDispatcher(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return PopScope( - canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, - child: widget.child, - ); - } - - void _updateBackButtonDispatcher() { - if (!_enable) return; - - var dispatcher = Router.maybeOf(context)?.backButtonDispatcher; - if (dispatcher != _parentBackBtnDispatcher) { - _disposeBackBtnDispatcher(); - _parentBackBtnDispatcher = dispatcher; - if (dispatcher is BackButtonDispatcher && - dispatcher is! ChildBackButtonDispatcher) { - dispatcher = dispatcher.createChildBackButtonDispatcher(); - } - _backBtnDispatcher = dispatcher as ChildBackButtonDispatcher; - } - _backBtnDispatcher?.removeCallback(_handleBackButton); - _backBtnDispatcher?.addCallback(_handleBackButton); - _backBtnDispatcher?.takePriority(); - } - - void _disposeBackBtnDispatcher() { - _backBtnDispatcher?.removeCallback(_handleBackButton); - if (_backBtnDispatcher is ChildBackButtonDispatcher) { - final child = _backBtnDispatcher as ChildBackButtonDispatcher; - _parentBackBtnDispatcher?.forget(child); - } - _backBtnDispatcher = null; - _parentBackBtnDispatcher = null; - } - - bool get _onlyRoute => _route != null && _route!.isFirst && _route!.isCurrent; - - Future _handleBackButton() async { - if (_onlyRoute) { - widget.onPopInvoked?.call(widget.canPop); - if (!widget.canPop) { - return true; - } - } - return false; - } -} diff --git a/lib/components/heart_button/heart_button.dart b/lib/components/heart_button/heart_button.dart deleted file mode 100644 index 14a0572f..00000000 --- a/lib/components/heart_button/heart_button.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/components/heart_button/use_track_toggle_like.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/library/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; - -class HeartButton extends HookConsumerWidget { - final bool isLiked; - final void Function()? onPressed; - final IconData? icon; - final Color? color; - final String? tooltip; - final AbstractButtonStyle variance; - final ButtonSize size; - const HeartButton({ - required this.isLiked, - required this.onPressed, - this.color, - this.tooltip, - this.icon, - this.variance = ButtonVariance.ghost, - this.size = ButtonSize.normal, - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - - if (authenticated.asData?.value != true) return const SizedBox.shrink(); - - return Tooltip( - tooltip: TooltipContainer(child: Text(tooltip ?? "")).call, - child: IconButton( - variance: variance, - size: size, - enabled: onPressed != null, - icon: AnimatedSwitcher( - switchInCurve: Curves.fastOutSlowIn, - switchOutCurve: Curves.fastOutSlowIn, - duration: const Duration(milliseconds: 300), - transitionBuilder: (child, animation) { - return ScaleTransition( - scale: animation, - child: child, - ); - }, - child: Icon( - icon ?? - (isLiked - ? Icons.favorite_rounded - : Icons.favorite_outline_rounded), - key: ValueKey(isLiked), - color: color ?? (isLiked ? color ?? Colors.red : null), - ), - ), - onPressed: onPressed, - ), - ); - } -} - -class TrackHeartButton extends HookConsumerWidget { - final SpotubeTrackObject track; - const TrackHeartButton({ - super.key, - required this.track, - }); - - @override - Widget build(BuildContext context, ref) { - final savedTracks = ref.watch(metadataPluginSavedTracksProvider); - final me = ref.watch(metadataPluginUserProvider); - final (:isLiked, :isLoading, :toggleTrackLike) = - useTrackToggleLike(track, ref); - - if (me.isLoading) { - return const CircularProgressIndicator(); - } - - return HeartButton( - tooltip: isLiked - ? context.l10n.remove_from_favorites - : context.l10n.save_as_favorite, - isLiked: isLiked, - onPressed: savedTracks.asData?.value == null || isLoading - ? null - : () { - toggleTrackLike(track); - }, - ); - } -} diff --git a/lib/components/heart_button/use_track_toggle_like.dart b/lib/components/heart_button/use_track_toggle_like.dart deleted file mode 100644 index af961578..00000000 --- a/lib/components/heart_button/use_track_toggle_like.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/library/tracks.dart'; - -typedef UseTrackToggleLike = ({ - bool isLiked, - bool isLoading, - Future Function(SpotubeTrackObject track) toggleTrackLike, -}); - -UseTrackToggleLike useTrackToggleLike(SpotubeTrackObject track, WidgetRef ref) { - final savedTracksNotifier = - ref.watch(metadataPluginSavedTracksProvider.notifier); - - final isSavedTrack = ref.watch(metadataPluginIsSavedTrackProvider(track.id)); - - return ( - isLiked: isSavedTrack.asData?.value ?? false, - isLoading: isSavedTrack.isLoading, - toggleTrackLike: (track) async { - final isLikedTrack = await ref.read( - metadataPluginIsSavedTrackProvider(track.id).future, - ); - - if (isLikedTrack) { - await savedTracksNotifier.removeFavorite([track]); - } else { - await savedTracksNotifier.addFavorite([track]); - } - }, - ); -} diff --git a/lib/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart b/lib/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart deleted file mode 100644 index 3ac90a06..00000000 --- a/lib/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart +++ /dev/null @@ -1,124 +0,0 @@ -import 'dart:ui'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/album/album_card.dart'; -import 'package:spotube/modules/artist/artist_card.dart'; -import 'package:spotube/modules/playlist/playlist_card.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -class HorizontalPlaybuttonCardView extends HookWidget { - final Widget title; - final List items; - final Widget? error; - final VoidCallback onFetchMore; - final bool isLoadingNextPage; - final bool hasNextPage; - final Widget? titleTrailing; - - HorizontalPlaybuttonCardView({ - required this.title, - required this.items, - required this.hasNextPage, - required this.onFetchMore, - required this.isLoadingNextPage, - this.titleTrailing, - this.error, - super.key, - }) : assert( - items.every( - (item) => - item is SpotubeSimpleAlbumObject || - item is SpotubeSimplePlaylistObject || - item is SpotubeFullArtistObject, - ), - ); - - @override - Widget build(BuildContext context) { - final scrollController = useScrollController(); - final isArtist = items.every((s) => s is SpotubeFullArtistObject); - final scale = context.theme.scaling; - - return Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: DefaultTextStyle( - style: context.theme.typography.h4.copyWith( - color: context.theme.colorScheme.foreground, - ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - child: title, - ), - ), - if (titleTrailing != null) titleTrailing!, - ], - ), - if (error != null) - error! - else - SizedBox( - height: isArtist ? 250 : 225, - child: NotificationListener( - // disable multiple scrollbar to use this - onNotification: (notification) => true, - child: ScrollConfiguration( - behavior: ScrollConfiguration.of(context).copyWith( - dragDevices: PointerDeviceKind.values.toSet(), - ), - child: items.isEmpty - ? ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: 5, - itemBuilder: (context, index) { - return AlbumCard(FakeData.albumSimple); - }, - ) - : InfiniteList( - scrollController: scrollController, - scrollDirection: Axis.horizontal, - padding: const EdgeInsets.symmetric(vertical: 8.0), - itemCount: items.length, - onFetchData: onFetchMore, - loadingBuilder: (context) => Skeletonizer( - enabled: true, - child: isArtist - ? ArtistCard(FakeData.artist) - : AlbumCard(FakeData.albumSimple), - ), - isLoading: isLoadingNextPage, - hasReachedMax: !hasNextPage, - separatorBuilder: (context, index) => Gap(12 * scale), - itemBuilder: (context, index) { - final item = items[index]; - - return switch (item) { - SpotubeSimplePlaylistObject() => PlaylistCard( - item as SpotubeSimplePlaylistObject), - SpotubeSimpleAlbumObject() => - AlbumCard(item as SpotubeSimpleAlbumObject), - SpotubeFullArtistObject() => - ArtistCard(item as SpotubeFullArtistObject), - _ => const SizedBox.shrink(), - }; - }), - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/components/hover_builder.dart b/lib/components/hover_builder.dart deleted file mode 100644 index 7793e744..00000000 --- a/lib/components/hover_builder.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -class HoverBuilder extends HookWidget { - final bool? permanentState; - final Widget Function(BuildContext context, bool isHovering) builder; - const HoverBuilder({ - required this.builder, - this.permanentState, - super.key, - }); - - @override - Widget build(BuildContext context) { - final hovering = useState(false); - - if (permanentState != null) { - return builder(context, permanentState!); - } - - return MouseRegion( - onEnter: (_) { - if (!hovering.value) hovering.value = true; - }, - onExit: (_) { - if (hovering.value) hovering.value = false; - }, - child: builder(context, hovering.value), - ); - } -} diff --git a/lib/components/image/universal_image.dart b/lib/components/image/universal_image.dart deleted file mode 100644 index e157f96a..00000000 --- a/lib/components/image/universal_image.dart +++ /dev/null @@ -1,136 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/collections/assets.gen.dart'; - -class UniversalImage extends HookWidget { - final String path; - final double? height; - final double? width; - final double scale; - final String? placeholder; - final BoxFit? fit; - const UniversalImage({ - required this.path, - this.height, - this.width, - this.placeholder, - this.fit, - this.scale = 1, - super.key, - }); - - static ImageProvider imageProvider( - String path, { - final double? height, - final double? width, - final double scale = 1, - }) { - if (path.startsWith("http")) { - return CachedNetworkImageProvider( - path, - maxHeight: height?.toInt(), - maxWidth: width?.toInt(), - cacheKey: path, - scale: scale, - ); - } else if (path.startsWith("assets/")) { - return AssetImage(path); - } else if (Uri.tryParse(path) != null) { - return FileImage(File(path), scale: scale); - } - return MemoryImage(base64Decode(path), scale: scale); - } - - @override - Widget build(BuildContext context) { - if (path.startsWith("http")) { - return FadeInImage( - image: CachedNetworkImageProvider( - path, - maxHeight: height?.toInt(), - maxWidth: width?.toInt(), - cacheKey: path, - scale: scale, - ), - height: height, - width: width, - placeholder: AssetImage(placeholder ?? Assets.images.placeholder.path), - imageErrorBuilder: (context, error, stackTrace) { - return Image.asset( - placeholder ?? Assets.images.placeholder.path, - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - ); - }, - fit: fit, - ); - } else if (Uri.tryParse(path) != null && !path.startsWith("assets")) { - return Image.file( - File(path), - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - fit: fit, - errorBuilder: (context, error, stackTrace) { - return Image.asset( - placeholder ?? Assets.images.placeholder.path, - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - ); - }, - ); - } else if (path.startsWith("assets")) { - return Image.asset( - path, - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - fit: fit, - errorBuilder: (context, error, stackTrace) { - return Image.asset( - placeholder ?? Assets.images.placeholder.path, - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - ); - }, - ); - } - - return Image.memory( - base64Decode(path), - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - fit: fit, - errorBuilder: (context, error, stackTrace) { - return Image.asset( - placeholder ?? Assets.images.placeholder.path, - width: width, - height: height, - cacheHeight: height?.toInt(), - cacheWidth: width?.toInt(), - scale: scale, - ); - }, - ); - } -} diff --git a/lib/components/inter_scrollbar/inter_scrollbar.dart b/lib/components/inter_scrollbar/inter_scrollbar.dart deleted file mode 100644 index 415ba6da..00000000 --- a/lib/components/inter_scrollbar/inter_scrollbar.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:draggable_scrollbar/draggable_scrollbar.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/utils/platform.dart'; - -class InterScrollbar extends HookWidget { - final Widget child; - final ScrollController controller; - - const InterScrollbar({ - super.key, - required this.child, - required this.controller, - }); - - @override - Widget build(BuildContext context) { - if (kIsDesktop) return child; - - return DraggableScrollbar.semicircle( - controller: controller, - child: child, - ); - } -} diff --git a/lib/components/links/anchor_button.dart b/lib/components/links/anchor_button.dart deleted file mode 100644 index a0b3fa73..00000000 --- a/lib/components/links/anchor_button.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -class AnchorButton extends HookWidget { - final String text; - final TextStyle style; - final TextAlign? textAlign; - final TextOverflow? overflow; - final void Function()? onTap; - final int? maxLines; - - const AnchorButton( - this.text, { - super.key, - this.onTap, - this.textAlign, - this.overflow, - this.maxLines, - this.style = const TextStyle(), - }); - - @override - Widget build(BuildContext context) { - var hover = useState(false); - var tap = useState(false); - - return GestureDetector( - onTapDown: (event) => tap.value = true, - onTapUp: (event) => tap.value = false, - onTap: onTap, - child: MouseRegion( - cursor: WidgetStateMouseCursor.clickable, - child: Text( - text, - style: style.copyWith( - decoration: - hover.value || tap.value ? TextDecoration.underline : null, - ), - maxLines: maxLines, - textAlign: textAlign, - overflow: overflow, - ), - onEnter: (event) => hover.value = true, - onExit: (event) => hover.value = false, - ), - ); - } -} diff --git a/lib/components/links/artist_link.dart b/lib/components/links/artist_link.dart deleted file mode 100644 index dc093345..00000000 --- a/lib/components/links/artist_link.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/links/anchor_button.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class ArtistLink extends StatelessWidget { - final List artists; - final WrapCrossAlignment crossAxisAlignment; - final WrapAlignment mainAxisAlignment; - final TextStyle textStyle; - final bool hideOverflowArtist; - final void Function(String route)? onRouteChange; - final VoidCallback? onOverflowArtistClick; - - const ArtistLink({ - super.key, - required this.artists, - this.crossAxisAlignment = WrapCrossAlignment.center, - this.mainAxisAlignment = WrapAlignment.center, - this.textStyle = const TextStyle(), - this.onRouteChange, - this.hideOverflowArtist = true, - this.onOverflowArtistClick, - }) : assert(hideOverflowArtist ? onOverflowArtistClick != null : true); - - @override - Widget build(BuildContext context) { - final ThemeData(:colorScheme) = Theme.of(context); - - return Wrap( - crossAxisAlignment: crossAxisAlignment, - alignment: mainAxisAlignment, - children: [ - ...(hideOverflowArtist ? artists.take(3).toList() : artists) - .asMap() - .entries - .map( - (artist) => Builder(builder: (context) { - return AnchorButton( - (artist.key != artists.length - 1) - ? "${artist.value.name}, " - : artist.value.name, - onTap: () { - if (onRouteChange != null) { - onRouteChange?.call("/artist/${artist.value.id}"); - } else { - context - .navigateTo(ArtistRoute(artistId: artist.value.id)); - } - }, - overflow: TextOverflow.ellipsis, - style: textStyle, - ); - }), - ), - if (hideOverflowArtist && artists.length > 3) - AnchorButton( - context.l10n.and_n_more(artists.length - 3), - onTap: () { - onOverflowArtistClick?.call(); - }, - overflow: TextOverflow.ellipsis, - style: textStyle.copyWith( - color: colorScheme.secondary, - decoration: TextDecoration.underline, - ), - ), - ], - ); - } -} diff --git a/lib/components/links/hyper_link.dart b/lib/components/links/hyper_link.dart deleted file mode 100644 index 647edaca..00000000 --- a/lib/components/links/hyper_link.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/links/anchor_button.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -class Hyperlink extends StatelessWidget { - final String text; - final TextStyle style; - final TextAlign? textAlign; - final TextOverflow? overflow; - final String url; - final int? maxLines; - - const Hyperlink( - this.text, - this.url, { - super.key, - this.textAlign, - this.overflow, - this.style = const TextStyle(), - this.maxLines, - }); - - @override - Widget build(BuildContext context) { - return AnchorButton( - text, - onTap: () async { - await launchUrlString( - url, - mode: LaunchMode.externalApplication, - ); - }, - key: key, - overflow: overflow, - maxLines: maxLines, - style: style.copyWith(color: Colors.blue), - textAlign: textAlign, - ); - } -} diff --git a/lib/components/links/link_text.dart b/lib/components/links/link_text.dart deleted file mode 100644 index c64ae93d..00000000 --- a/lib/components/links/link_text.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/links/anchor_button.dart'; - -class LinkText extends StatelessWidget { - final String text; - final TextStyle style; - final TextAlign? textAlign; - final TextOverflow? overflow; - final PageRouteInfo route; - final int? maxLines; - - final bool push; - const LinkText( - this.text, - this.route, { - super.key, - this.textAlign, - this.overflow, - this.style = const TextStyle(), - this.maxLines, - this.push = false, - }); - - @override - Widget build(BuildContext context) { - return AnchorButton( - text, - onTap: () { - if (push) { - context.navigateTo(route); - } else { - context.navigateTo(route); - } - }, - key: key, - overflow: overflow, - style: style, - textAlign: textAlign, - maxLines: maxLines, - ); - } -} diff --git a/lib/components/markdown/markdown.dart b/lib/components/markdown/markdown.dart deleted file mode 100644 index 1fd4ac5b..00000000 --- a/lib/components/markdown/markdown.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter_markdown_plus/flutter_markdown_plus.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/dialogs/link_open_permission_dialog.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -class AppMarkdown extends StatelessWidget { - final String data; - const AppMarkdown({ - super.key, - required this.data, - }); - - @override - Widget build(BuildContext context) { - return MarkdownBody( - data: data, - imageBuilder: (uri, title, alt) { - final url = uri.toString(); - return CachedNetworkImage( - imageUrl: url, - fit: BoxFit.cover, - ); - }, - onTapLink: (text, href, title) async { - final allowOpeningLink = await showDialog( - context: context, - builder: (context) { - return LinkOpenPermissionDialog(href: href); - }, - ); - - if (href != null && allowOpeningLink == true) { - launchUrlString( - href, - mode: LaunchMode.externalApplication, - ); - } - }, - ); - } -} diff --git a/lib/components/playbutton_view/playbutton_card.dart b/lib/components/playbutton_view/playbutton_card.dart deleted file mode 100644 index ea28c738..00000000 --- a/lib/components/playbutton_view/playbutton_card.dart +++ /dev/null @@ -1,170 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/string.dart'; -import 'package:spotube/utils/platform.dart'; - -class PlaybuttonCard extends StatelessWidget { - final void Function()? onTap; - final void Function()? onPlaybuttonPressed; - final void Function()? onAddToQueuePressed; - final String? description; - - final String? imageUrl; - final Widget? image; - final bool isPlaying; - final bool isLoading; - final String title; - final bool isOwner; - - const PlaybuttonCard({ - required this.isPlaying, - required this.isLoading, - required this.title, - this.description, - this.onPlaybuttonPressed, - this.onAddToQueuePressed, - this.onTap, - this.isOwner = false, - this.imageUrl, - this.image, - super.key, - }) : assert( - imageUrl != null || image != null, - "imageUrl and image can't be null at the same time", - ); - - @override - Widget build(BuildContext context) { - final unescapeHtml = description?.unescapeHtml().cleanHtml() ?? ""; - final scale = context.theme.scaling; - - return SizedBox( - width: 150 * scale, - child: CardImage( - image: Stack( - children: [ - if (imageUrl != null) - Container( - width: 150 * scale, - height: 150 * scale, - decoration: BoxDecoration( - borderRadius: context.theme.borderRadiusMd, - image: DecorationImage( - image: UniversalImage.imageProvider( - imageUrl!, - height: 200 * scale, - width: 200 * scale, - ), - fit: BoxFit.cover, - ), - ), - ) - else - SizedBox( - width: 150 * scale, - height: 150 * scale, - child: ClipRRect( - borderRadius: context.theme.borderRadiusMd, - child: image!, - ), - ), - StatedWidget.builder( - builder: (context, states) { - return Positioned( - right: 8, - bottom: 8, - child: Column( - children: [ - AnimatedScale( - curve: Curves.easeOutBack, - duration: const Duration(milliseconds: 300), - scale: (states.contains(WidgetState.hovered) || - kIsMobile) && - !isLoading - ? 1 - : 0.7, - child: AnimatedOpacity( - duration: const Duration(milliseconds: 300), - opacity: (states.contains(WidgetState.hovered) || - kIsMobile) && - !isLoading - ? 1 - : 0, - child: IconButton.secondary( - icon: const Icon(SpotubeIcons.queueAdd), - onPressed: onAddToQueuePressed, - size: ButtonSize.small, - ), - ), - ), - const Gap(5), - AnimatedScale( - curve: Curves.easeOutBack, - duration: const Duration(milliseconds: 150), - scale: states.contains(WidgetState.hovered) || - kIsMobile || - isPlaying || - isLoading - ? 1 - : 0.7, - child: AnimatedOpacity( - duration: const Duration(milliseconds: 150), - opacity: states.contains(WidgetState.hovered) || - kIsMobile || - isPlaying || - isLoading - ? 1 - : 0, - child: IconButton.secondary( - icon: switch ((isLoading, isPlaying)) { - (true, _) => const CircularProgressIndicator( - size: 15, - ), - (false, false) => const Icon(SpotubeIcons.play), - (false, true) => const Icon(SpotubeIcons.pause) - }, - enabled: !isLoading, - onPressed: onPlaybuttonPressed, - size: ButtonSize.small, - ), - ), - ), - ], - ), - ); - }, - ), - if (isOwner) - const Positioned( - right: 5, - top: 5, - child: SecondaryBadge( - style: ButtonStyle.secondaryIcon( - shape: ButtonShape.circle, - size: ButtonSize.small, - ), - child: Icon(SpotubeIcons.user), - ), - ), - ], - ), - title: Tooltip( - tooltip: TooltipContainer(child: Text(title)).call, - child: Text( - title, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - subtitle: Text( - unescapeHtml.isEmpty ? "\n" : unescapeHtml, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - onPressed: onTap, - ), - ); - } -} diff --git a/lib/components/playbutton_view/playbutton_tile.dart b/lib/components/playbutton_view/playbutton_tile.dart deleted file mode 100644 index 7470105d..00000000 --- a/lib/components/playbutton_view/playbutton_tile.dart +++ /dev/null @@ -1,115 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/string.dart'; - -class PlaybuttonTile extends StatelessWidget { - final void Function()? onTap; - final void Function()? onPlaybuttonPressed; - final void Function()? onAddToQueuePressed; - final String? description; - - final String? imageUrl; - final Widget? image; - final bool isPlaying; - final bool isLoading; - final String title; - final bool isOwner; - - const PlaybuttonTile({ - required this.isPlaying, - required this.isLoading, - required this.title, - this.description, - this.onPlaybuttonPressed, - this.onAddToQueuePressed, - this.onTap, - this.isOwner = false, - this.imageUrl, - this.image, - super.key, - }) : assert( - imageUrl != null || image != null, - "imageUrl and image can't be null at the same time", - ); - - @override - Widget build(BuildContext context) { - final cleanDescription = description?.unescapeHtml().cleanHtml() ?? ""; - final scale = context.theme.scaling; - - return Button( - leading: imageUrl != null - ? Container( - width: 50 * scale, - height: 50 * scale, - decoration: BoxDecoration( - borderRadius: context.theme.borderRadiusMd, - image: DecorationImage( - image: UniversalImage.imageProvider(imageUrl!), - fit: BoxFit.cover, - ), - ), - ) - : SizedBox( - width: 50 * scale, - height: 50 * scale, - child: ClipRRect( - borderRadius: context.theme.borderRadiusMd, - child: image, - ), - ), - style: ButtonVariance.ghost.copyWith( - padding: (context, states, value) { - return (ButtonVariance.ghost.padding(context, states) as EdgeInsets) - .copyWith(right: 0, left: 0); - }, - ), - trailing: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Tooltip( - tooltip: TooltipContainer(child: Text(context.l10n.add_to_queue)).call, - child: IconButton.outline( - icon: const Icon(SpotubeIcons.queueAdd), - onPressed: onAddToQueuePressed, - enabled: !isLoading, - ), - ), - const Gap(8), - Tooltip( - tooltip: TooltipContainer(child: Text(context.l10n.play)).call, - child: IconButton.secondary( - icon: switch ((isLoading, isPlaying)) { - (true, _) => const CircularProgressIndicator( - size: 22, - ), - (false, false) => const Icon(SpotubeIcons.play), - (false, true) => const Icon(SpotubeIcons.pause) - }, - onPressed: onPlaybuttonPressed, - enabled: !isLoading, - ), - ), - ], - ), - enabled: !isLoading, - onPressed: onTap, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title), - if (cleanDescription.isNotEmpty) - Text( - description!, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ).xSmall().muted(), - ], - ), - ); - } -} diff --git a/lib/components/playbutton_view/playbutton_view.dart b/lib/components/playbutton_view/playbutton_view.dart deleted file mode 100644 index 7880bb8c..00000000 --- a/lib/components/playbutton_view/playbutton_view.dart +++ /dev/null @@ -1,204 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/playbutton_view/playbutton_card.dart'; -import 'package:spotube/components/playbutton_view/playbutton_tile.dart'; -import 'package:spotube/components/waypoint.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -const _dummyPlaybuttonCard = PlaybuttonCard( - imageUrl: 'https://placehold.co/150x150.png', - isLoading: false, - isPlaying: false, - title: "Playbutton", - description: "A really cool playbutton", - isOwner: false, -); - -const _dummyPlaybuttonTile = PlaybuttonTile( - imageUrl: 'https://placehold.co/150x150.png', - isLoading: false, - isPlaying: false, - title: "Playbutton", - description: "A really cool playbutton", - isOwner: false, -); - -/// A [PlaybuttonCard] grid/list view (selectable) sliver widget -/// with support for infinite scrolling -class PlaybuttonView extends StatelessWidget { - final int itemCount; - final Widget Function(BuildContext context, int index) gridItemBuilder; - final Widget Function(BuildContext context, int index) listItemBuilder; - final bool hasMore; - final bool isLoading; - final VoidCallback onRequestMore; - final ScrollController controller; - - final Widget? leading; - - const PlaybuttonView({ - super.key, - required this.itemCount, - required this.gridItemBuilder, - required this.listItemBuilder, - required this.hasMore, - required this.isLoading, - required this.onRequestMore, - required this.controller, - this.leading, - }); - - @override - Widget build(BuildContext context) { - final scale = context.theme.scaling; - - return SliverLayoutBuilder( - builder: (context, constrains) => HookBuilder(builder: (context) { - final isGrid = useState(constrains.mdAndUp); - final hasUserInteracted = useRef(false); - - useEffect(() { - if (hasUserInteracted.value) return null; - if (isGrid.value != constrains.mdAndUp) { - isGrid.value = constrains.mdAndUp; - } - return null; - }, [constrains]); - - return SliverMainAxisGroup( - slivers: [ - SliverToBoxAdapter( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - if (leading != null) leading!, - Toggle( - value: isGrid.value, - style: - const ButtonStyle.outline(density: ButtonDensity.icon), - onChanged: (value) { - isGrid.value = value; - hasUserInteracted.value = true; - }, - child: const Icon(SpotubeIcons.grid), - ), - const SizedBox(width: 8), - Toggle( - value: !isGrid.value, - style: - const ButtonStyle.outline(density: ButtonDensity.icon), - onChanged: (value) { - isGrid.value = !value; - hasUserInteracted.value = true; - }, - child: const Icon(SpotubeIcons.list), - ), - ], - ), - ), - const SliverGap(10), - // Toggle between grid and list view - switch ((isGrid.value, isLoading)) { - (true, _) => !isLoading && itemCount == 0 - ? SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8), - sliver: SliverToBoxAdapter( - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.taken, - color: Theme.of(context).colorScheme.primary, - ), - Text( - context.l10n.nothing_found, - textAlign: TextAlign.center, - ).muted().small() - ], - ), - ), - ) - : SliverGrid.builder( - itemCount: isLoading ? 6 : itemCount + 1, - gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 150 * scale, - mainAxisExtent: 225 * scale, - crossAxisSpacing: 12 * scale, - mainAxisSpacing: 12 * scale, - ), - itemBuilder: (context, index) { - if (isLoading) { - return const Skeletonizer( - enabled: true, - child: _dummyPlaybuttonCard, - ); - } - - if (index == itemCount) { - if (!hasMore) return const SizedBox.shrink(); - return Waypoint( - controller: controller, - isGrid: true, - onTouchEdge: onRequestMore, - child: const Skeletonizer( - enabled: true, - child: _dummyPlaybuttonCard, - ), - ); - } - - return gridItemBuilder(context, index); - }, - ), - (false, true) => Skeletonizer.sliver( - enabled: true, - child: SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) => _dummyPlaybuttonTile, - childCount: 6, - ), - ), - ), - (false, false) => SliverInfiniteList( - itemCount: itemCount, - loadingBuilder: (context) => const Skeletonizer( - enabled: true, - child: _dummyPlaybuttonTile, - ), - itemBuilder: listItemBuilder, - onFetchData: onRequestMore, - hasReachedMax: !hasMore, - isLoading: isLoading, - emptyBuilder: (context) { - return Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.taken, - color: Theme.of(context).colorScheme.primary, - ), - Text( - context.l10n.nothing_found, - textAlign: TextAlign.center, - ).muted().small() - ], - ); - }, - ), - } - ], - ); - }), - ); - } -} diff --git a/lib/components/shimmers/shimmer_lyrics.dart b/lib/components/shimmers/shimmer_lyrics.dart deleted file mode 100644 index 9312865e..00000000 --- a/lib/components/shimmers/shimmer_lyrics.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:skeletonizer/skeletonizer.dart'; - -class ShimmerLyrics extends HookWidget { - const ShimmerLyrics({super.key}); - - @override - Widget build(BuildContext context) { - return Skeletonizer( - enabled: true, - child: ListView.builder( - itemCount: 30, - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index) { - final texts = [ - "Lorem ipsum", - "consectetur.", - "Sed", - "Sed non risus", - ]..shuffle(); - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - for (final text in texts) ...[ - Text(text), - if (text != texts.last) const Gap(10), - ], - ], - ); - }, - ), - ); - } -} diff --git a/lib/components/titlebar/titlebar.dart b/lib/components/titlebar/titlebar.dart deleted file mode 100644 index 778f0b09..00000000 --- a/lib/components/titlebar/titlebar.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/titlebar/titlebar_buttons.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; - -final kTitlebarVisible = kIsWindows || kIsLinux; - -class TitleBar extends HookConsumerWidget implements PreferredSizeWidget { - final bool automaticallyImplyLeading; - final List trailing; - final List leading; - final Widget? child; - final Widget? title; - final Widget? header; // small widget placed on top of title - final Widget? subtitle; // small widget placed below title - final bool - trailingExpanded; // expand the trailing instead of the main content - final AlignmentGeometry alignment; - final Color? backgroundColor; - final Color? foregroundColor; - final double? leadingGap; - final double? trailingGap; - final EdgeInsetsGeometry? padding; - final double? height; - final bool useSafeArea; - final double? surfaceBlur; - final double? surfaceOpacity; - - const TitleBar({ - super.key, - this.automaticallyImplyLeading = true, - this.trailing = const [], - this.leading = const [], - this.title, - this.header, - this.subtitle, - this.child, - this.trailingExpanded = false, - this.alignment = Alignment.center, - this.padding, - this.backgroundColor, - this.foregroundColor, - this.leadingGap, - this.trailingGap, - this.height, - this.surfaceBlur, - this.surfaceOpacity, - this.useSafeArea = false, - }); - - void onDrag(WidgetRef ref) { - final systemTitleBar = - ref.read(userPreferencesProvider.select((s) => s.systemTitleBar)); - if (kIsDesktop && !systemTitleBar) { - windowManager.startDragging(); - } - } - - @override - Widget build(BuildContext context, ref) { - final hasLeadingOrCanPop = leading.isNotEmpty || Navigator.canPop(context); - final lastClicked = useRef(DateTime.now().millisecondsSinceEpoch); - - return SizedBox( - height: height ?? (48 * context.theme.scaling), - child: LayoutBuilder( - builder: (context, constraints) { - final hasFullscreen = - MediaQuery.sizeOf(context).width == constraints.maxWidth; - - final canPop = leading.isEmpty && - automaticallyImplyLeading && - (Navigator.canPop(context) || context.watchRouter.canPop()); - - return GestureDetector( - onHorizontalDragStart: (_) => onDrag(ref), - onVerticalDragStart: (_) => onDrag(ref), - onTapDown: (details) async { - final systemTitlebar = ref.read( - userPreferencesProvider.select((s) => s.systemTitleBar)); - if (!kIsDesktop || systemTitlebar) return; - - int currMills = DateTime.now().millisecondsSinceEpoch; - - if ((currMills - lastClicked.value) < 500) { - if (await windowManager.isMaximized()) { - await windowManager.unmaximize(); - } else { - await windowManager.maximize(); - } - } else { - lastClicked.value = currMills; - } - }, - child: AppBar( - leading: canPop ? [const BackButton()] : leading, - trailing: [ - ...trailing, - Align( - alignment: Alignment.topRight, - child: - WindowTitleBarButtons(foregroundColor: foregroundColor), - ), - ], - title: title, - header: header, - subtitle: subtitle, - trailingExpanded: trailingExpanded, - alignment: alignment, - padding: padding ?? EdgeInsets.zero, - backgroundColor: backgroundColor, - leadingGap: leadingGap, - trailingGap: trailingGap, - height: height ?? (48 * context.theme.scaling), - surfaceBlur: surfaceBlur, - surfaceOpacity: surfaceOpacity, - useSafeArea: useSafeArea, - child: child, - ).withPadding( - left: kIsMacOS && hasFullscreen && hasLeadingOrCanPop ? 65 : 0), - ); - }, - ), - ); - } - - @override - Size get preferredSize => Size.fromHeight(height ?? 48); -} diff --git a/lib/components/titlebar/titlebar_buttons.dart b/lib/components/titlebar/titlebar_buttons.dart deleted file mode 100644 index 30d88508..00000000 --- a/lib/components/titlebar/titlebar_buttons.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/components/hover_builder.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/titlebar/titlebar_icon_buttons.dart'; - -import 'package:spotube/hooks/configurators/use_window_listener.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:titlebar_buttons/titlebar_buttons.dart'; -import 'package:window_manager/window_manager.dart'; - -class WindowTitleBarButtons extends HookConsumerWidget { - final Color? foregroundColor; - const WindowTitleBarButtons({ - super.key, - this.foregroundColor, - }); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final isMaximized = useState(null); - const type = ThemeType.auto; - - Future onClose() async { - await windowManager.close(); - } - - useWindowListener( - onWindowMaximize: () { - isMaximized.value = true; - }, - onWindowUnmaximize: () { - isMaximized.value = false; - }, - ); - - useEffect(() { - if (kIsDesktop) { - windowManager.isMaximized().then((value) { - isMaximized.value = value; - }); - } - return null; - }, []); - - if (!kTitlebarVisible || preferences.systemTitleBar) { - return const SizedBox.shrink(); - } - - if (kIsWindows) { - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ShadcnWindowButton( - icon: MinimizeIcon(color: context.theme.colorScheme.foreground), - onPressed: windowManager.minimize, - ), - if (isMaximized.value != true) - ShadcnWindowButton( - icon: MaximizeIcon(color: context.theme.colorScheme.foreground), - onPressed: () { - windowManager.maximize(); - isMaximized.value = true; - }, - ) - else - ShadcnWindowButton( - icon: RestoreIcon(color: context.theme.colorScheme.foreground), - onPressed: () { - windowManager.unmaximize(); - isMaximized.value = false; - }, - ), - HoverBuilder(builder: (context, isHovered) { - return ShadcnWindowButton( - icon: CloseIcon( - color: isHovered - ? Colors.white - : context.theme.colorScheme.foreground, - ), - onPressed: onClose, - hoverBackgroundColor: const Color(0xFFD32F2F), - ); - }), - ], - ); - } - - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - DecoratedMinimizeButton( - type: type, - onPressed: windowManager.minimize, - ), - DecoratedMaximizeButton( - type: type, - onPressed: () async { - if (await windowManager.isMaximized()) { - await windowManager.unmaximize(); - isMaximized.value = false; - } else { - await windowManager.maximize(); - isMaximized.value = true; - } - }, - ), - DecoratedCloseButton( - type: type, - onPressed: onClose, - ), - ], - ); - } -} diff --git a/lib/components/titlebar/titlebar_icon_buttons.dart b/lib/components/titlebar/titlebar_icon_buttons.dart deleted file mode 100644 index 0a3f6178..00000000 --- a/lib/components/titlebar/titlebar_icon_buttons.dart +++ /dev/null @@ -1,155 +0,0 @@ -import 'dart:math'; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -class ShadcnWindowButton extends StatelessWidget { - final Widget icon; - final VoidCallback onPressed; - final Color? hoverBackgroundColor; - - const ShadcnWindowButton({ - super.key, - required this.icon, - required this.onPressed, - this.hoverBackgroundColor, - }); - - @override - Widget build(BuildContext context) { - return SizedBox( - width: 45, - height: 32, - child: IconButton( - variance: ButtonVariance.ghost.copyWith( - decoration: (context, states, value) { - final decoration = ButtonVariance.ghost.decoration(context, states) - as BoxDecoration; - if (hoverBackgroundColor != null && - states.contains(WidgetState.hovered)) { - return decoration.copyWith( - borderRadius: BorderRadius.zero, - color: hoverBackgroundColor, - ); - } - - return decoration.copyWith( - borderRadius: BorderRadius.zero, - ); - }, - ), - icon: icon, - onPressed: onPressed, - ), - ); - } -} - -/// Close -class CloseIcon extends StatelessWidget { - final Color color; - const CloseIcon({super.key, required this.color}); - @override - Widget build(BuildContext context) => Align( - alignment: Alignment.topLeft, - child: Stack(children: [ - // Use rotated containers instead of a painter because it renders slightly crisper than a painter for some reason. - Transform.rotate( - angle: pi * .25, - child: - Center(child: Container(width: 14, height: 1, color: color))), - Transform.rotate( - angle: pi * -.25, - child: - Center(child: Container(width: 14, height: 1, color: color))), - ]), - ); -} - -/// Maximize -class MaximizeIcon extends StatelessWidget { - final Color color; - const MaximizeIcon({super.key, required this.color}); - @override - Widget build(BuildContext context) => _AlignedPaint(_MaximizePainter(color)); -} - -class _MaximizePainter extends _IconPainter { - _MaximizePainter(super.color); - @override - void paint(Canvas canvas, Size size) { - Paint p = getPaint(color); - canvas.drawRect(Rect.fromLTRB(0, 0, size.width - 1, size.height - 1), p); - } -} - -/// Restore -class RestoreIcon extends StatelessWidget { - final Color color; - const RestoreIcon({ - super.key, - required this.color, - }); - @override - Widget build(BuildContext context) => _AlignedPaint(_RestorePainter(color)); -} - -class _RestorePainter extends _IconPainter { - _RestorePainter(super.color); - @override - void paint(Canvas canvas, Size size) { - Paint p = getPaint(color); - canvas.drawRect(Rect.fromLTRB(0, 2, size.width - 2, size.height), p); - canvas.drawLine(const Offset(2, 2), const Offset(2, 0), p); - canvas.drawLine(const Offset(2, 0), Offset(size.width, 0), p); - canvas.drawLine( - Offset(size.width, 0), Offset(size.width, size.height - 2), p); - canvas.drawLine(Offset(size.width, size.height - 2), - Offset(size.width - 2, size.height - 2), p); - } -} - -/// Minimize -class MinimizeIcon extends StatelessWidget { - final Color color; - const MinimizeIcon({super.key, required this.color}); - @override - Widget build(BuildContext context) => _AlignedPaint(_MinimizePainter(color)); -} - -class _MinimizePainter extends _IconPainter { - _MinimizePainter(super.color); - @override - void paint(Canvas canvas, Size size) { - Paint p = getPaint(color); - canvas.drawLine( - Offset(0, size.height / 2), Offset(size.width, size.height / 2), p); - } -} - -/// Helpers -abstract class _IconPainter extends CustomPainter { - _IconPainter(this.color); - final Color color; - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) => false; -} - -class _AlignedPaint extends StatelessWidget { - const _AlignedPaint(this.painter); - final CustomPainter painter; - - @override - Widget build(BuildContext context) { - return Align( - alignment: Alignment.center, - child: CustomPaint(size: const Size(10, 10), painter: painter), - ); - } -} - -Paint getPaint(Color color, [bool isAntiAlias = false]) => Paint() - ..color = color - ..style = PaintingStyle.stroke - ..isAntiAlias = isAntiAlias - ..strokeWidth = 1; diff --git a/lib/components/track_presentation/presentation_actions.dart b/lib/components/track_presentation/presentation_actions.dart deleted file mode 100644 index 61202a48..00000000 --- a/lib/components/track_presentation/presentation_actions.dart +++ /dev/null @@ -1,234 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/adaptive/adaptive_pop_sheet_list.dart'; -import 'package:spotube/components/dialogs/confirm_download_dialog.dart'; -import 'package:spotube/components/dialogs/playlist_add_track_dialog.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/presentation_state.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; -import 'package:spotube/provider/history/history.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; - -ToastOverlay showToastForAction( - BuildContext context, - String action, - int count, -) { - final message = switch (action) { - "download" => (context.l10n.download_count(count), SpotubeIcons.download), - "add-to-playlist" => ( - context.l10n.add_count_to_playlist(count), - SpotubeIcons.playlistAdd - ), - "add-to-queue" => ( - context.l10n.add_count_to_queue(count), - SpotubeIcons.queueAdd - ), - "play-next" => ( - context.l10n.play_count_next(count), - SpotubeIcons.lightning - ), - _ => ("", SpotubeIcons.error), - }; - - return showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - leading: Icon(message.$2), - title: Text(message.$1), - leadingAlignment: Alignment.center, - trailing: IconButton.ghost( - size: ButtonSize.small, - icon: const Icon(SpotubeIcons.close), - onPressed: () { - overlay.close(); - }, - ), - ), - ); - }, - ); -} - -class TrackPresentationActionsSection extends HookConsumerWidget { - const TrackPresentationActionsSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final options = TrackPresentationOptions.of(context); - - ref.watch(downloadManagerProvider); - final downloader = ref.watch(downloadManagerProvider.notifier); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final historyNotifier = ref.watch(playbackHistoryActionsProvider); - - final state = ref.watch(presentationStateProvider(options.collection)); - final notifier = - ref.watch(presentationStateProvider(options.collection).notifier); - final selectedTracks = state.selectedTracks; - - Future actionDownloadTracks({ - required BuildContext context, - required List tracks, - required String action, - }) async { - final fullTrackObjects = - tracks.whereType().toList(); - final confirmed = await showDialog( - context: context, - builder: (context) { - return const ConfirmDownloadDialog(); - }, - ) ?? - false; - if (confirmed != true) return; - downloader.addAllToQueue(fullTrackObjects); - notifier.deselectAllTracks(); - if (!context.mounted) return; - showToastForAction(context, action, fullTrackObjects.length); - } - - return AdaptivePopSheetList( - tooltip: context.l10n.more_actions, - headings: [ - Text( - context.l10n.more_actions, - style: context.theme.typography.large, - ), - ], - onSelected: (action) async { - var tracks = selectedTracks; - - if (selectedTracks.isEmpty) { - tracks = await options.pagination.onFetchAll(); - - notifier.selectAllTracks(); - } - - if (!context.mounted) return; - - switch (action) { - case "download": - await actionDownloadTracks( - context: context, - tracks: tracks, - action: action, - ); - break; - case "add-to-playlist": - { - if (context.mounted) { - final worked = await showDialog( - context: context, - builder: (context) { - return PlaylistAddTrackDialog( - openFromPlaylist: options.collectionId, - tracks: tracks.toList(), - ); - }, - ); - - if (!context.mounted || worked != true) return; - showToastForAction(context, action, tracks.length); - } - break; - } - case "play-next": - { - playlistNotifier.addTracksAtFirst(tracks); - playlistNotifier.addCollection(options.collectionId); - if (options.collection is SpotubeSimpleAlbumObject) { - historyNotifier.addAlbums( - [options.collection as SpotubeSimpleAlbumObject]); - } else { - historyNotifier.addPlaylists( - [options.collection as SpotubeSimplePlaylistObject]); - } - notifier.deselectAllTracks(); - if (!context.mounted) return; - showToastForAction(context, action, tracks.length); - break; - } - case "add-to-queue": - { - playlistNotifier.addTracks(tracks); - playlistNotifier.addCollection(options.collectionId); - if (options.collection is SpotubeSimpleAlbumObject) { - historyNotifier.addAlbums( - [options.collection as SpotubeSimpleAlbumObject]); - } else { - historyNotifier.addPlaylists( - [options.collection as SpotubeSimplePlaylistObject]); - } - notifier.deselectAllTracks(); - if (!context.mounted) return; - showToastForAction(context, action, tracks.length); - break; - } - default: - } - - if (!context.mounted) return; - }, - icon: const Icon(SpotubeIcons.moreVertical), - variance: ButtonVariance.outline, - items: (context) => [ - AdaptiveMenuButton( - value: "download", - leading: const Icon(SpotubeIcons.download), - child: selectedTracks.isEmpty || - selectedTracks.length == options.tracks.length - ? Text( - context.l10n.download_all, - ) - : Text( - context.l10n.download_count(selectedTracks.length), - ), - ), - AdaptiveMenuButton( - value: "add-to-playlist", - leading: const Icon(SpotubeIcons.playlistAdd), - child: selectedTracks.isEmpty || - selectedTracks.length == options.tracks.length - ? Text( - context.l10n.add_all_to_playlist, - ) - : Text( - context.l10n.add_count_to_playlist(selectedTracks.length), - ), - ), - AdaptiveMenuButton( - value: "add-to-queue", - leading: const Icon(SpotubeIcons.queueAdd), - child: selectedTracks.isEmpty || - selectedTracks.length == options.tracks.length - ? Text( - context.l10n.add_all_to_queue, - ) - : Text( - context.l10n.add_count_to_queue(selectedTracks.length), - ), - ), - AdaptiveMenuButton( - value: "play-next", - leading: const Icon(SpotubeIcons.lightning), - child: selectedTracks.isEmpty || - selectedTracks.length == options.tracks.length - ? Text( - context.l10n.play_all_next, - ) - : Text( - context.l10n.play_count_next(selectedTracks.length), - ), - ), - ], - ); - } -} diff --git a/lib/components/track_presentation/presentation_list.dart b/lib/components/track_presentation/presentation_list.dart deleted file mode 100644 index 19772c7c..00000000 --- a/lib/components/track_presentation/presentation_list.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/presentation_state.dart'; -import 'package:spotube/components/track_presentation/use_track_tile_play_callback.dart'; -import 'package:spotube/components/track_tile/track_tile.dart'; -import 'package:spotube/components/track_presentation/use_is_user_playlist.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -class PresentationListSection extends HookConsumerWidget { - const PresentationListSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final options = TrackPresentationOptions.of(context); - final playlist = ref.watch(audioPlayerProvider); - final state = ref.watch(presentationStateProvider(options.collection)); - final notifier = - ref.read(presentationStateProvider(options.collection).notifier); - final isUserPlaylist = useIsUserPlaylist(ref, options.collectionId); - - final onTileTap = useTrackTilePlayCallback(ref); - - if (state.presentationTracks.isEmpty && !options.pagination.isLoading) { - if (options.error != null) { - return SliverToBoxAdapter( - child: Center( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: ErrorBox( - error: options.error!, - onRetry: options.pagination.onRefresh, - ), - ), - ), - ); - } - return SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Undraw( - illustration: UndrawIllustration.dreamer, - color: context.theme.colorScheme.primary, - height: 200 * context.theme.scaling, - ), - Text( - isUserPlaylist - ? context.l10n.no_tracks_added_yet - : context.l10n.no_tracks, - textAlign: TextAlign.center, - ).muted().small(), - ], - ), - ), - ); - } - - return SliverInfiniteList( - isLoading: options.pagination.isLoading, - onFetchData: options.pagination.onFetchMore, - itemCount: state.presentationTracks.length, - hasReachedMax: !options.pagination.hasNextPage, - loadingBuilder: (context) { - return Skeletonizer( - enabled: true, - child: TrackTile( - index: 0, - playlist: playlist, - track: FakeData.track, - ), - ); - }, - emptyBuilder: (context) => Skeletonizer( - enabled: true, - child: Column( - children: List.generate( - 10, - (index) => TrackTile( - track: FakeData.track, - index: index, - playlist: playlist, - ), - ), - ), - ), - itemBuilder: (context, index) => HookBuilder(builder: (context) { - final track = state.presentationTracks[index]; - final isSelected = useMemoized( - () => state.selectedTracks.any((e) => e.id == track.id), - [track.id, state.selectedTracks], - ); - return TrackTile( - userPlaylist: isUserPlaylist, - playlistId: options.collectionId, - index: index, - playlist: playlist, - track: track, - selected: isSelected, - onTap: () => onTileTap(track, index), - onChanged: state.selectedTracks.isEmpty - ? null - : (isSelected) { - if (isSelected == true) { - notifier.selectTrack(track); - } else { - notifier.deselectTrack(track); - } - }, - onLongPress: () { - notifier.selectTrack(track); - HapticFeedback.selectionClick(); - }, - ); - }), - ); - } -} diff --git a/lib/components/track_presentation/presentation_modifiers.dart b/lib/components/track_presentation/presentation_modifiers.dart deleted file mode 100644 index 42c3cb4f..00000000 --- a/lib/components/track_presentation/presentation_modifiers.dart +++ /dev/null @@ -1,131 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/track_presentation/sort_tracks_dropdown.dart'; -import 'package:spotube/components/track_presentation/presentation_actions.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/presentation_state.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_shadcn_text_editing_controller.dart'; - -class TrackPresentationModifiersSection extends HookConsumerWidget { - final FocusNode? focusNode; - const TrackPresentationModifiersSection({ - super.key, - this.focusNode, - }); - - @override - Widget build(BuildContext context, ref) { - final options = TrackPresentationOptions.of(context); - final state = ref.watch(presentationStateProvider(options.collection)); - final notifier = ref.watch( - presentationStateProvider(options.collection).notifier, - ); - - final controller = useShadcnTextEditingController(); - final scale = context.theme.scaling; - - return LayoutBuilder(builder: (context, constrains) { - return Padding( - padding: EdgeInsets.symmetric( - horizontal: (constrains.mdAndUp ? 16 : 8) * scale, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Checkbox( - state: state.selectedTracks.length == options.tracks.length - ? CheckboxState.checked - : CheckboxState.unchecked, - onChanged: (value) { - if (value == CheckboxState.checked) { - notifier.selectAllTracks(); - } else { - notifier.deselectAllTracks(); - } - }, - ), - ], - ), - Flexible( - child: Row( - mainAxisSize: MainAxisSize.min, - spacing: 8, - children: [ - Flexible( - child: ConstrainedBox( - constraints: BoxConstraints( - maxWidth: 320 * scale, - maxHeight: 38 * scale, - ), - child: TextField( - controller: controller, - focusNode: focusNode, - placeholder: Text(context.l10n.search_tracks), - onChanged: (value) { - if (value.isEmpty) { - notifier.clearFilter(); - } else { - notifier.filterTracks(value); - } - }, - features: [ - InputFeature.leading( - Icon( - SpotubeIcons.search, - color: context.theme.colorScheme.mutedForeground, - ), - ), - InputFeature.trailing( - ListenableBuilder( - listenable: controller, - builder: (context, _) { - return AnimatedCrossFade( - duration: const Duration(milliseconds: 300), - crossFadeState: controller.text.isEmpty - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - firstChild: - const SizedBox.square(dimension: 20), - secondChild: AnimatedScale( - duration: - const Duration(milliseconds: 300), - scale: controller.text.isEmpty ? 0 : 1, - child: IconButton.ghost( - size: const ButtonSize(.6), - icon: const Icon(SpotubeIcons.close), - onPressed: () { - controller.clear(); - notifier.clearFilter(); - }, - ), - ), - ); - }), - ) - ], - ), - ), - ), - SortTracksDropdown( - value: state.sortBy, - onChanged: (value) { - notifier.sortTracks(value); - }, - ), - const TrackPresentationActionsSection(), - ], - ), - ), - ], - ), - ); - }); - } -} diff --git a/lib/components/track_presentation/presentation_props.dart b/lib/components/track_presentation/presentation_props.dart deleted file mode 100644 index 1992487f..00000000 --- a/lib/components/track_presentation/presentation_props.dart +++ /dev/null @@ -1,113 +0,0 @@ -import 'dart:async'; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class PaginationProps { - final bool hasNextPage; - final bool isLoading; - final VoidCallback onFetchMore; - final Future Function() onRefresh; - final Future> Function() onFetchAll; - - const PaginationProps({ - required this.hasNextPage, - required this.isLoading, - required this.onFetchMore, - required this.onFetchAll, - required this.onRefresh, - }); - - @override - operator ==(Object other) { - return other is PaginationProps && - other.hasNextPage == hasNextPage && - other.isLoading == isLoading && - other.onFetchMore == onFetchMore && - other.onFetchAll == onFetchAll && - other.onRefresh == onRefresh; - } - - @override - int get hashCode => - super.hashCode ^ - hasNextPage.hashCode ^ - isLoading.hashCode ^ - onFetchMore.hashCode ^ - onFetchAll.hashCode ^ - onRefresh.hashCode; -} - -class TrackPresentationOptions { - final Object collection; - final String title; - final String? description; - final String? owner; - final String? ownerImage; - final String image; - final String routePath; - final List tracks; - final PaginationProps pagination; - final bool isLiked; - final String? shareUrl; - final Object? error; - - // events - final FutureOr Function()? onHeart; // if null heart button will hidden - - const TrackPresentationOptions({ - required this.collection, - required this.title, - this.description, - this.owner, - this.ownerImage, - required this.image, - required this.tracks, - required this.pagination, - required this.routePath, - this.shareUrl, - this.isLiked = false, - this.onHeart, - this.error, - }) : assert(collection is SpotubeSimpleAlbumObject || - collection is SpotubeSimplePlaylistObject); - - String get collectionId => collection is SpotubeSimpleAlbumObject - ? (collection as SpotubeSimpleAlbumObject).id - : (collection as SpotubeSimplePlaylistObject).id; - - static TrackPresentationOptions of(BuildContext context) { - return Data.of(context); - } - - @override - operator ==(Object other) { - return other is TrackPresentationOptions && - other.collection == collection && - other.title == title && - other.description == description && - other.image == image && - other.routePath == routePath && - other.tracks == tracks && - other.pagination == pagination && - other.isLiked == isLiked && - other.shareUrl == shareUrl && - other.onHeart == onHeart && - other.error == error; - } - - @override - int get hashCode => - super.hashCode ^ - collection.hashCode ^ - title.hashCode ^ - description.hashCode ^ - image.hashCode ^ - routePath.hashCode ^ - tracks.hashCode ^ - pagination.hashCode ^ - isLiked.hashCode ^ - shareUrl.hashCode ^ - onHeart.hashCode ^ - error.hashCode; -} diff --git a/lib/components/track_presentation/presentation_state.dart b/lib/components/track_presentation/presentation_state.dart deleted file mode 100644 index 32b7353a..00000000 --- a/lib/components/track_presentation/presentation_state.dart +++ /dev/null @@ -1,180 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/pages/library/user_local_tracks/user_local_tracks.dart'; -import 'package:spotube/provider/metadata_plugin/library/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/album.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/playlist.dart'; -import 'package:spotube/utils/service_utils.dart'; - -class PresentationState { - final List selectedTracks; - final List presentationTracks; - final SortBy sortBy; - - const PresentationState({ - required this.selectedTracks, - required this.presentationTracks, - required this.sortBy, - }); - - PresentationState copyWith({ - List? selectedTracks, - List? presentationTracks, - SortBy? sortBy, - }) { - return PresentationState( - selectedTracks: selectedTracks ?? this.selectedTracks, - presentationTracks: presentationTracks ?? this.presentationTracks, - sortBy: sortBy ?? this.sortBy, - ); - } -} - -class PresentationStateNotifier - extends AutoDisposeFamilyNotifier { - @override - PresentationState build(collection) { - if (arg case SpotubeSimplePlaylistObject() || SpotubeSimpleAlbumObject()) { - if (isSavedTrackPlaylist) { - ref.listen( - metadataPluginSavedTracksProvider, - (previous, next) { - next.whenData((value) { - state = state.copyWith( - presentationTracks: ServiceUtils.sortTracks( - value.items, - state.sortBy, - ), - ); - }); - }, - ); - } else { - ref.listen( - arg is SpotubeSimplePlaylistObject - ? metadataPluginPlaylistTracksProvider( - (arg as SpotubeSimplePlaylistObject).id) - : metadataPluginAlbumTracksProvider( - (arg as SpotubeSimpleAlbumObject).id), - (previous, next) { - next.whenData((value) { - state = state.copyWith( - presentationTracks: ServiceUtils.sortTracks( - value.items, - state.sortBy, - ), - ); - }); - }, - ); - } - } - - return PresentationState( - selectedTracks: [], - presentationTracks: tracks, - sortBy: SortBy.none, - ); - } - - bool get isSavedTrackPlaylist => - arg is SpotubeSimplePlaylistObject && - (arg as SpotubeSimplePlaylistObject).id == "user-liked-tracks"; - - List get tracks { - assert( - arg is SpotubeSimplePlaylistObject || arg is SpotubeSimpleAlbumObject, - "arg must be SpotubeSimplePlaylistObject or SpotubeSimpleAlbumObject", - ); - - final isPlaylist = arg is SpotubeSimplePlaylistObject; - - final tracks = switch ((isPlaylist, isSavedTrackPlaylist)) { - (true, true) => - ref.read(metadataPluginSavedTracksProvider).asData?.value.items, - (true, false) => ref - .read(metadataPluginPlaylistTracksProvider( - (arg as SpotubeSimplePlaylistObject).id)) - .asData - ?.value - .items, - _ => ref - .read(metadataPluginAlbumTracksProvider( - (arg as SpotubeSimpleAlbumObject).id)) - .asData - ?.value - .items, - } ?? - []; - - return tracks; - } - - void selectTrack(SpotubeTrackObject track) { - if (state.selectedTracks.any((e) => e.id == track.id)) { - return; - } - - state = state.copyWith( - selectedTracks: [...state.selectedTracks, track], - ); - } - - void selectAllTracks() { - state = state.copyWith( - selectedTracks: tracks, - ); - } - - void deselectTrack(SpotubeTrackObject track) { - state = state.copyWith( - selectedTracks: state.selectedTracks.where((e) => e != track).toList(), - ); - } - - void deselectAllTracks() { - state = state.copyWith( - selectedTracks: [], - ); - } - - void filterTracks(String query) { - if (query.isEmpty) { - return; - } - - state = state.copyWith( - presentationTracks: ServiceUtils.sortTracks( - tracks - .map((e) => (weightedRatio(e.name, query), e)) - .sorted((a, b) => b.$1.compareTo(a.$1)) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList(), - state.sortBy, - ), - ); - } - - void clearFilter() { - state = state.copyWith( - presentationTracks: ServiceUtils.sortTracks(tracks, state.sortBy), - ); - } - - void sortTracks(SortBy sortBy) { - state = state.copyWith( - presentationTracks: sortBy == SortBy.none - ? tracks - : ServiceUtils.sortTracks(state.presentationTracks, sortBy), - sortBy: sortBy, - ); - } -} - -final presentationStateProvider = AutoDisposeNotifierProviderFamily< - PresentationStateNotifier, PresentationState, Object>( - () => PresentationStateNotifier(), -); diff --git a/lib/components/track_presentation/presentation_top.dart b/lib/components/track_presentation/presentation_top.dart deleted file mode 100644 index d2576cc0..00000000 --- a/lib/components/track_presentation/presentation_top.dart +++ /dev/null @@ -1,261 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/services.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/heart_button/heart_button.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/use_action_callbacks.dart'; -import 'package:spotube/components/track_presentation/use_is_user_playlist.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/playlist/playlist_create_dialog.dart'; - -class TrackPresentationTopSection extends HookConsumerWidget { - const TrackPresentationTopSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.sizeOf(context); - final options = TrackPresentationOptions.of(context); - final scale = context.theme.scaling; - final isUserPlaylist = useIsUserPlaylist(ref, options.collectionId); - - final decorationImage = DecorationImage( - image: UniversalImage.imageProvider(options.image), - fit: BoxFit.cover, - ); - - final imageDimension = mediaQuery.mdAndUp ? 200 : 120; - - final (:isLoading, :isActive, :onPlay, :onShuffle, :onAddToQueue) = - useActionCallbacks(ref); - - final playbackActions = Row( - spacing: 8 * scale, - children: [ - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.shuffle_playlist), - ).call, - child: IconButton.secondary( - icon: isLoading - ? const Center( - child: - CircularProgressIndicator(onSurface: false, size: 20), - ) - : const Icon(SpotubeIcons.shuffle), - enabled: !isLoading && !isActive, - onPressed: onShuffle, - ), - ), - if (mediaQuery.width <= 320) - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.add_to_queue), - ).call, - child: IconButton.secondary( - icon: const Icon(SpotubeIcons.queueAdd), - enabled: !isLoading && !isActive, - onPressed: onAddToQueue, - ), - ) - else - Button.secondary( - leading: const Icon(SpotubeIcons.add), - enabled: !isLoading && !isActive, - onPressed: onAddToQueue, - child: Text(context.l10n.queue), - ), - Button.primary( - alignment: Alignment.center, - leading: switch ((isActive, isLoading)) { - (true, false) => const Icon(SpotubeIcons.pause), - (false, true) => const Center( - child: CircularProgressIndicator(onSurface: true, size: 18), - ), - _ => const Icon(SpotubeIcons.play), - }, - onPressed: onPlay, - enabled: !isLoading && !isActive, - child: isActive ? Text(context.l10n.pause) : Text(context.l10n.play), - ), - ], - ); - - final additionalActions = Row( - spacing: 8 * scale, - children: [ - if (isUserPlaylist) - IconButton.outline( - size: ButtonSize.small, - icon: const Icon(SpotubeIcons.edit), - onPressed: () { - showDialog( - context: context, - builder: (context) { - return PlaylistCreateDialog( - playlistId: options.collectionId, - trackIds: options.tracks.map((e) => e.id).toList(), - ); - }, - ); - }, - ), - if (options.shareUrl != null) - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.share), - ).call, - child: IconButton.outline( - icon: const Icon(SpotubeIcons.share), - size: ButtonSize.small, - onPressed: () async { - await Clipboard.setData( - ClipboardData(text: options.shareUrl!), - ); - - if (!context.mounted) return; - - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n - .copied_shareurl_to_clipboard(options.shareUrl!), - ).small(), - ); - }, - ); - }, - ), - ), - if (options.onHeart != null) - HeartButton( - isLiked: options.isLiked, - tooltip: options.isLiked - ? context.l10n.remove_from_favorites - : context.l10n.save_as_favorite, - variance: ButtonVariance.outline, - size: ButtonSize.small, - onPressed: options.onHeart, - ), - ], - ); - - return SliverMainAxisGroup( - slivers: [ - if (mediaQuery.mdAndUp) SliverGap(16 * scale), - SliverPadding( - padding: EdgeInsets.symmetric( - horizontal: (mediaQuery.mdAndUp ? 16 : 8.0) * scale, - ), - sliver: SliverList.list( - children: [ - DecoratedBox( - decoration: BoxDecoration( - image: decorationImage, - borderRadius: BorderRadius.circular(45), - ), - child: OutlinedContainer( - surfaceOpacity: context.theme.surfaceOpacity, - surfaceBlur: context.theme.surfaceBlur, - padding: EdgeInsets.all(24 * scale), - borderRadius: BorderRadius.circular(22 * scale), - borderWidth: 2, - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 16 * scale, - children: [ - Row( - spacing: 16 * scale, - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Container( - height: imageDimension * scale, - width: imageDimension * scale, - decoration: BoxDecoration( - borderRadius: context.theme.borderRadiusXl, - image: decorationImage, - ), - ), - Flexible( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AutoSizeText( - options.title, - maxLines: 2, - minFontSize: 16, - style: context.theme.typography.h3, - ), - if (options.description != null) - AutoSizeText( - options.description!, - maxLines: 2, - minFontSize: 14, - maxFontSize: 18, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: context - .theme.colorScheme.mutedForeground, - fontSize: 18, - ), - ), - const Gap(16), - Flex( - crossAxisAlignment: CrossAxisAlignment.start, - direction: mediaQuery.smAndUp - ? Axis.horizontal - : Axis.vertical, - spacing: 8 * scale, - children: [ - if (options.owner != null) - OutlineBadge( - leading: options.ownerImage != null - ? Avatar( - initials: - options.owner?[0] ?? "U", - provider: UniversalImage - .imageProvider( - options.ownerImage!, - ), - size: 20 * scale, - ) - : null, - child: Text( - options.owner!, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ).small(), - ), - additionalActions, - ], - ), - if (mediaQuery.mdAndUp) ...[ - const Gap(16), - playbackActions - ], - ], - ), - ), - ], - ), - if (mediaQuery.smAndDown) playbackActions, - ], - ), - ), - ), - ], - ), - ) - ], - ); - } -} diff --git a/lib/components/track_presentation/sort_tracks_dropdown.dart b/lib/components/track_presentation/sort_tracks_dropdown.dart deleted file mode 100644 index 0a07cbad..00000000 --- a/lib/components/track_presentation/sort_tracks_dropdown.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/pages/library/user_local_tracks/user_local_tracks.dart'; -import 'package:spotube/components/adaptive/adaptive_pop_sheet_list.dart'; -import 'package:spotube/extensions/context.dart'; - -class SortTracksDropdown extends StatelessWidget { - final SortBy? value; - final void Function(SortBy)? onChanged; - const SortTracksDropdown({ - this.onChanged, - this.value, - super.key, - }); - - @override - Widget build(BuildContext context) { - return AdaptivePopSheetList( - variance: ButtonVariance.outline, - headings: [ - Text(context.l10n.sort_tracks), - ], - onSelected: onChanged, - tooltip: context.l10n.sort_tracks, - icon: const Icon(SpotubeIcons.sort), - items: (context) => [ - AdaptiveMenuButton( - value: SortBy.none, - enabled: value != SortBy.none, - child: Text(context.l10n.none), - ), - AdaptiveMenuButton( - value: SortBy.ascending, - enabled: value != SortBy.ascending, - child: Text(context.l10n.sort_a_z), - ), - AdaptiveMenuButton( - value: SortBy.descending, - enabled: value != SortBy.descending, - child: Text(context.l10n.sort_z_a), - ), - AdaptiveMenuButton( - value: SortBy.newest, - enabled: value != SortBy.newest, - child: Text(context.l10n.sort_newest), - ), - AdaptiveMenuButton( - value: SortBy.oldest, - enabled: value != SortBy.oldest, - child: Text(context.l10n.sort_oldest), - ), - AdaptiveMenuButton( - value: SortBy.duration, - enabled: value != SortBy.duration, - child: Text(context.l10n.sort_duration), - ), - AdaptiveMenuButton( - value: SortBy.artist, - enabled: value != SortBy.artist, - child: Text(context.l10n.sort_artist), - ), - AdaptiveMenuButton( - value: SortBy.album, - enabled: value != SortBy.album, - child: Text(context.l10n.sort_album), - ), - ], - ); - } -} diff --git a/lib/components/track_presentation/track_presentation.dart b/lib/components/track_presentation/track_presentation.dart deleted file mode 100644 index 2b2a9f6f..00000000 --- a/lib/components/track_presentation/track_presentation.dart +++ /dev/null @@ -1,96 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/track_presentation/presentation_list.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/presentation_top.dart'; -import 'package:spotube/components/track_presentation/presentation_modifiers.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/utils/platform.dart'; - -class TrackPresentation extends HookConsumerWidget { - final TrackPresentationOptions options; - const TrackPresentation({ - super.key, - required this.options, - }); - - @override - Widget build(BuildContext context, ref) { - final scrollController = useScrollController(); - final focusNode = useFocusNode(); - final scale = context.theme.scaling; - - useEffect(() { - if (!kIsMobile) return null; - void listener() { - if (!scrollController.hasClients) return; - - if (focusNode.hasFocus) { - scrollController.animateTo( - 300 * scale, - duration: const Duration(milliseconds: 300), - curve: Curves.easeInOut, - ); - } - } - - focusNode.addListener(listener); - return () { - focusNode.removeListener(listener); - }; - }, [focusNode, scrollController, scale]); - - return Data.inherit( - data: options, - child: SafeArea( - bottom: false, - child: Scaffold( - headers: const [TitleBar()], - child: CustomScrollView( - controller: scrollController, - slivers: [ - const TrackPresentationTopSection(), - const SliverGap(16), - SliverList.list( - children: [ - TrackPresentationModifiersSection( - focusNode: focusNode, - ), - LayoutBuilder(builder: (context, constrains) { - return Basic( - padding: const EdgeInsets.symmetric( - vertical: 8, - horizontal: 16, - ), - leading: constrains.mdAndUp ? const Text(" #") : null, - title: Row( - children: [ - Expanded( - flex: constrains.lgAndUp ? 5 : 6, - child: Text(context.l10n.title), - ), - if (constrains.mdAndUp) - Expanded( - flex: 3, - child: Text(context.l10n.album), - ), - Text(context.l10n.duration), - ], - ), - ).small().muted(); - }), - ], - ), - const PresentationListSection(), - const SliverSafeArea(sliver: SliverGap(10)), - ], - ), - ), - ), - ); - } -} diff --git a/lib/components/track_presentation/use_action_callbacks.dart b/lib/components/track_presentation/use_action_callbacks.dart deleted file mode 100644 index 6707dd36..00000000 --- a/lib/components/track_presentation/use_action_callbacks.dart +++ /dev/null @@ -1,173 +0,0 @@ -import 'dart:math'; - -import 'package:flutter/widgets.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/track_presentation/presentation_actions.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; - -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/history/history.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; - -typedef UseActionCallbacks = ({ - bool isActive, - bool isLoading, - Future Function() onShuffle, - Future Function() onPlay, - VoidCallback onAddToQueue, -}); - -UseActionCallbacks useActionCallbacks(WidgetRef ref) { - final isLoading = useState(false); - final context = useContext(); - final options = TrackPresentationOptions.of(context); - final playlist = ref.watch(audioPlayerProvider); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final historyNotifier = ref.watch(playbackHistoryActionsProvider); - - final isActive = useMemoized( - () => playlist.collections.contains(options.collectionId), - [playlist.collections, options.collectionId], - ); - - final onShuffle = useCallback(() async { - try { - isLoading.value = true; - - final initialTracks = options.tracks; - if (!context.mounted) return; - - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - if (isRemoteDevice == null) return; - if (isRemoteDevice) { - final allTracks = await options.pagination.onFetchAll(); - final remotePlayback = ref.read(connectProvider.notifier); - await remotePlayback.load( - options.collection is SpotubeSimpleAlbumObject - ? WebSocketLoadEventData.album( - tracks: allTracks, - collection: options.collection as SpotubeSimpleAlbumObject, - initialIndex: Random().nextInt(allTracks.length)) - : WebSocketLoadEventData.playlist( - tracks: allTracks, - collection: options.collection as SpotubeSimplePlaylistObject, - initialIndex: Random().nextInt(allTracks.length), - ), - ); - await remotePlayback.setShuffle(true); - } else { - await playlistNotifier.load( - initialTracks, - autoPlay: true, - initialIndex: Random().nextInt(initialTracks.length), - ); - await audioPlayer.setShuffle(true); - playlistNotifier.addCollection(options.collectionId); - if (options.collection is SpotubeSimpleAlbumObject) { - historyNotifier - .addAlbums([options.collection as SpotubeSimpleAlbumObject]); - } else { - historyNotifier.addPlaylists( - [options.collection as SpotubeSimplePlaylistObject]); - } - - final allTracks = await options.pagination.onFetchAll(); - - await playlistNotifier.addTracks( - allTracks.sublist(initialTracks.length), - ); - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - rethrow; - } finally { - isLoading.value = false; - } - }, [options, playlistNotifier, historyNotifier]); - - final onPlay = useCallback(() async { - try { - isLoading.value = true; - - final initialTracks = options.tracks; - - if (!context.mounted) return; - - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - if (isRemoteDevice == null) return; - if (isRemoteDevice) { - final allTracks = await options.pagination.onFetchAll(); - - final remotePlayback = ref.read(connectProvider.notifier); - await remotePlayback.load( - options.collection is SpotubeSimpleAlbumObject - ? WebSocketLoadEventData.album( - tracks: allTracks, - collection: options.collection as SpotubeSimpleAlbumObject, - ) - : WebSocketLoadEventData.playlist( - tracks: allTracks, - collection: options.collection as SpotubeSimplePlaylistObject, - ), - ); - } else { - if (initialTracks.isEmpty) return; - - await playlistNotifier.load(initialTracks, autoPlay: true); - playlistNotifier.addCollection(options.collectionId); - - if (options.collection is SpotubeSimpleAlbumObject) { - historyNotifier.addAlbums( - [options.collection as SpotubeSimpleAlbumObject], - ); - } else { - historyNotifier.addPlaylists( - [options.collection as SpotubeSimplePlaylistObject], - ); - } - - final allTracks = await options.pagination.onFetchAll(); - - await playlistNotifier.addTracks( - allTracks.sublist(initialTracks.length), - ); - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - rethrow; - } finally { - if (context.mounted) { - isLoading.value = false; - } - } - }, [options, playlistNotifier, historyNotifier]); - - final onAddToQueue = useCallback(() { - final tracks = options.tracks; - playlistNotifier.addTracks(tracks); - playlistNotifier.addCollection(options.collectionId); - if (options.collection is SpotubeSimpleAlbumObject) { - historyNotifier - .addAlbums([options.collection as SpotubeSimpleAlbumObject]); - } else { - historyNotifier - .addPlaylists([options.collection as SpotubeSimplePlaylistObject]); - } - if (!context.mounted) return; - showToastForAction(context, "add-to-queue", tracks.length); - }, [options, playlistNotifier, historyNotifier]); - - return ( - isActive: isActive, - isLoading: isLoading.value, - onShuffle: onShuffle, - onPlay: onPlay, - onAddToQueue: onAddToQueue, - ); -} diff --git a/lib/components/track_presentation/use_is_user_playlist.dart b/lib/components/track_presentation/use_is_user_playlist.dart deleted file mode 100644 index 8792f6e7..00000000 --- a/lib/components/track_presentation/use_is_user_playlist.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; - -bool useIsUserPlaylist(WidgetRef ref, String playlistId) { - final userPlaylistsQuery = ref.watch(metadataPluginSavedPlaylistsProvider); - final me = ref.watch(metadataPluginUserProvider); - - return useMemoized( - () => - userPlaylistsQuery.asData?.value.items.any((e) => - e.id == playlistId && - me.asData?.value != null && - e.owner.id == me.asData?.value?.id) ?? - false, - [userPlaylistsQuery.asData?.value, playlistId, me.asData?.value], - ); -} diff --git a/lib/components/track_presentation/use_track_tile_play_callback.dart b/lib/components/track_presentation/use_track_tile_play_callback.dart deleted file mode 100644 index 99f44f1e..00000000 --- a/lib/components/track_presentation/use_track_tile_play_callback.dart +++ /dev/null @@ -1,93 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/presentation_state.dart'; -import 'package:spotube/extensions/list.dart'; - -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/history/history.dart'; - -Future Function(SpotubeTrackObject track, int index) - useTrackTilePlayCallback( - WidgetRef ref, -) { - final context = useContext(); - final options = TrackPresentationOptions.of(context); - final playlist = ref.watch(audioPlayerProvider); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final historyNotifier = ref.watch(playbackHistoryActionsProvider); - - final isActive = useMemoized( - () => playlist.collections.contains(options.collectionId), - [playlist.collections, options.collectionId], - ); - - final onTapTrackTile = - useCallback((SpotubeTrackObject track, int index) async { - final state = ref.read(presentationStateProvider(options.collection)); - final notifier = - ref.read(presentationStateProvider(options.collection).notifier); - - if (state.selectedTracks.isNotEmpty) { - if (state.selectedTracks.contains(track)) { - notifier.deselectTrack(track); - } else { - notifier.selectTrack(track); - } - return; - } - - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - if (isRemoteDevice == null) return; - - if (isRemoteDevice) { - final remotePlayback = ref.read(connectProvider.notifier); - final remoteQueue = ref.read(queueProvider); - if (remoteQueue.collections.contains(options.collectionId) || - remoteQueue.tracks.any((s) => s.id == track.id)) { - await playlistNotifier.jumpToTrack(track); - } else { - final tracks = await options.pagination.onFetchAll(); - await remotePlayback.load( - options.collection is SpotubeSimpleAlbumObject - ? WebSocketLoadEventData.album( - tracks: tracks, - collection: options.collection as SpotubeSimpleAlbumObject, - initialIndex: index, - ) - : WebSocketLoadEventData.playlist( - tracks: tracks, - collection: options.collection as SpotubeSimplePlaylistObject, - initialIndex: index, - ), - ); - } - } else { - if (isActive || playlist.tracks.containsBy(track, (a) => a.id)) { - await playlistNotifier.jumpToTrack(track); - } else { - final tracks = await options.pagination.onFetchAll(); - await playlistNotifier.load( - tracks, - initialIndex: index, - autoPlay: true, - ); - playlistNotifier.addCollection(options.collectionId); - if (options.collection is SpotubeSimpleAlbumObject) { - historyNotifier - .addAlbums([options.collection as SpotubeSimpleAlbumObject]); - } else { - historyNotifier.addPlaylists( - [options.collection as SpotubeSimplePlaylistObject]); - } - } - } - }, [isActive, playlist, options, playlistNotifier, historyNotifier]); - - return onTapTrackTile; -} diff --git a/lib/components/track_tile/track_options.dart b/lib/components/track_tile/track_options.dart deleted file mode 100644 index 7d14493e..00000000 --- a/lib/components/track_tile/track_options.dart +++ /dev/null @@ -1,283 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/track_options/track_options_provider.dart'; - -/// [track] must be a [SpotubeFullTrackObject] or [SpotubeLocalTrackObject] -class TrackOptions extends HookConsumerWidget { - final SpotubeTrackObject track; - final bool userPlaylist; - final String? playlistId; - final Widget? icon; - final VoidCallback? onTapItem; - - const TrackOptions({ - super.key, - required this.track, - this.userPlaylist = false, - this.playlistId, - this.icon, - this.onTapItem, - }) : assert( - track is SpotubeFullTrackObject || track is SpotubeLocalTrackObject, - "Track must be a SpotubeFullTrackObject, SpotubeLocalTrackObject", - ); - - @override - Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.of(context); - - final trackOptionActions = ref.watch(trackOptionActionsProvider(track)); - final ( - :isBlacklisted, - :isInDownloadQueue, - :isInQueue, - :isActiveTrack, - :isAuthenticated, - :isLiked, - :downloadTask - ) = ref.watch(trackOptionsStateProvider(track)); - final isLocalTrack = track is SpotubeLocalTrackObject; - - return Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 8, - children: [ - if (isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.delete, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.trash), - title: Text(context.l10n.delete), - ), - if (mediaQuery.smAndDown && !isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.album, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.album), - title: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(context.l10n.go_to_album), - Text( - track.album.name, - style: context.theme.typography.xSmall, - ), - ], - ), - ), - if (!isInQueue) ...[ - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.addToQueue, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.queueAdd), - title: Text(context.l10n.add_to_queue), - ), - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.playNext, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.lightning), - title: Text(context.l10n.play_next), - ), - ] else - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.removeFromQueue, - playlistId, - ); - onTapItem?.call(); - }, - enabled: !isActiveTrack, - leading: const Icon(SpotubeIcons.queueRemove), - title: Text(context.l10n.remove_from_queue), - ), - if (isAuthenticated && !isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.favorite, - playlistId, - ); - onTapItem?.call(); - }, - leading: isLiked - ? const Icon( - SpotubeIcons.heartFilled, - color: Colors.pink, - ) - : const Icon(SpotubeIcons.heart), - title: Text( - isLiked - ? context.l10n.remove_from_favorites - : context.l10n.save_as_favorite, - ), - ), - if (isAuthenticated && !isLocalTrack) ...[ - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.startRadio, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.radio), - title: Text(context.l10n.start_a_radio), - ), - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.addToPlaylist, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.playlistAdd), - title: Text(context.l10n.add_to_playlist), - ), - ], - if (userPlaylist && isAuthenticated && !isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.removeFromPlaylist, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.removeFilled), - title: Text(context.l10n.remove_from_playlist), - ), - if (!isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.download, - playlistId, - ); - onTapItem?.call(); - }, - enabled: !isInDownloadQueue, - leading: isInDownloadQueue - ? StreamBuilder( - stream: downloadTask?.downloadedBytesStream, - builder: (context, snapshot) { - final progress = downloadTask?.totalSizeBytes == null || - downloadTask?.totalSizeBytes == 0 - ? 0 - : (snapshot.data ?? 0) / - downloadTask!.totalSizeBytes!; - return CircularProgressIndicator( - value: progress.toDouble(), - ); - }, - ) - : const Icon(SpotubeIcons.download), - title: Text(context.l10n.download_track), - ), - if (!isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.blacklist, - playlistId, - ); - onTapItem?.call(); - }, - leading: Icon( - SpotubeIcons.playlistRemove, - color: isBlacklisted != true ? Colors.red[400] : null, - ), - title: Text( - isBlacklisted == true - ? context.l10n.remove_from_blacklist - : context.l10n.add_to_blacklist, - style: TextStyle( - color: isBlacklisted != true ? Colors.red[400] : null, - ), - ), - ), - if (!isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.share, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.share), - title: Text(context.l10n.share), - ), - if (!isLocalTrack) - ButtonTile( - style: ButtonVariance.menu, - onPressed: () async { - await trackOptionActions.action( - rootNavigatorKey.currentContext!, - TrackOptionValue.details, - playlistId, - ); - onTapItem?.call(); - }, - leading: const Icon(SpotubeIcons.info), - title: Text(context.l10n.details), - ), - ], - ); - } -} diff --git a/lib/components/track_tile/track_options_button.dart b/lib/components/track_tile/track_options_button.dart deleted file mode 100644 index 51fff5ea..00000000 --- a/lib/components/track_tile/track_options_button.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/track_tile/track_options.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class TrackOptionsButton extends HookConsumerWidget { - final SpotubeTrackObject track; - final bool userPlaylist; - final String? playlistId; - const TrackOptionsButton({ - super.key, - required this.track, - required this.userPlaylist, - this.playlistId, - }); - - static OverlayCompleter showOptions( - BuildContext context, - Offset offset, - SpotubeTrackObject track, { - bool userPlaylist = false, - String? playlistId, - }) { - return showPopover( - context: context, - position: offset, - alignment: Alignment.bottomRight, - builder: (context) { - return SizedBox( - width: 220 * context.theme.scaling, - child: Card( - padding: const EdgeInsets.all(8), - child: TrackOptions( - track: track, - playlistId: playlistId, - userPlaylist: userPlaylist, - onTapItem: () { - closeOverlay(context); - }, - ), - ), - ); - }, - ); - } - - @override - Widget build(BuildContext context, ref) { - final imageProvider = useMemoized( - () => UniversalImage.imageProvider( - (track.album.images).smallest(ImagePlaceholder.albumArt), - ), - [track.album.images], - ); - - return IconButton.ghost( - icon: const Icon(SpotubeIcons.moreHorizontal), - onPressed: () { - final mediaQuery = MediaQuery.sizeOf(context); - - if (mediaQuery.lgAndUp) { - final renderBox = context.findRenderObject() as RenderBox; - final position = RelativeRect.fromRect( - Rect.fromPoints( - renderBox.localToGlobal(Offset.zero, - ancestor: context.findRenderObject()), - renderBox.localToGlobal(renderBox.size.bottomRight(Offset.zero), - ancestor: context.findRenderObject()), - ), - Offset.zero & mediaQuery, - ); - final offset = Offset(position.left, position.top); - showOptions( - context, - offset, - track, - userPlaylist: userPlaylist, - playlistId: playlistId, - ); - } else { - openDrawer( - context: context, - position: OverlayPosition.bottom, - draggable: true, - showDragHandle: true, - borderRadius: context.theme.borderRadiusMd, - transformBackdrop: false, - builder: (context) { - return Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16.0, - vertical: 8.0, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 8, - children: [ - Basic( - leading: Container( - width: 40, - height: 40, - decoration: BoxDecoration( - borderRadius: context.theme.borderRadiusMd, - image: DecorationImage( - fit: BoxFit.cover, - image: imageProvider, - ), - ), - ), - title: Text( - track.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ).semiBold(), - subtitle: Align( - alignment: Alignment.centerLeft, - child: ArtistLink( - artists: track.artists, - onOverflowArtistClick: () => context.navigateTo( - TrackRoute(trackId: track.id), - ), - ), - ), - ), - const Divider(), - TrackOptions( - track: track, - userPlaylist: userPlaylist, - playlistId: playlistId, - onTapItem: () { - closeDrawer(context); - }, - ), - ], - ), - ); - }, - ); - } - }, - ); - } -} diff --git a/lib/components/track_tile/track_tile.dart b/lib/components/track_tile/track_tile.dart deleted file mode 100644 index ec3f50f3..00000000 --- a/lib/components/track_tile/track_tile.dart +++ /dev/null @@ -1,347 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/gestures.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/hover_builder.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/links/link_text.dart'; -import 'package:spotube/components/track_tile/track_options_button.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/duration.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/querying_track_info.dart'; -import 'package:spotube/provider/audio_player/state.dart'; -import 'package:spotube/provider/blacklist_provider.dart'; -import 'package:spotube/utils/platform.dart'; - -final isBlacklistedProvider = - Provider.autoDispose.family( - (ref, track) { - ref.watch(blacklistProvider); - final blacklist = ref.read(blacklistProvider.notifier); - return blacklist.contains(track); - }, -); - -final _overlay = ValueNotifier?>(null); - -class TrackTile extends HookConsumerWidget { - /// [index] will not be shown if null - final int? index; - final SpotubeTrackObject track; - final bool selected; - final bool selectionMode; - final ValueChanged? onChanged; - final Future Function()? onTap; - final VoidCallback? onLongPress; - final bool userPlaylist; - final String? playlistId; - final AudioPlayerState playlist; - - final List? leadingActions; - - const TrackTile({ - super.key, - this.index, - required this.track, - this.selected = false, - this.selectionMode = false, - required this.playlist, - this.onTap, - this.onLongPress, - this.onChanged, - this.userPlaylist = false, - this.playlistId, - this.leadingActions, - }); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - - final isBlackListed = ref.watch(isBlacklistedProvider(track)); - - final isLoading = useState(false); - - final isPlaying = playlist.activeTrack?.id == track.id; - - final isSelected = isPlaying || isLoading.value; - - final imageProvider = useMemoized( - () => UniversalImage.imageProvider( - (track.album.images).smallest(ImagePlaceholder.albumArt), - ), - [track.album.images], - ); - - // Treat either explicit selectionMode or presence of onChanged as selection - // context. Some lists enable selection by providing `onChanged` without - // toggling a dedicated `selectionMode` flag (e.g. playlists), so we must - // disable inner navigation in both cases. - final effectiveSelection = selectionMode || onChanged != null; - - return LayoutBuilder(builder: (context, constrains) { - return Listener( - onPointerDown: (event) { - if (event.buttons != kSecondaryMouseButton) return; - if (_overlay.value != null) { - _overlay.value?.remove(); - _overlay.value = null; - } - _overlay.value = TrackOptionsButton.showOptions( - context, - Offset.zero, - track, - userPlaylist: userPlaylist, - playlistId: playlistId, - ); - }, - child: HoverBuilder( - permanentState: isSelected || constrains.smAndDown ? true : null, - builder: (context, isHovering) => ButtonTile( - selected: isSelected, - onPressed: () async { - if (isBlackListed) return; - try { - isLoading.value = true; - await onTap?.call(); - } finally { - if (context.mounted) { - isLoading.value = false; - } - } - }, - onLongPress: onLongPress, - style: (isBlackListed - ? ButtonVariance.destructive - : ButtonVariance.ghost) - .copyWith( - padding: (context, states, value) => - const EdgeInsets.symmetric(vertical: 8, horizontal: 0), - ), - leading: Row( - mainAxisSize: MainAxisSize.min, - children: [ - ...?leadingActions, - AnimatedCrossFade( - duration: const Duration(milliseconds: 300), - crossFadeState: index != null && onChanged == null - ? CrossFadeState.showSecond - : CrossFadeState.showFirst, - firstChild: Checkbox( - state: selected - ? CheckboxState.checked - : CheckboxState.unchecked, - onChanged: (state) => - onChanged?.call(state == CheckboxState.checked), - ), - secondChild: constrains.smAndDown - ? const SizedBox(width: 16) - : SizedBox( - width: 50, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Text( - '${(index ?? 0) + 1}', - maxLines: 1, - style: theme.typography.small, - textAlign: TextAlign.center, - ), - ), - ), - ), - Stack( - children: [ - Container( - height: 40, - width: 40, - decoration: BoxDecoration( - borderRadius: theme.borderRadiusMd, - image: DecorationImage( - fit: BoxFit.cover, - image: imageProvider, - ), - ), - ), - Positioned.fill( - child: AnimatedContainer( - duration: const Duration(milliseconds: 300), - decoration: BoxDecoration( - borderRadius: theme.borderRadiusMd, - color: isHovering - ? Colors.black.withAlpha(102) - : Colors.transparent, - ), - ), - ), - Positioned.fill( - child: Center( - child: Skeleton.ignore( - child: Consumer( - builder: (context, ref, _) { - final isFetchingActiveTrack = - ref.watch(queryingTrackInfoProvider); - return AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: switch (( - isPlaying, - isFetchingActiveTrack, - isPlaying, - isHovering, - isLoading.value - )) { - (true, true, _, _, _) || - (_, _, _, _, true) => - const SizedBox( - width: 26, - height: 26, - child: CircularProgressIndicator(), - ), - (_, _, true, _, _) => Icon( - SpotubeIcons.pause, - color: theme.colorScheme.primary, - ), - (_, _, _, true, _) => const Icon( - SpotubeIcons.play, - color: Colors.white, - ), - _ => const SizedBox.shrink(), - }, - ); - }, - ), - ), - ), - ), - ], - ), - ], - ), - title: Row( - children: [ - Expanded( - flex: 6, - child: AbsorbPointer( - absorbing: selectionMode, - child: switch (track) { - SpotubeLocalTrackObject() => Text( - track.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - _ => Row( - mainAxisSize: MainAxisSize.min, - children: [ - Flexible( - child: Button( - style: ButtonVariance.link.copyWith( - padding: (context, states, value) => - EdgeInsets.zero, - ), - onPressed: effectiveSelection - ? null - : () { - context - .navigateTo(TrackRoute(trackId: track.id)); - }, - child: Text( - track.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - ), - ], - ), - }, - ), - ), - if (constrains.mdAndUp) ...[ - const SizedBox(width: 8), - Expanded( - flex: 4, - child: switch (track) { - SpotubeLocalTrackObject() => Text( - track.album.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - _ => Align( - alignment: Alignment.centerLeft, - child: LinkText( - track.album.name, - AlbumRoute( - album: track.album, - id: track.album.id, - ), - push: true, - overflow: TextOverflow.ellipsis, - ), - ) - }, - ), - ], - ], - ), - subtitle: Align( - alignment: Alignment.centerLeft, - child: track is SpotubeLocalTrackObject - ? Text( - track.artists.asString(), - ) - : ClipRect( - child: ConstrainedBox( - constraints: const BoxConstraints(maxHeight: 40), - child: AbsorbPointer( - absorbing: effectiveSelection, - child: ArtistLink( - artists: track.artists, - onOverflowArtistClick: effectiveSelection - ? () {} - : () { - context.navigateTo( - TrackRoute(trackId: track.id), - ); - }, - ), - ), - ), - ), - ), - trailing: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const SizedBox(width: 8), - Text( - Duration(milliseconds: track.durationMs) - .toHumanReadableString(padZero: false), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - Builder( - builder: (context) { - return TrackOptionsButton( - track: track, - userPlaylist: userPlaylist, - playlistId: playlistId, - ); - }, - ), - if (kIsDesktop) const Gap(10), - ], - ), - ), - ), - ); - }); - } -} diff --git a/lib/components/ui/button_tile.dart b/lib/components/ui/button_tile.dart deleted file mode 100644 index e31a09a5..00000000 --- a/lib/components/ui/button_tile.dart +++ /dev/null @@ -1,109 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -class ButtonTile extends StatelessWidget { - final Widget? title; - final Widget? subtitle; - final Widget? leading; - final Widget? trailing; - final bool enabled; - final VoidCallback? onPressed; - final VoidCallback? onLongPress; - final bool selected; - final AbstractButtonStyle style; - final EdgeInsets? padding; - - const ButtonTile({ - super.key, - this.title, - this.subtitle, - this.leading, - this.trailing, - this.enabled = true, - this.onPressed, - this.onLongPress, - this.selected = false, - this.padding, - this.style = ButtonVariance.outline, - }); - - @override - Widget build(BuildContext context) { - final ThemeData(:colorScheme, :typography) = Theme.of(context); - - return GestureDetector( - onLongPress: onLongPress, - child: Button( - enabled: enabled, - onPressed: onPressed, - style: style.copyWith( - padding: - padding != null ? (context, states, value) => padding! : null, - decoration: (context, states, value) { - final decoration = - style.decoration(context, states) as BoxDecoration; - - if (selected) { - return switch (style) { - ButtonVariance.outline => decoration.copyWith( - border: Border.all( - color: colorScheme.primary, - width: 1.0, - ), - color: colorScheme.primary.withAlpha(25), - ), - ButtonVariance.ghost || _ => decoration.copyWith( - color: colorScheme.primary.withAlpha(25), - ), - }; - } - - return decoration; - }, - iconTheme: (context, states, value) { - final iconTheme = style.iconTheme(context, states); - - if (selected && style == ButtonVariance.outline) { - return iconTheme.copyWith( - color: colorScheme.primary, - ); - } - - return iconTheme; - }, - textStyle: (context, states, value) { - final textStyle = style.textStyle(context, states); - - if (selected && style == ButtonVariance.outline) { - return textStyle.copyWith( - color: colorScheme.primary, - ); - } - - return textStyle; - }, - ), - alignment: Alignment.centerLeft, - child: SizedBox( - width: double.infinity, - child: Basic( - padding: EdgeInsets.zero, - leadingAlignment: Alignment.center, - trailingAlignment: Alignment.center, - leading: leading, - title: title, - subtitle: - style == ButtonVariance.outline && selected && subtitle != null - ? DefaultTextStyle( - style: typography.xSmall.copyWith( - color: colorScheme.primary, - ), - child: subtitle!, - ) - : subtitle, - trailing: trailing, - ), - ), - ), - ); - } -} diff --git a/lib/components/waypoint.dart b/lib/components/waypoint.dart deleted file mode 100644 index cf00e29b..00000000 --- a/lib/components/waypoint.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:visibility_detector/visibility_detector.dart'; - -class Waypoint extends HookWidget { - final FutureOr Function()? onTouchEdge; - final Widget? child; - final ScrollController controller; - final bool isGrid; - - const Waypoint({ - super.key, - required this.controller, - this.isGrid = false, - this.onTouchEdge, - this.child, - }); - - @override - Widget build(BuildContext context) { - useEffect(() { - if (isGrid) { - return null; - } - Future listener() async { - // nextPageTrigger will have a value equivalent to 80% of the list size. - final nextPageTrigger = 0.8 * controller.position.maxScrollExtent; - - // scrollController fetches the next paginated data when the current - // position of the user on the screen has surpassed - if (controller.position.pixels >= nextPageTrigger && context.mounted) { - await onTouchEdge?.call(); - } - } - - WidgetsBinding.instance.addPostFrameCallback((_) { - if (controller.hasClients && context.mounted) { - listener(); - controller.addListener(listener); - } - }); - return () => controller.removeListener(listener); - }, [controller, onTouchEdge]); - - if (isGrid) { - return VisibilityDetector( - key: const Key("waypoint"), - onVisibilityChanged: (info) { - if (info.visibleFraction > 0) { - onTouchEdge?.call(); - } - }, - child: child ?? Container(), - ); - } - - return child ?? Container(); - } -} diff --git a/lib/extensions/button_variance.dart b/lib/extensions/button_variance.dart deleted file mode 100644 index cf66d528..00000000 --- a/lib/extensions/button_variance.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -extension CopyWithButtonVarianceExtension on ButtonVariance { - ButtonVariance copyWith({ - ButtonStateProperty? padding, - ButtonStateProperty? decoration, - ButtonStateProperty? mouseCursor, - ButtonStateProperty? iconTheme, - ButtonStateProperty? margin, - ButtonStateProperty? textStyle, - }) { - return ButtonVariance( - padding: padding ?? this.padding, - decoration: decoration ?? this.decoration, - mouseCursor: mouseCursor ?? this.mouseCursor, - iconTheme: iconTheme ?? this.iconTheme, - margin: margin ?? this.margin, - textStyle: textStyle ?? this.textStyle, - ); - } -} diff --git a/lib/extensions/color.dart b/lib/extensions/color.dart deleted file mode 100644 index bc7d65a2..00000000 --- a/lib/extensions/color.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -extension ColorAlterer on Color { - Color darken(double amount) { - assert(amount >= 0 && amount <= 1); - final hsl = HSLColor.fromColor(this); - final hslDark = hsl.withLightness((hsl.lightness - amount).clamp(0.0, 1.0)); - return hslDark.toColor(); - } - - Color lighten(double amount) { - assert(amount >= 0 && amount <= 1); - final hsl = HSLColor.fromColor(this); - final hslLight = - hsl.withLightness((hsl.lightness + amount).clamp(0.0, 1.0)); - return hslLight.toColor(); - } - - bool isLight() { - final luminance = computeLuminance(); - return luminance > 0.5; - } - - bool isDark() { - final luminance = computeLuminance(); - return luminance <= 0.5; - } -} diff --git a/lib/extensions/constrains.dart b/lib/extensions/constrains.dart deleted file mode 100644 index b7353c4f..00000000 --- a/lib/extensions/constrains.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'package:flutter/rendering.dart'; -import 'package:flutter/widgets.dart'; - -enum Breakpoint { - xs, - sm, - md, - lg, - xl, - xxl; - - bool operator <=(Breakpoint other) => index <= other.index; - bool operator <(Breakpoint other) => index < other.index; - bool operator >(Breakpoint other) => index > other.index; - bool operator >=(Breakpoint other) => index >= other.index; -} - -// ignore: constant_identifier_names -const Breakpoints = ( - xs: 480.0, - sm: 640.0, - md: 820.0, - lg: 1024.0, - xl: 1280.0, -); - -extension SliverBreakpoints on SliverConstraints { - bool get isXs => crossAxisExtent <= Breakpoints.xs; - bool get isSm => - crossAxisExtent > Breakpoints.xs && crossAxisExtent <= Breakpoints.sm; - bool get isMd => - crossAxisExtent > Breakpoints.sm && crossAxisExtent <= Breakpoints.md; - bool get isLg => - crossAxisExtent > Breakpoints.md && crossAxisExtent <= Breakpoints.lg; - bool get isXl => - crossAxisExtent > Breakpoints.lg && crossAxisExtent <= Breakpoints.xl; - bool get is2Xl => crossAxisExtent > Breakpoints.xl; - - Breakpoint get breakpoint { - if (isXs) return Breakpoint.xs; - if (isSm) return Breakpoint.sm; - if (isMd) return Breakpoint.md; - if (isLg) return Breakpoint.lg; - if (isXl) return Breakpoint.xl; - return Breakpoint.xxl; - } - - bool get smAndUp => isSm || isMd || isLg || isXl || is2Xl; - bool get mdAndUp => isMd || isLg || isXl || is2Xl; - bool get lgAndUp => isLg || isXl || is2Xl; - bool get xlAndUp => isXl || is2Xl; - - bool get smAndDown => isXs || isSm; - bool get mdAndDown => isXs || isSm || isMd; - bool get lgAndDown => isXs || isSm || isMd || isLg; - bool get xlAndDown => isXs || isSm || isMd || isLg || isXl; -} - -extension ContainerBreakpoints on BoxConstraints { - bool get isXs => biggest.width <= Breakpoints.xs; - bool get isSm => - biggest.width > Breakpoints.xs && biggest.width <= Breakpoints.sm; - bool get isMd => - biggest.width > Breakpoints.sm && biggest.width <= Breakpoints.md; - bool get isLg => - biggest.width > Breakpoints.md && biggest.width <= Breakpoints.lg; - bool get isXl => - biggest.width > Breakpoints.lg && biggest.width <= Breakpoints.xl; - bool get is2Xl => biggest.width > Breakpoints.xl; - - Breakpoint get breakpoint { - if (isXs) return Breakpoint.xs; - if (isSm) return Breakpoint.sm; - if (isMd) return Breakpoint.md; - if (isLg) return Breakpoint.lg; - if (isXl) return Breakpoint.xl; - return Breakpoint.xxl; - } - - bool get smAndUp => isSm || isMd || isLg || isXl || is2Xl; - bool get mdAndUp => isMd || isLg || isXl || is2Xl; - bool get lgAndUp => isLg || isXl || is2Xl; - bool get xlAndUp => isXl || is2Xl; - - bool get smAndDown => isXs || isSm; - bool get mdAndDown => isXs || isSm || isMd; - bool get lgAndDown => isXs || isSm || isMd || isLg; - bool get xlAndDown => isXs || isSm || isMd || isLg || isXl; -} - -extension ScreenBreakpoints on MediaQueryData { - bool get isXs => size.width <= Breakpoints.xs; - bool get isSm => size.width > Breakpoints.xs && size.width <= Breakpoints.sm; - bool get isMd => size.width > Breakpoints.sm && size.width <= Breakpoints.md; - bool get isLg => size.width > Breakpoints.md && size.width <= Breakpoints.lg; - bool get isXl => size.width > Breakpoints.lg && size.width <= Breakpoints.xl; - bool get is2Xl => size.width > Breakpoints.xl; - - bool get smAndUp => isSm || isMd || isLg || isXl || is2Xl; - bool get mdAndUp => isMd || isLg || isXl || is2Xl; - bool get lgAndUp => isLg || isXl || is2Xl; - bool get xlAndUp => isXl || is2Xl; - - bool get smAndDown => isXs || isSm; - bool get mdAndDown => isXs || isSm || isMd; - bool get lgAndDown => isXs || isSm || isMd || isLg; - bool get xlAndDown => isXs || isSm || isMd || isLg || isXl; -} - -extension SizeBreakpoints on Size { - bool get isXs => width <= Breakpoints.xs; - bool get isSm => width > Breakpoints.xs && width <= Breakpoints.sm; - bool get isMd => width > Breakpoints.sm && width <= Breakpoints.md; - bool get isLg => width > Breakpoints.md && width <= Breakpoints.lg; - bool get isXl => width > Breakpoints.lg && width <= Breakpoints.xl; - bool get is2Xl => width > Breakpoints.xl; - - bool get smAndUp => isSm || isMd || isLg || isXl || is2Xl; - bool get mdAndUp => isMd || isLg || isXl || is2Xl; - bool get lgAndUp => isLg || isXl || is2Xl; - bool get xlAndUp => isXl || is2Xl; - - bool get smAndDown => isXs || isSm; - bool get mdAndDown => isXs || isSm || isMd; - bool get lgAndDown => isXs || isSm || isMd || isLg; - bool get xlAndDown => isXs || isSm || isMd || isLg || isXl; -} diff --git a/lib/extensions/context.dart b/lib/extensions/context.dart deleted file mode 100644 index 29fbb7ca..00000000 --- a/lib/extensions/context.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/l10n/l10n.dart'; - -extension AppLocale on BuildContext { - AppLocalizations get l10n => AppLocalizations.of(this)!; -} diff --git a/lib/extensions/dio.dart b/lib/extensions/dio.dart deleted file mode 100644 index 81bb1e70..00000000 --- a/lib/extensions/dio.dart +++ /dev/null @@ -1,168 +0,0 @@ -import 'dart:io'; -import 'package:dio/dio.dart'; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart'; - -extension ChunkDownloaderDioExtension on Dio { - Future chunkDownload( - String urlPath, - dynamic savePath, { - ProgressCallback? onReceiveProgress, - Map? queryParameters, - CancelToken? cancelToken, - bool deleteOnError = true, - FileAccessMode fileAccessMode = FileAccessMode.write, - String lengthHeader = Headers.contentLengthHeader, - Object? data, - Options? options, - int connections = 4, - }) async { - final targetFile = File(savePath.toString()); - final tempRootDir = await getTemporaryDirectory(); - final tempSaveDir = Directory( - join( - tempRootDir.path, - 'Spotube', - '.chunk_dl_${targetFile.uri.pathSegments.last}', - ), - ); - if (await tempSaveDir.exists()) await tempSaveDir.delete(recursive: true); - await tempSaveDir.create(recursive: true); - - try { - int? totalLength; - bool supportsRange = false; - - Response? headResp; - try { - headResp = await head( - urlPath, - queryParameters: queryParameters, - options: Options( - headers: {'Range': 'bytes=0-0'}, - followRedirects: true, - ), - ); - } catch (_) { - // Some servers reject HEAD -> ignore - } - - final lengthStr = headResp?.headers[lengthHeader]?.first; - if (lengthStr != null) { - final parsed = int.tryParse(lengthStr); - if (parsed != null && parsed > 1) { - totalLength = parsed; - } - } - - supportsRange = headResp?.statusCode == 206 || - headResp?.headers.value(HttpHeaders.acceptRangesHeader) == 'bytes'; - - if (totalLength == null || totalLength <= 1) { - final resp = await get( - urlPath, - options: Options( - responseType: ResponseType.stream, - ), - queryParameters: queryParameters, - cancelToken: cancelToken, - ); - - final len = int.tryParse(resp.headers[lengthHeader]?.first ?? ''); - if (len == null || len <= 1) { - // can’t safely chunk — fallback - return download( - urlPath, - savePath, - onReceiveProgress: onReceiveProgress, - queryParameters: queryParameters, - cancelToken: cancelToken, - deleteOnError: deleteOnError, - options: options, - data: data, - ); - } - - totalLength = len; - supportsRange = - resp.headers.value(HttpHeaders.acceptRangesHeader)?.toLowerCase() == - 'bytes'; - } - - if (!supportsRange || connections <= 1) { - return download( - urlPath, - savePath, - onReceiveProgress: onReceiveProgress, - queryParameters: queryParameters, - cancelToken: cancelToken, - deleteOnError: deleteOnError, - options: options, - data: data, - ); - } - - final chunkSize = (totalLength / connections).ceil(); - int downloaded = 0; - - final partFiles = List.generate( - connections, - (i) => File(join(tempSaveDir.path, 'part_$i')), - ); - - final futures = List.generate(connections, (i) async { - final start = i * chunkSize; - final end = (i + 1) * chunkSize - 1; - if (start >= totalLength!) return; - - final resp = await get( - urlPath, - options: Options( - responseType: ResponseType.stream, - headers: {'Range': 'bytes=$start-$end'}, - ), - queryParameters: queryParameters, - cancelToken: cancelToken, - ); - - final file = partFiles[i]; - if (await file.exists()) await file.delete(); - await file.create(recursive: true); - final sink = file.openWrite(); - - await for (final chunk in resp.data!.stream) { - sink.add(chunk); - downloaded += chunk.length; - onReceiveProgress?.call(downloaded, totalLength); - } - - await sink.close(); - }); - - await Future.wait(futures); - - final targetSink = targetFile.openWrite(); - for (final f in partFiles) { - await targetSink.addStream(f.openRead()); - } - await targetSink.close(); - - await tempSaveDir.delete(recursive: true); - - return Response( - requestOptions: RequestOptions(path: urlPath), - data: targetFile, - statusCode: 200, - statusMessage: 'Chunked download completed ($connections connections)', - ); - } catch (e) { - if (deleteOnError) { - if (await targetFile.exists()) await targetFile.delete(); - if (await tempSaveDir.exists()) { - await tempSaveDir.delete(recursive: true); - } - } - rethrow; - } - } -} diff --git a/lib/extensions/duration.dart b/lib/extensions/duration.dart deleted file mode 100644 index ff670b1a..00000000 --- a/lib/extensions/duration.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:duration/locale.dart'; -import 'package:duration/duration.dart'; - -extension DurationToHumanReadableString on Duration { - String toHumanReadableString({padZero = true}) { - final mm = inMinutes - .remainder(60) - .toString() - .padLeft(2, !padZero && inHours == 0 ? '' : "0"); - final ss = inSeconds.remainder(60).toString().padLeft(2, "0"); - - if (inHours > 0) { - final hh = inHours.toString().padLeft(2, !padZero ? '' : "0"); - return "$hh:$mm:$ss"; - } - - return "$mm:$ss"; - } - - String format({ - DurationTersity tersity = DurationTersity.second, - DurationTersity upperTersity = DurationTersity.week, - DurationLocale locale = const EnglishDurationLocale(), - String? spacer, - String? delimiter, - String? conjugation, - bool abbreviated = false, - }) => - printDuration( - this, - tersity: tersity, - upperTersity: upperTersity, - locale: locale, - spacer: spacer, - delimiter: delimiter, - conjugation: conjugation, - abbreviated: abbreviated, - ); -} - -extension ParseDuration on Duration { - static Duration fromString(String duration) { - final parts = duration.split(':').reversed.toList(); - final seconds = int.parse(parts[0]); - final minutes = parts.length > 1 ? int.parse(parts[1]) : 0; - final hours = parts.length > 2 ? int.parse(parts[2]) : 0; - return Duration(hours: hours, minutes: minutes, seconds: seconds); - } -} diff --git a/lib/extensions/list.dart b/lib/extensions/list.dart deleted file mode 100644 index ddd36e4d..00000000 --- a/lib/extensions/list.dart +++ /dev/null @@ -1,19 +0,0 @@ -extension UniqueItemExtension on List { - List unique(bool Function(T a, T b) equals) { - final copy = []; - - for (final item in this) { - if (copy.any((element) => equals(element, item))) continue; - copy.add(item); - } - - return copy; - } - - bool containsBy(T item, dynamic Function(T a) fn) { - for (final el in this) { - if (fn(el) == fn(item)) return true; - } - return false; - } -} diff --git a/lib/extensions/map.dart b/lib/extensions/map.dart deleted file mode 100644 index 48f2935c..00000000 --- a/lib/extensions/map.dart +++ /dev/null @@ -1,15 +0,0 @@ -extension CastDeepMaps on Map { - Map castKeyDeep() { - return cast().map((key, value) { - if (value is Map) { - return MapEntry(key, value.castKeyDeep()); - } else if (value is List) { - return MapEntry( - key, - value.map((e) => e is Map ? e.castKeyDeep() : e).toList(), - ); - } - return MapEntry(key, value); - }); - } -} diff --git a/lib/extensions/string.dart b/lib/extensions/string.dart deleted file mode 100644 index 94123fe3..00000000 --- a/lib/extensions/string.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:html_unescape/html_unescape.dart'; -import 'package:html/parser.dart'; - -final htmlEscape = HtmlUnescape(); - -extension UnescapeHtml on String { - String cleanHtml() => parse("

$this

").documentElement!.text; - String unescapeHtml() => htmlEscape.convert(this); -} - -extension NullableUnescapeHtml on String? { - String? cleanHtml() => this?.cleanHtml(); - String? unescapeHtml() => this?.unescapeHtml(); -} - -extension StringExtension on String { - String capitalize() { - return "${this[0].toUpperCase()}${substring(1)}"; - } -} diff --git a/lib/generated_plugin_registrant.dart b/lib/generated_plugin_registrant.dart deleted file mode 100644 index a25a1f5f..00000000 --- a/lib/generated_plugin_registrant.dart +++ /dev/null @@ -1,23 +0,0 @@ -// -// Generated file. Do not edit. -// - -// ignore_for_file: directives_ordering -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: depend_on_referenced_packages - -import 'package:audio_service_web/audio_service_web.dart'; -import 'package:audio_session/audio_session_web.dart'; -import 'package:shared_preferences_web/shared_preferences_web.dart'; -import 'package:url_launcher_web/url_launcher_web.dart'; - -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; - -// ignore: public_member_api_docs -void registerPlugins(Registrar registrar) { - AudioServiceWeb.registerWith(registrar); - AudioSessionWeb.registerWith(registrar); - SharedPreferencesPlugin.registerWith(registrar); - UrlLauncherPlugin.registerWith(registrar); - registrar.registerMessageHandler(); -} diff --git a/lib/hooks/configurators/use_check_yt_dlp_installed.dart b/lib/hooks/configurators/use_check_yt_dlp_installed.dart deleted file mode 100644 index 1d948258..00000000 --- a/lib/hooks/configurators/use_check_yt_dlp_installed.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'dart:io'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/modules/settings/youtube_engine_not_installed_dialog.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:spotube/services/youtube_engine/yt_dlp_engine.dart'; - -void useCheckYtDlpInstalled(WidgetRef ref) { - final context = useContext(); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) async { - final youtubeEngine = ref.read( - userPreferencesProvider.select( - (value) => value.youtubeClientEngine, - ), - ); - - final customPath = - KVStoreService.getYoutubeEnginePath(YoutubeClientEngine.ytDlp); - - if (youtubeEngine == YoutubeClientEngine.ytDlp && - !await YtDlpEngine.isInstalled() && - (customPath == null || !await File(customPath).exists()) && - context.mounted) { - await showDialog( - context: context, - builder: (context) => - YouTubeEngineNotInstalledDialog(engine: youtubeEngine), - ); - } - }); - - return null; - }, []); -} diff --git a/lib/hooks/configurators/use_close_behavior.dart b/lib/hooks/configurators/use_close_behavior.dart deleted file mode 100644 index 2bdc65ef..00000000 --- a/lib/hooks/configurators/use_close_behavior.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'dart:io'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/hooks/configurators/use_window_listener.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -import 'package:local_notifier/local_notifier.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; - -final closeNotification = !kIsDesktop - ? null - : (LocalNotification( - title: 'Spotube', - body: 'Running in background. Minimized to System Tray', - actions: [ - LocalNotificationAction(text: 'Close The App'), - ], - )..onClickAction = (value) { - exit(0); - }); - -void useCloseBehavior(WidgetRef ref) { - useWindowListener( - onWindowClose: () async { - final preferences = ref.read(userPreferencesProvider); - if (preferences.closeBehavior == CloseBehavior.minimizeToTray) { - await windowManager.hide(); - closeNotification?.show(); - } else { - exit(0); - } - }, - ); -} diff --git a/lib/hooks/configurators/use_deep_linking.dart b/lib/hooks/configurators/use_deep_linking.dart deleted file mode 100644 index aaa4111c..00000000 --- a/lib/hooks/configurators/use_deep_linking.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'dart:async'; - -import 'package:app_links/app_links.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:flutter_sharing_intent/flutter_sharing_intent.dart'; -import 'package:flutter_sharing_intent/model/sharing_file.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/platform.dart'; - -final appLinks = AppLinks(); -final linkStream = appLinks.stringLinkStream.asBroadcastStream(); - -@Deprecated( - "Deeplinking is deprecated. Later a custom API for metadata provider will be created.") -void useDeepLinking(WidgetRef ref, AppRouter router) { - // // single instance no worries - // final spotify = ref.watch(spotifyProvider); - - // useEffect(() { - // void uriListener(List files) async { - // for (final file in files) { - // if (file.type != SharedMediaType.URL) continue; - // final url = Uri.parse(file.value!); - // if (url.pathSegments.length != 2) continue; - - // switch (url.pathSegments.first) { - // case "album": - // final album = await spotify.invoke((api) { - // return api.albums.get(url.pathSegments.last); - // }); - // // router.navigate( - // // AlbumRoute(id: album.id!, album: album), - // // ); - // break; - // case "artist": - // router.navigate(ArtistRoute(artistId: url.pathSegments.last)); - // break; - // case "playlist": - // final playlist = await spotify.invoke((api) { - // return api.playlists.get(url.pathSegments.last); - // }); - // // router - // // .navigate(PlaylistRoute(id: playlist.id!, playlist: playlist)); - // break; - // case "track": - // router.navigate(TrackRoute(trackId: url.pathSegments.last)); - // break; - // default: - // break; - // } - // } - // } - - // StreamSubscription? mediaStream; - - // if (kIsMobile) { - // FlutterSharingIntent.instance.getInitialSharing().then(uriListener); - - // mediaStream = - // FlutterSharingIntent.instance.getMediaStream().listen(uriListener); - // } - - // final subscription = linkStream.listen((uri) async { - // try { - // final startSegment = uri.split(":").take(2).join(":"); - // final endSegment = uri.split(":").last; - - // switch (startSegment) { - // case "spotify:album": - // final album = await spotify.invoke((api) { - // return api.albums.get(endSegment); - // }); - // // await router.navigate( - // // AlbumRoute(id: album.id!, album: album), - // // ); - // break; - // case "spotify:artist": - // await router.navigate(ArtistRoute(artistId: endSegment)); - // break; - // case "spotify:track": - // await router.navigate(TrackRoute(trackId: endSegment)); - // break; - // case "spotify:playlist": - // final playlist = await spotify.invoke((api) { - // return api.playlists.get(endSegment); - // }); - // // await router.navigate( - // // PlaylistRoute(id: playlist.id!, playlist: playlist), - // // ); - // break; - // default: - // break; - // } - // } catch (e, stack) { - // AppLogger.reportError(e, stack); - // } - // }); - - // return () { - // mediaStream?.cancel(); - // subscription.cancel(); - // }; - // }, [spotify]); -} diff --git a/lib/hooks/configurators/use_disable_battery_optimizations.dart b/lib/hooks/configurators/use_disable_battery_optimizations.dart deleted file mode 100644 index 4aa51b74..00000000 --- a/lib/hooks/configurators/use_disable_battery_optimizations.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:disable_battery_optimization/disable_battery_optimization.dart'; - -import 'package:spotube/hooks/utils/use_async_effect.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:spotube/utils/platform.dart'; - -void useDisableBatteryOptimizations() { - useAsyncEffect(() async { - if (!kIsAndroid || KVStoreService.askedForBatteryOptimization) return; - - await DisableBatteryOptimization.showDisableBatteryOptimizationSettings(); - - await DisableBatteryOptimization - .showDisableManufacturerBatteryOptimizationSettings( - "Your device has additional battery optimization", - "Follow the steps and disable the optimizations to allow smooth functioning of this app", - ); - - await KVStoreService.setAskedForBatteryOptimization(true); - }, null, []); -} diff --git a/lib/hooks/configurators/use_endless_playback.dart b/lib/hooks/configurators/use_endless_playback.dart deleted file mode 100644 index 9e8c191e..00000000 --- a/lib/hooks/configurators/use_endless_playback.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -void useEndlessPlayback(WidgetRef ref) { - final playback = ref.watch(audioPlayerProvider.notifier); - final audioPlayerState = ref.watch(audioPlayerProvider); - final endlessPlayback = - ref.watch(userPreferencesProvider.select((s) => s.endlessPlayback)); - final metadataPlugin = ref.watch(metadataPluginProvider.future); - - useEffect( - () { - if (!endlessPlayback) return null; - - void listener(int index) async { - try { - final playlist = ref.read(audioPlayerProvider); - if (index != playlist.tracks.length - 1) return; - - final track = playlist.tracks.last; - - final tracks = await (await metadataPlugin)?.track.radio(track.id); - - if (tracks == null || tracks.isEmpty) return; - - await playback.addTracks( - tracks.toList() - ..removeWhere((e) { - final playlist = ref.read(audioPlayerProvider); - final isDuplicate = playlist.tracks.any((t) => t.id == e.id); - return e.id == track.id || isDuplicate; - }), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - } - - // Sometimes user can change settings for which the currentIndexChanged - // might not be called. So we need to check if the current track is the - // last track and if it is then we need to call the listener manually. - if (audioPlayerState.currentIndex == audioPlayerState.tracks.length - 1 && - audioPlayer.isPlaying) { - listener(audioPlayerState.currentIndex); - } - - final subscription = - audioPlayer.currentIndexChangedStream.listen(listener); - - return subscription.cancel; - }, - [ - metadataPlugin, - playback, - audioPlayerState.tracks, - audioPlayerState.currentIndex, - endlessPlayback, - ], - ); -} diff --git a/lib/hooks/configurators/use_fix_window_stretching.dart b/lib/hooks/configurators/use_fix_window_stretching.dart deleted file mode 100644 index b94098ab..00000000 --- a/lib/hooks/configurators/use_fix_window_stretching.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; - -void useFixWindowStretching() { - useEffect(() { - if (!kIsWindows) return; - WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) async { - await Future.delayed(const Duration(milliseconds: 100), () { - windowManager.getSize().then((Size value) { - windowManager.setSize( - Size(value.width + 1, value.height + 1), - ); - }); - }); - }); - - return null; - }, []); -} diff --git a/lib/hooks/configurators/use_get_storage_perms.dart b/lib/hooks/configurators/use_get_storage_perms.dart deleted file mode 100644 index f860aaa7..00000000 --- a/lib/hooks/configurators/use_get_storage_perms.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:device_info_plus/device_info_plus.dart'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:spotube/hooks/utils/use_async_effect.dart'; -import 'package:spotube/provider/local_tracks/local_tracks_provider.dart'; -import 'package:spotube/utils/platform.dart'; - -void useGetStoragePermissions(WidgetRef ref) { - final context = useContext(); - - useAsyncEffect( - () async { - if (kIsAndroid) { - final androidInfo = await DeviceInfoPlugin().androidInfo; - - final hasNoStoragePerm = androidInfo.version.sdkInt < 33 && - !await Permission.storage.isGranted && - !await Permission.storage.isLimited; - - final hasNoAudioPerm = androidInfo.version.sdkInt >= 33 && - !await Permission.audio.isGranted && - !await Permission.audio.isLimited; - - if (hasNoStoragePerm) { - await Permission.storage.request(); - if (context.mounted) ref.invalidate(localTracksProvider); - } - if (hasNoAudioPerm) { - await Permission.audio.request(); - if (context.mounted) ref.invalidate(localTracksProvider); - } - } - - if (kIsIOS) { - final hasStoragePerm = await Permission.storage.isGranted || - await Permission.storage.isLimited; - - if (!hasStoragePerm) { - await Permission.storage.request(); - if (context.mounted) ref.invalidate(localTracksProvider); - } - } - }, - null, - [], - ); -} diff --git a/lib/hooks/configurators/use_has_touch.dart b/lib/hooks/configurators/use_has_touch.dart deleted file mode 100644 index 5ce309b8..00000000 --- a/lib/hooks/configurators/use_has_touch.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter/gestures.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/utils/platform.dart'; - -bool useHasTouch() { - final hasTouch = useState(kIsMobile); - - useEffect(() { - void globalRoute(PointerEvent event) { - if (hasTouch.value) return; - hasTouch.value = event.kind == PointerDeviceKind.touch || - event.kind == PointerDeviceKind.stylus || - event.kind == PointerDeviceKind.invertedStylus; - } - - WidgetsBinding.instance.addPostFrameCallback((_) { - GestureBinding.instance.pointerRouter.addGlobalRoute(globalRoute); - }); - - return () { - GestureBinding.instance.pointerRouter.removeGlobalRoute(globalRoute); - }; - }, []); - - return hasTouch.value; -} diff --git a/lib/hooks/configurators/use_window_listener.dart b/lib/hooks/configurators/use_window_listener.dart deleted file mode 100644 index 5977ea8e..00000000 --- a/lib/hooks/configurators/use_window_listener.dart +++ /dev/null @@ -1,201 +0,0 @@ -import 'package:flutter/widgets.dart'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; - -class CallbackWindowListener implements WindowListener { - final VoidCallback? _onWindowClose; - final VoidCallback? _onWindowFocus; - final VoidCallback? _onWindowBlur; - final VoidCallback? _onWindowMaximize; - final VoidCallback? _onWindowUnmaximize; - final VoidCallback? _onWindowMinimize; - final VoidCallback? _onWindowRestore; - final VoidCallback? _onWindowResize; - final VoidCallback? _onWindowResized; - final VoidCallback? _onWindowMove; - final VoidCallback? _onWindowMoved; - final VoidCallback? _onWindowEnterFullScreen; - final VoidCallback? _onWindowLeaveFullScreen; - final VoidCallback? _onWindowDocked; - final VoidCallback? _onWindowUndocked; - final VoidCallback? _onWindowEvent; - - const CallbackWindowListener({ - VoidCallback? onWindowClose, - VoidCallback? onWindowFocus, - VoidCallback? onWindowBlur, - VoidCallback? onWindowMaximize, - VoidCallback? onWindowUnmaximize, - VoidCallback? onWindowMinimize, - VoidCallback? onWindowRestore, - VoidCallback? onWindowResize, - VoidCallback? onWindowResized, - VoidCallback? onWindowMove, - VoidCallback? onWindowMoved, - VoidCallback? onWindowEnterFullScreen, - VoidCallback? onWindowLeaveFullScreen, - VoidCallback? onWindowDocked, - VoidCallback? onWindowUndocked, - VoidCallback? onWindowEvent, - }) : _onWindowClose = onWindowClose, - _onWindowFocus = onWindowFocus, - _onWindowBlur = onWindowBlur, - _onWindowMaximize = onWindowMaximize, - _onWindowUnmaximize = onWindowUnmaximize, - _onWindowMinimize = onWindowMinimize, - _onWindowRestore = onWindowRestore, - _onWindowResize = onWindowResize, - _onWindowResized = onWindowResized, - _onWindowMove = onWindowMove, - _onWindowMoved = onWindowMoved, - _onWindowEnterFullScreen = onWindowEnterFullScreen, - _onWindowLeaveFullScreen = onWindowLeaveFullScreen, - _onWindowDocked = onWindowDocked, - _onWindowUndocked = onWindowUndocked, - _onWindowEvent = onWindowEvent; - - @override - void onWindowBlur() { - return _onWindowBlur?.call(); - } - - @override - void onWindowClose() { - return _onWindowClose?.call(); - } - - @override - void onWindowDocked() { - return _onWindowDocked?.call(); - } - - @override - void onWindowEnterFullScreen() { - return _onWindowEnterFullScreen?.call(); - } - - @override - void onWindowEvent(String eventName) { - return _onWindowEvent?.call(); - } - - @override - void onWindowFocus() { - return _onWindowFocus?.call(); - } - - @override - void onWindowLeaveFullScreen() { - return _onWindowLeaveFullScreen?.call(); - } - - @override - void onWindowMaximize() { - return _onWindowMaximize?.call(); - } - - @override - void onWindowMinimize() { - return _onWindowMinimize?.call(); - } - - @override - void onWindowMove() { - return _onWindowMove?.call(); - } - - @override - void onWindowMoved() { - return _onWindowMoved?.call(); - } - - @override - void onWindowResize() { - return _onWindowResize?.call(); - } - - @override - void onWindowResized() { - return _onWindowResized?.call(); - } - - @override - void onWindowRestore() { - return _onWindowRestore?.call(); - } - - @override - void onWindowUndocked() { - return _onWindowUndocked?.call(); - } - - @override - void onWindowUnmaximize() { - return _onWindowUnmaximize?.call(); - } -} - -void useWindowListener({ - VoidCallback? onWindowClose, - VoidCallback? onWindowFocus, - VoidCallback? onWindowBlur, - VoidCallback? onWindowMaximize, - VoidCallback? onWindowUnmaximize, - VoidCallback? onWindowMinimize, - VoidCallback? onWindowRestore, - VoidCallback? onWindowResize, - VoidCallback? onWindowResized, - VoidCallback? onWindowMove, - VoidCallback? onWindowMoved, - VoidCallback? onWindowEnterFullScreen, - VoidCallback? onWindowLeaveFullScreen, - VoidCallback? onWindowDocked, - VoidCallback? onWindowUndocked, - VoidCallback? onWindowEvent, -}) { - useEffect(() { - if (!kIsDesktop) return null; - - final listener = CallbackWindowListener( - onWindowClose: onWindowClose, - onWindowFocus: onWindowFocus, - onWindowBlur: onWindowBlur, - onWindowMaximize: onWindowMaximize, - onWindowUnmaximize: onWindowUnmaximize, - onWindowMinimize: onWindowMinimize, - onWindowRestore: onWindowRestore, - onWindowResize: onWindowResize, - onWindowResized: onWindowResized, - onWindowMove: onWindowMove, - onWindowMoved: onWindowMoved, - onWindowEnterFullScreen: onWindowEnterFullScreen, - onWindowLeaveFullScreen: onWindowLeaveFullScreen, - onWindowDocked: onWindowDocked, - onWindowUndocked: onWindowUndocked, - onWindowEvent: onWindowEvent, - ); - windowManager.addListener(listener); - return () { - windowManager.removeListener(listener); - }; - }, [ - onWindowClose, - onWindowFocus, - onWindowBlur, - onWindowMaximize, - onWindowUnmaximize, - onWindowMinimize, - onWindowRestore, - onWindowResize, - onWindowResized, - onWindowMove, - onWindowMoved, - onWindowEnterFullScreen, - onWindowLeaveFullScreen, - onWindowDocked, - onWindowUndocked, - onWindowEvent, - ]); -} diff --git a/lib/hooks/controllers/use_auto_scroll_controller.dart b/lib/hooks/controllers/use_auto_scroll_controller.dart deleted file mode 100644 index befc4351..00000000 --- a/lib/hooks/controllers/use_auto_scroll_controller.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:scroll_to_index/scroll_to_index.dart'; - -/// Creates [AutoScrollController] that will be disposed automatically. -/// -/// See also: -/// - [AutoScrollController] -AutoScrollController useAutoScrollController({ - double initialScrollOffset = 0.0, - bool keepScrollOffset = true, - String? debugLabel, - Axis? axis, - AutoScrollController? copyTagsFrom, - double? suggestedRowHeight, - Rect Function() viewportBoundaryGetter = defaultViewportBoundaryGetter, - List? keys, -}) { - return use( - _AutoScrollControllerHook( - initialScrollOffset: initialScrollOffset, - keepScrollOffset: keepScrollOffset, - debugLabel: debugLabel, - axis: axis, - copyTagsFrom: copyTagsFrom, - suggestedRowHeight: suggestedRowHeight, - viewportBoundaryGetter: viewportBoundaryGetter, - keys: keys, - ), - ); -} - -class _AutoScrollControllerHook extends Hook { - const _AutoScrollControllerHook({ - required this.initialScrollOffset, - required this.keepScrollOffset, - required this.viewportBoundaryGetter, - this.axis, - this.copyTagsFrom, - this.suggestedRowHeight, - this.debugLabel, - super.keys, - }); - - final double initialScrollOffset; - final bool keepScrollOffset; - final String? debugLabel; - final Axis? axis; - final AutoScrollController? copyTagsFrom; - final double? suggestedRowHeight; - final Rect Function() viewportBoundaryGetter; - - @override - HookState> createState() => - _AutoScrollControllerHookState(); -} - -class _AutoScrollControllerHookState - extends HookState { - late final AutoScrollController controller; - - @override - void initHook() { - super.initHook(); - controller = AutoScrollController( - initialScrollOffset: hook.initialScrollOffset, - keepScrollOffset: hook.keepScrollOffset, - debugLabel: hook.debugLabel, - axis: hook.axis, - copyTagsFrom: hook.copyTagsFrom, - suggestedRowHeight: hook.suggestedRowHeight, - viewportBoundaryGetter: hook.viewportBoundaryGetter, - ); - } - - @override - AutoScrollController build(BuildContext context) => controller; - - @override - void dispose() => controller.dispose(); - - @override - String get debugLabel => 'useAutoScrollController'; -} diff --git a/lib/hooks/controllers/use_package_info.dart b/lib/hooks/controllers/use_package_info.dart deleted file mode 100644 index 07b53af6..00000000 --- a/lib/hooks/controllers/use_package_info.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:package_info_plus/package_info_plus.dart'; - -PackageInfo usePackageInfo({ - /// The app name. `CFBundleDisplayName` on iOS, `application/label` on Android. - String appName = 'Unknown', - - /// The package name. `bundleIdentifier` on iOS, `getPackageName` on Android. - String packageName = 'Unknown', - - /// The package version. `CFBundleShortVersionString` on iOS, `versionName` on Android. - String version = 'Unknown', - - /// The build number. `CFBundleVersion` on iOS, `versionCode` on Android. - String buildNumber = 'Unknown', - - /// The build signature. Empty string on iOS, signing key signature (hex) on Android. - String buildSignature = '', - List? keys, -}) { - return use( - _PackageInfoHook( - appName: appName, - buildNumber: buildNumber, - packageName: packageName, - version: version, - buildSignature: buildSignature, - keys: keys, - ), - ); -} - -class _PackageInfoHook extends Hook { - final String appName; - final String packageName; - final String version; - final String buildNumber; - final String buildSignature; - - const _PackageInfoHook({ - required this.appName, - required this.packageName, - required this.version, - required this.buildNumber, - this.buildSignature = '', - super.keys, - }); - - @override - HookState> createState() => - _PackageInfoHookState(); -} - -class _PackageInfoHookState - extends HookState> { - late PackageInfo info = PackageInfo( - appName: hook.appName, - buildNumber: hook.buildNumber, - packageName: hook.packageName, - version: hook.version, - ); - - @override - void initHook() { - PackageInfo.fromPlatform().then((packageInfo) { - setState(() { - info = packageInfo; - }); - }); - super.initHook(); - } - - @override - PackageInfo build(BuildContext context) => info; - - @override - String get debugLabel => 'usePagingController'; -} diff --git a/lib/hooks/controllers/use_shadcn_text_editing_controller.dart b/lib/hooks/controllers/use_shadcn_text_editing_controller.dart deleted file mode 100644 index ae33f4e4..00000000 --- a/lib/hooks/controllers/use_shadcn_text_editing_controller.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -class _TextEditingControllerHookCreator { - const _TextEditingControllerHookCreator(); - - /// Creates a [TextEditingController] that will be disposed automatically. - /// - /// The [text] parameter can be used to set the initial value of the - /// controller. - TextEditingController call({String? text, List? keys}) { - return use(_TextEditingControllerHook(text, keys)); - } - - /// Creates a [TextEditingController] from the initial [value] that will - /// be disposed automatically. - TextEditingController fromValue( - TextEditingValue value, [ - List? keys, - ]) { - return use(_TextEditingControllerHook.fromValue(value, keys)); - } -} - -/// Creates a [TextEditingController], either via an initial text or an initial -/// [TextEditingValue]. -/// -/// To use a [TextEditingController] with an optional initial text, use: -/// ```dart -/// final controller = useTextEditingController(text: 'initial text'); -/// ``` -/// -/// To use a [TextEditingController] with an optional initial value, use: -/// ```dart -/// final controller = useTextEditingController -/// .fromValue(TextEditingValue.empty); -/// ``` -/// -/// Changing the text or initial value after the widget has been built has no -/// effect whatsoever. To update the value in a callback, for instance after a -/// button was pressed, use the [TextEditingController.text] or -/// [TextEditingController.value] setters. To have the [TextEditingController] -/// reflect changing values, you can use [useEffect]. This example will update -/// the [TextEditingController.text] whenever a provided [ValueListenable] -/// changes: -/// ```dart -/// final controller = useTextEditingController(); -/// final update = useValueListenable(myTextControllerUpdates); -/// -/// useEffect(() { -/// controller.text = update; -/// }, [update]); -/// ``` -/// -/// See also: -/// - [TextEditingController], which this hook creates. -const useShadcnTextEditingController = _TextEditingControllerHookCreator(); - -class _TextEditingControllerHook extends Hook { - const _TextEditingControllerHook( - this.initialText, [ - List? keys, - ]) : initialValue = null, - super(keys: keys); - - const _TextEditingControllerHook.fromValue( - TextEditingValue this.initialValue, [ - List? keys, - ]) : initialText = null, - super(keys: keys); - - final String? initialText; - final TextEditingValue? initialValue; - - @override - _TextEditingControllerHookState createState() { - return _TextEditingControllerHookState(); - } -} - -class _TextEditingControllerHookState - extends HookState { - late final _controller = hook.initialValue != null - ? TextEditingController.fromValue( - hook.initialValue ?? TextEditingValue.empty, - ) - : TextEditingController(text: hook.initialText); - - @override - TextEditingController build(BuildContext context) => _controller; - - @override - void dispose() => _controller.dispose(); - - @override - String get debugLabel => 'useTextEditingController'; -} diff --git a/lib/hooks/utils/use_async_effect.dart b/lib/hooks/utils/use_async_effect.dart deleted file mode 100644 index 8af25543..00000000 --- a/lib/hooks/utils/use_async_effect.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_hooks/flutter_hooks.dart'; - -void useAsyncEffect( - FutureOr Function() effect, [ - FutureOr Function()? cleanup, - List? keys, -]) { - useEffect(() { - Future.microtask(effect); - return () { - if (cleanup != null) { - Future.microtask(cleanup); - } - }; - }, keys); -} diff --git a/lib/hooks/utils/use_breakpoint_value.dart b/lib/hooks/utils/use_breakpoint_value.dart deleted file mode 100644 index 74b2f860..00000000 --- a/lib/hooks/utils/use_breakpoint_value.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/extensions/constrains.dart'; - -T useBreakpointValue({ - T? xs, - T? sm, - T? md, - T? lg, - T? xl, - T? xxl, - T? others, -}) { - final isSomeNull = xs == null || - sm == null || - md == null || - lg == null || - xl == null || - xxl == null; - assert( - (isSomeNull && others != null) || (!isSomeNull && others == null), - 'You must provide a value for all breakpoints or a default value for others', - ); - final context = useContext(); - final mediaQuery = MediaQuery.of(context); - - if (isSomeNull) { - if (mediaQuery.isXs) { - return xs ?? others!; - } else if (mediaQuery.isSm) { - return sm ?? others!; - } else if (mediaQuery.isMd) { - return md ?? others!; - } else if (mediaQuery.isXl) { - return xl ?? others!; - } else if (mediaQuery.is2Xl) { - return xxl ?? others!; - } else { - return lg ?? others!; - } - } else { - if (mediaQuery.isXs) { - return xs; - } else if (mediaQuery.isSm) { - return sm; - } else if (mediaQuery.isMd) { - return md; - } else if (mediaQuery.isXl) { - return xl; - } else if (mediaQuery.is2Xl) { - return xxl; - } else { - return lg; - } - } -} diff --git a/lib/hooks/utils/use_brightness_value.dart b/lib/hooks/utils/use_brightness_value.dart deleted file mode 100644 index 64e3f27c..00000000 --- a/lib/hooks/utils/use_brightness_value.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -T useBrightnessValue( - T lightValue, - T darkValue, -) { - final context = useContext(); - - return Theme.of(context).brightness == Brightness.light - ? lightValue - : darkValue; -} diff --git a/lib/hooks/utils/use_custom_status_bar_color.dart b/lib/hooks/utils/use_custom_status_bar_color.dart deleted file mode 100644 index f34ae7a8..00000000 --- a/lib/hooks/utils/use_custom_status_bar_color.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -VoidCallback useCustomStatusBarColor( - Color color, - bool isCurrentRoute, { - bool noSetBGColor = false, - bool? automaticSystemUiAdjustment, -}) { - final context = useContext(); - final backgroundColor = Theme.of(context).colorScheme.background; - // ignore: invalid_use_of_visible_for_testing_member - final previousState = SystemChrome.latestStyle; - - void resetStatusbar() => previousState != null - ? SystemChrome.setSystemUIOverlayStyle(previousState) - : SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarColor: backgroundColor, // status bar color - statusBarIconBrightness: backgroundColor.computeLuminance() > 0.179 - ? Brightness.dark - : Brightness.light, - ), - ); - - // ignore: invalid_use_of_visible_for_testing_member - final statusBarColor = SystemChrome.latestStyle?.statusBarColor; - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - if (automaticSystemUiAdjustment != null) { - // ignore: deprecated_member_use - WidgetsBinding.instance.renderView.automaticSystemUiAdjustment = - automaticSystemUiAdjustment; - } - if (isCurrentRoute && statusBarColor != color) { - final isLight = color.computeLuminance() > 0.179; - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarColor: - noSetBGColor ? Colors.transparent : color, // status bar color - statusBarIconBrightness: - isLight ? Brightness.dark : Brightness.light, - ), - ); - } else if (!isCurrentRoute && statusBarColor == color) { - resetStatusbar(); - } - }); - return () { - if (automaticSystemUiAdjustment != null) { - // ignore: deprecated_member_use - WidgetsBinding.instance.renderView.automaticSystemUiAdjustment = false; - } - }; - }, [color, isCurrentRoute, statusBarColor]); - - useEffect(() { - return resetStatusbar; - }, []); - - return resetStatusbar; -} diff --git a/lib/hooks/utils/use_debounce.dart b/lib/hooks/utils/use_debounce.dart deleted file mode 100644 index 5eb859a1..00000000 --- a/lib/hooks/utils/use_debounce.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_hooks/flutter_hooks.dart'; - -T useDebounce( - T value, [ - Duration delay = const Duration(milliseconds: 500), -]) { - final state = useState(value); - - useEffect(() { - final timer = Timer(delay, () => state.value = value); - return timer.cancel; - }, [value, delay]); - - return state.value; -} diff --git a/lib/hooks/utils/use_force_update.dart b/lib/hooks/utils/use_force_update.dart deleted file mode 100644 index 268f0f04..00000000 --- a/lib/hooks/utils/use_force_update.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; - -void Function() useForceUpdate() { - final state = useState(null); - // ignore: invalid_use_of_protected_member, invalid_use_of_visible_for_testing_member - return () => state.notifyListeners(); -} diff --git a/lib/hooks/utils/use_palette_color.dart b/lib/hooks/utils/use_palette_color.dart deleted file mode 100644 index c70bcf72..00000000 --- a/lib/hooks/utils/use_palette_color.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:palette_generator/palette_generator.dart'; -import 'package:spotube/components/image/universal_image.dart'; - -final _paletteColorState = StateProvider( - (ref) { - return PaletteColor(Colors.gray[300], 0); - }, -); - -PaletteColor usePaletteColor(String imageUrl, WidgetRef ref) { - final context = useContext(); - final theme = Theme.of(context); - final paletteColor = ref.watch(_paletteColorState); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - final palette = await PaletteGenerator.fromImageProvider( - UniversalImage.imageProvider( - imageUrl, - height: 50, - width: 50, - ), - ); - if (!context.mounted) return; - final color = theme.brightness == Brightness.light - ? palette.lightMutedColor ?? palette.lightVibrantColor - : palette.darkMutedColor ?? palette.darkVibrantColor; - if (color != null) { - ref.read(_paletteColorState.notifier).state = color; - } - }); - return null; - }, [imageUrl]); - - return paletteColor; -} - -PaletteGenerator usePaletteGenerator(String imageUrl) { - final palette = useState(PaletteGenerator.fromColors([])); - final context = useContext(); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - final newPalette = await PaletteGenerator.fromImageProvider( - UniversalImage.imageProvider( - imageUrl, - height: 50, - width: 50, - ), - ); - if (!context.mounted) return; - - palette.value = newPalette; - }); - return null; - }, [imageUrl]); - - return palette.value; -} diff --git a/lib/l10n/app_ar.arb b/lib/l10n/app_ar.arb deleted file mode 100644 index f1997517..00000000 --- a/lib/l10n/app_ar.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "ضيف", - "browse": "تصفح", - "search": "بحث", - "library": "مكتبة", - "lyrics": "كلمات", - "settings": "إعدادات", - "genre_categories_filter": "تصفية الفئات أو الأنواع...", - "genre": "النوع", - "personalized": "شخصية", - "featured": "متميز", - "new_releases": "الإصدارات الجديدة", - "songs": "أغاني", - "playing_track": "تشغيل {track}", - "queue_clear_alert": "سيؤدي هذا إلى مسح قائمة الانتظار الحالية. {track_length} ستتم إزالة المقطوعات\nهل تريد الإستمرار؟", - "load_more": "تحميل المزيد", - "playlists": "قوائم التشغيل", - "artists": "فنانون", - "albums": "ألبومات", - "tracks": "مقطوعات", - "downloads": "تنزيلات", - "filter_playlists": "تصفية قوائم التشغيل الخاصة بك...", - "liked_tracks": "المقطوعات التي أعجبتك", - "liked_tracks_description": "جميع المقطوعات التي أعجبتك", - "create_playlist": "إنشاء قائمة التشغيل", - "create_a_playlist": "إنشاء قائمة تشغيل", - "update_playlist": "تحديث قائمة التشغيل", - "create": "إنشاء", - "cancel": "إلغاء", - "update": "تحديث", - "playlist_name": "اسم قائمة التشغيل", - "name_of_playlist": "اسم قائمة التشغيل", - "description": "وصف", - "public": "عام", - "collaborative": "تعاوني", - "search_local_tracks": "بحث عن مقطوعات محلية", - "play": "تشغيل", - "delete": "حذف", - "none": "لا شيء", - "sort_a_z": "الترتيب من A-Z", - "sort_z_a": "الترتيب من Z-A", - "sort_artist": "الترتيب حسب الفنان", - "sort_album": "فرز حسب الألبوم", - "sort_tracks": "ترتيب المقطوعات", - "currently_downloading": "يتم التنزيل ({tracks_length})", - "cancel_all": "إلغاء الكل", - "filter_artist": "تصفية الفنانين...", - "followers": "{followers} متابعون", - "add_artist_to_blacklist": "إضافة فنان إلى القائمة السوداء", - "top_tracks": "أهم المقطوعات الصوتية", - "fans_also_like": "المعجبون يحبون أيضاً", - "loading": "جارٍ التحميل", - "artist": "فنان", - "blacklisted": "في القائمة السوداء", - "following": "يتابع", - "follow": "تابع", - "artist_url_copied": "تم نسخ عنوان URL للفنان إلى الحافظة", - "added_to_queue": "تم إضافة المقطوعات إلى قائمة الإنتظار {tracks}", - "filter_albums": "تصفية الألبومات...", - "synced": "تم المزامنة", - "plain": "سهل", - "shuffle": "خلط", - "search_tracks": "يحث عن مقطوعات", - "released": "تم الإصدار", - "error": "خطأ {error}", - "title": "عنوان", - "time": "وقت", - "more_actions": "المزيد من الإجراءات", - "download_count": "تنزيل ({count})", - "add_count_to_playlist": "إضافة ({count}) إلى قائمة التشغيل", - "add_count_to_queue": "إضافة ({count}) إلى قائمة الإنتظار", - "play_count_next": "تشغيل ({count}) التالي", - "album": "ألبوم", - "copied_to_clipboard": "تم النسخ {data} إلى الحافظة", - "add_to_following_playlists": "إضافة {track} إلى قوائم التشغيل التالية", - "add": "إضافة", - "added_track_to_queue": "تم الإضافة {track} إلى قائمة الإنتظار", - "add_to_queue": "إضافة إلى قائمة التشغيل", - "track_will_play_next": "{track} سيتم تشغيل التالي", - "play_next": "تشغيل التالي", - "removed_track_from_queue": "تم الإزالة {track} من قائمة الإنتظار", - "remove_from_queue": "إزالة من قائمة الإنتظار", - "remove_from_favorites": "إزالة من المفضلة", - "save_as_favorite": "حفظ كمفضل", - "add_to_playlist": "إضافة إلى قائمة التشغيل", - "remove_from_playlist": "إزالة من قائمة التشغيل", - "add_to_blacklist": "إضافة إلى القائمة السوداء", - "remove_from_blacklist": "إزالة من القائمة السوداء", - "share": "مشاكرة", - "mini_player": "مشغل مصغر", - "slide_to_seek": "قم بالتمرير للبحث للأمام أو للخلف", - "shuffle_playlist": "قائمة تشغيل عشوائية", - "unshuffle_playlist": "إلغاء ترتيب قائمة التشغيل", - "previous_track": "المقطوعة السابقة", - "next_track": "مقطوعة جديدة", - "pause_playback": "إيقاف التشغيل مؤقتًا", - "resume_playback": "استئناف التشغيل", - "loop_track": "تشغيل المقطوعة بشكل لا نهائي", - "repeat_playlist": "تكرار قائمة التشغيل", - "queue": "قائمة الإنتظار", - "alternative_track_sources": "مصادر مقطوعات بديلة", - "download_track": "تنزيل المقطوعة", - "tracks_in_queue": "{tracks} المقطوعات في قائمة الإنتظار", - "clear_all": "مسح الكل", - "show_hide_ui_on_hover": "إظهار/إخفاء واجهة المستخدم عند التمرير", - "always_on_top": "دائما في القمة", - "exit_mini_player": "خروج من المشغل المصغر", - "download_location": "تنزيل الموقع", - "account": "حساب", - "login_with_spotify": "تسجيل الدخول بواسطة حساب Spotify", - "connect_with_spotify": "توصيل بـSpotify", - "logout": "تسجيل الخروج", - "logout_of_this_account": "تسجيل الخروج من هذا الحساب", - "language_region": "اللغة والمنطقة", - "language": "لغة", - "system_default": "لغة النظام الإفتراضية", - "market_place_region": "منطقة السوق", - "recommendation_country": "بلد التوصية", - "appearance": "مظهر", - "layout_mode": "وضع التخطيط", - "override_layout_settings": "تجاوز إعدادات وضع التخطيط سريع الاستجابة", - "adaptive": "متكيف", - "compact": "مدمج", - "extended": "ممتد", - "theme": "مظهر", - "dark": "داكن", - "light": "ساطعt", - "system": "حسب النظام", - "accent_color": "لون تمييز", - "sync_album_color": "مزامنة لون الألبوم", - "sync_album_color_description": "يستخدم اللون السائد لصورة الألبوم باعتباره لون التمييز", - "playback": "التشغيل", - "audio_quality": "جودة الصوت", - "high": "مرتفعة", - "low": "منخفضة", - "pre_download_play": "التحميل المسبق والتشغيل", - "pre_download_play_description": "بدلاً من دفق الصوت، قم بتنزيل وحدات البايت وتشغيلها بدلاً من ذلك (موصى به لمستخدمي Bandwidth)", - "skip_non_music": "تخطي المقاطع غير الموسيقية (SponsorBlock)", - "blacklist_description": "المقطوعات والفنانون المدرجون في القائمة السوداء", - "wait_for_download_to_finish": "يرجى الانتظار حتى انتهاء التنزيل الحالي", - "desktop": "سطح المكتب", - "close_behavior": "إغلاق التصرف", - "close": "إغلاق", - "minimize_to_tray": "تصغير إلى الدرج", - "show_tray_icon": "إظهار أيقونات درج النظام", - "about": "حول", - "u_love_spotube": "نحن نعلم أنك تحب Spotube", - "check_for_updates": "تحقق من وجود تحديثات", - "about_spotube": "حول Spotube", - "blacklist": "قائمة سوداء", - "please_sponsor": "يرجى دعم/التبرع", - "spotube_description": "Spotube، عميل Spotify خفيف الوزن ومتعدد المنصات ومجاني للجميع", - "version": "إصدار", - "build_number": "رقم البنية", - "founder": "الموئسس", - "repository": "المستودع", - "bug_issues": "أخطاء+مشاكل", - "made_with": "صُنع باستخدام ❤️ في بنغلاديش🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "الترخيص", - "add_spotify_credentials": "أضف بيانات Spotify الخاصة بك للبدء", - "credentials_will_not_be_shared_disclaimer": "لا تقلق، لن يتم جمع أي من بيانات الخاصة بك أو مشاركتها مع أي شخص", - "know_how_to_login": "لا تعرف كيف تفعل هذا؟", - "follow_step_by_step_guide": "اتبع الدليل خطوة بخطوة", - "spotify_cookie": "Spotify {name} كوكيز", - "cookie_name_cookie": "{name} كوكيز", - "fill_in_all_fields": "يرجى تعبئة جميع الحقول", - "submit": "إرسال", - "exit": "خروج", - "previous": "السابق", - "next": "التالي", - "done": "تم", - "step_1": "الخطوة 1", - "first_go_to": "أولا، اذهب إلى", - "login_if_not_logged_in": "وتسجيل الدخول/الاشتراك إذا لم تقم بتسجيل الدخول", - "step_2": "الخطوة 2", - "step_2_steps": "1. بمجرد تسجيل الدخول، اضغط على F12 أو انقر بزر الماوس الأيمن > فحص لفتح أدوات تطوير المتصفح.\n2. ثم انتقل إلى علامة التبويب \"التطبيقات\" (Chrome وEdge وBrave وما إلى ذلك.) أو علامة التبويب \"التخزين\" (Firefox وPalemoon وما إلى ذلك..)\n3. انتقل إلى قسم \"ملفات تعريف الارتباط\" ثم القسم الفرعي \"https://accounts.spotify.com\"", - "step_3": "الخطوة 3", - "success_emoji": "نجاح 🥳", - "success_message": "لقد قمت الآن بتسجيل الدخول بنجاح باستخدام حساب Spotify الخاص بك. عمل جيد يا صديقي!", - "step_4": "الخطوة 4", - "something_went_wrong": "هناك خطأ ما", - "piped_instance": "مثيل خادم Piped", - "piped_description": "مثيل خادم Piped الذي سيتم استخدامه لمطابقة المقطوعة", - "piped_warning": "البعض منهم قد لا يعمل بشكل جيد. لذلك استخدمه على مسؤوليتك", - "generate_playlist": "إنشاء قائمة التشغيل", - "track_exists": "المقطوعة {track} بالفعل موجودة", - "replace_downloaded_tracks": "استبدل جميع المقطوعات التي تم تنزيلها", - "skip_download_tracks": "تخطي تنزيل كافة المقطوعات التي تم تنزيلها", - "do_you_want_to_replace": "هل تريد استبدال المقطوعة الحالية؟", - "replace": "إستبدال", - "skip": "تخطي", - "select_up_to_count_type": "إختر ما يصل إلى {count} {type}", - "select_genres": "حدد الأنواع", - "add_genres": "أضف الأنواع", - "country": "دولة", - "number_of_tracks_generate": "عدد المسارات المقطوعات المراد توليدها", - "acousticness": "صوتية", - "danceability": "قدرة على الرقص", - "energy": "طاقة", - "instrumentalness": "نفعية", - "liveness": "حيوية", - "loudness": "بريق", - "speechiness": "كلام", - "valence": "تكافؤ", - "popularity": "شعبية", - "key": "مفتاح", - "duration": "مدة (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "توقيع الوقت", - "short": "قصير", - "medium": "متوسط", - "long": "طويل", - "min": "أدنى", - "max": "أقصى", - "target": "هدف", - "moderate": "معتدل", - "deselect_all": "الغاء تحديد الكل", - "select_all": "اختر الكل", - "are_you_sure": "هل أنت متأكد؟", - "generating_playlist": "جارٍ إنشاء قائمة التشغيل المخصصة...", - "selected_count_tracks": "مقطوعات {count} مختارة", - "download_warning": "إذا قمت بتنزيل جميع المقاطع الصوتية بكميات كبيرة، فمن الواضح أنك تقوم بقرصنة الموسيقى وتسبب الضرر للمجتمع الإبداعي للموسيقى. أتمنى أن تكون على علم بهذا. حاول دائمًا احترام ودعم العمل الجاد للفنان", - "download_ip_ban_warning": "بالمناسبة، يمكن أن يتم حظر عنوان IP الخاص بك على YouTube بسبب طلبات التنزيل الزائدة عن المعتاد. يعني حظر IP أنه لا يمكنك استخدام YouTube (حتى إذا قمت بتسجيل الدخول) لمدة تتراوح بين شهرين إلى ثلاثة أشهر على الأقل من جهاز IP هذا. ولا يتحمل Spotube أي مسؤولية إذا حدث هذا على الإطلاق", - "by_clicking_accept_terms": "بالنقر على \"قبول\"، فإنك توافق على الشروط التالية:", - "download_agreement_1": "أعلم أنني أقوم بقرصنة الموسيقى. انا سيئ", - "download_agreement_2": "سأدعم الفنان أينما أستطيع، وأنا أفعل هذا فقط لأنني لا أملك المال لشراء أعمالهم الفنية", - "download_agreement_3": "أدرك تمامًا أنه يمكن حظر عنوان IP الخاص بي على YouTube ولا أحمل Spotube أو مالكيه/مساهميه المسؤولية عن أي حوادث ناجمة عن الإجراء الحالي الخاص بي", - "decline": "رفض", - "accept": "قبول", - "details": "تفاصيل", - "youtube": "YouTube", - "channel": "قناة", - "likes": "إعجابات", - "dislikes": "عدم الإعجابات", - "views": "مشاهدات", - "streamUrl": "عنوان URL البث", - "stop": "إيقاف", - "sort_newest": "الترتيب حسب الأقدم", - "sort_oldest": "الترتيب حسب الأقدم", - "sleep_timer": "مؤقت النوم", - "mins": "{minutes} دقائق", - "hours": "{hours} ساعات", - "hour": "{hours} ساعة", - "custom_hours": "ساعات مخصصة", - "logs": "سجلات", - "developers": "المطورون", - "not_logged_in": "لم تقم بتسجيل الدخول", - "search_mode": "وضع البحث", - "audio_source": "مصدر الصوت", - "ok": "حسسناً", - "failed_to_encrypt": "فشل في التشفير", - "encryption_failed_warning": "يستخدم Spotube التشفير لتخزين بياناتك بشكل آمن. لكنها فشلت في القيام بذلك. لذلك سيعود الأمر إلى التخزين غير الآمن\nإذا كنت تستخدم Linux، فيرجى التأكد من تثبيت أي خدمة سرية (gnome-keyring، kde-wallet، keepassxc، إلخ)", - "querying_info": "جارٍ الاستعلام عن معلومات...", - "piped_api_down": "Piped API معطلة", - "piped_down_error_instructions": "المثيل الموجه {pipedInstance} معطل حاليًا\n\nيمكنك إما تغيير المثيل أو تغيير 'نوع API' إلى YouTube API الرسمي\n\nتأكد من إعادة تشغيل التطبيق بعد التغيير", - "you_are_offline": "أنت غير متصل حالياً", - "connection_restored": "تمت استعادة اتصالك بالإنترنت", - "use_system_title_bar": "استخدم شريط عنوان النظام", - "crunching_results": "تدمير النتائج", - "search_to_get_results": "إبحث للحصول على النتائج", - "use_amoled_mode": "استخدم وضع AMOLED", - "pitch_dark_theme": "موضوع دارت الأسود الفحمي", - "normalize_audio": "تطبيع الصوت", - "change_cover": "تغيير الغلاف", - "add_cover": "إضافة غلاف", - "restore_defaults": "استعادة الإعدادات الافتراضية", - "download_music_codec": "تنزيل ترميز الموسيقى", - "streaming_music_codec": "ترميز الموسيقى بالتدفق", - "login_with_lastfm": "تسجيل الدخول باستخدام Last.fm", - "connect": "اتصال", - "disconnect_lastfm": "قطع الاتصال بـ Last.fm", - "disconnect": "قطع الاتصال", - "username": "اسم المستخدم", - "password": "كلمة المرور", - "login": "تسجيل الدخول", - "login_with_your_lastfm": "تسجيل الدخول باستخدام حساب Last.fm الخاص بك", - "scrobble_to_lastfm": "تسجيل الاستماع على Last.fm", - "go_to_album": "الانتقال إلى الألبوم", - "discord_rich_presence": "وجود ديسكورد الغني", - "browse_all": "تصفح الكل", - "genres": "الأنواع الموسيقية", - "explore_genres": "استكشاف الأنواع", - "step_3_steps": "انسخ قيمة الكوكي \"sp_dc\"", - "step_4_steps": "الصق قيمة \"sp_dc\" المنسوخة", - "friends": "أصدقاء", - "no_lyrics_available": "عذرًا، تعذر العثور على كلمات الأغنية لهذه العنصر", - "sort_duration": "ترتيب حسب المدة", - "start_a_radio": "بدء راديو", - "how_to_start_radio": "كيف تريد بدء الراديو؟", - "replace_queue_question": "هل تريد استبدال قائمة التشغيل الحالية أم إضافة إليها؟", - "endless_playback": "تشغيل بلا نهاية", - "delete_playlist": "حذف قائمة التشغيل", - "delete_playlist_confirmation": "هل أنت متأكد أنك تريد حذف هذه قائمة التشغيل؟", - "local_tracks": "المسارات المحلية", - "song_link": "رابط الأغنية", - "skip_this_nonsense": "تخطي هذه الهراء", - "freedom_of_music": "“حرية الموسيقى”", - "freedom_of_music_palm": "“حرية الموسيقى في متناول يدك”", - "get_started": "لنبدأ", - "youtube_source_description": "موصى به ويعمل بشكل أفضل.", - "piped_source_description": "تشعر بالحرية؟ نفس يوتيوب ولكن أكثر حرية.", - "jiosaavn_source_description": "الأفضل لمنطقة جنوب آسيا.", - "highest_quality": "أعلى جودة: {quality}", - "select_audio_source": "اختر مصدر الصوت", - "endless_playback_description": "إلحاق الأغاني الجديدة تلقائيًا\nإلى نهاية قائمة التشغيل", - "choose_your_region": "اختر منطقتك", - "choose_your_region_description": "سيساعدك هذا في عرض المحتوى المناسب\nلموقعك.", - "choose_your_language": "اختر لغتك", - "help_project_grow": "ساعد في نمو هذا المشروع", - "help_project_grow_description": "Spotube هو مشروع مفتوح المصدر. يمكنك مساعدة هذا المشروع في النمو عن طريق المساهمة في المشروع، أو الإبلاغ عن الأخطاء، أو اقتراح ميزات جديدة.", - "contribute_on_github": "المساهمة على GitHub", - "donate_on_open_collective": "التبرع على Open Collective", - "browse_anonymously": "تصفح بشكل مجهول", - "enable_connect": "تمكين الاتصال", - "enable_connect_description": "التحكم في Spotube من الأجهزة الأخرى", - "devices": "الأجهزة", - "select": "اختر", - "connect_client_alert": "أنت تتم التحكم بواسطة {client}", - "this_device": "هذا الجهاز", - "remote": "بعيد", - "local_library": "المكتبة المحلية", - "add_library_location": "أضف إلى المكتبة", - "remove_library_location": "إزالة من المكتبة", - "local_tab": "محلي", - "stats": "إحصائيات", - "and_n_more": "و {count} أكثر", - "recently_played": "تم تشغيله مؤخرًا", - "browse_more": "تصفح المزيد", - "no_title": "بدون عنوان", - "not_playing": "غير مشغل", - "epic_failure": "فشل كبير!", - "added_num_tracks_to_queue": "تمت إضافة {tracks_length} مسارات إلى قائمة الانتظار", - "spotube_has_an_update": "يوجد تحديث لسبوتيوب", - "download_now": "تحميل الآن", - "nightly_version": "تم إصدار سبوتيوب الليلي {nightlyBuildNum}", - "release_version": "تم إصدار سبوتيوب v{version}", - "read_the_latest": "اقرأ الأحدث", - "release_notes": "ملاحظات الإصدار", - "pick_color_scheme": "اختر نظام الألوان", - "save": "حفظ", - "choose_the_device": "اختر الجهاز:", - "multiple_device_connected": "تم توصيل أجهزة متعددة.\nاختر الجهاز الذي تريد إجراء هذه العملية عليه", - "nothing_found": "لم يتم العثور على شيء", - "the_box_is_empty": "الصندوق فارغ", - "top_artists": "أفضل الفنانين", - "top_albums": "أفضل الألبومات", - "this_week": "هذا الأسبوع", - "this_month": "هذا الشهر", - "last_6_months": "آخر 6 أشهر", - "this_year": "هذا العام", - "last_2_years": "آخر سنتين", - "all_time": "كل الوقت", - "powered_by_provider": "مدعوم من {providerName}", - "email": "البريد الإلكتروني", - "profile_followers": "المتابعين", - "birthday": "عيد الميلاد", - "subscription": "اشتراك", - "not_born": "لم يولد", - "hacker": "هاكر", - "profile": "الملف الشخصي", - "no_name": "بدون اسم", - "edit": "تعديل", - "user_profile": "ملف المستخدم", - "count_plays": "{count} تشغيلات", - "streaming_fees_hypothetical": "رسوم البث (افتراضية)", - "minutes_listened": "الدقائق المستمعة", - "streamed_songs": "الأغاني المذاعة", - "count_streams": "{count} بث", - "owned_by_you": "مملوك لك", - "copied_shareurl_to_clipboard": "تم نسخ {shareUrl} إلى الحافظة", - "spotify_hipotetical_calculation": "*هذا محسوب بناءً على الدفع لكل بث من سبوتيفاي\nبقيمة 0.003 إلى 0.005 دولار. هذا حساب افتراضي\nلإعطاء المستخدم فكرة عن المبلغ الذي\nكان سيدفعه للفنانين إذا كانوا قد استمعوا\nإلى أغنيتهم على سبوتيفاي.", - "count_mins": "{minutes} دقيقة", - "summary_minutes": "الدقائق", - "summary_listened_to_music": "استمعت إلى الموسيقى", - "summary_songs": "أغاني", - "summary_streamed_overall": "بث بشكل عام", - "summary_owed_to_artists": "مدين للفنانين\nهذا الشهر", - "summary_artists": "الفنانين", - "summary_music_reached_you": "وصلت إليك الموسيقى", - "summary_full_albums": "ألبومات كاملة", - "summary_got_your_love": "حصلت على حبك", - "summary_playlists": "قوائم التشغيل", - "summary_were_on_repeat": "كانت على التكرار", - "total_money": "المجموع {money}", - "webview_not_found": "لم يتم العثور على Webview", - "webview_not_found_description": "لم يتم تثبيت بيئة تشغيل Webview على جهازك.\nإذا كانت مثبتة، تأكد من وجودها في environment PATH\n\nبعد التثبيت، أعد تشغيل التطبيق", - "unsupported_platform": "المنصة غير مدعومة", - "invidious_instance": "مثيل خادم Invidious", - "invidious_description": "مثيل خادم Invidious المستخدم لمطابقة المسارات", - "invidious_warning": "قد لا تعمل بعض الخوادم بشكل جيد. استخدمها على مسؤوليتك الخاصة", - "invidious_source_description": "مشابه لـ Piped ولكن بتوافر أعلى", - "cache_music": "تخزين الموسيقى مؤقتًا", - "open": "فتح", - "cache_folder": "مجلد التخزين المؤقت", - "export": "تصدير", - "clear_cache": "مسح التخزين المؤقت", - "clear_cache_confirmation": "هل تريد مسح التخزين المؤقت؟", - "export_cache_files": "تصدير الملفات المخزنة مؤقتًا", - "found_n_files": "تم العثور على {count} ملف", - "export_cache_confirmation": "هل تريد تصدير هذه الملفات إلى", - "exported_n_out_of_m_files": "تم تصدير {filesExported} من أصل {files} ملفات", - "playlist": "قائمة التشغيل", - "no_loop": "بدون تكرار", - "generate": "إنشاء", - "undo": "تراجع", - "download_all": "تنزيل الكل", - "add_all_to_playlist": "إضافة الكل إلى قائمة التشغيل", - "add_all_to_queue": "إضافة الكل إلى القائمة", - "play_all_next": "تشغيل الكل بعد ذلك", - "pause": "إيقاف مؤقت", - "view_all": "عرض الكل", - "no_tracks_added_yet": "يبدو أنك لم تضف أي مسارات بعد", - "no_tracks": "يبدو أنه لا يوجد أي مسارات هنا", - "no_tracks_listened_yet": "يبدو أنك لم تستمع إلى أي شيء بعد", - "not_following_artists": "أنت لا تتابع أي فنانين", - "no_favorite_albums_yet": "يبدو أنك لم تضف أي ألبومات إلى المفضلة بعد", - "no_logs_found": "لم يتم العثور على سجلات", - "youtube_engine": "محرك يوتيوب", - "youtube_engine_not_installed_title": "{engine} غير مثبت", - "youtube_engine_not_installed_message": "{engine} غير مثبت في نظامك.", - "youtube_engine_set_path": "تأكد من أنه متاح في متغير PATH أو\nحدد المسار الكامل للملف القابل للتنفيذ {engine} أدناه", - "youtube_engine_unix_issue_message": "في أنظمة macOS/Linux/Unix مثل الأنظمة، لن يعمل تعيين المسار في .zshrc/.bashrc/.bash_profile وما إلى ذلك.\nيجب تعيين المسار في ملف تكوين الصدفة", - "download": "تنزيل", - "file_not_found": "الملف غير موجود", - "custom": "مخصص", - "add_custom_url": "إضافة URL مخصص", - "edit_port": "تعديل المنفذ", - "port_helper_msg": "القيمة الافتراضية هي -1 والتي تشير إلى رقم عشوائي. إذا كان لديك جدار ناري مُعد، يُوصى بتعيين هذا.", - "connect_request": "السماح لـ {client} بالاتصال؟", - "connection_request_denied": "تم رفض الاتصال. المستخدم رفض الوصول.", - "hipotetical_calculation": "*تمّ الحساب بمعدّل دفعة تتراوح بين 0.003–0.005 دولار أمريكي لكل تشغيل على منصات الموسيقى عبر الإنترنت. هذا حساب افتراضي لتوضيح للمستخدم مقدار ما كان سيدفعه للفنانين لو استمع إلى أغنيتهم على منصات مختلفة.", - "an_error_occurred": "حدث خطأ", - "copy_to_clipboard": "نسخ إلى الحافظة", - "view_logs": "عرض السجلات", - "retry": "إعادة المحاولة", - "no_default_metadata_provider_selected": "لم تقُم بتعيين مزود بيانات افتراضي", - "manage_metadata_providers": "إدارة مزوّدي البيانات", - "open_link_in_browser": "فتح الرابط في المتصفح؟", - "do_you_want_to_open_the_following_link": "هل ترغب في فتح الرابط التالي؟", - "unsafe_url_warning": "قد يكون فتح الروابط من مصادر غير موثوقة غير آمن. تحرّ الحذر!\nيمكنك أيضًا نسخ الرابط إلى الحافظة.", - "copy_link": "نسخ الرابط", - "building_your_timeline": "جاري بناء المخطط الزمني استنادًا إلى استماعاتك...", - "official": "رسمي", - "author_name": "المؤلّف: {author}", - "third_party": "طرف ثالث", - "plugin_requires_authentication": "تتطلّب الإضافة تسجيل الدخول", - "update_available": "تحديث متوفر", - "supports_scrobbling": "يدعم التتبع (scrobbling)", - "plugin_scrobbling_info": "تقوم هذه الإضافة بتتبع مقاطعك الموسيقية لإنشاء سجل الاستماع الخاص بك.", - "default_plugin": "الافتراضي", - "set_default": "تعيين كافتراضي", - "support": "الدعم", - "support_plugin_development": "دعم تطوير الإضافات", - "can_access_name_api": "- يمكن الوصول إلى واجهة برمجة التطبيقات **{name}**", - "do_you_want_to_install_this_plugin": "هل ترغب في تثبيت هذه الإضافة؟", - "third_party_plugin_warning": "هذه الإضافة من مستودع طرف ثالث. تأكد من موثوقية المصدر قبل التثبيت.", - "author": "المؤلف", - "this_plugin_can_do_following": "يمكن لهذه الإضافة القيام بما يلي", - "install": "تثبيت", - "install_a_metadata_provider": "تثبيت مزوّد بيانات", - "no_tracks_playing": "لا توجد مقاطع تعمل حاليًا", - "synced_lyrics_not_available": "الكلمات المتزامنة غير متوفرة لهذه الأغنية. يُرجى استخدام", - "plain_lyrics": "الكلمات العادية", - "tab_instead": "بدلاً من ذلك، استخدم التبويب.", - "disclaimer": "إخلاء المسؤولية", - "third_party_plugin_dmca_notice": "لا تتحمّل فريق Spotube أي مسؤولية (بما في ذلك القانونية) عن أي من الإضافات “لطرف ثالث”.\nاستخدمها على مسؤوليتك الخاصّة. لأيّة أخطاء/مشكلات، يُرجى الإبلاغ عنها في مستودع الإضافة.\n\nإذا كانت أي إضافة “لطرف ثالث” تنتهك شروط الخدمة أو قانون DMCA الخاص بأي خدمة أو كيان قانوني، فيُرجى طلب اتخاذ إجراء من مؤلف الإضافة أو منصة الاستضافة مثل GitHub/Codeberg. الإضافات المدرجة كـ “لطرف ثالث” هي مفعّلة ومُدارة من المجتمع، وليس لدينا صلاحية إدارتها أو التدخل فيها.\n\n", - "input_does_not_match_format": "المدخل لا يتوافق مع التنسيق المطلوب", - "metadata_provider_plugins": "إضافات مزود البيانات", - "paste_plugin_download_url": "الصق رابط التنزيل أو GitHub/Codeberg أو رابط مباشر لملف .smplug", - "download_and_install_plugin_from_url": "تنزيل وتثبيت الإضافة من رابط", - "failed_to_add_plugin_error": "فشل في إضافة الإضافة: {error}", - "upload_plugin_from_file": "رفع الإضافة من ملف", - "installed": "تم التثبيت", - "available_plugins": "الإضافات المتوفّرة", - "configure_your_own_metadata_plugin": "تهيئة مزوّد بيانات للقائمة/الألبوم/الفنان/المصدر خاص بك", - "audio_scrobblers": "أجهزة تتبع الصوت", - "scrobbling": "التتبع", - "download_music_format": "تنسيق تنزيل الموسيقى", - "streaming_music_format": "تنسيق بث الموسيقى", - "download_music_quality": "جودة تنزيل الموسيقى", - "streaming_music_quality": "جودة بث الموسيقى", - "default_metadata_source": "مصدر البيانات الوصفية الافتراضي", - "set_default_metadata_source": "تعيين مصدر البيانات الوصفية الافتراضي", - "default_audio_source": "مصدر الصوت الافتراضي", - "set_default_audio_source": "تعيين مصدر الصوت الافتراضي", - "plugins": "الإضافات", - "configure_plugins": "قم بتكوين مزود البيانات الوصفية ومكونات مصدر الصوت الخاصة بك", - "source": "المصدر: ", - "uncompressed": "غير مضغوط", - "dab_music_source_description": "لمحبي الصوتيات. يوفر تدفقات صوتية عالية الجودة/بدون فقدان. مطابقة دقيقة للمسارات بناءً على ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_bn.arb b/lib/l10n/app_bn.arb deleted file mode 100644 index 4d001da1..00000000 --- a/lib/l10n/app_bn.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "অতিথি", - "browse": "ব্রাউজ করুন", - "search": "অনুসন্ধান করুন", - "library": "লাইব্রেরী", - "lyrics": "গানের কথা", - "settings": "সেটিংস", - "genre_categories_filter": "গানের ধরণ বা শ্রেণি খুঁজুন", - "genre": "গানের ধরণ", - "personalized": "আপনার জন্য", - "featured": "বৈশিষ্ট্যযুক্ত", - "new_releases": "সাম্প্রতিক মুক্তি প্রাপ্ত", - "songs": "গান", - "playing_track": "{track} চালানো হচ্ছে", - "queue_clear_alert": "এটি বর্তমান প্লেলিষ্ট সাফ করে দিবে। {track_length}টি গান বাদ দেওয়া হবে\nআপনি কি চালিয়ে যেতে চান?", - "load_more": "আরো লোড করুন", - "playlists": "প্লেলিস্ট", - "artists": "শিল্পী", - "albums": "অ্যালবাম", - "tracks": "গানের ট্র্যাক", - "downloads": "ডাউনলোড", - "filter_playlists": "প্লেলিস্ট অনুসন্ধান করুন...", - "liked_tracks": "পছন্দের গান", - "liked_tracks_description": "আপনার পছন্দের গান সমূহ", - "create_playlist": "প্লেলিস্ট তৈরি করুন", - "create_a_playlist": "একটি প্লেলিস্ট তৈরি করুন", - "create": "তৈরি করুন", - "cancel": "বাতিল করুন", - "playlist_name": "প্লেলিস্টের নাম", - "name_of_playlist": "প্লেলিস্টের নাম", - "description": "বিবরণ", - "public": "পাবলিক", - "collaborative": "সহযোগিতামূলক", - "search_local_tracks": "ডাউনলোডকৃত গান অনুসন্ধান করুন...", - "play": "চালান", - "delete": "মুছে ফেলুন", - "none": "কোনটিই না", - "sort_a_z": "A-Z ক্রমে সাজান", - "sort_z_a": "Z-A ক্রমে সাজান", - "sort_artist": "শিল্পীর ক্রমে সাজান", - "sort_album": "অ্যালবামের ক্রমে সাজান", - "sort_tracks": "গানের ক্রম", - "currently_downloading": "ডাউনলোড করা হচ্ছে ({tracks_length})", - "cancel_all": "সব বাতিল করুন", - "filter_artist": "শিল্পীর অনুসন্ধান করুন...", - "followers": "{followers} অনুসরণকারী", - "add_artist_to_blacklist": "শিল্পীকে ব্ল্যাকলিস্টে যোগ করুন", - "top_tracks": "শীর্ষ গানের ট্র্যাক", - "fans_also_like": "অনুসরণকারীদের পছন্দ", - "loading": "লোড হচ্ছে...", - "artist": "শিল্পী", - "blacklisted": "ব্ল্যাকলিস্টে আছে", - "following": "অনুসরণ করছেন", - "follow": "অনুসরণ করুন", - "artist_url_copied": "শিল্পীর URL কপি করা হয়েছে", - "added_to_queue": "{tracks}টি গানের ট্র্যাক কিউতে যোগ করা হয়েছে", - "filter_albums": "অ্যালবাম অনুসন্ধান করুন...", - "synced": "সময় সুসংগত", - "plain": "অসুসংগত", - "shuffle": "অদলবদল", - "search_tracks": "গান অনুসন্ধান করুন...", - "released": "প্রকাশিত হয়েছে", - "error": "ত্রুটি {error}", - "title": "শিরোনাম", - "time": "সময়", - "more_actions": "আরও অপশন", - "download_count": "ডাউনলোড ({count}টি)", - "add_count_to_playlist": "প্লেলিস্টে যোগ করুন ({count}টি)", - "add_count_to_queue": "কিউতে যোগ করুন ({count}টি)", - "play_count_next": "পরবর্তীতে চালান ({count}টি)", - "album": "অ্যালবাম", - "copied_to_clipboard": "{data} ক্লিপবোর্ডে কপি করা হয়েছে", - "add_to_following_playlists": "নিম্নলিখিত প্লেলিস্টে {track} যোগ করুন", - "add": "যোগ করুন", - "added_track_to_queue": "কিউতে {track} যোগ করা হয়েছে", - "add_to_queue": "কিউতে যোগ করুন", - "track_will_play_next": "{track} পরবর্তীতে চালানো হবে", - "play_next": "পরবর্তীতে চালান", - "removed_track_from_queue": "কিউ থেকে {track} সরিয়ে নেওয়া হয়েছে", - "remove_from_queue": "কিউ থেকে সরান", - "remove_from_favorites": "পছন্দের তালিকা থেকে অপসারণ করুন", - "save_as_favorite": "পছন্দের তালিকায় সংরক্ষণ করুন", - "add_to_playlist": "প্লেলিস্টে যোগ করুন", - "remove_from_playlist": "প্লেলিস্ট থেকে সরান", - "add_to_blacklist": "ব্ল্যাকলিস্টে যোগ করুন", - "remove_from_blacklist": "ব্ল্যাকলিস্ট থেকে সরান", - "share": "শেয়ার করুন", - "mini_player": "মিনি প্লেয়ার", - "slide_to_seek": "গান সামনে বা পিছনে নিতে স্লাইড করুন", - "shuffle_playlist": "প্লেলিস্ট এলোমেলো করুন", - "unshuffle_playlist": "প্লেলিস্ট আগের মতো করুন", - "previous_track": "আগের গানের ট্র্যাক", - "next_track": "পরের গানের ট্র্যাক", - "pause_playback": "গান বন্ধ করুন", - "resume_playback": "গান চালু করুন", - "loop_track": "গান শেষে পুনরায় চালান", - "repeat_playlist": "প্লেলিস্ট শেষে পুনরায় চালান", - "queue": "গানের কিউ", - "alternative_track_sources": "বিকল্প গানের উৎস", - "download_track": "গান ডাউনলোড করুন", - "tracks_in_queue": "{tracks}টি গান কিউতে রয়েছে", - "clear_all": "সব মুছে ফেলুন", - "show_hide_ui_on_hover": "হভার করলে UI দেখান/লুকান", - "always_on_top": "সর্বদা উপরে", - "exit_mini_player": "মিনি প্লেয়ার থেকে বের হয়ে যান", - "download_location": "ডাউনলোড স্থান", - "account": "অ্যাকাউন্ট", - "login_with_spotify": "আপনার Spotify account দিয়ে লগইন করুন", - "connect_with_spotify": "Spotify লগইন", - "logout": "লগআউট করুন", - "logout_of_this_account": "অ্যাকাউন্ট থেকে লগআউট করুন", - "language_region": "ভাষা ও অঞ্চল", - "language": "ভাষা", - "system_default": "সিস্টেম ডিফল্ট", - "market_place_region": "মার্কেটপ্লেস অঞ্চল", - "recommendation_country": "দেশভিত্তিক সঙ্গীত পরামর্শের জন্য দেশ", - "appearance": "রুপ", - "layout_mode": "UI বিন্যাস রূপ", - "override_layout_settings": "প্রতিক্রিয়াশীল UI বিন্যাস রূপের সেটিংস পরিবর্তন করুন", - "adaptive": "অভিযোজিত", - "compact": "আঁটসাঁট UI", - "extended": "বিস্তৃত UI", - "theme": "থিম", - "dark": "অন্ধকার", - "light": "উজ্জল", - "system": "সিস্টেম থিম", - "accent_color": "প্রভাবশালী রং", - "sync_album_color": "অ্যালবাম সুসংগত UI এর রং", - "sync_album_color_description": "অ্যালবাম কভারের প্রভাবশালী রঙ UI অ্যাকসেন্ট রঙ হিসাবে ব্যবহার করে", - "playback": "সংগীতের প্লেব্যাক", - "audio_quality": "শব্দের গুণমান", - "high": "উচ্চ", - "low": "নিম্ন", - "pre_download_play": "আগে গান ডাউনলোড করে পরে চালান ", - "pre_download_play_description": "গান স্ট্রিম করার পরিবর্তে, ডাউনলোড করুন এবং প্লে করুন (উচ্চ ব্যান্ডউইথ ব্যবহারকারীদের জন্য প্রস্তাবিত)", - "skip_non_music": "গানের নন-মিউজিক সেগমেন্ট এড়িয়ে যান (SponsorBlock)", - "blacklist_description": "কালো তালিকাভুক্ত গানের ট্র্যাক এবং শিল্পী", - "wait_for_download_to_finish": "ডাউনলোড শেষ হওয়ার জন্য অপেক্ষা করুন", - "desktop": "ডেস্কটপ", - "close_behavior": "বন্ধ করার প্রক্রিয়া", - "close": "বন্ধ করুন", - "minimize_to_tray": "সিস্টেম ট্রেতে রাখুন", - "show_tray_icon": "সিস্টেম ট্রে আইকন দেখান", - "about": "বিস্তারিত", - "u_love_spotube": "আমরা জানি আপনি Spotube কে ভালবাসেন", - "check_for_updates": "আপডেট চেক করুন", - "about_spotube": "Spotube সম্পর্কে বিস্তারিত", - "blacklist": "কালো তালিকা", - "please_sponsor": "স্পনসর/সহায়তা করুন", - "spotube_description": "Spotube, একটি কর্মদক্ষ, ক্রস-প্ল্যাটফর্ম, বিনামূল্যের জন্য Spotify ক্লায়েন্ট", - "version": "সংস্করণ", - "build_number": "বিল্ড নম্বর", - "founder": "প্রতিষ্ঠাতা", - "repository": "সংগ্রহস্থল", - "bug_issues": "বাগ/সমস্যা", - "made_with": "❤️ দিয়ে বাংলাদেশে🇧🇩 তৈরি", - "kingkor_roy_tirtho": "কিংকর রায় তীর্থ", - "copyright": "© 2021-{current_year} কিংকর রায় তীর্থ", - "license": "লাইসেন্স", - "add_spotify_credentials": "আপনার Spotify লগইন তথ্য যোগ করুন", - "credentials_will_not_be_shared_disclaimer": "চিন্তা করবেন না, আপনার কোনো লগইন তথ্য সংগ্রহ করা হবে না বা কারো সাথে শেয়ার করা হবে না", - "know_how_to_login": "আপনি কিভাবে লগইন করবেন তা জানেন না?", - "follow_step_by_step_guide": "ধাপে ধাপে নির্দেশিকা অনুসরণ করুন", - "spotify_cookie": "Spotify {name} কুকি", - "cookie_name_cookie": "{name} কুকি", - "fill_in_all_fields": "সমস্ত ফর্ম ক্ষেত্র পূরণ করুন", - "submit": "জমা দিন", - "exit": "প্রস্থান", - "previous": "পূর্ববর্তী", - "next": "পরবর্তী", - "done": "সম্পন্ন", - "step_1": "ধাপ 1", - "first_go_to": "প্রথমে যান", - "login_if_not_logged_in": "এবং যদি আপনি লগইন/সাইন-আপ না থাকেন তবে লগইন/সাইন-আপ করুন", - "step_2": "ধাপ 2", - "step_2_steps": "১. একবার আপনি লগ ইন করলে, ব্রাউজার ডেভটুল খুলতে F12 বা মাউসের রাইট ক্লিক > \"Inspect to open Browser DevTools\" টিপুন।\n২. তারপর \"Application\" ট্যাবে যান (Chrome, Edge, Brave etc..) অথবা \"Storage\" Tab (Firefox, Palemoon etc..)\n৩. \"Cookies \" বিভাগে যান তারপর \"https://accounts.spotify.com\" উপবিভাগে যান", - "step_3": "ধাপ 3", - "success_emoji": "আমরা সফল🥳", - "success_message": "এখন আপনি সফলভাবে আপনার Spotify অ্যাকাউন্ট দিয়ে লগ ইন করেছেন। সাধুভাত আপনাকে", - "step_4": "ধাপ 4", - "something_went_wrong": "কিছু ভুল হয়েছে", - "piped_instance": "Piped সার্ভার এড্রেস", - "piped_description": "গান ম্যাচ করার জন্য ব্যবহৃত পাইপড সার্ভার", - "piped_warning": "এগুলোর মধ্যে কিছু ভাল কাজ নাও করতে পারে৷ তাই নিজ দায়িত্বে ব্যবহার করুন", - "generate_playlist": "প্লেলিস্ট তৈরি করুন", - "track_exists": "ট্র্যাক {track} ইতিমধ্যে বিদ্যমান", - "replace_downloaded_tracks": "সমস্ত ডাউনলোড করা ট্র্যাক প্রতিস্থাপন করুন", - "skip_download_tracks": "সমস্ত ডাউনলোড করা ট্র্যাক এ স্কিপ করুন", - "do_you_want_to_replace": "আপনি কি বিদ্যমান ট্র্যাকটি প্রতিস্থাপন করতে চান?", - "replace": "প্রতিস্থাপন করুন", - "skip": "স্কিপ করুন", - "select_up_to_count_type": "{count} {type} পর্যন্ত নির্বাচন করুন", - "select_genres": "গানের ধরণ নির্বাচন করুন", - "add_genres": "গানের ধরণ যুক্ত করুন", - "country": "দেশ", - "number_of_tracks_generate": "উত্পাদিত ট্র্যাকের সংখ্যা", - "acousticness": "অধ্যাত্মিকতা", - "danceability": "নৃত্যমূলকতা", - "energy": "শক্তি", - "instrumentalness": "সাধারণতা", - "liveness": "জীবনমুক্ততা", - "loudness": "স্বরের উচ্চতা", - "speechiness": "বক্তব্যমূলকতা", - "valence": "সন্তোষমূলকতা", - "popularity": "জনপ্রিয়তা", - "key": "কী", - "duration": "সময়কাল (সেকেন্ড)", - "tempo": "গতি (বিপিএম)", - "mode": "মোড", - "time_signature": "সময়ের স্বাক্ষর", - "short": "সংক্ষিপ্ত", - "medium": "মাঝারি", - "long": "দীর্ঘ", - "min": "সর্বনিম্ন", - "max": "সর্বাধিক", - "target": "লক্ষ্য", - "moderate": "মাঝারি", - "deselect_all": "সমস্ত অপচুন করুন", - "select_all": "সমস্ত নির্বাচন করুন", - "are_you_sure": "আপনি কি নিশ্চিত?", - "generating_playlist": "আপনার কাস্টম প্লেলিস্ট তৈরি হচ্ছে...", - "selected_count_tracks": "{count} ট্র্যাক নির্বাচিত", - "download_warning": "যদি আপনি সমস্ত ট্র্যাকগুলি একসঙ্গে ডাউনলোড করেন, তবে আপনি নিশ্চিতভাবে সঙ্গীত চুরি করছেন এবং সৃষ্টিশীল সমাজে ক্ষতি দিচ্ছেন। আমি আশা করি আপনি এটা সম্পর্কে জানেন। সর্বদা, শিল্পীদের কঠিন পরিশ্রমকে সম্মান করতে চেষ্টা করুন এবং সমর্থন করুন", - "download_ip_ban_warning": "তথ্যবিশ্বস্ত করে নেওয়া যায় যে, আপনার IP ঠিকানাটি YouTube দ্বারা স্থানান্তরিত করা হতে পারে যখন সাধারন থেকে বেশি ডাউনলোড অনুরোধ হয়। IP ব্লকের মাধ্যমে আপনি কমপক্ষে ২-৩ মাস ধরে (ঐ IP ডিভাইস থেকে) YouTube ব্যবহার করতে পারবেন না। এবং Spotube কোনও দায়িত্ব সম্পর্কে দায়িত্ব বহন করে না যদি এটি ঘটে।", - "by_clicking_accept_terms": "'গ্রহণ' ক্লিক করে আপনি নিম্নলিখিত শর্তাদি স্বীকার করছেন:", - "download_agreement_1": "আমি জানি আমি সঙ্গীত চুরি করছি। আমি খারাপ", - "download_agreement_2": "আমি কেবলমাত্র তাদের কাজ কেনার জন্য অর্থ নেই কিন্তু যেখানে প্রয়োজন সেখানে আমি শিল্পীদের সমর্থন করব।", - "download_agreement_3": "আমি সম্পূর্ণরূপে জানি যে আমার IP YouTube-তে ব্লক হতে পারে এবং আমি Spotube বা তার মালিকানাধীন কোনও দায়িত্ব পেতে পারিনি আমার বর্তমান ক্রিয়াটি দ্বারা সৃষ্ট দুর্ঘটনা করার জন্য", - "decline": "অগ্রায়ন করুন", - "accept": "গ্রহণ করুন", - "details": "বিস্তারিত", - "youtube": "YouTube", - "channel": "চ্যানেল", - "likes": "লাইক", - "dislikes": "অপছন্দ", - "views": "দর্শনার্থী", - "streamUrl": "স্ট্রিম URL", - "stop": "বন্ধ করুন", - "sort_newest": "নতুনতম অনুসারে সাজান", - "sort_oldest": "পুরানোতম অনুসারে সাজান", - "sleep_timer": "স্লীপ টাইমার", - "mins": "{minutes} মিনিট", - "hours": "{hours} ঘন্টা", - "hour": "{hours} ঘন্টা", - "custom_hours": "কাস্টম ঘন্টা", - "logs": "লগ", - "developers": "ডেভেলপার", - "not_logged_in": "আপনি লগইন করা নেই", - "search_mode": "অনুসন্ধান মোড", - "audio_source": "অডিও উৎস", - "ok": "ঠিক আছে", - "failed_to_encrypt": "এনক্রিপ্ট করা ব্যর্থ হয়েছে", - "encryption_failed_warning": "Spotube আপনার তথ্যগুলি নিরাপদভাবে স্টোর করতে এনক্রিপশন ব্যবহার করে। কিন্তু এটি ব্যর্থ হয়েছে। তাই এটি অনিরাপদ স্টোরে ফলফল হবে\nযদি আপনি Linux ব্যবহার করেন, তবে দয়া করে নিশ্চিত হউন যে আপনার কোনও সিক্রেট-সার্ভিস gnome-keyring, kde-wallet, keepassxc ইত্যাদি ইনস্টল করা আছে", - "querying_info": "তথ্য অনুসন্ধান করা হচ্ছে", - "piped_api_down": "পাইপড API ডাউন আছে", - "piped_down_error_instructions": "বর্তমানে পাইপড ইনস্ট্যান্স {pipedInstance} ডাউন আছে\n\nইনস্ট্যান্স পরিবর্তন করুন অথবা 'API টাইপ' পরিবর্তন করুন অফিসিয়াল ইউটিউব API হতে\n\nপরিবর্তনের পরে অ্যাপটি পুনরায় চালানোর নিশ্চিত করুন", - "you_are_offline": "আপনি বর্তমানে অফলাইন", - "connection_restored": "আপনার ইন্টারনেট সংযোগ পুনরুদ্ধার হয়েছে", - "use_system_title_bar": "সিস্টেম শিরোনাম বার ব্যবহার করুন", - "update_playlist": "প্লেলিস্ট আপডেট করুন", - "update": "আপডেট", - "crunching_results": "ফলাফল বিশ্লেষণ করা হচ্ছে...", - "search_to_get_results": "ফলাফল পেতে খোঁজ করুন", - "use_amoled_mode": "AMOLED মোড ব্যবহার করুন", - "pitch_dark_theme": "পিচ ব্ল্যাক ডার্ট থিম", - "normalize_audio": "অডিও স্তরমান করুন", - "change_cover": "কভার পরিবর্তন করুন", - "add_cover": "কভার যোগ করুন", - "restore_defaults": "ডিফল্ট সেটিংস পুনরুদ্ধার করুন", - "download_music_codec": "সঙ্গীত কোডেক ডাউনলোড করুন", - "streaming_music_codec": "স্ট্রিমিং সঙ্গীত কোডেক", - "login_with_lastfm": "Last.fm দিয়ে লগইন করুন", - "connect": "সংযোগ করুন", - "disconnect_lastfm": "Last.fm সংযোগ বিচ্ছিন্ন করুন", - "disconnect": "সংযোগ বিচ্ছিন্ন করুন", - "username": "ব্যবহারকারীর নাম", - "password": "পাসওয়ার্ড", - "login": "লগইন", - "login_with_your_lastfm": "আপনার Last.fm অ্যাকাউন্ট দিয়ে লগইন করুন", - "scrobble_to_lastfm": "Last.fm এ স্ক্রবল করুন", - "go_to_album": "الانتقال إلى الألبوم", - "discord_rich_presence": "وجود ديسكورد الغني", - "browse_all": "تصفح الكل", - "genres": "الأنواع الموسيقية", - "explore_genres": "استكشاف الأنواع", - "step_3_steps": "কুকি \"sp_dc\" এর মানটি কপি করুন", - "step_4_steps": "কপি করা \"sp_dc\" মানটি পেস্ট করুন", - "friends": "বন্ধু", - "no_lyrics_available": "দুঃখিত, এই ট্র্যাকের জন্য কথা খুঁজে পাওয়া গেলনা", - "sort_duration": "দৈর্ঘ্য অনুযায়ী বাছাই করুন", - "start_a_radio": "রেডিও শুরু করুন", - "how_to_start_radio": "রেডিও কিভাবে শুরু করতে চান?", - "replace_queue_question": "আপনি বর্তমান কিউটি প্রতিস্থাপন করতে চান কিনা বা এর সাথে যুক্ত করতে চান?", - "endless_playback": "অবিরাম প্রচার", - "delete_playlist": "প্লেলিস্ট মুছুন", - "delete_playlist_confirmation": "আপনি কি নিশ্চিত যে আপনি এই প্লেলিস্টটি মুছতে চান?", - "local_tracks": "স্থানীয় ট্র্যাক", - "song_link": "গানের লিংক", - "skip_this_nonsense": "এই বাকবাস পালান", - "freedom_of_music": "“সংগীতের স্বাধীনতা”", - "freedom_of_music_palm": "“তোমার হাতের কাছে সংগীতের স্বাধীনতা”", - "get_started": "শুরু করা যাক", - "youtube_source_description": "প্রস্তাবিত এবং সেরা কাজ করে।", - "piped_source_description": "মন খারাপ? ইউটিউবের মতো আবার ফ্রি।", - "jiosaavn_source_description": "দক্ষিণ এশিয়ান অঞ্চলের জন্য সেরা।", - "highest_quality": "সর্বোচ্চ গুণগতি: {quality}", - "select_audio_source": "অডিও উৎস নির্বাচন করুন", - "endless_playback_description": "নতুন গান নিজে নিজে প্লেলিস্টের শেষে\nসংযুক্ত করুন", - "choose_your_region": "আপনার অঞ্চল নির্বাচন করুন", - "choose_your_region_description": "এটি স্পটুবে আপনাকে আপনার অবস্থানের জন্য ঠিক কন্টেন্ট দেখানোর সাহায্য করবে।", - "choose_your_language": "আপনার ভাষা নির্বাচন করুন", - "help_project_grow": "এই প্রকল্পের বৃদ্ধি করুন", - "help_project_grow_description": "স্পটুব একটি ওপেন সোর্স প্রকল্প। আপনি প্রকল্পে অবদান রাখেন, বাগ রিপোর্ট করেন, বা নতুন বৈশিষ্ট্যগুলি সুপারিশ করেন।", - "contribute_on_github": "গিটহাবে অবদান রাখুন", - "donate_on_open_collective": "ওপেন কলেক্টিভে অনুদান করুন", - "browse_anonymously": "অজানে ব্রাউজ করুন", - "enable_connect": "সংযোগ সক্রিয় করুন", - "enable_connect_description": "অন্যান্য ডিভাইস থেকে Spotube নিয়ন্ত্রণ করুন", - "devices": "ডিভাইস", - "select": "নির্বাচন করুন", - "connect_client_alert": "আপনি {client} দ্বারা নিয়ন্ত্রিত হচ্ছেন", - "this_device": "এই ডিভাইস", - "remote": "রিমোট", - "local_library": "স্থানীয় লাইব্রেরি", - "add_library_location": "লাইব্রেরিতে যোগ করুন", - "remove_library_location": "লাইব্রেরি থেকে সরান", - "local_tab": "স্থানীয়", - "stats": "পরিসংখ্যান", - "and_n_more": "এবং {count} আরও", - "recently_played": "সম্প্রতি বাজানো", - "browse_more": "আরও ব্রাউজ করুন", - "no_title": "কোনো শিরোনাম নেই", - "not_playing": "চালানো হচ্ছে না", - "epic_failure": "বিরাট ব্যর্থতা!", - "added_num_tracks_to_queue": "{tracks_length} ট্র্যাক সারিতে যোগ করা হয়েছে", - "spotube_has_an_update": "স্পটিউবে একটি আপডেট আছে", - "download_now": "এখনই ডাউনলোড করুন", - "nightly_version": "স্পটিউব নাইটলি {nightlyBuildNum} প্রকাশিত হয়েছে", - "release_version": "স্পটিউব v{version} প্রকাশিত হয়েছে", - "read_the_latest": "সর্বশেষ পড়ুন", - "release_notes": "রিলিজ নোট", - "pick_color_scheme": "রঙের থিম নির্বাচন করুন", - "save": "সংরক্ষণ করুন", - "choose_the_device": "ডিভাইস নির্বাচন করুন:", - "multiple_device_connected": "একাধিক ডিভাইস সংযুক্ত রয়েছে।\nযে ডিভাইসে আপনি এই ক্রিয়াটি চালাতে চান সেটি নির্বাচন করুন", - "nothing_found": "কিছুই পাওয়া যায়নি", - "the_box_is_empty": "বাক্সটি খালি", - "top_artists": "শীর্ষ শিল্পী", - "top_albums": "শীর্ষ অ্যালবাম", - "this_week": "এই সপ্তাহ", - "this_month": "এই মাস", - "last_6_months": "গত ৬ মাস", - "this_year": "এই বছর", - "last_2_years": "গত ২ বছর", - "all_time": "সব সময়", - "powered_by_provider": "{providerName} দ্বারা চালিত", - "email": "ইমেইল", - "profile_followers": "অনুসারী", - "birthday": "জন্মদিন", - "subscription": "সাবস্ক্রিপশন", - "not_born": "জন্মগ্রহণ করেনি", - "hacker": "হ্যাকার", - "profile": "প্রোফাইল", - "no_name": "কোন নাম নেই", - "edit": "সম্পাদনা করুন", - "user_profile": "ব্যবহারকারীর প্রোফাইল", - "count_plays": "{count} বার প্লে হয়েছে", - "streaming_fees_hypothetical": "স্ট্রিমিং ফি (ধারণাগত)", - "minutes_listened": "শুনেছেন মিনিট", - "streamed_songs": "স্ট্রিম করা গান", - "count_streams": "{count} বার স্ট্রিম", - "owned_by_you": "আপনার মালিকানাধীন", - "copied_shareurl_to_clipboard": "{shareUrl} ক্লিপবোর্ডে কপি করা হয়েছে", - "spotify_hipotetical_calculation": "*এটি স্পোটিফাইয়ের প্রতি স্ট্রিম\n$0.003 থেকে $0.005 পেআউটের ভিত্তিতে গণনা করা হয়েছে। এটি একটি ধারণাগত\nগণনা ব্যবহারকারীদেরকে জানাতে দেয় যে কত টাকা\nতারা শিল্পীদের দিতো যদি তারা স্পোটিফাইতে\nতাদের গান শুনতেন।", - "count_mins": "{minutes} মিনিট", - "summary_minutes": "মিনিট", - "summary_listened_to_music": "সঙ্গীত শুনেছেন", - "summary_songs": "গান", - "summary_streamed_overall": "মোট স্ট্রিম", - "summary_owed_to_artists": "এই মাসে\nশিল্পীদেরকে ঋণী", - "summary_artists": "শিল্পীর", - "summary_music_reached_you": "আপনার কাছে পৌঁছেছে সঙ্গীত", - "summary_full_albums": "সম্পূর্ণ অ্যালবাম", - "summary_got_your_love": "আপনার ভালোবাসা পেয়েছে", - "summary_playlists": "প্লেলিস্ট", - "summary_were_on_repeat": "পুনরাবৃত্তিতে ছিল", - "total_money": "মোট {money}", - "webview_not_found": "ওয়েবভিউ পাওয়া যায়নি", - "webview_not_found_description": "আপনার ডিভাইসে কোনো ওয়েবভিউ রানটাইম ইনস্টল করা নেই।\nযদি ইনস্টল থাকে, তা নিশ্চিত করুন যে এটি environment PATH এ রয়েছে\n\nইনস্টল করার পর, অ্যাপটি পুনরায় চালু করুন", - "unsupported_platform": "সমর্থিত প্ল্যাটফর্ম নয়", - "invidious_instance": "ইনভিডিয়াস সার্ভার ইন্সটেন্স", - "invidious_description": "ট্রাক মিলানোর জন্য ব্যবহৃত ইনভিডিয়াস সার্ভার", - "invidious_warning": "কিছু সার্ভার ভাল কাজ নাও করতে পারে। নিজের ঝুঁকিতে ব্যবহার করুন", - "invidious_source_description": "পাইপের মতো কিন্তু আরও বেশি উপলব্ধতা সহ", - "cache_music": "ক্যাশে সংগীত", - "open": "খুলুন", - "cache_folder": "ক্যাশে ফোল্ডার", - "export": "রপ্তানি", - "clear_cache": "ক্যাশে পরিষ্কার", - "clear_cache_confirmation": "আপনি কি ক্যাশে পরিষ্কার করতে চান?", - "export_cache_files": "ক্যাশে ফাইল রপ্তানি", - "found_n_files": "{count} টি ফাইল পাওয়া গেছে", - "export_cache_confirmation": "আপনি কি এই ফাইলগুলি রপ্তানি করতে চান", - "exported_n_out_of_m_files": "{filesExported} টি ফাইল রপ্তানি করা হয়েছে {files} এর মধ্যে", - "playlist": "প্লেলিস্ট", - "no_loop": "কোনো লুপ নেই", - "generate": "উৎপন্ন করুন", - "undo": "পূর্বাবস্থায় ফিরুন", - "download_all": "সব ডাউনলোড করুন", - "add_all_to_playlist": "সব প্লেলিস্টে যোগ করুন", - "add_all_to_queue": "সব কিউতে যোগ করুন", - "play_all_next": "সব পরবর্তী খেলুন", - "pause": "বিরতি", - "view_all": "সব দেখুন", - "no_tracks_added_yet": "এখনও কোনো ট্র্যাক যোগ করা হয়নি মনে হচ্ছে", - "no_tracks": "এখানে কোনো ট্র্যাক নেই মনে হচ্ছে", - "no_tracks_listened_yet": "এখনও কিছু শোনা হয়নি মনে হচ্ছে", - "not_following_artists": "আপনি কোনো শিল্পীকে অনুসরণ করছেন না", - "no_favorite_albums_yet": "এখনও কোনো অ্যালবাম প্রিয় তালিকায় যোগ করা হয়নি মনে হচ্ছে", - "no_logs_found": "কোনো লগ পাওয়া যায়নি", - "youtube_engine": "ইউটিউব ইঞ্জিন", - "youtube_engine_not_installed_title": "{engine} ইনস্টল করা নেই", - "youtube_engine_not_installed_message": "{engine} আপনার সিস্টেমে ইনস্টল করা নেই।", - "youtube_engine_set_path": "এটি PATH ভেরিয়েবলে উপলব্ধ কিনা নিশ্চিত করুন অথবা\nনীচে {engine} এক্সিকিউটেবল এর পূর্ণপথ সেট করুন", - "youtube_engine_unix_issue_message": "macOS/Linux/Unix-এর মতো অপারেটিং সিস্টেমে, .zshrc/.bashrc/.bash_profile ইত্যাদিতে পাথ সেট করা কাজ করবে না।\nআপনাকে শেল কনফিগারেশন ফাইলে পাথ সেট করতে হবে", - "download": "ডাউনলোড", - "file_not_found": "ফাইল পাওয়া যায়নি", - "custom": "কাস্টম", - "add_custom_url": "কাস্টম URL যোগ করুন", - "edit_port": "পোর্ট সম্পাদনা করুন", - "port_helper_msg": "ডিফল্ট হল -1 যা এলোমেলো সংখ্যা নির্দেশ করে। যদি আপনার ফায়ারওয়াল কনফিগার করা থাকে, তবে এটি সেট করা সুপারিশ করা হয়।", - "connect_request": "{client} কে সংযোগ করতে অনুমতি দেবেন?", - "connection_request_denied": "সংযোগ অস্বীকৃত। ব্যবহারকারী প্রবেশাধিকার অস্বীকার করেছে।", - "hipotetical_calculation": "*এটি নিরূপণ করা হয়েছে গড় অনলাইন মিউজিক স্ট্রিমিং প্ল্যাটফর্মের প্রতি স্ট্রিম 0.003–0.005 USD পেআউটের ভিত্তিতে। এটি একটি কাল্পনিক হিসাব যা ব্যবহারকারীকে ধারণা দিতে পারে তারা অন্যান্য স্ট্রিমিং প্ল্যাটফর্মে একই গান শোনার জন্য শিল্পীদের কত টাকা দিয়েছেন হোক।", - "an_error_occurred": "একটি ত্রুটি ঘটেছে", - "copy_to_clipboard": "ক্লিপবোর্ডে কপি করুন", - "view_logs": "লগ দেখুন", - "retry": "পুনরায় চেষ্টা করুন", - "no_default_metadata_provider_selected": "আপনি কোনো ডিফল্ট মেটাডেটা প্রদানকারী সেট করেননি", - "manage_metadata_providers": "মেটাডেটা প্রদানকারীগণ পরিচালনা করুন", - "open_link_in_browser": "লিংকটি ব্রাউজারে খুলবেন?", - "do_you_want_to_open_the_following_link": "নিচের লিংকটি খুলতে চান?", - "unsafe_url_warning": "অবিশ্বাসযোগ্য উৎস থেকে লিংক খোলা নিরাপদ নাও হতে পারে। সতর্ক থাকুন!\nআপনি এটি ক্লিপবোর্ডে কপি করতে পারেন।", - "copy_link": "লিংক কপি করুন", - "building_your_timeline": "আপনার শোনার ধারা অনুযায়ী টাইমলাইন তৈরি করা হচ্ছে...", - "official": "সরকারি", - "author_name": "লেখক: {author}", - "third_party": "তৃতীয় পক্ষ", - "plugin_requires_authentication": "প্লাগইনটি প্রমাণীকরণ প্রয়োজন", - "update_available": "হালনাগাদ উপলব্ধ", - "supports_scrobbling": "স্ক্রোব্বলিং সমর্থিত", - "plugin_scrobbling_info": "এই প্লাগইনটি আপনার সঙ্গীত স্ক্রোব্বল করে আপনার শোনা ইতিহাস তৈরি করে।", - "default_plugin": "ডিফল্ট", - "set_default": "ডিফল্ট হিসাবে নির্ধারণ করুন", - "support": "সমর্থন", - "support_plugin_development": "প্লাগইন উন্নয়নকে সমর্থন করুন", - "can_access_name_api": "- **{name}** API-তে অ্যাক্সেস করতে পারে", - "do_you_want_to_install_this_plugin": "আপনি কি এই প্লাগইন ইনস্টল করতে চান?", - "third_party_plugin_warning": "এই প্লাগইন একটি তৃতীয় পক্ষের রেপোজিটরির। ইনস্টল করার আগে উৎস বিশ্বস্ত কিনা নিশ্চিত করুন।", - "author": "লেখক", - "this_plugin_can_do_following": "এই প্লাগইন নিচের কাজ করতে পারে", - "install": "ইনস্টল করুন", - "install_a_metadata_provider": "একটি মেটাডেটা প্রদানকারী ইনস্টল করুন", - "no_tracks_playing": "বর্তমানে কোনো ট্র্যাক শোনা হচ্ছে না", - "synced_lyrics_not_available": "এই গানের জন্য সিঙ্ক্রোনাইজড লিরিক্স পাওয়া যায় না। অনুগ্রহ করে ব্যবহার করুন", - "plain_lyrics": "সহজ লিরিক্স", - "tab_instead": "তার পরিবর্তে ট্যাব ব্যবহার করুন।", - "disclaimer": "অস্বীকৃতি", - "third_party_plugin_dmca_notice": "Spotube দল কোনো “তৃতীয় পক্ষ” প্লাগইনের জন্য কোনো (আইনগত সহ) দায়িত্ব নেয় না। নিজের বিপদে ব্যবহার করুন। কোনো বাগ/সমস্যা হলে প্লাগইন রেপোজিটরিতে জানাতে অনুরোধ করা হচ্ছে।\n\nযদি কোনো “তৃতীয় পক্ষ” প্লাগইন কোনো পরিষেবা/আইনগত সংস্থার ToS/DMCA ভূঙ্গ করে, অনুগ্রহ করে “তৃতীয় পক্ষ” প্লাগইনের লেখক বা হোস্টিং প্ল্যাটফর্মে (যেমন GitHub/Codeberg) পদক্ষেপ নিতে বলুন। “তৃতীয় পক্ষ” লেবেলযুক্ত যুক্তিগুলি সকলই পাবলিক/কমিউনিটি দ্বারা রক্ষণাবেক্ষণ করা হয়; আমরা সেগুলি কিউরেট করি না, তাই আমরা কোনো পদক্ষেপ নিতে পারি না।\n\n", - "input_does_not_match_format": "ইনপুট প্রয়োজনীয় ফরম্যাটের সাথে মেলে না", - "metadata_provider_plugins": "মেটাডেটা প্রদানকারী প্লাগইনসমূহ", - "paste_plugin_download_url": "ডাউনলোড URL বা GitHub/Codeberg রিপো URL বা .smplug ফাইলের সরাসরি লিঙ্ক পেস্ট করুন", - "download_and_install_plugin_from_url": "URL থেকে প্লাগইন ডাউনলোড এবং ইনস্টল করুন", - "failed_to_add_plugin_error": "প্লাগইন যোগ করতে ব্যর্থ: {error}", - "upload_plugin_from_file": "ফাইল থেকে প্লাগইন আপলোড করুন", - "installed": "ইনস্টল করা হয়েছে", - "available_plugins": "উপলব্ধ প্লাগইনগুলো", - "configure_your_own_metadata_plugin": "নিজস্ব প্লেলিস্ট/অ্যালবাম/শিল্পী/ফিড মেটাডেটা প্রদানকারী কনফিগার করুন", - "audio_scrobblers": "অডিও স্ক্রোব্বলার্স", - "scrobbling": "স্ক্রোব্বলিং", - "download_music_format": "গান ডাউনলোডের বিন্যাস", - "streaming_music_format": "গান স্ট্রিমিং এর বিন্যাস", - "download_music_quality": "গান ডাউনলোডের মান", - "streaming_music_quality": "গান স্ট্রিমিং এর মান", - "default_metadata_source": "ডিফল্ট মেটাডেটা উৎস", - "set_default_metadata_source": "ডিফল্ট মেটাডেটা উৎস সেট করুন", - "default_audio_source": "ডিফল্ট অডিও উৎস", - "set_default_audio_source": "ডিফল্ট অডিও উৎস সেট করুন", - "plugins": "প্লাগইন", - "configure_plugins": "আপনার নিজের মেটাডেটা প্রদানকারী এবং অডিও উৎস প্লাগইন কনফিগার করুন", - "source": "উৎস: ", - "uncompressed": "অ-সংকুচিত", - "dab_music_source_description": "অডিওফাইলদের জন্য। উচ্চ-মানের/লসলেস অডিও স্ট্রিম প্রদান করে। সঠিক ISRC ভিত্তিক ট্র্যাক ম্যাচিং।" -} \ No newline at end of file diff --git a/lib/l10n/app_ca.arb b/lib/l10n/app_ca.arb deleted file mode 100644 index 06ed7ec6..00000000 --- a/lib/l10n/app_ca.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Convidat", - "browse": "Explorar", - "search": "Cercar", - "library": "Biblioteca", - "lyrics": "Lletres", - "settings": "Configuració", - "genre_categories_filter": "Filtrar categories o gèneres...", - "genre": "Gènere", - "personalized": "Personalizat", - "featured": "Destacat", - "new_releases": "Nous Llançaments", - "songs": "Cançons", - "playing_track": "Reproduint {track}", - "queue_clear_alert": "Això eliminarà la llista actual. S'eliminaran {track_length} cançons.\n¿Vol continuar?", - "load_more": "Carregar més", - "playlists": "Llistes de reproducció", - "artists": "Artistes", - "albums": "Àlbums", - "tracks": "Cançons", - "downloads": "Descàrregues", - "filter_playlists": "Filtrar les seves llistes de reproducció...", - "liked_tracks": "Cançons Preferides", - "liked_tracks_description": "Totes les seves cançons preferides", - "create_playlist": "Crear Llista de reproducció", - "create_a_playlist": "Crear una llista de reproducció", - "create": "Crear", - "cancel": "Cancel·lar", - "playlist_name": "Nom de la llista", - "name_of_playlist": "Nom de la lista", - "description": "Descripció", - "public": "Pública", - "collaborative": "Col·laborativa", - "search_local_tracks": "Cercar cançons locals...", - "play": "Reproduir", - "delete": "Eliminar", - "none": "Cap", - "sort_a_z": "Ordenar de la A a la Z", - "sort_z_a": "Ordenar de la Z a la A", - "sort_artist": "Ordenar per Artista", - "sort_album": "Ordenar per Àlbum", - "sort_tracks": "Ordenar Cançons", - "currently_downloading": "Descàrrega en curs ({tracks_length})", - "cancel_all": "Cancel·lar todo", - "filter_artist": "Filtrar artistes...", - "followers": "{followers} Seguidors", - "add_artist_to_blacklist": "Afegir artista a la llista negra", - "top_tracks": "Millors Cançons", - "fans_also_like": "Als fans també els hi agrada", - "loading": "Carregant...", - "artist": "Artista", - "blacklisted": "A la llista negra", - "following": "Seguint", - "follow": "Seguir", - "artist_url_copied": "URL de l'artista copiada al porta-retalls ", - "added_to_queue": "{tracks} cançons afegides a la llista", - "filter_albums": "Filtrar àlbums...", - "synced": "Sincronitzat", - "plain": "Normal", - "shuffle": "Aleatori", - "search_tracks": "Buscar cançons...", - "released": "Publicat", - "error": "Error {error}", - "title": "Títul", - "time": "Duració", - "more_actions": "Més accios", - "download_count": "Descarregar ({count})", - "add_count_to_playlist": "Afegir ({count}) a la llista de reproducció", - "add_count_to_queue": "Agregar ({count}) a la llista", - "play_count_next": "Reproduir ({count}) a continuació", - "album": "Àlbum", - "copied_to_clipboard": "{data} copiado al porta-retalls", - "add_to_following_playlists": "Afegir {track} a les llistes de reproducció següents", - "add": "Afegir", - "added_track_to_queue": "{track} afegida a la llista", - "add_to_queue": "Afegir a la llista", - "track_will_play_next": "{track} es reproduirà a continuació", - "play_next": "Reproduir a continuació", - "removed_track_from_queue": "{track} eliminada de la llista", - "remove_from_queue": "Eliminar de la llista", - "remove_from_favorites": "Eliminar de preferits", - "save_as_favorite": "Guardar a preferits", - "add_to_playlist": "Afegir a la llista de reproducció", - "remove_from_playlist": "Eliminar de la llista de reproducció", - "add_to_blacklist": "Afegir a la llista negra", - "remove_from_blacklist": "Eliminar de la llista negra", - "share": "Compartir", - "mini_player": "Reproductor Petit", - "slide_to_seek": "Lliscar per cercar endavant o endarrere", - "shuffle_playlist": "Mesclar la llista de reproducció", - "unshuffle_playlist": "No mesclar la llista de reproducció", - "previous_track": "Cançó anterior", - "next_track": "Canço següent", - "pause_playback": "Pausar reproducció", - "resume_playback": "Continuar reproducció", - "loop_track": "Repetir canço", - "repeat_playlist": "Repetir la llista de reproducció", - "queue": "Llista", - "alternative_track_sources": "Fonts alternatives de cançons", - "download_track": "Descarregar cançó", - "tracks_in_queue": "{tracks} cançons a la llista", - "clear_all": "Netejar tot", - "show_hide_ui_on_hover": "Mostrar/Ocultar interfície al passar el cursor", - "always_on_top": "Sempre visible", - "exit_mini_player": "Sortir del reproductor petit", - "download_location": "Ubicació de descàrregues", - "account": "Compte", - "login_with_spotify": "Iniciar sesión amb el seu compte de Spotify", - "connect_with_spotify": "Connectar amb Spotify", - "logout": "Tancar sessió", - "logout_of_this_account": "Tancar sessió d'aquest compte", - "language_region": "Idioma i Regió", - "language": "Idioma", - "system_default": "Predeterminat del sistema", - "market_place_region": "Regió de la botiga", - "recommendation_country": "País de recomanació", - "appearance": "Apariència", - "layout_mode": "Mode de disseny", - "override_layout_settings": "Anul·leu la configuració del mode de disseny responsiu", - "adaptive": "Adaptable", - "compact": "Compacte", - "extended": "Extès", - "theme": "Tema", - "dark": "Fosc", - "light": "Clar", - "system": "Sistema", - "accent_color": "Color d'accent", - "sync_album_color": "Sincronitzar color de l'àlbum", - "sync_album_color_description": "Utilitza el color dominant de l'álbum com a color d'accent", - "playback": "Reproducció", - "audio_quality": "Qualitat d'àudio", - "high": "Alta", - "low": "Baixa", - "pre_download_play": "Descàrrega prèvia i reproduir", - "pre_download_play_description": "En lloc de transmetre l'àudio, descarrega bytes i ho reprodueix (recomendat per usuaris amb un bon ample de banda)", - "skip_non_music": "Ometre segments que no son música (SponsorBlock)", - "blacklist_description": "Cançons i artistes de la llista negra", - "wait_for_download_to_finish": "Si us plau, esperi que acabi la descàrrega actual", - "desktop": "Escriptori", - "close_behavior": "Comportament al tancar", - "close": "Tancar", - "minimize_to_tray": "Minimizar a la safata del sistema", - "show_tray_icon": "Mostrar icona a la safata del sistema", - "about": "Sobre", - "u_love_spotube": "Sabem que li encanta Spotube", - "check_for_updates": "Buscar actualitzacions", - "about_spotube": "Sobre Spotube", - "blacklist": "Llista negra", - "please_sponsor": "Si us plau, patrocina/dona", - "spotube_description": "Spotube, un client lleuger, multiplataforma i gratuït de Spotify", - "version": "Versió", - "build_number": "Número de compilació", - "founder": "Fundador", - "repository": "Repositori", - "bug_issues": "Errors i problemes", - "made_with": "Fet amb ❤️ a Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Llicència", - "add_spotify_credentials": "Afegir les seves credencials de Spotify per començar", - "credentials_will_not_be_shared_disclaimer": "No es preocupi, les seves credencials no seran recollides ni compartides amb ningú", - "know_how_to_login": "No sap com fer-ho?", - "follow_step_by_step_guide": "Segueixi la guia pas a pas", - "spotify_cookie": "Cookie de Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Si us plau, completi tots els camps", - "submit": "Enviar", - "exit": "Sortir", - "previous": "Anterior", - "next": "Següent", - "done": "Fet", - "step_1": "Pas 1", - "first_go_to": "Primer, vagi a", - "login_if_not_logged_in": "i iniciï sessió/registri el seu compte si no ho ha fet encara", - "step_2": "Pas 2", - "step_2_steps": "1. Una vegada que hagi iniciat sessió, premi F12 o faci clic dret amb el ratolí > Inspeccionar per obrir les eines de desenvolulpador del navegador.\n2. Després vagi a la pestanya \"Application\" (Chrome, Edge, Brave, etc.) o \"Storage\" (Firefox, Palemoon, etc.)\n3. Vagi a la secció \"Cookies\" i després a la subsecció \"https://accounts.spotify.com\"", - "step_3": "Pas 3", - "success_emoji": "Èxit! 🥳", - "success_message": "Ara has iniciat sessió amb èxit al teu compte de Spotify. Bona feina!", - "step_4": "Pas 4", - "something_went_wrong": "Quelcom ha sortit malament", - "piped_instance": "Instància del servidor Piped", - "piped_description": "La instància del servidor Piped a utilitzar per la coincidència de cançons", - "piped_warning": "Algunes poden no funcionar bé, utilitzi-les sota el seu propi risc", - "generate_playlist": "Generar Llista de reproducció", - "track_exists": "La cançó {track} ja existeix", - "replace_downloaded_tracks": "Substituir totes les cançons descarregades", - "skip_download_tracks": "Ometre la descàrrega de totes les cançons descarregades", - "do_you_want_to_replace": "Vol substituir la cançó existent?", - "replace": "Substituir", - "skip": "Ometre", - "select_up_to_count_type": "Seleccionar fins{count} {type}", - "select_genres": "Seleccionar Gèneres", - "add_genres": "Afegir Gèneres", - "country": "País", - "number_of_tracks_generate": "Número de cançons a generar", - "acousticness": "Acústica", - "danceability": "Ballabilitat", - "energy": "Energia", - "instrumentalness": "Instrumental", - "liveness": "En viu", - "loudness": "Sonoritat", - "speechiness": "Parla", - "valence": "Valencia", - "popularity": "Popularidad", - "key": "To", - "duration": "Duració (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "Signatura de temps", - "short": "Curt", - "medium": "Mig", - "long": "Llarg", - "min": "Mín.", - "max": "Màx.", - "target": "Objetiu", - "moderate": "Moderat", - "deselect_all": "Desseleccionar tot", - "select_all": "Seleccionar tot", - "are_you_sure": "Està segur?", - "generating_playlist": "Generant la seva llista de reproducció personalitzada...", - "selected_count_tracks": "Cançons {count} seleccionades", - "download_warning": "Si descarrega totes les cançons de cop, està piratejant música clarament i causant dany a la societat creativa de la música. Espero que sigui conscient d'això i sempre intenti respectar i recolzar la forta feina dels artístes", - "download_ip_ban_warning": "Per cert, la seva IP pot ser bloquejada a YouTube degut a solicituds de descàrrega excessives. El bloqueig d'IP vol dir que no podrà utilitzar YouTube (fins i tot si ha iniciat sessió) durant un mínim de 2-3 meses desde esa dirección IP. I Spotube no es fa responsable si això succeeix en alguna ocasió", - "by_clicking_accept_terms": "Al fer clic a 'Acceptar', acepta els següents termes:", - "download_agreement_1": "Se que estic piratejant música. Sóc dolent", - "download_agreement_2": "Recolzaré l'artista quan pugui i només ho faig perquè no tinc diners per comprar el seu art", - "download_agreement_3": "Sóc completament conscient que la meva IP pot ser bloqueada per YouTube i no responsabilizo a Spotube ni als seus propietaris/contribuents per qualsevol incident causat per la meva acció actual", - "decline": "Rebutjar", - "accept": "Acceptar", - "details": "Detalls", - "youtube": "YouTube", - "channel": "Canal", - "likes": "M'agrada", - "dislikes": "No m'agrada", - "views": "Vistes", - "streamUrl": "URL del streaming", - "stop": "Parar", - "sort_newest": "Ordenar per més noves", - "sort_oldest": "Ordenar per més antigues", - "sleep_timer": "Temporitzador d'apagat", - "mins": "{minutes} minuts", - "hours": "{hours} hores", - "hour": "{hours} hora", - "custom_hours": "Hores personalitzades", - "logs": "Registres", - "developers": "Desenvolupadors", - "not_logged_in": "No ha iniciat sesió", - "search_mode": "Mode de cerca", - "audio_source": "Font d'àudio", - "ok": "OK", - "failed_to_encrypt": "Error al xifrar", - "encryption_failed_warning": "Spotube utilitza el xifrado per emmagatzemar les seves dades de forma segura. Però ha fallat. Per tant, tornarà a un emmagatzament no segur\nSi estè utilizant Linux, asseguri's de tenir instal·lats els serveis secrets com gnome-keyring, kde-wallet i keepassxc", - "piped_api_down": "La API de Piped no està operativa", - "piped_down_error_instructions": "La instància de Piped {pipedInstance} no està operativa en aquest moment\n\nCanvieu la instància o canvieu el 'Tipus d'API' a l'API oficial de YouTube\n\nAssegureu-vos de reiniciar l'aplicació després del canvi", - "you_are_offline": "Actualment no teniu connexió a internet", - "connection_restored": "S'ha restablert la connexió a internet", - "use_system_title_bar": "Utilitza la barra de títol del sistema", - "querying_info": "Consultant informació...", - "update_playlist": "Actualitzar la llista de reproducció", - "update": "Actualitzar", - "crunching_results": "Processant resultats...", - "search_to_get_results": "Cerca per obtenir resultats", - "use_amoled_mode": "Utilitza el mode AMOLED", - "pitch_dark_theme": "Tema de dart negre intens", - "normalize_audio": "Normalitza l'àudio", - "change_cover": "Canvia la coberta", - "add_cover": "Afegeix una coberta", - "restore_defaults": "Restaura els valors per defecte", - "download_music_codec": "Descarrega el codec de música", - "streaming_music_codec": "Codec de música en streaming", - "login_with_lastfm": "Inicia la sessió amb Last.fm", - "connect": "Connecta", - "disconnect_lastfm": "Desconnecta de Last.fm", - "disconnect": "Desconnecta", - "username": "Nom d'usuari", - "password": "Contrasenya", - "login": "Inicia la sessió", - "login_with_your_lastfm": "Inicia la sessió amb el teu compte de Last.fm", - "scrobble_to_lastfm": "Scrobble a Last.fm", - "go_to_album": "Anar a l'àlbum", - "discord_rich_presence": "Presència rica de Discord", - "browse_all": "Navega per tot", - "genres": "Gèneres", - "explore_genres": "Explora els gèneres", - "step_3_steps": "Copia el valor de la cookie \"sp_dc\"", - "step_4_steps": "Pega el valor copiado de \"sp_dc\"", - "friends": "Amics", - "no_lyrics_available": "Ho sentim, no es poden trobar les lletres d'aquesta pista", - "sort_duration": "Ordenar per Durada", - "start_a_radio": "Inicia una ràdio", - "how_to_start_radio": "Com vols començar la ràdio?", - "replace_queue_question": "Voleu substituir la cua actual o afegir-hi?", - "endless_playback": "Reproducció infinita", - "delete_playlist": "Suprimeix la llista de reproducció", - "delete_playlist_confirmation": "Esteu segur que voleu suprimir aquesta llista de reproducció?", - "local_tracks": "Pistes locals", - "song_link": "Enllaç de la cançó", - "skip_this_nonsense": "Omet aquesta tonteria", - "freedom_of_music": "“Llibertat de la música”", - "freedom_of_music_palm": "“Llibertat de la música a la palma de la mà”", - "get_started": "Comencem", - "youtube_source_description": "Recomanat i funciona millor.", - "piped_source_description": "Et sents lliure? El mateix que YouTube però més lliure.", - "jiosaavn_source_description": "El millor per a la regió del sud d'Àsia.", - "highest_quality": "Qualitat més alta: {quality}", - "select_audio_source": "Seleccioneu la font d'àudio", - "endless_playback_description": "Afegiu automàticament noves cançons\nal final de la cua", - "choose_your_region": "Trieu la vostra regió", - "choose_your_region_description": "Això ajudarà a Spotube a mostrar-vos el contingut adequat\nper a la vostra ubicació.", - "choose_your_language": "Trieu el vostre idioma", - "help_project_grow": "Ajuda a fer créixer aquest projecte", - "help_project_grow_description": "Spotube és un projecte de codi obert. Podeu ajudar a fer créixer aquest projecte contribuint al projecte, informant d'errors o suggerint noves funcionalitats.", - "contribute_on_github": "Contribueix a GitHub", - "donate_on_open_collective": "Fes una donació a Open Collective", - "browse_anonymously": "Navega de manera anònima", - "enable_connect": "Habilita la connexió", - "enable_connect_description": "Controla Spotube des d'altres dispositius", - "devices": "Dispositius", - "select": "Selecciona", - "connect_client_alert": "Estàs sent controlat per {client}", - "this_device": "Aquest dispositiu", - "remote": "Remot", - "local_library": "Biblioteca local", - "add_library_location": "Afegeix a la biblioteca", - "remove_library_location": "Elimina de la biblioteca", - "local_tab": "Local", - "stats": "Estadístiques", - "and_n_more": "i {count} més", - "recently_played": "Reproduït recentment", - "browse_more": "Navega més", - "no_title": "Sense títol", - "not_playing": "No s'està reproduint", - "epic_failure": "Fracàs èpic!", - "added_num_tracks_to_queue": "Afegit {tracks_length} pistes a la cua", - "spotube_has_an_update": "Spotube té una actualització", - "download_now": "Descarregar ara", - "nightly_version": "Spotube Nightly {nightlyBuildNum} ha estat publicat", - "release_version": "Spotube v{version} ha estat publicat", - "read_the_latest": "Llegeix el més recent", - "release_notes": "notes de la versió", - "pick_color_scheme": "Tria l'esquema de colors", - "save": "Desar", - "choose_the_device": "Tria el dispositiu:", - "multiple_device_connected": "Hi ha diversos dispositius connectats.\nTria el dispositiu on vols realitzar aquesta acció", - "nothing_found": "No s'ha trobat res", - "the_box_is_empty": "La caixa està buida", - "top_artists": "Millors artistes", - "top_albums": "Millors àlbums", - "this_week": "Aquesta setmana", - "this_month": "Aquest mes", - "last_6_months": "Últims 6 mesos", - "this_year": "Aquest any", - "last_2_years": "Últims 2 anys", - "all_time": "Tots els temps", - "powered_by_provider": "Funciona amb {providerName}", - "email": "Correu electrònic", - "profile_followers": "Seguidors", - "birthday": "Aniversari", - "subscription": "Subscripció", - "not_born": "No ha nascut", - "hacker": "Hacker", - "profile": "Perfil", - "no_name": "Sense nom", - "edit": "Editar", - "user_profile": "Perfil d'usuari", - "count_plays": "{count} reproduccions", - "streaming_fees_hypothetical": "Comissions de streaming (hipotètic)", - "minutes_listened": "minuts escoltats", - "streamed_songs": "cançons reproduïdes", - "count_streams": "{count} reproduccions", - "owned_by_you": "De la teva propietat", - "copied_shareurl_to_clipboard": "S'ha copiat {shareUrl} al porta-retalls", - "spotify_hipotetical_calculation": "*Això es calcula basant-se en els\npagaments per reproducció de Spotify de $0.003 a $0.005.\nAquest és un càlcul hipotètic per\ndonar als usuaris una idea de quant\nhaurien pagat als artistes si haguessin escoltat\nla seva cançó a Spotify.", - "count_mins": "{minutes} minuts", - "summary_minutes": "minuts", - "summary_listened_to_music": "has escoltat música", - "summary_songs": "cançons", - "summary_streamed_overall": "reproduït en general", - "summary_owed_to_artists": "degut als artistes\nAquest mes", - "summary_artists": "artistes", - "summary_music_reached_you": "La música t'ha arribat", - "summary_full_albums": "Àlbums complets", - "summary_got_your_love": "ha aconseguit el teu amor", - "summary_playlists": "llistes de reproducció", - "summary_were_on_repeat": "estaven en repetició", - "total_money": "total {money}", - "webview_not_found": "No s'ha trobat el Webview", - "webview_not_found_description": "No hi ha cap temps d'execució de Webview instal·lat al dispositiu.\nSi està instal·lat, assegureu-vos que estigui en el environment PATH\n\nDesprés d'instal·lar-lo, reinicieu l'aplicació", - "unsupported_platform": "Plataforma no compatible", - "invidious_instance": "Instància del servidor Invidious", - "invidious_description": "La instància del servidor Invidious per fer coincidir pistes", - "invidious_warning": "Algunes instàncies podrien no funcionar bé. Feu-les servir sota la vostra responsabilitat", - "invidious_source_description": "Similar a Piped però amb més disponibilitat", - "cache_music": "Música en caché", - "open": "Obrir", - "cache_folder": "Carpeta de caché", - "export": "Exportar", - "clear_cache": "Netejar caché", - "clear_cache_confirmation": "Voleu netejar la memòria cau?", - "export_cache_files": "Exportar arxius en caché", - "found_n_files": "S'han trobat {count} arxius", - "export_cache_confirmation": "Voleu exportar aquests arxius a", - "exported_n_out_of_m_files": "S'han exportat {filesExported} de {files} arxius", - "playlist": "Llista de reproducció", - "no_loop": "Sense repetició", - "generate": "Generar", - "undo": "Desfer", - "download_all": "Descarregar tot", - "add_all_to_playlist": "Afegir tot a la llista de reproducció", - "add_all_to_queue": "Afegir tot a la cua", - "play_all_next": "Reproduir tot a continuació", - "pause": "Pausa", - "view_all": "Veure tot", - "no_tracks_added_yet": "Sembla que encara no has afegit cap pista", - "no_tracks": "Sembla que no hi ha pistes aquí", - "no_tracks_listened_yet": "Sembla que no has escoltat res encara", - "not_following_artists": "No estàs seguint cap artista", - "no_favorite_albums_yet": "Sembla que encara no has afegit cap àlbum als teus favorits", - "no_logs_found": "No s'han trobat registres", - "youtube_engine": "Motor de YouTube", - "youtube_engine_not_installed_title": "{engine} no està instal·lat", - "youtube_engine_not_installed_message": "{engine} no està instal·lat al teu sistema.", - "youtube_engine_set_path": "Assegura't que estigui disponible a la variable PATH o\nestableix el camí absolut a l'executable de {engine} a continuació", - "youtube_engine_unix_issue_message": "En macOS/Linux/Unix com a sistemes operatius, establir el camí a .zshrc/.bashrc/.bash_profile etc. no funcionarà.\nHas de configurar el camí al fitxer de configuració de la shell", - "download": "Descarregar", - "file_not_found": "Fitxer no trobat", - "custom": "Personalitzat", - "add_custom_url": "Afegir URL personalitzada", - "edit_port": "Editar port", - "port_helper_msg": "El valor per defecte és -1, que indica un número aleatori. Si teniu un tallafoc configurat, es recomana establir-ho.", - "connect_request": "Permetre que {client} es connecti?", - "connection_request_denied": "Connexió denegada. L'usuari ha denegat l'accés.", - "hipotetical_calculation": "*Això està calculat en funció d’un pagament mitjà per reproducció de 0,003–0,005 USD en plataformes de reproducció musical en línia. És un càlcul hipotètic per ajudar l’usuari a entendre quant hauria pagat als artistes si hagués escoltat la seva cançó en diferents plataformes.", - "an_error_occurred": "S’ha produït un error", - "copy_to_clipboard": "Copiar al porta-retalls", - "view_logs": "Veure registres", - "retry": "Tornar-ho a provar", - "no_default_metadata_provider_selected": "No has configurat cap proveïdor de metadades predeterminat", - "manage_metadata_providers": "Gestionar proveïdors de metadades", - "open_link_in_browser": "Obrir l’enllaç en el navegador?", - "do_you_want_to_open_the_following_link": "Vols obrir l’enllaç següent?", - "unsafe_url_warning": "Pot ser perillós obrir enllaços de fonts no fiables. Sigues precavís!\nTambé pots copiar l’enllaç al porta-retalls.", - "copy_link": "Copiar enllaç", - "building_your_timeline": "Construint la teva cronologia en funció de les teves escoltes...", - "official": "Oficial", - "author_name": "Autor: {author}", - "third_party": "Tercers", - "plugin_requires_authentication": "El complement requereix autenticació", - "update_available": "Actualització disponible", - "supports_scrobbling": "Admet scrobbling", - "plugin_scrobbling_info": "Aquest complement fa scrobbling de la teva música per generar l’historial d’escoltes.", - "default_plugin": "Predeterminat", - "set_default": "Establir com a predeterminat", - "support": "Suport", - "support_plugin_development": "Suportar el desenvolupament del complement", - "can_access_name_api": "- Pot accedir a l’API **{name}**", - "do_you_want_to_install_this_plugin": "Vols instal·lar aquest complement?", - "third_party_plugin_warning": "Aquest complement prové d’un repositori de tercers. Assegura’t de confiar en la font abans d’instal·lar-lo.", - "author": "Autor", - "this_plugin_can_do_following": "Aquest complement pot fer el següent", - "install": "Instal·lar", - "install_a_metadata_provider": "Instal·lar un proveïdor de metadades", - "no_tracks_playing": "No s’està reproduint cap pista actualment", - "synced_lyrics_not_available": "Les lletres sincronitzades no estan disponibles per a aquesta cançó. Si us plau, usa", - "plain_lyrics": "Lletres sense format", - "tab_instead": "en lloc d’això, utilitza la tecla Tab.", - "disclaimer": "Avís legal", - "third_party_plugin_dmca_notice": "L’equip de Spotube no accepta cap responsabilitat (inclosa legal) pels complements de “tercers”.\nFes-los servir sota la teva responsabilitat. Si detectes errors/problemes, informa’ls al repositori del complement.\n\nSi algun complement de “tercers” incompleix els ToS/DMCA d’un servei o entitat legal, contacta amb l’autor del complement o amb la plataforma d’allotjament (per exemple GitHub/Codeberg) per prendre mesures. Els complements etiquetats com a “tercers” són públics i gestionats per la comunitat; no els curatem, per la qual cosa no podem intervenir-hi.\n\n", - "input_does_not_match_format": "L’entrada no coincideix amb el format requerit", - "metadata_provider_plugins": "Complements de proveïdor de metadades", - "paste_plugin_download_url": "Enllaça l’URL de descàrrega o el repositori de GitHub/Codeberg o l’enllaç directe al fitxer .smplug", - "download_and_install_plugin_from_url": "Descarrega i instal·la el complement des d’un URL", - "failed_to_add_plugin_error": "Error en afegir el complement: {error}", - "upload_plugin_from_file": "Penja el complement des d’un fitxer", - "installed": "Instal·lat", - "available_plugins": "Complements disponibles", - "configure_your_own_metadata_plugin": "Configura el teu propi proveïdor de metadades per llistes/reproduccions àlbum/artista/flux", - "audio_scrobblers": "Scrobblers d’àudio", - "scrobbling": "Scrobbling", - "download_music_format": "Format de descàrrega de música", - "streaming_music_format": "Format de reproducció de música en temps real", - "download_music_quality": "Qualitat de descàrrega de música", - "streaming_music_quality": "Qualitat de reproducció de música en temps real", - "default_metadata_source": "Font de metadades per defecte", - "set_default_metadata_source": "Estableix la font de metadades per defecte", - "default_audio_source": "Font d'àudio per defecte", - "set_default_audio_source": "Estableix la font d'àudio per defecte", - "plugins": "Connectors", - "configure_plugins": "Configura els teus propis connectors de proveïdor de metadades i de font d'àudio", - "source": "Font: ", - "uncompressed": "Sense comprimir", - "dab_music_source_description": "Per als audiòfils. Ofereix fluxos d'àudio d'alta qualitat/sense pèrdua. Coincidència precisa de pistes basada en ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_cs.arb b/lib/l10n/app_cs.arb deleted file mode 100644 index 59938004..00000000 --- a/lib/l10n/app_cs.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Host", - "browse": "Procházet", - "search": "Hledat", - "library": "Knihovna", - "lyrics": "Texty", - "settings": "Nastavení", - "genre_categories_filter": "Filtrovat kategorie nebo žánry...", - "genre": "Žánr", - "personalized": "Personalizované", - "featured": "Doporučené", - "new_releases": "Nově vydané", - "songs": "Skladby", - "playing_track": "Hraje {track}", - "queue_clear_alert": "Toto vymaže aktuální frontu. {track_length} skladeb bude odstraněno\nChcete pokračovat?", - "load_more": "Načíst více", - "playlists": "Playlisty", - "artists": "Umělci", - "albums": "Alba", - "tracks": "Skladby", - "downloads": "Stahování", - "filter_playlists": "Filtrovat playlisty...", - "liked_tracks": "Oblíbené skladby", - "liked_tracks_description": "Všechny vaše oblíbené skladby", - "create_playlist": "Vytvořit playlist", - "create_a_playlist": "Vytvořit playlist", - "update_playlist": "Aktualizovat playlist", - "create": "Vytvořit", - "cancel": "Zrušit", - "update": "Aktualizovat", - "playlist_name": "Název playlistu", - "name_of_playlist": "Název playlistu", - "description": "Popis", - "public": "Veřejné", - "collaborative": "Společný", - "search_local_tracks": "Hledat místní skladby...", - "play": "Přehrát", - "delete": "Smazat", - "none": "Žádné", - "sort_a_z": "Seřadit od A-Z", - "sort_z_a": "Seřadit od Z-A", - "sort_artist": "Seřadit podle umělce", - "sort_album": "Seřadit podle alba", - "sort_duration": "Seřadit podle délky", - "sort_tracks": "Seřadit skladby", - "currently_downloading": "Právě se stahuje ({tracks_length})", - "cancel_all": "Zrušit vše", - "filter_artist": "Filtrovat umělce...", - "followers": "{followers} Sledující", - "add_artist_to_blacklist": "Přidat umělce na černou listinu", - "top_tracks": "Top skladby", - "fans_also_like": "Fanoušci mají také rádi", - "loading": "Načítání...", - "artist": "Umělec", - "blacklisted": "Na černé listině", - "following": "Sleduje", - "follow": "Sledovat", - "artist_url_copied": "URL umělce zkopírována do schránky", - "added_to_queue": "Přidáno {tracks} skladeb do fronty", - "filter_albums": "Filtrovat alba...", - "synced": "Synchronizováno", - "plain": "Jednoduché", - "shuffle": "Zamíchat", - "search_tracks": "Hledat skladby...", - "released": "Vydáno", - "error": "Chyba {error}", - "title": "Název", - "time": "Čas", - "more_actions": "Více akcí", - "download_count": "Stáhnout ({count})", - "add_count_to_playlist": "Přidat ({count}) do playlistu", - "add_count_to_queue": "Přidat ({count}) do fronty", - "play_count_next": "Přehrát ({count}) dalších", - "album": "Album", - "copied_to_clipboard": "Zkopírováno {data} do schránky", - "add_to_following_playlists": "Přidat {track} do následujících playlistů", - "add": "Přidat", - "added_track_to_queue": "Přidána skladba {track} do fronty", - "add_to_queue": "Přidat do fronty", - "track_will_play_next": "{track} se přehraje jako další", - "play_next": "Přehrát další", - "removed_track_from_queue": "Odstraněna skladba {track} z fronty", - "remove_from_queue": "Odstranit z fronty", - "remove_from_favorites": "Odstranit z oblíbených", - "save_as_favorite": "Uložit jako oblíbené", - "add_to_playlist": "Přidat do playlistu", - "remove_from_playlist": "Odstranit z playlistu", - "add_to_blacklist": "Přidat na černou listinu", - "remove_from_blacklist": "Odstranit z černé listiny", - "share": "Sdílet", - "mini_player": "Mini přehrávač", - "slide_to_seek": "Táhněte pro posunutí vpřed nebo vzad", - "shuffle_playlist": "Zamíchat playlist", - "unshuffle_playlist": "Zrušit zamíchání playlistu", - "previous_track": "Předchozí skladba", - "next_track": "Další skladba", - "pause_playback": "Pozastavit přehrávání", - "resume_playback": "Pokračovat v přehrávání", - "loop_track": "Opakovat skladbu", - "repeat_playlist": "Opakovat playlist", - "queue": "Fronta", - "alternative_track_sources": "Alternativní zdroje skladeb", - "download_track": "Stáhnout skladbu", - "tracks_in_queue": "{tracks} skladeb ve frontě", - "clear_all": "Vymazat vše", - "show_hide_ui_on_hover": "Zobrazit/Skrýt UI při najetí", - "always_on_top": "Vždy nahoře", - "exit_mini_player": "Zavřít mini přehrávač", - "download_location": "Umístění stahování", - "account": "Účet", - "login_with_spotify": "Přihlásit se pomocí Spotify účtu", - "connect_with_spotify": "Připojit k Spotify", - "logout": "Odhlásit se", - "logout_of_this_account": "Odhlásit se z tohoto účtu", - "language_region": "Jazyk a region", - "language": "Jazyk", - "system_default": "Systém", - "market_place_region": "Region", - "recommendation_country": "Země pro doporučení", - "appearance": "Vzhled", - "layout_mode": "Režim rozložení", - "override_layout_settings": "Přepsat režim rozložení", - "adaptive": "Adaptivní", - "compact": "Kompaktní", - "extended": "Rozšířený", - "theme": "Téma", - "dark": "Tmavé", - "light": "Světlé", - "system": "Systém", - "accent_color": "Barva akcentu", - "sync_album_color": "Synchronizovat barvu alba", - "sync_album_color_description": "Používá dominantní barvu obalu alba jako barvu akcentu", - "playback": "Přehrávání", - "audio_quality": "Kvalita zvuku", - "high": "Vysoká", - "low": "Nízká", - "pre_download_play": "Předstáhnout a přehrát", - "pre_download_play_description": "Místo streamování audia stáhnout skladbu a přehrát (doporučeno pro uživatele s rychlejším internetem)", - "skip_non_music": "Přeskočit nehudební segmenty (SponsorBlock)", - "blacklist_description": "Zakázané skladby a umělci", - "wait_for_download_to_finish": "Počkejte, až se dokončí stahování", - "desktop": "Desktop", - "close_behavior": "Chování při zavření", - "close": "Zavřít", - "minimize_to_tray": "Minimalizovat do lišty", - "show_tray_icon": "Zobrazit ikonu v systémové liště", - "about": "O aplikaci", - "u_love_spotube": "Víme, že milujete Spotube", - "check_for_updates": "Zkontrolovat aktualizace", - "about_spotube": "O Spotube", - "blacklist": "Černá listina", - "please_sponsor": "Sponzorovat/darovat", - "spotube_description": "Spotube, rychlý, multiplatformní, bezplatný Spotify klient", - "version": "Verze", - "build_number": "Číslo sestavení", - "founder": "Zakladatel", - "repository": "Repozitář", - "bug_issues": "Chyby+Problémy", - "made_with": "Vytvořeno s ❤️ v Bangladéši🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licence", - "add_spotify_credentials": "Přidejte své přihlašovací údaje Spotify a začněte", - "credentials_will_not_be_shared_disclaimer": "Nebojte, žádné z vašich údajů nebudou shromažďovány ani s nikým sdíleny", - "know_how_to_login": "Nevíte, jak na to?", - "follow_step_by_step_guide": "Postupujte podle návodu", - "spotify_cookie": "Cookie Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Vyplňte prosím všechna pole", - "submit": "Odeslat", - "exit": "Ukončit", - "previous": "Předchozí", - "next": "Další", - "done": "Hotovo", - "step_1": "Krok 1", - "first_go_to": "Nejprve jděte na", - "login_if_not_logged_in": "a přihlašte se nebo se zaregistrujte, pokud nejste přihlášeni", - "step_2": "Krok 2", - "step_2_steps": "1. Jakmile jste přihlášeni, stiskněte F12 nebo pravé tlačítko myši > Prozkoumat, abyste otevřeli nástroje pro vývojáře prohlížeče.\n2. Poté přejděte na kartu \"Aplikace\" (Chrome, Edge, Brave atd.) nebo kartu \"Úložiště\" (Firefox, Palemoon atd.)\n3. Přejděte do sekce \"Cookies\" a pak do podsekce \"https://accounts.spotify.com\"", - "step_3": "Krok 3", - "step_3_steps": "Zkopírujte hodnotu cookie \"sp_dc\"", - "success_emoji": "Úspěch🥳", - "success_message": "Nyní jste úspěšně přihlášeni pomocí svého Spotify účtu. Dobrá práce, kamaráde!", - "step_4": "Krok 4", - "step_4_steps": "Vložte zkopírovanou hodnotu \"sp_dc\"", - "something_went_wrong": "Něco se pokazilo", - "piped_instance": "Instance serveru Piped", - "piped_description": "Instance serveru Piped, kterou použít pro hledání skladeb", - "piped_warning": "Některé z nich nemusí dobře fungovat. Používejte na vlastní riziko", - "generate_playlist": "Vygenerovat playlist", - "track_exists": "Skladba {track} již existuje", - "replace_downloaded_tracks": "Nahradit všechny stažené skladby", - "skip_download_tracks": "Přeskočit stahování všech stažených skladeb", - "do_you_want_to_replace": "Chcete nahradit existující skladbu??", - "replace": "Nahradit", - "skip": "Přeskočit", - "select_up_to_count_type": "Vyberte až {count} {type}", - "select_genres": "Vyberte žánry", - "add_genres": "Přidat žánry", - "country": "Země", - "number_of_tracks_generate": "Počet skladeb k vygenerování", - "acousticness": "Akustičnost", - "danceability": "Tanečnost", - "energy": "Energie", - "instrumentalness": "Instrumentálnost", - "liveness": "Živost", - "loudness": "Hlasitost", - "speechiness": "Mluvnost", - "valence": "Valence", - "popularity": "Popularita", - "key": "Klíč", - "duration": "Délka (s)", - "tempo": "Tempo (BPM)", - "mode": "Režim", - "time_signature": "Udání taktu", - "short": "Krátký", - "medium": "Střední", - "long": "Dlouhý", - "min": "Min", - "max": "Max", - "target": "Cíl", - "moderate": "Mírný", - "deselect_all": "Zrušit výběr", - "select_all": "Vybrat vše", - "are_you_sure": "Jste si jisti?", - "generating_playlist": "Generování vašeho vlastního playlistu...", - "selected_count_tracks": "Vybráno {count} skladeb", - "download_warning": "Pokud stáhnete všechny skladby najednou, pirátíte tím hudbu a škodíte kreativní společnosti hudby. Doufám, že jste si toho vědomi. Vždy se snažte respektovat a podporovat tvrdou práci umělců", - "download_ip_ban_warning": "Mimochodem, vaše IP může být na YouTube zablokována kvůli nadměrným požadavkům na stahování. Blokování IP znamená, že nemůžete používat YouTube (i když jste přihlášeni) alespoň 2-3 měsíce ze zařízení s touto IP. A Spotube nenese žádnou odpovědnost, pokud se to někdy stane", - "by_clicking_accept_terms": "Kliknutím na 'přijmout' souhlasíte s následujícími podmínkami:", - "download_agreement_1": "Vím, že pirátím hudbu. Jsem špatný", - "download_agreement_2": "Budu podporovat umělce, kdekoliv to bude možné, a dělám to jen proto, že nemám peníze na koupi jejich umění", - "download_agreement_3": "Jsem si naprosto vědom toho, že moje IP může být na YouTube zablokována a nenesu žádnou odpovědnost za nehody způsobené mým současným jednáním", - "decline": "Odmítnout", - "accept": "Přijmout", - "details": "Podrobnosti", - "youtube": "YouTube", - "channel": "Kanál", - "likes": "Líbí se", - "dislikes": "Nelíbí se", - "views": "Zobrazení", - "streamUrl": "URL streamu", - "stop": "Zastavit", - "sort_newest": "Seřadit od nejnovějších", - "sort_oldest": "Seřadit od nejstarších", - "sleep_timer": "Časovač spánku", - "mins": "{minutes} Minut", - "hours": "{hours} Hodin", - "hour": "{hours} Hodina", - "custom_hours": "Vlastní hodiny", - "logs": "Protokoly", - "developers": "Vývojáři", - "not_logged_in": "Nejste přihlášeni", - "search_mode": "Režim hledání", - "audio_source": "Zdroj zvuku", - "ok": "Ok", - "failed_to_encrypt": "Šifrování selhalo", - "encryption_failed_warning": "Spotube používá šifrování k bezpečnému ukládání vašich dat. Ale selhalo. Takže se vrátí k nezabezpečenému úložišti\nPokud používáte linux, ujistěte se, že máte nainstalovanou jakoukoli službu k ukládání bezpečnostních pověření (gnome-keyring, kde-wallet, keepassxc atd.)", - "querying_info": "Získávání informací...", - "piped_api_down": "Piped API je mimo provoz", - "piped_down_error_instructions": "Instance Piped {pipedInstance} je momentálně mimo provoz\n\nBuď změňte instanci nebo změňte 'Typ API' na oficiální YouTube API\n\nPo změně se ujistěte, že aplikaci restartujete", - "you_are_offline": "Momentálně jste offline", - "connection_restored": "Vaše internetové připojení bylo obnoveno", - "use_system_title_bar": "Použít systémové záhlaví okna", - "crunching_results": "Zpracovávání výsledků...", - "search_to_get_results": "Hledejte pro získání výsledků", - "use_amoled_mode": "Úplně černé téma", - "pitch_dark_theme": "AMOLED režim", - "normalize_audio": "Normalizovat audio", - "change_cover": "Změnit obal", - "add_cover": "Přidat obal", - "restore_defaults": "Obnovit výchozí", - "download_music_codec": "Kodek pro stahování", - "streaming_music_codec": "Kodek pro streamování", - "login_with_lastfm": "Přihlásit se pomocí Last.fm", - "connect": "Připojit", - "disconnect_lastfm": "Odpojit Last.fm", - "disconnect": "Odpojit", - "username": "Uživatelské jméno", - "password": "Heslo", - "login": "Přihlásit se", - "login_with_your_lastfm": "Přihlásit se pomocí vašeho Last.fm účtu", - "scrobble_to_lastfm": "Scrobble na Last.fm", - "go_to_album": "Přejít na album", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "Procházet vše", - "genres": "Žánry", - "explore_genres": "Prozkoumat žánry", - "friends": "Přátelé", - "no_lyrics_available": "Omlouváme se, není možné najít texty pro tuto skladbu", - "start_a_radio": "Vytvořit rádio", - "how_to_start_radio": "Jak chcete vytvořit rádio?", - "replace_queue_question": "Chcete nahradit aktuální frontu nebo k ní přidat?", - "endless_playback": "Nekonečné přehrávání", - "delete_playlist": "Smazat playlist", - "delete_playlist_confirmation": "Jste si jisti, že chcete smazat tento playlist?", - "local_tracks": "Místní skladby", - "song_link": "Odkaz na skladbu", - "skip_this_nonsense": "Přeskočit tenhle nesmysl", - "freedom_of_music": "“Svobodná hudba”", - "freedom_of_music_palm": "“Svobodná hudba ve vaší dlani”", - "get_started": "Začít", - "youtube_source_description": "Doporučeno a funguje nejlépe.", - "piped_source_description": "Nechcete být sledováni? Stejné jako YouTube, ale respektuje soukromí.", - "jiosaavn_source_description": "Nejlepší pro jihoasijský region.", - "highest_quality": "Nejvyšší kvalita: {quality}", - "select_audio_source": "Vyberte zdroj zvuku", - "endless_playback_description": "Automaticky přidávat nové skladby\nna konec fronty", - "choose_your_region": "Vyberte svůj region", - "choose_your_region_description": "To pomůže Spotube ukázat vám správný obsah\npro vaši lokalitu.", - "choose_your_language": "Vyberte svůj jazyk", - "help_project_grow": "Pomozte tomuto projektu růst", - "help_project_grow_description": "Spotube je open-source projekt. Můžete pomoci tomuto projektu růst tím, že přispějete do projektu, nahlásíte chyby nebo navrhnete nové funkce.", - "contribute_on_github": "Přispějte na GitHub", - "donate_on_open_collective": "Darujte na Open Collective", - "browse_anonymously": "Procházet anonymně", - "enable_connect": "Povolit ovládání", - "enable_connect_description": "Ovládejte Spotube z jiného zařízení", - "devices": "Zařízení", - "select": "Vybrat", - "connect_client_alert": "Zařízení je ovládáno z {client}", - "this_device": "Toto zařízení", - "remote": "Ovladač", - "local_library": "Místní knihovna", - "add_library_location": "Přidat do knihovny", - "remove_library_location": "Odebrat z knihovny", - "local_tab": "Místní", - "stats": "Statistiky", - "and_n_more": "a dalších {count}", - "recently_played": "Nedávno přehráno", - "browse_more": "Procházet více", - "no_title": "Bez názvu", - "not_playing": "Nepřehrává se", - "epic_failure": "Epické selhání!", - "added_num_tracks_to_queue": "Přidáno {tracks_length} skladeb do fronty", - "spotube_has_an_update": "Spotube má aktualizaci", - "download_now": "Stáhnout nyní", - "nightly_version": "Byla vydána noční verze Spotube {nightlyBuildNum}", - "release_version": "Byla vydána verze Spotube v{version}", - "read_the_latest": "Přečtěte si nejnovější ", - "release_notes": "poznámky k vydání", - "pick_color_scheme": "Vyberte barevné schéma", - "save": "Uložit", - "choose_the_device": "Vyberte zařízení:", - "multiple_device_connected": "Je připojeno více zařízení.\nVyberte zařízení, na kterém chcete provést tuto akci", - "nothing_found": "Nic nenalezeno", - "the_box_is_empty": "Krabice je prázdná", - "top_artists": "Nejlepší umělci", - "top_albums": "Nejlepší alba", - "this_week": "Tento týden", - "this_month": "Tento měsíc", - "last_6_months": "Posledních 6 měsíců", - "this_year": "Tento rok", - "last_2_years": "Poslední 2 roky", - "all_time": "Všechny časy", - "powered_by_provider": "Pohání {providerName}", - "email": "Email", - "profile_followers": "Sledující", - "birthday": "Narozeniny", - "subscription": "Předplatné", - "not_born": "Nenarozen", - "hacker": "Hacker", - "profile": "Profil", - "no_name": "Bez jména", - "edit": "Upravit", - "user_profile": "Uživatelský profil", - "count_plays": "{count} přehrání", - "streaming_fees_hypothetical": "Poplatky za streamování (hypotetické)", - "minutes_listened": "Poslouchané minuty", - "streamed_songs": "Streamované skladby", - "count_streams": "{count} streamů", - "owned_by_you": "Vlastněno vámi", - "copied_shareurl_to_clipboard": "Zkopírováno {shareUrl} do schránky", - "spotify_hipotetical_calculation": "*Toto je vypočítáno na základě výplaty\nza stream Spotify od $0.003 do $0.005.\nToto je hypotetický výpočet,\nabyste měli představu o tom, kolik\nbyste zaplatili umělcům,\npokud byste poslouchali jejich píseň na Spotify.", - "count_mins": "{minutes} minut", - "summary_minutes": "minuty", - "summary_listened_to_music": "Poslouchal(a) hudbu", - "summary_songs": "písně", - "summary_streamed_overall": "Streamováno celkově", - "summary_owed_to_artists": "Dluženo umělcům\nTento měsíc", - "summary_artists": "umělců", - "summary_music_reached_you": "Hudba vás oslovila", - "summary_full_albums": "plná alba", - "summary_got_your_love": "Získal vaši lásku", - "summary_playlists": "playlisty", - "summary_were_on_repeat": "Byly na opakování", - "total_money": "Celkem {money}", - "webview_not_found": "Webview nebyl nalezen", - "webview_not_found_description": "Na vašem zařízení není nainstalováno žádné runtime prostředí Webview.\nPokud je nainstalováno, ujistěte se, že je v environment PATH\n\nPo instalaci restartujte aplikaci", - "unsupported_platform": "Nepodporovaná platforma", - "invidious_instance": "Instance serveru Invidious", - "invidious_description": "Instance serveru Invidious pro párování stop", - "invidious_warning": "Některé instance nemusí fungovat správně. Používejte na vlastní riziko", - "invidious_source_description": "Podobné Piped, ale s vyšší dostupností", - "cache_music": "Hudba v mezipaměti", - "open": "Otevřít", - "cache_folder": "Složka mezipaměti", - "export": "Exportovat", - "clear_cache": "Vymazat mezipaměť", - "clear_cache_confirmation": "Opravdu chcete vymazat mezipaměť?", - "export_cache_files": "Exportovat soubory z mezipaměti", - "found_n_files": "Nalezeno {count} souborů", - "export_cache_confirmation": "Chcete exportovat tyto soubory do", - "exported_n_out_of_m_files": "Exportováno {filesExported} z {files} souborů", - "playlist": "Seznam skladeb", - "no_loop": "Žádné opakování", - "generate": "Generovat", - "undo": "Zpět", - "download_all": "Stáhnout vše", - "add_all_to_playlist": "Přidat vše do seznamu skladeb", - "add_all_to_queue": "Přidat vše do fronty", - "play_all_next": "Přehrát vše následně", - "pause": "Pauza", - "view_all": "Zobrazit vše", - "no_tracks_added_yet": "Zdá se, že jste ještě nepřidali žádné skladby", - "no_tracks": "Zdá se, že zde nejsou žádné skladby", - "no_tracks_listened_yet": "Zdá se, že jste ještě nic neposlouchali", - "not_following_artists": "Nezajímáte se o žádné umělce", - "no_favorite_albums_yet": "Zdá se, že jste ještě nepřidali žádné alba mezi oblíbené", - "no_logs_found": "Žádné záznamy nenalezeny", - "youtube_engine": "YouTube Engine", - "youtube_engine_not_installed_title": "{engine} není nainstalován", - "youtube_engine_not_installed_message": "{engine} není nainstalován ve vašem systému.", - "youtube_engine_set_path": "Ujistěte se, že je k dispozici v proměnné PATH nebo\nnastavte absolutní cestu k {engine} spustitelnému souboru níže", - "youtube_engine_unix_issue_message": "V macOS/Linux/Unixových systémech nebude fungovat nastavení cesty v .zshrc/.bashrc/.bash_profile atd.\nMusíte nastavit cestu v konfiguračním souboru shellu", - "download": "Stáhnout", - "file_not_found": "Soubor nenalezen", - "custom": "Vlastní", - "add_custom_url": "Přidat vlastní URL", - "edit_port": "Upravit port", - "port_helper_msg": "Výchozí hodnota je -1, což znamená náhodné číslo. Pokud máte nakonfigurován firewall, doporučuje se to nastavit.", - "connect_request": "Povolit {client} připojení?", - "connection_request_denied": "Připojení bylo zamítnuto. Uživatel odmítl přístup.", - "hipotetical_calculation": "*Toto je vypočítáno na základě průměrného výplatu za přehrání 0,003–0,005 USD na online hudebních streamovacích platformách. Jedná se o hypotetický výpočet, který má uživateli ukázat, kolik by umělci dostali, pokud by jeho píseň poslouchal na jiné platformě.", - "an_error_occurred": "Došlo k chybě", - "copy_to_clipboard": "Kopírovat do schránky", - "view_logs": "Zobrazit protokoly", - "retry": "Zkusit znovu", - "no_default_metadata_provider_selected": "Nemáte nastaven výchozí poskytovatel metadat", - "manage_metadata_providers": "Spravovat poskytovatele metadat", - "open_link_in_browser": "Otevřít odkaz v prohlížeči?", - "do_you_want_to_open_the_following_link": "Chcete otevřít následující odkaz?", - "unsafe_url_warning": "Odkazy z nedůvěryhodných zdrojů mohou být nebezpečné. Buďte opatrní!\nOdkaz si také můžete zkopírovat do schránky.", - "copy_link": "Zkopírovat odkaz", - "building_your_timeline": "Vytváří se váš časový přehled podle poslechů...", - "official": "Oficiální", - "author_name": "Autor: {author}", - "third_party": "Třetí strana", - "plugin_requires_authentication": "Plugin vyžaduje ověření", - "update_available": "Aktualizace dostupná", - "supports_scrobbling": "Podpora scrobblování", - "plugin_scrobbling_info": "Tento plugin scrobbles vaši hudbu pro vytvoření historie poslechů.", - "default_plugin": "Výchozí", - "set_default": "Nastavit jako výchozí", - "support": "Podpora", - "support_plugin_development": "Podpořit vývoj pluginu", - "can_access_name_api": "- Může přistupovat k API **{name}**", - "do_you_want_to_install_this_plugin": "Chcete tento plugin nainstalovat?", - "third_party_plugin_warning": "Tento plugin pochází z repozitáře třetí strany. Ujistěte se, že důvěřujete zdroji, než ho nainstalujete.", - "author": "Autor", - "this_plugin_can_do_following": "Tento plugin může provádět následující úkony", - "install": "Instalovat", - "install_a_metadata_provider": "Nainstalovat poskytovatele metadat", - "no_tracks_playing": "Momentálně není přehrávána žádná skladba", - "synced_lyrics_not_available": "Synchronizované texty nejsou k dispozici k této písni. Prosím použijte", - "plain_lyrics": "Prostý text", - "tab_instead": "místo toho použijte tabulátor.", - "disclaimer": "Prohlášení", - "third_party_plugin_dmca_notice": "Tým Spotube nenese žádnou odpovědnost (včetně právní) za pluginy „třetích stran“.\nPoužívejte je na vlastní riziko. Pro chyby/problémy je nahlaste do repozitáře pluginu.\n\nPokud jakýkoli plugin „třetí strany“ porušuje podmínky služby nebo DMCA kteréhokoli poskytovatele či právního subjektu, požádejte autora pluginu nebo hostingovou platformu (např. GitHub/Codeberg), aby podnikla kroky. Pluginy označené jako „třetí strana“ jsou otevřené a spravovány komunitou; nespravujeme je, tudíž nemůžeme jednat.\n\n", - "input_does_not_match_format": "Vstup neodpovídá požadovanému formátu", - "metadata_provider_plugins": "Pluginy poskytovatelů metadat", - "paste_plugin_download_url": "Vložte URL ke stažení nebo GitHub/Codeberg repozitář či přímý odkaz na soubor .smplug", - "download_and_install_plugin_from_url": "Stáhnout a nainstalovat plugin z URL", - "failed_to_add_plugin_error": "Nepodařilo se přidat plugin: {error}", - "upload_plugin_from_file": "Nahrát plugin ze souboru", - "installed": "Nainstalováno", - "available_plugins": "Dostupné pluginy", - "configure_your_own_metadata_plugin": "Nakonfigurujte si vlastního poskytovatele metadat pro playlist/album/umělec/fid", - "audio_scrobblers": "Audio scrobblers", - "scrobbling": "Scrobbling", - "download_music_format": "Formát stahování hudby", - "streaming_music_format": "Formát streamování hudby", - "download_music_quality": "Kvalita stahování hudby", - "streaming_music_quality": "Kvalita streamování hudby", - "default_metadata_source": "Výchozí zdroj metadat", - "set_default_metadata_source": "Nastavit výchozí zdroj metadat", - "default_audio_source": "Výchozí zdroj zvuku", - "set_default_audio_source": "Nastavit výchozí zdroj zvuku", - "plugins": "Pluginy", - "configure_plugins": "Konfigurujte své vlastní pluginy poskytovatele metadat a zdroje zvuku", - "source": "Zdroj: ", - "uncompressed": "Nekomprimováno", - "dab_music_source_description": "Pro audiofily. Poskytuje vysoce kvalitní/bezztrátové zvukové toky. Přesná shoda skladeb na základě ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb deleted file mode 100644 index 458e7c07..00000000 --- a/lib/l10n/app_de.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Gast", - "browse": "Durchsuchen", - "search": "Suchen", - "library": "Bibliothek", - "lyrics": "Songtexte", - "settings": "Einstellungen", - "genre_categories_filter": "Filtere Kategorien oder Genres...", - "genre": "Genre", - "personalized": "Personalisiert", - "featured": "Empfohlen", - "new_releases": "Neue Veröffentlichungen", - "songs": "Songs", - "playing_track": "Wiedergabe: {track}", - "queue_clear_alert": "Dadurch wird die aktuelle Warteschlange gelöscht. {track_length} Titel werden entfernt.\nMöchten Sie fortfahren?", - "load_more": "Mehr laden", - "playlists": "Playlists", - "artists": "Künstler", - "albums": "Alben", - "tracks": "Titel", - "downloads": "Downloads", - "filter_playlists": "Filtere deine Playlists...", - "liked_tracks": "Gefällt mir-Titel", - "liked_tracks_description": "Alle deine geliketen Titel", - "create_playlist": "Playlist erstellen", - "create_a_playlist": "Erstelle eine Playlist", - "create": "Erstellen", - "cancel": "Abbrechen", - "playlist_name": "Playlist-Name", - "name_of_playlist": "Name der Playlist", - "description": "Beschreibung", - "public": "Öffentlich", - "collaborative": "Kollaborativ", - "search_local_tracks": "Lokale Titel durchsuchen...", - "play": "Wiedergabe", - "delete": "Löschen", - "none": "Keine", - "sort_a_z": "Sortieren nach A-Z", - "sort_z_a": "Sortieren nach Z-A", - "sort_artist": "Sortieren nach Künstler", - "sort_album": "Sortieren nach Album", - "sort_tracks": "Titel sortieren", - "currently_downloading": "Derzeitige Downloads ({tracks_length})", - "cancel_all": "Alle abbrechen", - "filter_artist": "Künstler filtern...", - "followers": "{followers} Follower", - "add_artist_to_blacklist": "Künstler zur Schwarzen Liste hinzufügen", - "top_tracks": "Top-Titel", - "fans_also_like": "Fans mögen auch", - "loading": "Laden...", - "artist": "Künstler", - "blacklisted": "Auf der Schwarzen Liste", - "following": "Folgen", - "follow": "Folgen", - "artist_url_copied": "Künstler-URL in Zwischenablage kopiert", - "added_to_queue": "{tracks} Titel zur Warteschlange hinzugefügt", - "filter_albums": "Alben filtern...", - "synced": "Synchronisiert", - "plain": "Einfach", - "shuffle": "Zufällige Wiedergabe", - "search_tracks": "Titel durchsuchen...", - "released": "Veröffentlicht", - "error": "Fehler {error}", - "title": "Titel", - "time": "Dauer", - "more_actions": "Weitere Aktionen", - "download_count": "Download ({count})", - "add_count_to_playlist": "Zu Playlist hinzufügen ({count})", - "add_count_to_queue": "Zur Warteschlange hinzufügen ({count})", - "play_count_next": "Als nächstes abspielen ({count})", - "album": "Album", - "copied_to_clipboard": "{data} in Zwischenablage kopiert", - "add_to_following_playlists": "{track} zu folgenden Playlists hinzufügen", - "add": "Hinzufügen", - "added_track_to_queue": "{track} zur Warteschlange hinzugefügt", - "add_to_queue": "Zur Warteschlange hinzufügen", - "track_will_play_next": "{track} wird als nächstes abgespielt", - "play_next": "Als nächstes abspielen", - "removed_track_from_queue": "{track} aus der Warteschlange entfernt", - "remove_from_queue": "Aus der Warteschlange entfernen", - "remove_from_favorites": "Aus Favoriten entfernen", - "save_as_favorite": "Als Favorit speichern", - "add_to_playlist": "Zur Playlist hinzufügen", - "remove_from_playlist": "Aus der Playlist entfernen", - "add_to_blacklist": "Zur Schwarzen Liste hinzufügen", - "remove_from_blacklist": "Aus der Schwarzen Liste entfernen", - "share": "Teilen", - "mini_player": "Mini-Player", - "slide_to_seek": "Zum Vor- oder Zurückspulen ziehen", - "shuffle_playlist": "Playlist mischen", - "unshuffle_playlist": "Playlist nicht mehr mischen", - "previous_track": "Vorheriger Track", - "next_track": "Nächster Track", - "pause_playback": "Wiedergabe pausieren", - "resume_playback": "Wiedergabe fortsetzen", - "loop_track": "Track wiederholen", - "repeat_playlist": "Playlist wiederholen", - "queue": "Warteschlange", - "alternative_track_sources": "Alternative Track-Quellen", - "download_track": "Track herunterladen", - "tracks_in_queue": "{tracks} Tracks in der Warteschlange", - "clear_all": "Alle löschen", - "show_hide_ui_on_hover": "UI beim Überfahren anzeigen/ausblenden", - "always_on_top": "Immer im Vordergrund", - "exit_mini_player": "Mini-Player verlassen", - "download_location": "Download-Speicherort", - "account": "Konto", - "login_with_spotify": "Mit deinem Spotify-Konto anmelden", - "connect_with_spotify": "Mit Spotify verbinden", - "logout": "Abmelden", - "logout_of_this_account": "Von diesem Konto abmelden", - "language_region": "Sprache & Region", - "language": "Sprache", - "system_default": "Systemstandard", - "market_place_region": "Marktplatzregion", - "recommendation_country": "Empfehlungsland", - "appearance": "Erscheinungsbild", - "layout_mode": "Layout-Modus", - "override_layout_settings": "Responsiven Layout-Modus-Einstellungen überschreiben", - "adaptive": "Adaptiv", - "compact": "Kompakt", - "extended": "Erweitert", - "theme": "Design", - "dark": "Dunkel", - "light": "Hell", - "system": "System", - "accent_color": "Akzentfarbe", - "sync_album_color": "Albumfarbe synchronisieren", - "sync_album_color_description": "Verwendet die dominante Farbe des Album Covers als Akzentfarbe", - "playback": "Wiedergabe", - "audio_quality": "Audioqualität", - "high": "Hoch", - "low": "Niedrig", - "pre_download_play": "Vorab herunterladen und abspielen", - "pre_download_play_description": "Anstatt Audio zu streamen, Bytes herunterladen und abspielen (Empfohlen für Benutzer mit hoher Bandbreite)", - "skip_non_music": "Überspringe Nicht-Musik-Segmente (SponsorBlock)", - "blacklist_description": "Gesperrte Titel und Künstler", - "wait_for_download_to_finish": "Bitte warten Sie, bis der aktuelle Download abgeschlossen ist", - "desktop": "Desktop", - "close_behavior": "Verhalten beim Schließen", - "close": "Schließen", - "minimize_to_tray": "In Taskleiste minimieren", - "show_tray_icon": "Systemsymbol anzeigen", - "about": "Über", - "u_love_spotube": "Wir wissen, dass Sie Spotube lieben", - "check_for_updates": "Nach Updates suchen", - "about_spotube": "Über Spotube", - "blacklist": "Gesperrte Titel", - "please_sponsor": "Bitte unterstützen/Spenden Sie", - "spotube_description": "Spotube, ein leichtgewichtiger, plattformübergreifender und kostenloser Spotify-Client", - "version": "Version", - "build_number": "Build-Nummer", - "founder": "Gründer", - "repository": "Repository", - "bug_issues": "Fehler und Probleme", - "made_with": "Entwickelt mit ❤️ in Bangladesch 🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Lizenz", - "add_spotify_credentials": "Fügen Sie Ihre Spotify-Anmeldeinformationen hinzu, um zu starten", - "credentials_will_not_be_shared_disclaimer": "Keine Sorge, Ihre Anmeldeinformationen werden nicht erfasst oder mit anderen geteilt", - "know_how_to_login": "Wissen Sie nicht, wie es geht?", - "follow_step_by_step_guide": "Befolgen Sie die schrittweise Anleitung", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "Bitte füllen Sie alle Felder aus", - "submit": "Senden", - "exit": "Beenden", - "previous": "Zurück", - "next": "Weiter", - "done": "Fertig", - "step_1": "Schritt 1", - "first_go_to": "Gehe zuerst zu", - "login_if_not_logged_in": "und melde dich an/registriere dich, falls du nicht angemeldet bist", - "step_2": "Schritt 2", - "step_2_steps": "1. Wenn du angemeldet bist, drücke F12 oder klicke mit der rechten Maustaste > Inspektion, um die Browser-Entwicklertools zu öffnen.\n2. Gehe dann zum \"Anwendungs\"-Tab (Chrome, Edge, Brave usw.) oder zum \"Storage\"-Tab (Firefox, Palemoon usw.)\n3. Gehe zum Abschnitt \"Cookies\" und dann zum Unterabschnitt \"https://accounts.spotify.com\"", - "step_3": "Schritt 3", - "success_emoji": "Erfolg🥳", - "success_message": "Jetzt bist du erfolgreich mit deinem Spotify-Konto angemeldet. Gut gemacht, Kumpel!", - "step_4": "Schritt 4", - "something_went_wrong": "Etwas ist schiefgelaufen", - "piped_instance": "Piped-Serverinstanz", - "piped_description": "Die Piped-Serverinstanz, die zur Titelzuordnung verwendet werden soll", - "piped_warning": "Einige von ihnen funktionieren möglicherweise nicht gut. Verwende sie also auf eigenes Risiko", - "generate_playlist": "Playlist generieren", - "track_exists": "Track {track} existiert bereits", - "replace_downloaded_tracks": "Alle heruntergeladenen Titel ersetzen", - "skip_download_tracks": "Das Herunterladen aller heruntergeladenen Titel überspringen", - "do_you_want_to_replace": "Möchtest du den vorhandenen Track ersetzen?", - "replace": "Ersetzen", - "skip": "Überspringen", - "select_up_to_count_type": "Wähle bis zu {count} {type} aus", - "select_genres": "Genres auswählen", - "add_genres": "Genres hinzufügen", - "country": "Land", - "number_of_tracks_generate": "Anzahl der zu generierenden Titel", - "acousticness": "Akustik", - "danceability": "Tanzbarkeit", - "energy": "Energie", - "instrumentalness": "Instrumentalität", - "liveness": "Lebendigkeit", - "loudness": "Lautstärke", - "speechiness": "Sprechanteil", - "valence": "Stimmung", - "popularity": "Beliebtheit", - "key": "Tonart", - "duration": "Dauer (s)", - "tempo": "Tempo (BPM)", - "mode": "Modus", - "time_signature": "Taktart", - "short": "Kurz", - "medium": "Mittel", - "long": "Lang", - "min": "Min", - "max": "Max", - "target": "Ziel", - "moderate": "Mäßig", - "deselect_all": "Alle abwählen", - "select_all": "Alle auswählen", - "are_you_sure": "Bist du sicher?", - "generating_playlist": "Erstelle deine individuelle Wiedergabeliste...", - "selected_count_tracks": "{count} Titel ausgewählt", - "download_warning": "Wenn du alle Titel in großen Mengen herunterlädst, betreibst du eindeutig Raubkopien von Musik und schadest der kreativen Gesellschaft der Musik. Ich hoffe, dir ist dies bewusst. Versuche immer, die harte Arbeit der Künstler zu respektieren und zu unterstützen.", - "download_ip_ban_warning": "Übrigens, deine IP-Adresse kann aufgrund übermäßiger Downloadanfragen von YouTube gesperrt werden. Eine IP-Sperre bedeutet, dass du YouTube (auch wenn du angemeldet bist) für mindestens 2-3 Monate von diesem IP-Gerät aus nicht nutzen kannst. Spotube übernimmt keine Verantwortung, falls dies jemals geschieht.", - "by_clicking_accept_terms": "Durch Klicken auf 'Akzeptieren' stimmst du den folgenden Bedingungen zu:", - "download_agreement_1": "Ich weiß, dass ich Raubkopien von Musik betreibe. Ich bin böse.", - "download_agreement_2": "Ich werde die Künstler, wo immer ich kann, unterstützen, und ich tue dies nur, weil ich kein Geld habe, um ihre Kunst zu kaufen.", - "download_agreement_3": "Mir ist vollkommen bewusst, dass meine IP-Adresse auf YouTube gesperrt werden kann, und ich halte Spotube oder seine Eigentümer/Mitarbeiter nicht für etwaige Unfälle verantwortlich, die durch meine derzeitige Handlung verursacht werden.", - "decline": "Ablehnen", - "accept": "Akzeptieren", - "details": "Details", - "youtube": "YouTube", - "channel": "Kanal", - "likes": "Likes", - "dislikes": "Dislikes", - "views": "Aufrufe", - "streamUrl": "Stream-URL", - "stop": "Stopp", - "sort_newest": "Nach neuesten Hinzufügungen sortieren", - "sort_oldest": "Nach ältesten Hinzufügungen sortieren", - "sleep_timer": "Schlaftimer", - "mins": "{minutes} Minuten", - "hours": "{hours} Stunden", - "hour": "{hours} Stunde", - "custom_hours": "Benutzerdefinierte Stunden", - "logs": "Protokolle", - "developers": "Entwickler", - "not_logged_in": "Sie sind nicht angemeldet", - "search_mode": "Suchmodus", - "audio_source": "Audioquelle", - "ok": "OK", - "failed_to_encrypt": "Verschlüsselung fehlgeschlagen", - "encryption_failed_warning": "Spotube verwendet Verschlüsselung, um Ihre Daten sicher zu speichern. Dies ist jedoch fehlgeschlagen. Daher wird es auf unsichere Speicherung zurückgreifen\nWenn Sie Linux verwenden, stellen Sie bitte sicher, dass Sie Secret-Services wie gnome-keyring, kde-wallet und keepassxc installiert haben", - "querying_info": "Abfrageinformationen...", - "piped_api_down": "Die Piped API ist ausgefallen", - "piped_down_error_instructions": "Die Piped-Instanz {pipedInstance} ist derzeit nicht verfügbar\n\nEntweder ändern Sie die Instanz oder wechseln Sie den 'API-Typ' zur offiziellen YouTube API\n\nStellen Sie sicher, dass Sie die App nach der Änderung neu starten", - "you_are_offline": "Sie sind derzeit offline", - "connection_restored": "Ihre Internetverbindung wurde wiederhergestellt", - "use_system_title_bar": "System-Titelleiste verwenden", - "update_playlist": "Wiedergabeliste aktualisieren", - "update": "Aktualisieren", - "crunching_results": "Ergebnisse werden verarbeitet...", - "search_to_get_results": "Suche, um Ergebnisse zu erhalten", - "use_amoled_mode": "AMOLED-Modus verwenden", - "pitch_dark_theme": "Pitch Black Dart Theme", - "normalize_audio": "Audio normalisieren", - "change_cover": "Cover ändern", - "add_cover": "Cover hinzufügen", - "restore_defaults": "Standardeinstellungen wiederherstellen", - "download_music_codec": "Musik-Codec herunterladen", - "streaming_music_codec": "Streaming-Musik-Codec", - "login_with_lastfm": "Mit Last.fm anmelden", - "connect": "Verbinden", - "disconnect_lastfm": "Last.fm trennen", - "disconnect": "Trennen", - "username": "Benutzername", - "password": "Passwort", - "login": "Anmelden", - "login_with_your_lastfm": "Mit Ihrem Last.fm-Konto anmelden", - "scrobble_to_lastfm": "Auf Last.fm scrobbeln", - "go_to_album": "Zum Album gehen", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "Alles durchsuchen", - "genres": "Genres", - "explore_genres": "Genres erkunden", - "step_3_steps": "Kopiere den Wert des Cookies \"sp_dc\"", - "step_4_steps": "Füge den kopierten Wert von \"sp_dc\" ein", - "friends": "Freunde", - "no_lyrics_available": "Entschuldigung, Texte für diesen Track konnten nicht gefunden werden", - "sort_duration": "Nach Dauer sortieren", - "start_a_radio": "Radio starten", - "how_to_start_radio": "Wie möchten Sie das Radio starten?", - "replace_queue_question": "Möchten Sie die aktuelle Wiedergabeliste ersetzen oder hinzufügen?", - "endless_playback": "Endlose Wiedergabe", - "delete_playlist": "Wiedergabeliste löschen", - "delete_playlist_confirmation": "Sind Sie sicher, dass Sie diese Wiedergabeliste löschen möchten?", - "local_tracks": "Lokale Titel", - "song_link": "Lied-Link", - "skip_this_nonsense": "Diesen Unsinn überspringen", - "freedom_of_music": "“Freiheit der Musik”", - "freedom_of_music_palm": "“Freiheit der Musik in Ihrer Handfläche”", - "get_started": "Lass uns anfangen", - "youtube_source_description": "Empfohlen und funktioniert am besten.", - "piped_source_description": "Fühlen Sie sich frei? Wie YouTube, aber viel freier.", - "jiosaavn_source_description": "Am besten für die südasiatische Region.", - "highest_quality": "Höchste Qualität: {quality}", - "select_audio_source": "Audioquelle auswählen", - "endless_playback_description": "Neue Lieder automatisch\nam Ende der Wiedergabeliste hinzufügen", - "choose_your_region": "Wählen Sie Ihre Region", - "choose_your_region_description": "Dies wird Spotube helfen, Ihnen den richtigen Inhalt\nfür Ihren Standort anzuzeigen.", - "choose_your_language": "Wählen Sie Ihre Sprache", - "help_project_grow": "Helfen Sie diesem Projekt zu wachsen", - "help_project_grow_description": "Spotube ist ein Open-Source-Projekt. Sie können diesem Projekt helfen, indem Sie zum Projekt beitragen, Fehler melden oder neue Funktionen vorschlagen.", - "contribute_on_github": "Auf GitHub beitragen", - "donate_on_open_collective": "Auf Open Collective spenden", - "browse_anonymously": "Anonym durchsuchen", - "enable_connect": "Verbindung aktivieren", - "enable_connect_description": "Spotube von anderen Geräten steuern", - "devices": "Geräte", - "select": "Auswählen", - "connect_client_alert": "Du wirst von {client} gesteuert", - "this_device": "Dieses Gerät", - "remote": "Fernbedienung", - "local_library": "Lokale Bibliothek", - "add_library_location": "Zur Bibliothek hinzufügen", - "remove_library_location": "Aus der Bibliothek entfernen", - "local_tab": "Lokal", - "stats": "Statistiken", - "and_n_more": "und {count} mehr", - "recently_played": "Zuletzt gespielt", - "browse_more": "Mehr durchsuchen", - "no_title": "Kein Titel", - "not_playing": "Wird nicht abgespielt", - "epic_failure": "Episches Versagen!", - "added_num_tracks_to_queue": "{tracks_length} Titel zur Warteschlange hinzugefügt", - "spotube_has_an_update": "Spotube hat ein Update", - "download_now": "Jetzt herunterladen", - "nightly_version": "Spotube Nightly {nightlyBuildNum} wurde veröffentlicht", - "release_version": "Spotube v{version} wurde veröffentlicht", - "read_the_latest": "Lese die neuesten ", - "release_notes": "Versionshinweise", - "pick_color_scheme": "Farbschema wählen", - "save": "Speichern", - "choose_the_device": "Wähle das Gerät:", - "multiple_device_connected": "Es sind mehrere Geräte verbunden.\nWähle das Gerät, auf dem diese Aktion ausgeführt werden soll", - "nothing_found": "Nichts gefunden", - "the_box_is_empty": "Die Box ist leer", - "top_artists": "Top-Künstler", - "top_albums": "Top-Alben", - "this_week": "Diese Woche", - "this_month": "Diesen Monat", - "last_6_months": "Letzte 6 Monate", - "this_year": "Dieses Jahr", - "last_2_years": "Letzte 2 Jahre", - "all_time": "Alle Zeiten", - "powered_by_provider": "Bereitgestellt von {providerName}", - "email": "Email", - "profile_followers": "Follower", - "birthday": "Geburtstag", - "subscription": "Abonnement", - "not_born": "Nicht geboren", - "hacker": "Hacker", - "profile": "Profil", - "no_name": "Kein Name", - "edit": "Bearbeiten", - "user_profile": "Benutzerprofil", - "count_plays": "{count} Wiedergaben", - "streaming_fees_hypothetical": "Streaming-Gebühren (hypothetisch)", - "minutes_listened": "Gehörte Minuten", - "streamed_songs": "Gestreamte Lieder", - "count_streams": "{count} Streams", - "owned_by_you": "In Ihrem Besitz", - "copied_shareurl_to_clipboard": "{shareUrl} in die Zwischenablage kopiert", - "spotify_hipotetical_calculation": "*Dies ist basierend auf Spotifys\npro Stream Auszahlung von $0,003 bis $0,005\nberechnet. Dies ist eine hypothetische Berechnung,\num dem Benutzer Einblick zu geben,\nwieviel sie den Künstlern gezahlt hätten,\nwenn sie ihren Song auf Spotify gehört hätten.", - "count_mins": "{minutes} Minuten", - "summary_minutes": "Minuten", - "summary_listened_to_music": "Hat Musik gehört", - "summary_songs": "Lieder", - "summary_streamed_overall": "Insgesamt gestreamt", - "summary_owed_to_artists": "Den Künstlern geschuldet\nDiesen Monat", - "summary_artists": "Künstler", - "summary_music_reached_you": "Musik hat Sie erreicht", - "summary_full_albums": "volle Alben", - "summary_got_your_love": "Hat Ihre Liebe gewonnen", - "summary_playlists": "Wiedergabelisten", - "summary_were_on_repeat": "Wurden wiederholt", - "total_money": "Gesamt {money}", - "webview_not_found": "Webview nicht gefunden", - "webview_not_found_description": "Es ist keine Webview-Laufzeitumgebung auf Ihrem Gerät installiert.\nFalls installiert, stellen Sie sicher, dass es im environment PATH ist\n\nNach der Installation starten Sie die App neu", - "unsupported_platform": "Nicht unterstützte Plattform", - "invidious_instance": "Invidious-Serverinstanz", - "invidious_description": "Die Invidious-Serverinstanz zur Titelerkennung", - "invidious_warning": "Einige Instanzen funktionieren möglicherweise nicht gut. Benutzung auf eigene Gefahr", - "invidious_source_description": "Ähnlich wie Piped, aber mit höherer Verfügbarkeit", - "cache_music": "Musik zwischenspeichern", - "open": "Öffnen", - "cache_folder": "Cache-Ordner", - "export": "Exportieren", - "clear_cache": "Cache leeren", - "clear_cache_confirmation": "Möchten Sie den Cache leeren?", - "export_cache_files": "Cachedateien exportieren", - "found_n_files": "{count} Dateien gefunden", - "export_cache_confirmation": "Möchten Sie diese Dateien exportieren nach", - "exported_n_out_of_m_files": "{filesExported} von {files} Dateien exportiert", - "playlist": "Playlist", - "no_loop": "Kein Loop", - "generate": "Generieren", - "undo": "Rückgängig", - "download_all": "Alle herunterladen", - "add_all_to_playlist": "Alle zur Playlist hinzufügen", - "add_all_to_queue": "Alle zur Warteschlange hinzufügen", - "play_all_next": "Alle als Nächstes abspielen", - "pause": "Pause", - "view_all": "Alle ansehen", - "no_tracks_added_yet": "Sie haben noch keine Titel hinzugefügt.", - "no_tracks": "Es sieht so aus, als ob hier keine Titel sind.", - "no_tracks_listened_yet": "Es scheint, dass Sie noch nichts gehört haben.", - "not_following_artists": "Sie folgen noch keinem Künstler.", - "no_favorite_albums_yet": "Es sieht so aus, als ob Sie noch keine Alben zu Ihren Favoriten hinzugefügt haben.", - "no_logs_found": "Keine Protokolle gefunden", - "youtube_engine": "YouTube-Engine", - "youtube_engine_not_installed_title": "{engine} ist nicht installiert", - "youtube_engine_not_installed_message": "{engine} ist nicht auf Ihrem System installiert.", - "youtube_engine_set_path": "Stellen Sie sicher, dass es im PATH verfügbar ist oder\nsetzen Sie den absoluten Pfad zur {engine} ausführbaren Datei unten.", - "youtube_engine_unix_issue_message": "In macOS/Linux/unixähnlichen Betriebssystemen funktioniert das Setzen des Pfads in .zshrc/.bashrc/.bash_profile usw. nicht.\nSie müssen den Pfad in der Shell-Konfigurationsdatei festlegen.", - "download": "Herunterladen", - "file_not_found": "Datei nicht gefunden", - "custom": "Benutzerdefiniert", - "add_custom_url": "Benutzerdefinierte URL hinzufügen", - "edit_port": "Port bearbeiten", - "port_helper_msg": "Der Standardwert ist -1, was eine zufällige Zahl bedeutet. Wenn Sie eine Firewall konfiguriert haben, wird empfohlen, dies einzustellen.", - "connect_request": "{client} die Verbindung erlauben?", - "connection_request_denied": "Verbindung abgelehnt. Benutzer hat den Zugriff verweigert.", - "hipotetical_calculation": "*Diese Berechnung basiert auf der durchschnittlichen Auszahlung pro Stream (0,003 USD bis 0,005 USD) auf Online-Musik-Streaming-Plattformen. Sie ist hypothetisch und soll dem Nutzer veranschaulichen, wie viel er den Künstlern bezahlt hätte, wenn er ihren Song auf verschiedenen Streaming-Plattformen gehört hätte.", - "an_error_occurred": "Ein Fehler ist aufgetreten", - "copy_to_clipboard": "In die Zwischenablage kopieren", - "view_logs": "Protokolle anzeigen", - "retry": "Erneut versuchen", - "no_default_metadata_provider_selected": "Sie haben keinen Standard-Metadatenanbieter festgelegt", - "manage_metadata_providers": "Metadatenanbieter verwalten", - "open_link_in_browser": "Link im Browser öffnen?", - "do_you_want_to_open_the_following_link": "Möchten Sie folgenden Link öffnen?", - "unsafe_url_warning": "Das Öffnen von Links aus nicht vertrauenswürdigen Quellen kann unsicher sein. Seien Sie vorsichtig!\nSie können den Link auch in Ihre Zwischenablage kopieren.", - "copy_link": "Link kopieren", - "building_your_timeline": "Ihr Zeitverlauf wird basierend auf Ihren Hördaten erstellt…", - "official": "Offiziell", - "author_name": "Autor: {author}", - "third_party": "Drittanbieter", - "plugin_requires_authentication": "Plugin erfordert Authentifizierung", - "update_available": "Update verfügbar", - "supports_scrobbling": "Unterstützt Scrobbling", - "plugin_scrobbling_info": "Dieses Plugin scrobbelt Ihre Musik, um Ihre Hörhistorie zu erstellen.", - "default_plugin": "Standard", - "set_default": "Als Standard festlegen", - "support": "Unterstützung", - "support_plugin_development": "Plugin-Entwicklung unterstützen", - "can_access_name_api": "- Kann auf **{name}**-API zugreifen", - "do_you_want_to_install_this_plugin": "Möchten Sie dieses Plugin installieren?", - "third_party_plugin_warning": "Dieses Plugin stammt aus einem Drittanbieter-Repository. Bitte stellen Sie sicher, dass Sie der Quelle vertrauen, bevor Sie es installieren.", - "author": "Autor", - "this_plugin_can_do_following": "Dieses Plugin kann Folgendes:", - "install": "Installieren", - "install_a_metadata_provider": "Einen Metadatenanbieter installieren", - "no_tracks_playing": "Derzeit wird kein Titel abgespielt", - "synced_lyrics_not_available": "Synchronisierte Liedtexte sind für dieses Lied nicht verfügbar. Bitte verwenden Sie stattdessen", - "plain_lyrics": "Einfache Liedtexte", - "tab_instead": "stattdessen die Tab-Taste verwenden.", - "disclaimer": "Haftungsausschluss", - "third_party_plugin_dmca_notice": "Das Spotube-Team übernimmt keine Verantwortung (auch nicht rechtlicher Art) für Plugins \"Drittanbieter\". Nutzen Sie diese auf eigenes Risiko. Für Fehler/Probleme melden Sie sich bitte beim Plugin-Repository.\n\nWenn ein Plugin \"Drittanbieter\" gegen die ToS/DMCA eines Dienstes bzw. gesetzlicher Vorschriften verstößt, wenden Sie sich bitte an den Plugin-Autor oder die Hosting-Plattform (z. B. GitHub/Codeberg), um Maßnahmen zu ergreifen. Die genannten Plugins (mit \"Drittanbieter\"-Kennzeichnung) werden öffentlich und gemeinschaftlich gepflegt. Wir kuratieren sie nicht und können keine Maßnahmen ergreifen.\n\n", - "input_does_not_match_format": "Eingabe entspricht nicht dem geforderten Format", - "metadata_provider_plugins": "Plugins für Metadatenanbieter", - "paste_plugin_download_url": "Download-URL, GitHub/Codeberg-Repo-URL oder direkten Link zur .smplug-Datei einfügen", - "download_and_install_plugin_from_url": "Plugin per URL herunterladen und installieren", - "failed_to_add_plugin_error": "Plugin konnte nicht hinzugefügt werden: {error}", - "upload_plugin_from_file": "Plugin per Datei hochladen", - "installed": "Installiert", - "available_plugins": "Verfügbare Plugins", - "configure_your_own_metadata_plugin": "Eigenen Anbieter für Playlist-/Album-/Künstler-/Feed-Metadaten konfigurieren", - "audio_scrobblers": "Audio-Scrobbler", - "scrobbling": "Scrobbling", - "download_music_format": "Musik-Downloadformat", - "streaming_music_format": "Musik-Streamingformat", - "download_music_quality": "Musik-Downloadqualität", - "streaming_music_quality": "Musik-Streamingqualität", - "default_metadata_source": "Standard-Metadatenquelle", - "set_default_metadata_source": "Standard-Metadatenquelle festlegen", - "default_audio_source": "Standard-Audioquelle", - "set_default_audio_source": "Standard-Audioquelle festlegen", - "plugins": "Plugins", - "configure_plugins": "Richte deine eigenen Metadatenanbieter- und Audioquellen-Plugins ein", - "source": "Quelle: ", - "uncompressed": "Unkomprimiert", - "dab_music_source_description": "Für Audiophile. Bietet hochwertige/verlustfreie Audiostreams. Präzises ISRC-basiertes Track-Matching." -} \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb deleted file mode 100644 index 111d76a8..00000000 --- a/lib/l10n/app_en.arb +++ /dev/null @@ -1,473 +0,0 @@ -{ - "guest": "Guest", - "browse": "Browse", - "search": "Search", - "library": "Library", - "lyrics": "Lyrics", - "settings": "Settings", - "genre_categories_filter": "Filter categories or genres...", - "genre": "Genre", - "personalized": "Personalized", - "featured": "Featured", - "new_releases": "New Releases", - "songs": "Songs", - "playing_track": "Playing {track}", - "queue_clear_alert": "This will clear the current queue. {track_length} tracks will be removed\nDo you want to continue?", - "load_more": "Load more", - "playlists": "Playlists", - "artists": "Artists", - "albums": "Albums", - "tracks": "Tracks", - "downloads": "Downloads", - "filter_playlists": "Filter your playlists...", - "liked_tracks": "Liked Tracks", - "liked_tracks_description": "All your liked tracks", - "playlist": "Playlist", - "create_a_playlist": "Create a playlist", - "update_playlist": "Update playlist", - "create": "Create", - "cancel": "Cancel", - "update": "Update", - "playlist_name": "Playlist Name", - "name_of_playlist": "Name of the playlist", - "description": "Description", - "public": "Public", - "collaborative": "Collaborative", - "search_local_tracks": "Search local tracks...", - "play": "Play", - "delete": "Delete", - "none": "None", - "sort_a_z": "Sort by A-Z", - "sort_z_a": "Sort by Z-A", - "sort_artist": "Sort by Artist", - "sort_album": "Sort by Album", - "sort_duration": "Sort by Duration", - "sort_tracks": "Sort Tracks", - "currently_downloading": "Currently Downloading ({tracks_length})", - "cancel_all": "Cancel All", - "filter_artist": "Filter artists...", - "followers": "{followers} Followers", - "add_artist_to_blacklist": "Add artist to blacklist", - "top_tracks": "Top Tracks", - "fans_also_like": "Fans also like", - "loading": "Loading...", - "artist": "Artist", - "blacklisted": "Blacklisted", - "following": "Following", - "follow": "Follow", - "artist_url_copied": "Artist URL copied to clipboard", - "added_to_queue": "Added {tracks} tracks to queue", - "filter_albums": "Filter albums...", - "synced": "Synced", - "plain": "Plain", - "shuffle": "Shuffle", - "search_tracks": "Search tracks...", - "released": "Released", - "error": "Error {error}", - "title": "Title", - "time": "Time", - "more_actions": "More actions", - "download_count": "Download ({count})", - "add_count_to_playlist": "Add ({count}) to Playlist", - "add_count_to_queue": "Add ({count}) to Queue", - "play_count_next": "Play ({count}) next", - "album": "Album", - "copied_to_clipboard": "Copied {data} to clipboard", - "add_to_following_playlists": "Add {track} to following Playlists", - "add": "Add", - "added_track_to_queue": "Added {track} to queue", - "add_to_queue": "Add to queue", - "track_will_play_next": "{track} will play next", - "play_next": "Play next", - "removed_track_from_queue": "Removed {track} from queue", - "remove_from_queue": "Remove from queue", - "remove_from_favorites": "Remove from favorites", - "save_as_favorite": "Save as favorite", - "add_to_playlist": "Add to playlist", - "remove_from_playlist": "Remove from playlist", - "add_to_blacklist": "Add to blacklist", - "remove_from_blacklist": "Remove from blacklist", - "share": "Share", - "mini_player": "Mini Player", - "slide_to_seek": "Slide to seek forward or backward", - "shuffle_playlist": "Shuffle playlist", - "unshuffle_playlist": "Unshuffle playlist", - "previous_track": "Previous track", - "next_track": "Next track", - "pause_playback": "Pause Playback", - "resume_playback": "Resume Playback", - "loop_track": "Loop track", - "no_loop": "No loop", - "repeat_playlist": "Repeat playlist", - "queue": "Queue", - "alternative_track_sources": "Alternative track sources", - "download_track": "Download track", - "tracks_in_queue": "{tracks} tracks in queue", - "clear_all": "Clear all", - "show_hide_ui_on_hover": "Show/Hide UI on hover", - "always_on_top": "Always on top", - "exit_mini_player": "Exit Mini player", - "download_location": "Download location", - "local_library": "Local library", - "add_library_location": "Add to library", - "remove_library_location": "Remove from library", - "account": "Account", - "logout": "Logout", - "logout_of_this_account": "Logout of this account", - "language_region": "Language & Region", - "language": "Language", - "system_default": "System Default", - "market_place_region": "Marketplace Region", - "recommendation_country": "Recommendation Country", - "appearance": "Appearance", - "layout_mode": "Layout Mode", - "override_layout_settings": "Override responsive layout mode settings", - "adaptive": "Adaptive", - "compact": "Compact", - "extended": "Extended", - "theme": "Theme", - "dark": "Dark", - "light": "Light", - "system": "System", - "accent_color": "Accent Color", - "sync_album_color": "Sync album color", - "sync_album_color_description": "Uses the dominant color of the album art as the accent color", - "playback": "Playback", - "audio_quality": "Audio Quality", - "high": "High", - "low": "Low", - "pre_download_play": "Pre-download and play", - "pre_download_play_description": "Instead of streaming audio, download bytes and play instead (Recommended for higher bandwidth users)", - "skip_non_music": "Skip non-music segments (SponsorBlock)", - "blacklist_description": "Blacklisted tracks and artists", - "wait_for_download_to_finish": "Please wait for the current download to finish", - "desktop": "Desktop", - "close_behavior": "Close Behavior", - "close": "Close", - "minimize_to_tray": "Minimize to tray", - "show_tray_icon": "Show System tray icon", - "about": "About", - "u_love_spotube": "We know you love Spotube", - "check_for_updates": "Check for updates", - "about_spotube": "About Spotube", - "blacklist": "Blacklist", - "please_sponsor": "Please Sponsor/Donate", - "spotube_description": "Open source extensible music streaming platform and app, based on BYOMM (Bring your own music metadata) concept", - "version": "Version", - "build_number": "Build Number", - "founder": "Founder", - "repository": "Repository", - "bug_issues": "Bug+Issues", - "made_with": "Made with ❤️ in Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "License", - "credentials_will_not_be_shared_disclaimer": "Don't worry, any of your credentials won't be collected or shared with anyone", - "know_how_to_login": "Don't know how to do this?", - "follow_step_by_step_guide": "Follow along the Step by Step guide", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "Please fill in all the fields", - "submit": "Submit", - "exit": "Exit", - "previous": "Previous", - "next": "Next", - "done": "Done", - "step_1": "Step 1", - "first_go_to": "First, Go to", - "something_went_wrong": "Something went wrong", - "piped_instance": "Piped Server Instance", - "piped_description": "The Piped server instance to use for track matching", - "piped_warning": "Some of them might not work well. So use at your own risk", - "invidious_instance": "Invidious Server Instance", - "invidious_description": "The Invidious server instance to use for track matching", - "invidious_warning": "Some of them might not work well. So use at your own risk", - "generate": "Generate", - "track_exists": "Track {track} already exists", - "replace_downloaded_tracks": "Replace all downloaded tracks", - "skip_download_tracks": "Skip downloading all downloaded tracks", - "do_you_want_to_replace": "Do you want to replace the existing track??", - "replace": "Replace", - "skip": "Skip", - "select_up_to_count_type": "Select up to {count} {type}", - "select_genres": "Select Genres", - "add_genres": "Add Genres", - "country": "Country", - "number_of_tracks_generate": "Number of tracks to generate", - "acousticness": "Acousticness", - "danceability": "Danceability", - "energy": "Energy", - "instrumentalness": "Instrumentalness", - "liveness": "Liveness", - "loudness": "Loudness", - "speechiness": "Speechiness", - "valence": "Valence", - "popularity": "Popularity", - "key": "Key", - "duration": "Duration (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "Time Signature", - "short": "Short", - "medium": "Medium", - "long": "Long", - "min": "Min", - "max": "Max", - "target": "Target", - "moderate": "Moderate", - "deselect_all": "Deselect All", - "select_all": "Select All", - "are_you_sure": "Are you sure?", - "generating_playlist": "Generating your custom playlist...", - "selected_count_tracks": "Selected {count} tracks", - "download_warning": "If you download all Tracks at bulk you're clearly pirating Music & causing damage to the creative society of Music. I hope you are aware of this. Always, try respecting & supporting Artist's hard work", - "download_ip_ban_warning": "BTW, your IP can get blocked on YouTube due excessive download requests than usual. IP block means you can't use YouTube (even if you're logged in) for at least 2-3 months from that IP device. And Spotube doesn't hold any responsibility if this ever happens", - "by_clicking_accept_terms": "By clicking 'accept' you agree to following terms:", - "download_agreement_1": "I know I'm pirating Music. I'm bad", - "download_agreement_2": "I'll support the Artist wherever I can and I'm only doing this because I don't have money to buy their art", - "download_agreement_3": "I'm completely aware that my IP can get blocked on YouTube & I don't hold Spotube or his owners/contributors responsible for any accidents caused by my current action", - "decline": "Decline", - "accept": "Accept", - "details": "Details", - "youtube": "YouTube", - "channel": "Channel", - "likes": "Likes", - "dislikes": "Dislikes", - "views": "Views", - "streamUrl": "Stream URL", - "stop": "Stop", - "sort_newest": "Sort by newest added", - "sort_oldest": "Sort by oldest added", - "sleep_timer": "Sleep Timer", - "mins": "{minutes} Minutes", - "hours": "{hours} Hours", - "hour": "{hours} Hour", - "custom_hours": "Custom Hours", - "logs": "Logs", - "developers": "Developers", - "not_logged_in": "You're not logged in", - "search_mode": "Search Mode", - "audio_source": "Audio Source", - "ok": "Ok", - "failed_to_encrypt": "Failed to encrypt", - "encryption_failed_warning": "Spotube uses encryption to securely store your data. But failed to do so. So it'll fallback to insecure storage\nIf you're using linux, please make sure you've any secret-service (gnome-keyring, kde-wallet, keepassxc etc) installed", - "querying_info": "Querying info...", - "piped_api_down": "Piped API is down", - "piped_down_error_instructions": "The Piped instance {pipedInstance} is currently down\n\nEither change the instance or change the 'API type' to official YouTube API\n\nMake sure to restart the app after change", - "you_are_offline": "You are currently offline", - "connection_restored": "Your internet connection was restored", - "use_system_title_bar": "Use system title bar", - "crunching_results": "Crunching results...", - "search_to_get_results": "Search to get results", - "use_amoled_mode": "Pitch black dark theme", - "pitch_dark_theme": "AMOLED Mode", - "normalize_audio": "Normalize audio", - "change_cover": "Change cover", - "add_cover": "Add cover", - "restore_defaults": "Restore defaults", - "download_music_format": "Download music format", - "streaming_music_format": "Streaming music format", - "download_music_quality": "Download music quality", - "streaming_music_quality": "Streaming music quality", - "login_with_lastfm": "Login with Last.fm", - "connect": "Connect", - "disconnect_lastfm": "Disconnect Last.fm", - "disconnect": "Disconnect", - "username": "Username", - "password": "Password", - "login": "Login", - "login_with_your_lastfm": "Login with your Last.fm account", - "scrobble_to_lastfm": "Scrobble to Last.fm", - "go_to_album": "Go to Album", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "Browse All", - "genres": "Genres", - "explore_genres": "Explore Genres", - "friends": "Friends", - "no_lyrics_available": "Sorry, unable find lyrics for this track", - "start_a_radio": "Start a Radio", - "how_to_start_radio": "How do you want to start the radio?", - "replace_queue_question": "Do you want to replace the current queue or append to it?", - "endless_playback": "Endless Playback", - "delete_playlist": "Delete Playlist", - "delete_playlist_confirmation": "Are you sure you want to delete this playlist?", - "local_tracks": "Local Tracks", - "local_tab": "Local", - "song_link": "Song Link", - "skip_this_nonsense": "Skip this nonsense", - "freedom_of_music": "“Freedom of Music”", - "freedom_of_music_palm": "“Freedom of Music in the palm of your hand”", - "get_started": "Let's get started", - "youtube_source_description": "Recommended and works best.", - "piped_source_description": "Feeling free? Same as YouTube but a lot free.", - "jiosaavn_source_description": "Best for South Asian region.", - "invidious_source_description": "Similar to Piped but with higher availability.", - "highest_quality": "Highest Quality: {quality}", - "select_audio_source": "Select Audio Source", - "endless_playback_description": "Automatically append new songs\nto the end of the queue", - "choose_your_region": "Choose your region", - "choose_your_region_description": "This will help Spotube show you the right content\nfor your location.", - "choose_your_language": "Choose your language", - "help_project_grow": "Help this project grow", - "help_project_grow_description": "Spotube is an open-source project. You can help this project grow by contributing to the project, reporting bugs, or suggesting new features.", - "contribute_on_github": "Contribute on GitHub", - "donate_on_open_collective": "Donate on Open Collective", - "browse_anonymously": "Browse Anonymously", - "enable_connect": "Enable Connect", - "enable_connect_description": "Control Spotube from other devices", - "devices": "Devices", - "select": "Select", - "connect_client_alert": "You're being controlled by {client}", - "this_device": "This Device", - "remote": "Remote", - "stats": "Stats", - "and_n_more": "and {count} more", - "recently_played": "Recently Played", - "browse_more": "Browse More", - "no_title": "No Title", - "not_playing": "Not playing", - "epic_failure": "Epic failure!", - "added_num_tracks_to_queue": "Added {tracks_length} tracks to queue", - "spotube_has_an_update": "Spotube has an update", - "download_now": "Download Now", - "nightly_version": "Spotube Nightly {nightlyBuildNum} has been released", - "release_version": "Spotube v{version} has been released", - "read_the_latest": "Read the latest ", - "release_notes": "release notes", - "pick_color_scheme": "Pick color scheme", - "save": "Save", - "choose_the_device": "Choose the device:", - "multiple_device_connected": "There are multiple device connected.\nChoose the device you want this action to take place", - "nothing_found": "Nothing found", - "the_box_is_empty": "The box is empty", - "top_artists": "Top Artists", - "top_albums": "Top Albums", - "this_week": "This week", - "this_month": "This month", - "last_6_months": "Last 6 months", - "this_year": "This year", - "last_2_years": "Last 2 years", - "all_time": "All time", - "powered_by_provider": "Powered by {providerName}", - "email": "Email", - "profile_followers": "Followers", - "birthday": "Birthday", - "subscription": "Subscription", - "not_born": "Not born", - "hacker": "Hacker", - "profile": "Profile", - "no_name": "No Name", - "edit": "Edit", - "user_profile": "User Profile", - "count_plays": "{count} plays", - "streaming_fees_hypothetical": "Streaming fees (hypothetical)", - "minutes_listened": "Minutes listened", - "streamed_songs": "Streamed songs", - "count_streams": "{count} streams", - "owned_by_you": "Owned by you", - "copied_shareurl_to_clipboard": "Copied {shareUrl} to clipboard", - "hipotetical_calculation": "*This is calculated based on average online music streaming platform's per stream\npayout of $0.003 to $0.005. This is a hypothetical\ncalculation to give user insight about how much they\nwould have paid to the artists if they were to listen\ntheir song in different music streaming platform.", - "count_mins": "{minutes} mins", - "summary_minutes": "minutes", - "summary_listened_to_music": "Listened to music", - "summary_songs": "songs", - "summary_streamed_overall": "Streamed overall", - "summary_owed_to_artists": "Owed to artists\nthis month", - "summary_artists": "artist's", - "summary_music_reached_you": "Music reached you", - "summary_full_albums": "full albums", - "summary_got_your_love": "Got your love", - "summary_playlists": "playlists", - "summary_were_on_repeat": "Were on repeat", - "total_money": "Total {money}", - "webview_not_found": "Webview not found", - "webview_not_found_description": "No webview runtime is installed in your device.\nIf it's installed make sure it's in the Environment PATH\n\nAfter installing, restart the app", - "unsupported_platform": "Unsupported platform", - "cache_music": "Cache music", - "open": "Open", - "cache_folder": "Cache folder", - "export": "Export", - "clear_cache": "Clear cache", - "clear_cache_confirmation": "Do you want to clear the cache?", - "export_cache_files": "Export Cached Files", - "found_n_files": "Found {count} files", - "export_cache_confirmation": "Do you want to export these files to", - "exported_n_out_of_m_files": "Exported {filesExported} out of {files} files", - "undo": "Undo", - "download_all": "Download all", - "add_all_to_playlist": "Add all to playlist", - "add_all_to_queue": "Add all to queue", - "play_all_next": "Play all next", - "pause": "Pause", - "view_all": "View all", - "no_tracks_added_yet": "Looks like you haven't added any tracks yet", - "no_tracks": "Looks like there are no tracks here", - "no_tracks_listened_yet": "Looks like you haven't listened to anything yet", - "not_following_artists": "You're not following any artists", - "no_favorite_albums_yet": "Looks like you haven't added any albums to your favorites yet", - "no_logs_found": "No logs found", - "youtube_engine": "YouTube Engine", - "youtube_engine_not_installed_title": "{engine} is not installed", - "youtube_engine_not_installed_message": "{engine} is not installed in your system.", - "youtube_engine_set_path": "Make sure it's available in the PATH variable or\nset the absolute path to the {engine} executable below", - "youtube_engine_unix_issue_message": "In macOS/Linux/unix like OS's, setting path on .zshrc/.bashrc/.bash_profile etc. won't work.\nYou need to set the path in the shell configuration file", - "download": "Download", - "file_not_found": "File not found", - "custom": "Custom", - "add_custom_url": "Add custom URL", - "edit_port": "Edit port", - "port_helper_msg": "Default is -1 which indicates random number. If you've firewall configured, setting this is recommended.", - "connect_request": "Allow {client} to connect?", - "connection_request_denied": "Connection denied. User denied access.", - "an_error_occurred": "An error occurred", - "copy_to_clipboard": "Copy to clipboard", - "view_logs": "View logs", - "retry": "Retry", - "no_default_metadata_provider_selected": "You've no default metadata provider set", - "manage_metadata_providers": "Manage metadata providers", - "open_link_in_browser": "Open Link in Browser?", - "do_you_want_to_open_the_following_link": "Do you want to open the following link", - "unsafe_url_warning": "It can be unsafe to open links from untrusted sources. Be cautious!\nYou can also copy the link to your clipboard.", - "copy_link": "Copy Link", - "building_your_timeline": "Building your timeline based on your listenings...", - "official": "Official", - "author_name": "Author: {author}", - "third_party": "Third-party", - "plugin_requires_authentication": "Plugin requires authentication", - "update_available": "Update available", - "supports_scrobbling": "Supports scrobbling", - "plugin_scrobbling_info": "This plugin scrobbles your music to generate your listening history.", - "default_metadata_source": "Default metadata source", - "set_default_metadata_source": "Set default metadata source", - "default_audio_source": "Default audio source", - "set_default_audio_source": "Set default audio source", - "set_default": "Set default", - "support": "Support", - "support_plugin_development": "Support plugin development", - "can_access_name_api": "- Can access **{name}** API", - "do_you_want_to_install_this_plugin": "Do you want to install this plugin?", - "third_party_plugin_warning": "This plugin is from a third-party repository. Please ensure you trust the source before installing.", - "author": "Author", - "this_plugin_can_do_following": "This plugin can do following", - "install": "Install", - "install_a_metadata_provider": "Install a Metadata Provider", - "no_tracks_playing": "No Track being played currently", - "synced_lyrics_not_available": "Synced lyrics are not available for this song. Please use the", - "plain_lyrics": "Plain Lyrics", - "tab_instead": "tab instead.", - "disclaimer": "Disclaimer", - "third_party_plugin_dmca_notice": "The Spotube team does not hold any responsibility (including legal) for any \"Third-party\" plugins.\nPlease use them at your own risk. For any bugs/issues, please report them to the plugin repository.\n\nIf any \"Third-party\" plugin is breaking ToS/DMCA of any service/legal entity, please ask the \"Third-party\" plugin author or the hosting platform .e.g GitHub/Codeberg to take action. Above listed (\"Third-party\" labelled) are all public/community maintained plugins. We're not curating them, so we cannot take any action on them.\n\n", - "input_does_not_match_format": "Input doesn't match the required format", - "plugins": "Plugins", - "paste_plugin_download_url": "Paste download url or GitHub/Codeberg repo url or direct link to .smplug file", - "download_and_install_plugin_from_url": "Download and install plugin from url", - "failed_to_add_plugin_error": "Failed to add plugin: {error}", - "upload_plugin_from_file": "Upload plugin from file", - "installed": "Installed", - "available_plugins": "Available plugins", - "configure_plugins": "Configure your own metadata provider and audio source plugins", - "audio_scrobblers": "Audio Scrobblers", - "scrobbling": "Scrobbling", - "source": "Source: ", - "uncompressed": "Uncompressed", - "dab_music_source_description": "For audiophiles. Provides high-quality/lossless audio streams. Accurate ISRC based track matching." -} diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb deleted file mode 100644 index 32822763..00000000 --- a/lib/l10n/app_es.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Invitado", - "browse": "Explorar", - "search": "Buscar", - "library": "Biblioteca", - "lyrics": "Letras", - "settings": "Configuración", - "genre_categories_filter": "Filtrar categorías o géneros...", - "genre": "Género", - "personalized": "Personalizado", - "featured": "Destacado", - "new_releases": "Nuevos Lanzamientos", - "songs": "Canciones", - "playing_track": "Reproduciendo {track}", - "queue_clear_alert": "Esto eliminará la lista actual. Se eliminarán {track_length} canciones.\n¿Deseas continuar?", - "load_more": "Cargar más", - "playlists": "Listas de reproducción", - "artists": "Artistas", - "albums": "Álbumes", - "tracks": "Canciones", - "downloads": "Descargas", - "filter_playlists": "Filtrar tus listas de reproducción...", - "liked_tracks": "Canciones Favoritas", - "liked_tracks_description": "Todas tus canciones favoritas", - "create_playlist": "Crear Lista de reproducción", - "create_a_playlist": "Crear una lista de reproducción", - "create": "Crear", - "cancel": "Cancelar", - "playlist_name": "Nombre de la lista", - "name_of_playlist": "Nombre de la lista", - "description": "Descripción", - "public": "Pública", - "collaborative": "Colaborativa", - "search_local_tracks": "Buscar canciones locales...", - "play": "Reproducir", - "delete": "Eliminar", - "none": "Ninguno", - "sort_a_z": "Ordenar de la A a la Z", - "sort_z_a": "Ordenar de la Z a la A", - "sort_artist": "Ordenar por Artista", - "sort_album": "Ordenar por Álbum", - "sort_tracks": "Ordenar Canciones", - "currently_downloading": "Descargando en curso ({tracks_length})", - "cancel_all": "Cancelar todo", - "filter_artist": "Filtrar artistas...", - "followers": "{followers} Seguidores", - "add_artist_to_blacklist": "Agregar artista a la lista negra", - "top_tracks": "Mejores Canciones", - "fans_also_like": "A los fans también les gusta", - "loading": "Cargando...", - "artist": "Artista", - "blacklisted": "En la lista negra", - "following": "Siguiendo", - "follow": "Seguir", - "artist_url_copied": "URL del artista copiada al portapapeles", - "added_to_queue": "Agregadas {tracks} canciones a la lista", - "filter_albums": "Filtrar álbumes...", - "synced": "Sincronizado", - "plain": "Normal", - "shuffle": "Aleatorio", - "search_tracks": "Buscar canciones...", - "released": "Lanzado", - "error": "Error {error}", - "title": "Título", - "time": "Duración", - "more_actions": "Más acciones", - "download_count": "Descargas ({count})", - "add_count_to_playlist": "Agregar ({count}) a la lista", - "add_count_to_queue": "Agregar ({count}) a la lista", - "play_count_next": "Reproducir ({count}) a continuación", - "album": "Álbum", - "copied_to_clipboard": "{data} copiado al portapapeles", - "add_to_following_playlists": "Agregar {track} a las listas de reproducción siguientes", - "add": "Agregar", - "added_track_to_queue": "{track} agregada a la lista", - "add_to_queue": "Agregar a la lista", - "track_will_play_next": "{track} se reproducirá a continuación", - "play_next": "Reproducir a continuación", - "removed_track_from_queue": "{track} eliminada de la lista", - "remove_from_queue": "Eliminar de la lista", - "remove_from_favorites": "Eliminar de favoritos", - "save_as_favorite": "Guardar como favorito", - "add_to_playlist": "Agregar a la lista", - "remove_from_playlist": "Eliminar de la lista", - "add_to_blacklist": "Agregar a la lista negra", - "remove_from_blacklist": "Eliminar de la lista negra", - "share": "Compartir", - "mini_player": "Reproductor Mini", - "slide_to_seek": "Desliza para buscar adelante o atrás", - "shuffle_playlist": "Reproducir lista en orden aleatorio", - "unshuffle_playlist": "Desactivar reproducción aleatoria", - "previous_track": "Pista anterior", - "next_track": "Pista siguiente", - "pause_playback": "Pausar reproducción", - "resume_playback": "Reanudar reproducción", - "loop_track": "Repetir pista", - "repeat_playlist": "Repetir lista", - "queue": "Lista", - "alternative_track_sources": "Fuentes alternativas de canciones", - "download_track": "Descargar canción", - "tracks_in_queue": "{tracks} canciones en la lista", - "clear_all": "Limpiar todo", - "show_hide_ui_on_hover": "Mostrar/Ocultar interfaz al pasar el cursor", - "always_on_top": "Siempre visible", - "exit_mini_player": "Salir del reproductor mini", - "download_location": "Ubicación de descargas", - "account": "Cuenta", - "login_with_spotify": "Iniciar sesión con tu cuenta de Spotify", - "connect_with_spotify": "Conectar con Spotify", - "logout": "Cerrar sesión", - "logout_of_this_account": "Cerrar sesión de esta cuenta", - "language_region": "Idioma y Región", - "language": "Idioma", - "system_default": "Predeterminado del sistema", - "market_place_region": "Región de la tienda", - "recommendation_country": "País de recomendación", - "appearance": "Apariencia", - "layout_mode": "Modo de diseño", - "override_layout_settings": "Anular la configuración del modo de diseño responsive", - "adaptive": "Adaptable", - "compact": "Compacto", - "extended": "Extendido", - "theme": "Tema", - "dark": "Oscuro", - "light": "Claro", - "system": "Sistema", - "accent_color": "Color de acento", - "sync_album_color": "Sincronizar color del álbum", - "sync_album_color_description": "Usa el color dominante del arte del álbum como color de acento", - "playback": "Reproducción", - "audio_quality": "Calidad de audio", - "high": "Alta", - "low": "Baja", - "pre_download_play": "Pre-descargar y reproducir", - "pre_download_play_description": "En lugar de transmitir audio, descarga bytes y reproduce en su lugar (recomendado para usuarios con mayor ancho de banda)", - "skip_non_music": "Omitir segmentos que no son música (SponsorBlock)", - "blacklist_description": "Canciones y artistas en la lista negra", - "wait_for_download_to_finish": "Por favor, espera a que termine la descarga actual", - "desktop": "Escritorio", - "close_behavior": "Comportamiento al cerrar", - "close": "Cerrar", - "minimize_to_tray": "Minimizar en la bandeja del sistema", - "show_tray_icon": "Mostrar icono en la bandeja del sistema", - "about": "Acerca de", - "u_love_spotube": "Sabemos que te encanta Spotube", - "check_for_updates": "Buscar actualizaciones", - "about_spotube": "Acerca de Spotube", - "blacklist": "Lista negra", - "please_sponsor": "Por favor, apoya/dona", - "spotube_description": "Spotube, un cliente ligero, multiplataforma y gratuito de Spotify", - "version": "Versión", - "build_number": "Número de compilación", - "founder": "Fundador", - "repository": "Repositorio", - "bug_issues": "Errores y problemas", - "made_with": "Hecho con ❤️ en Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licencia", - "add_spotify_credentials": "Agrega tus credenciales de Spotify para comenzar", - "credentials_will_not_be_shared_disclaimer": "No te preocupes, tus credenciales no serán recopiladas ni compartidas con nadie", - "know_how_to_login": "¿No sabes cómo hacerlo?", - "follow_step_by_step_guide": "Sigue la guía paso a paso", - "spotify_cookie": "Cookie de Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Por favor, completa todos los campos", - "submit": "Enviar", - "exit": "Salir", - "previous": "Anterior", - "next": "Siguiente", - "done": "Listo", - "step_1": "Paso 1", - "first_go_to": "Primero, ve a", - "login_if_not_logged_in": "e inicia sesión/registra tu cuenta si no lo has hecho aún", - "step_2": "Paso 2", - "step_2_steps": "1. Una vez que hayas iniciado sesión, presiona F12 o haz clic derecho con el ratón > Inspeccionar para abrir las herramientas de desarrollo del navegador.\n2. Luego ve a la pestaña \"Application\" (Chrome, Edge, Brave, etc.) o \"Storage\" (Firefox, Palemoon, etc.)\n3. Ve a la sección \"Cookies\" y luego la subsección \"https://accounts.spotify.com\"", - "step_3": "Paso 3", - "success_emoji": "¡Éxito! 🥳", - "success_message": "Ahora has iniciado sesión con éxito en tu cuenta de Spotify. ¡Buen trabajo!", - "step_4": "Paso 4", - "something_went_wrong": "Algo salió mal", - "piped_instance": "Instancia del servidor Piped", - "piped_description": "La instancia del servidor Piped a utilizar para la coincidencia de pistas", - "piped_warning": "Algunas pueden no funcionar bien, úsalas bajo tu propio riesgo", - "generate_playlist": "Generar Lista de reproducción", - "track_exists": "La canción {track} ya existe", - "replace_downloaded_tracks": "Reemplazar todas las canciones descargadas", - "skip_download_tracks": "Omitir la descarga de todas las canciones descargadas", - "do_you_want_to_replace": "¿Deseas reemplazar la canción existente?", - "replace": "Reemplazar", - "skip": "Omitir", - "select_up_to_count_type": "Seleccionar hasta {count} {type}", - "select_genres": "Seleccionar Géneros", - "add_genres": "Agregar Géneros", - "country": "País", - "number_of_tracks_generate": "Número de canciones a generar", - "acousticness": "Acousticness", - "danceability": "Danceability", - "energy": "Energía", - "instrumentalness": "Instrumentalidad", - "liveness": "En vivo", - "loudness": "Volumen", - "speechiness": "Habla", - "valence": "Valencia", - "popularity": "Popularidad", - "key": "Tono", - "duration": "Duración (s)", - "tempo": "Tempo (BPM)", - "mode": "Modo", - "time_signature": "Compás", - "short": "Corto", - "medium": "Medio", - "long": "Largo", - "min": "Mín.", - "max": "Máx.", - "target": "Objetivo", - "moderate": "Moderado", - "deselect_all": "Deseleccionar todo", - "select_all": "Seleccionar todo", - "are_you_sure": "¿Estás seguro?", - "generating_playlist": "Generando tu lista de reproducción personalizada...", - "selected_count_tracks": "Seleccionadas {count} canciones", - "download_warning": "Si descargas todas las canciones de golpe, estás claramente pirateando música y causando daño a la sociedad creativa de la música. Espero que seas consciente de esto y siempre intentes respetar y apoyar el arduo trabajo de los artistas", - "download_ip_ban_warning": "Por cierto, tu IP puede ser bloqueada en YouTube debido a solicitudes de descarga excesivas. El bloqueo de IP significa que no podrás usar YouTube (incluso si has iniciado sesión) durante al menos 2-3 meses desde esa dirección IP. Y Spotube no se hace responsable si esto ocurre alguna vez", - "by_clicking_accept_terms": "Al hacer clic en 'Aceptar', aceptas los siguientes términos:", - "download_agreement_1": "Sé que estoy pirateando música. Soy malo", - "download_agreement_2": "Apoyaré al artista donde pueda y solo lo hago porque no tengo dinero para comprar su arte", - "download_agreement_3": "Soy completamente consciente de que mi IP puede ser bloqueada en YouTube y no responsabilizo a Spotube ni a sus dueños/contribuyentes por cualquier incidente causado por mi acción actual", - "decline": "Rechazar", - "accept": "Aceptar", - "details": "Detalles", - "youtube": "YouTube", - "channel": "Canal", - "likes": "Me gusta", - "dislikes": "No me gusta", - "views": "Vistas", - "streamUrl": "URL del streaming", - "stop": "Detener", - "sort_newest": "Ordenar por más recientes", - "sort_oldest": "Ordenar por más antiguos", - "sleep_timer": "Temporizador de apagado", - "mins": "{minutes} minutos", - "hours": "{hours} horas", - "hour": "{hours} hora", - "custom_hours": "Horas personalizadas", - "logs": "Registros", - "developers": "Desarrolladores", - "not_logged_in": "No has iniciado sesión", - "search_mode": "Modo de búsqueda", - "audio_source": "Fuente de audio", - "ok": "OK", - "failed_to_encrypt": "Error al cifrar", - "encryption_failed_warning": "Spotube utiliza el cifrado para almacenar sus datos de forma segura. Pero ha fallado. Por lo tanto, volverá a un almacenamiento no seguro\nSi está utilizando Linux, asegúrese de tener instalados servicios secretos como gnome-keyring, kde-wallet y keepassxc", - "querying_info": "Consultando información...", - "piped_api_down": "La API de Piped no está disponible", - "piped_down_error_instructions": "La instancia de Piped {pipedInstance} no está funcionando en este momento\n\nCambie la instancia o cambie el 'Tipo de API' a la API oficial de YouTube\n\nAsegúrese de reiniciar la aplicación después del cambio", - "you_are_offline": "Actualmente estás sin conexión", - "connection_restored": "Se ha restablecido tu conexión a internet", - "use_system_title_bar": "Usar la barra de título del sistema", - "update_playlist": "Actualizar lista de reproducción", - "update": "Actualizar", - "crunching_results": "Procesando resultados...", - "search_to_get_results": "Buscar para obtener resultados", - "use_amoled_mode": "Usar modo AMOLED", - "pitch_dark_theme": "Tema oscuro de dart", - "normalize_audio": "Normalizar audio", - "change_cover": "Cambiar portada", - "add_cover": "Agregar portada", - "restore_defaults": "Restaurar valores predeterminados", - "download_music_codec": "Descargar códec de música", - "streaming_music_codec": "Códec de música en streaming", - "login_with_lastfm": "Iniciar sesión con Last.fm", - "connect": "Conectar", - "disconnect_lastfm": "Desconectar de Last.fm", - "disconnect": "Desconectar", - "username": "Nombre de usuario", - "password": "Contraseña", - "login": "Iniciar sesión", - "login_with_your_lastfm": "Iniciar sesión con tu cuenta de Last.fm", - "scrobble_to_lastfm": "Scrobble a Last.fm", - "go_to_album": "Ir al álbum", - "discord_rich_presence": "Presencia rica en Discord", - "browse_all": "Explorar todo", - "genres": "Géneros", - "explore_genres": "Explorar géneros", - "step_3_steps": "Copia el valor de la cookie \"sp_dc\"", - "step_4_steps": "Pega el valor copiado de \"sp_dc\"", - "friends": "Amigos", - "no_lyrics_available": "Lo siento, no se pueden encontrar las letras de esta pista", - "sort_duration": "Ordenar por Duración", - "start_a_radio": "Iniciar una Radio", - "how_to_start_radio": "¿Cómo quieres iniciar la radio?", - "replace_queue_question": "¿Quieres reemplazar la lista de reproducción actual o añadir a ella?", - "endless_playback": "Reproducción Infinita", - "delete_playlist": "Eliminar Lista de Reproducción", - "delete_playlist_confirmation": "¿Estás seguro de que quieres eliminar esta lista de reproducción?", - "local_tracks": "Pistas Locales", - "song_link": "Enlace de la Canción", - "skip_this_nonsense": "Saltar esta tontería", - "freedom_of_music": "“Libertad de la Música”", - "freedom_of_music_palm": "“Libertad de la Música en la palma de tu mano”", - "get_started": "Empecemos", - "youtube_source_description": "Recomendado y funciona mejor.", - "piped_source_description": "¿Te sientes libre? Igual que YouTube pero más libre.", - "jiosaavn_source_description": "Lo mejor para la región del sur de Asia.", - "highest_quality": "Mayor Calidad: {quality}", - "select_audio_source": "Seleccionar Fuente de Audio", - "endless_playback_description": "Añadir automáticamente nuevas canciones\nal final de la cola de reproducción", - "choose_your_region": "Elige tu región", - "choose_your_region_description": "Esto ayudará a Spotube a mostrarte el contenido adecuado\npara tu ubicación.", - "choose_your_language": "Elige tu idioma", - "help_project_grow": "Ayuda a que este proyecto crezca", - "help_project_grow_description": "Spotube es un proyecto de código abierto. Puedes ayudar a que este proyecto crezca contribuyendo al proyecto, informando errores o sugiriendo nuevas funciones.", - "contribute_on_github": "Contribuir en GitHub", - "donate_on_open_collective": "Donar en Open Collective", - "browse_anonymously": "Navegar Anónimamente", - "enable_connect": "Habilitar conexión", - "enable_connect_description": "Controla Spotube desde otros dispositivos", - "devices": "Dispositivos", - "select": "Seleccionar", - "connect_client_alert": "Estás siendo controlado por {client}", - "this_device": "Este dispositivo", - "remote": "Remoto", - "local_library": "Biblioteca local", - "add_library_location": "Añadir a la biblioteca", - "remove_library_location": "Eliminar de la biblioteca", - "local_tab": "Local", - "stats": "Estadísticas", - "and_n_more": "y {count} más", - "recently_played": "Recién reproducido", - "browse_more": "Explorar más", - "no_title": "Sin título", - "not_playing": "No reproduciendo", - "epic_failure": "¡Fallo épico!", - "added_num_tracks_to_queue": "Se añadieron {tracks_length} canciones a la cola", - "spotube_has_an_update": "Spotube tiene una actualización", - "download_now": "Descargar ahora", - "nightly_version": "Spotube Nightly {nightlyBuildNum} ha sido lanzado", - "release_version": "Spotube v{version} ha sido lanzado", - "read_the_latest": "Lee las últimas ", - "release_notes": "notas de la versión", - "pick_color_scheme": "Elige esquema de color", - "save": "Guardar", - "choose_the_device": "Elige el dispositivo:", - "multiple_device_connected": "Hay múltiples dispositivos conectados.\nElige el dispositivo en el que deseas realizar esta acción", - "nothing_found": "Nada encontrado", - "the_box_is_empty": "La caja está vacía", - "top_artists": "Artistas principales", - "top_albums": "Álbumes principales", - "this_week": "Esta semana", - "this_month": "Este mes", - "last_6_months": "Últimos 6 meses", - "this_year": "Este año", - "last_2_years": "Últimos 2 años", - "all_time": "Todos los tiempos", - "powered_by_provider": "Impulsado por {providerName}", - "email": "Correo electrónico", - "profile_followers": "Seguidores", - "birthday": "Cumpleaños", - "subscription": "Suscripción", - "not_born": "No nacido", - "hacker": "Hacker", - "profile": "Perfil", - "no_name": "Sin nombre", - "edit": "Editar", - "user_profile": "Perfil de usuario", - "count_plays": "{count} reproducciones", - "streaming_fees_hypothetical": "Tarifas de streaming (hipotéticas)", - "minutes_listened": "Minutos escuchados", - "streamed_songs": "Canciones reproducidas", - "count_streams": "{count} streams", - "owned_by_you": "En tu posesión", - "copied_shareurl_to_clipboard": "Copiado {shareUrl} al portapapeles", - "spotify_hipotetical_calculation": "*Esto se calcula en base al\npago por stream de Spotify de $0.003 a $0.005.\nEs un cálculo hipotético para dar\nuna idea de cuánto habría\npagado a los artistas si hubieras escuchado\nsu canción en Spotify.", - "count_mins": "{minutes} minutos", - "summary_minutes": "minutos", - "summary_listened_to_music": "Escuchó música", - "summary_songs": "canciones", - "summary_streamed_overall": "Transmitido en general", - "summary_owed_to_artists": "Debido a los artistas\nEste mes", - "summary_artists": "artistas", - "summary_music_reached_you": "La música te alcanzó", - "summary_full_albums": "álbumes completos", - "summary_got_your_love": "Obtuvo tu amor", - "summary_playlists": "listas de reproducción", - "summary_were_on_repeat": "Estaban en repetición", - "total_money": "Total {money}", - "webview_not_found": "No se encontró el Webview", - "webview_not_found_description": "No hay tiempo de ejecución de Webview instalado en su dispositivo.\nSi está instalado, asegúrese de que esté en el environment PATH\n\nDespués de instalar, reinicie la aplicación", - "unsupported_platform": "Plataforma no soportada", - "invidious_instance": "Instancia del Servidor Invidious", - "invidious_description": "La instancia del servidor Invidious para identificar pistas", - "invidious_warning": "Algunas instancias podrían no funcionar bien. Úselas bajo su propio riesgo", - "invidious_source_description": "Similar a Piped, pero con mayor disponibilidad", - "cache_music": "Caché de música", - "open": "Abrir", - "cache_folder": "Carpeta de caché", - "export": "Exportar", - "clear_cache": "Limpiar caché", - "clear_cache_confirmation": "¿Desea limpiar la caché?", - "export_cache_files": "Exportar archivos en caché", - "found_n_files": "Se encontraron {count} archivos", - "export_cache_confirmation": "¿Desea exportar estos archivos a", - "exported_n_out_of_m_files": "Se exportaron {filesExported} de {files} archivos", - "playlist": "Lista de reproducción", - "no_loop": "Sin bucle", - "generate": "Generar", - "undo": "Deshacer", - "download_all": "Descargar todo", - "add_all_to_playlist": "Agregar todo a la lista de reproducción", - "add_all_to_queue": "Agregar todo a la cola", - "play_all_next": "Reproducir todo a continuación", - "pause": "Pausa", - "view_all": "Ver todo", - "no_tracks_added_yet": "Parece que aún no has agregado ninguna canción.", - "no_tracks": "Parece que no hay canciones aquí.", - "no_tracks_listened_yet": "Parece que no has escuchado nada todavía.", - "not_following_artists": "No sigues a ningún artista.", - "no_favorite_albums_yet": "Parece que aún no has agregado ningún álbum a tus favoritos.", - "no_logs_found": "No se encontraron registros", - "youtube_engine": "Motor de YouTube", - "youtube_engine_not_installed_title": "{engine} no está instalado", - "youtube_engine_not_installed_message": "{engine} no está instalado en tu sistema.", - "youtube_engine_set_path": "Asegúrate de que esté disponible en la variable PATH o\nestablece la ruta absoluta del ejecutable de {engine} a continuación.", - "youtube_engine_unix_issue_message": "En macOS/Linux/sistemas operativos similares a Unix, establecer la ruta en .zshrc/.bashrc/.bash_profile etc. no funcionará.\nNecesitas establecer la ruta en el archivo de configuración del shell.", - "download": "Descargar", - "file_not_found": "Archivo no encontrado", - "custom": "Personalizado", - "add_custom_url": "Agregar URL personalizada", - "edit_port": "Editar puerto", - "port_helper_msg": "El valor predeterminado es -1, lo que indica un número aleatorio. Si tienes un firewall configurado, se recomienda establecer esto.", - "connect_request": "¿Permitir que {client} se conecte?", - "connection_request_denied": "Conexión denegada. El usuario denegó el acceso.", - "hipotetical_calculation": "*Este cálculo se basa en el pago promedio por reproducción en plataformas de música en línea (de 0,003 a 0,005 USD). Es hipotético y sirve para dar al usuario una idea de cuánto habría pagado a los artistas si hubiera escuchado su canción en distintas plataformas.", - "an_error_occurred": "Ocurrió un error", - "copy_to_clipboard": "Copiar al portapapeles", - "view_logs": "Ver registros", - "retry": "Reintentar", - "no_default_metadata_provider_selected": "No has configurado un proveedor de metadatos predeterminado", - "manage_metadata_providers": "Gestionar proveedores de metadatos", - "open_link_in_browser": "¿Abrir enlace en el navegador?", - "do_you_want_to_open_the_following_link": "¿Quieres abrir el siguiente enlace?", - "unsafe_url_warning": "Abrir enlaces de fuentes no confiables puede ser inseguro. ¡Ten cuidado!\nTambién puedes copiar el enlace al portapapeles.", - "copy_link": "Copiar enlace", - "building_your_timeline": "Construyendo tu línea de tiempo según tus escuchas…", - "official": "Oficial", - "author_name": "Autor: {author}", - "third_party": "Terceros", - "plugin_requires_authentication": "El complemento requiere autenticación", - "update_available": "Actualización disponible", - "supports_scrobbling": "Admite scrobbling", - "plugin_scrobbling_info": "Este complemento scrobblea tu música para generar tu historial de reproducción.", - "default_plugin": "Predeterminado", - "set_default": "Establecer como predeterminado", - "support": "Soporte", - "support_plugin_development": "Apoyar el desarrollo del complemento", - "can_access_name_api": "- Puede acceder a la API de **{name}**", - "do_you_want_to_install_this_plugin": "¿Deseas instalar este complemento?", - "third_party_plugin_warning": "Este complemento proviene de un repositorio de terceros. Asegúrate de confiar en la fuente antes de instalarlo.", - "author": "Autor", - "this_plugin_can_do_following": "Este complemento puede hacer lo siguiente", - "install": "Instalar", - "install_a_metadata_provider": "Instalar un proveedor de metadatos", - "no_tracks_playing": "No hay ninguna pista reproduciéndose actualmente", - "synced_lyrics_not_available": "Las letras sincronizadas no están disponibles para esta canción. Por favor, utiliza", - "plain_lyrics": "Letras sin formato", - "tab_instead": "en su lugar, usa la tecla Tab.", - "disclaimer": "Descargo de responsabilidad", - "third_party_plugin_dmca_notice": "El equipo de Spotube no asume ninguna responsabilidad (incluida la legal) por complementos de \"terceros\". Úsalos bajo tu propio riesgo. Para errores o problemas, repórtalos en el repositorio del complemento.\n\nSi algún complemento de “terceros” infringe los ToS/DMCA de algún servicio o entidad legal, por favor, solicita al autor del complemento o a la plataforma de alojamiento (p. ej., GitHub/Codeberg) que tome medidas. Los complementos etiquetados como “de terceros” son mantenidos públicamente por la comunidad; no los gestionamos y no podemos intervenir.\n\n", - "input_does_not_match_format": "La entrada no coincide con el formato requerido", - "metadata_provider_plugins": "Complementos de proveedor de metadatos", - "paste_plugin_download_url": "Pega la URL de descarga, el repositorio de GitHub/Codeberg o el enlace directo al archivo .smplug", - "download_and_install_plugin_from_url": "Descargar e instalar el complemento desde una URL", - "failed_to_add_plugin_error": "Error al añadir el complemento: {error}", - "upload_plugin_from_file": "Subir complemento desde archivo", - "installed": "Instalado", - "available_plugins": "Complementos disponibles", - "configure_your_own_metadata_plugin": "Configura tu propio proveedor de metadatos para listas/álbum/artista/feeds", - "audio_scrobblers": "Scrobblers de audio", - "scrobbling": "Scrobbling", - "download_music_format": "Formato de descarga de música", - "streaming_music_format": "Formato de transmisión de música", - "download_music_quality": "Calidad de descarga de música", - "streaming_music_quality": "Calidad de transmisión de música", - "default_metadata_source": "Fuente de metadatos predeterminada", - "set_default_metadata_source": "Establecer fuente de metadatos predeterminada", - "default_audio_source": "Fuente de audio predeterminada", - "set_default_audio_source": "Establecer fuente de audio predeterminada", - "plugins": "Plugins", - "configure_plugins": "Configura tus propios plugins de proveedor de metadatos y fuente de audio", - "source": "Fuente: ", - "uncompressed": "Sin comprimir", - "dab_music_source_description": "Para audiófilos. Proporciona transmisiones de audio de alta calidad/sin pérdida. Coincidencia precisa de pistas basada en ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_eu.arb b/lib/l10n/app_eu.arb deleted file mode 100644 index 8c87fd2c..00000000 --- a/lib/l10n/app_eu.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Gonbidatua", - "browse": "Arakatu", - "search": "Bilatu", - "library": "Liburutegia", - "lyrics": "Hitzak", - "settings": "Ezarpenak", - "genre_categories_filter": "Kategoria edo generoak filtratu...", - "genre": "Generoa", - "personalized": "Pertsonalizatua", - "featured": "Nabarmenduak", - "new_releases": "Argitaratze berriak", - "songs": "Abestiak", - "playing_track": "{track} erreproduzitzen", - "queue_clear_alert": "Uneko zerrenda ezabatuko da. {track_length} abesti ezabatuko dira.\nJarraitu nahi duzu?", - "load_more": "Gehiago kargatu", - "playlists": "Zerrendak", - "artists": "Artistak", - "albums": "Albumak", - "tracks": "Kantak", - "downloads": "Deskargak", - "filter_playlists": "Zure zerrendak filtratu...", - "liked_tracks": "Gustuko Kantak", - "liked_tracks_description": "Zure gustuko kanta guztiak", - "create_playlist": "Sortu zerrenda", - "create_a_playlist": "Sortu zerrenda bat", - "update_playlist": "Eguneratu zerrenda", - "create": "Sortu", - "cancel": "Ezeztatu", - "update": "Eguneratu", - "playlist_name": "Zerrenda Izena", - "name_of_playlist": "Zerrendaren izena", - "description": "Deskribapena", - "public": "Publikoa", - "collaborative": "Kolaboratiboa", - "search_local_tracks": "Bilatu kanta lokalak...", - "play": "Erreproduzitu", - "delete": "Ezabatu", - "none": "Batere ez", - "sort_a_z": "Ordenatu A-Z", - "sort_z_a": "Ordenatu Z-A", - "sort_artist": "Ordenatu Artistaren arabera", - "sort_album": "Ordenatu Albumaren arabera", - "sort_duration": "Ordenar Iraupenaren arabera", - "sort_tracks": "Ordenatu Kantak", - "currently_downloading": "Oraintxe ({tracks_length}) deskargatzen", - "cancel_all": "Ezeztatu dena", - "filter_artist": "Filtratu artistak...", - "followers": "{followers} Jarraitzaile", - "add_artist_to_blacklist": "Gehitu artista zerrenda beltzera", - "top_tracks": "Top Kantak", - "fans_also_like": "Fan-ek hau ere gustuko dute", - "loading": "Kargatzen...", - "artist": "Artista", - "blacklisted": "Zerrenda beltzean", - "following": "Jarraitzen", - "follow": "Jarraitu", - "artist_url_copied": "Artistaren URL-a arbelera kopiatua", - "added_to_queue": "{tracks} kanta zerrendara gehituak", - "filter_albums": "Albumak filtratu...", - "synced": "Sinkronizatuta", - "plain": "Arrunta", - "shuffle": "Ausaz", - "search_tracks": "Bilatu kantak...", - "released": "Argitaratua", - "error": "Errorea: {error}", - "title": "Izenburua", - "time": "Iraupena", - "more_actions": "Ekintza gehiago", - "download_count": "({count}) deskarga", - "add_count_to_playlist": "Gehitu ({count}) zerrendara", - "add_count_to_queue": "Gehitu ({count}) ilarara", - "play_count_next": "Erreproduzitu hurrengo ({count})-ak", - "album": "Albuma", - "copied_to_clipboard": "{data} arbelean kopiatua", - "add_to_following_playlists": "Gehitu {track} hurrengo erreprodukzio-zerrendetara", - "add": "Gehitu", - "added_track_to_queue": "{track} zerrendan gehitua", - "add_to_queue": "Gehitu zerrendan", - "track_will_play_next": "{track} erreproduzituko da ondoren", - "play_next": "Hurrengo erreprodukzioa", - "removed_track_from_queue": "{track} zerrendatik ezabatua", - "remove_from_queue": "Ezabatu ilaratik", - "remove_from_favorites": "Ezabatu gogokoetatik", - "save_as_favorite": "Gorde gogokoetan", - "add_to_playlist": "Gehitu zerrendara", - "remove_from_playlist": "Ezabatu zerrendatik", - "add_to_blacklist": "Gehitu zerrenda beltzera", - "remove_from_blacklist": "Ezabatu zerrenda beltzetik", - "share": "Elkarbanatu", - "mini_player": "Mini Erreproduzitzailea", - "slide_to_seek": "Arrastatu aurrerantz edo atzearantz bilatzeko", - "shuffle_playlist": "Erreproduzitu zerrenda ausazko ordenean", - "unshuffle_playlist": "Desgaitu ausazko erreprodukzioa", - "previous_track": "Aurreko pista", - "next_track": "Hurrengo pista", - "pause_playback": "Pausatu erreprodukzioa", - "resume_playback": "Berrabiarazi erreprodukzioa", - "loop_track": "Kanta begiztan", - "repeat_playlist": "Errepikatu lista", - "queue": "Ilara", - "alternative_track_sources": "Kanten iturri alternatiboak", - "download_track": "Deskargatu kanta", - "tracks_in_queue": "{tracks} kanta zerrendan", - "clear_all": "Garbitu dena", - "show_hide_ui_on_hover": "Erakutsi/Ezkutatu interfazea kurtsorea pasatzean", - "always_on_top": "Beti ikusgai", - "exit_mini_player": "Irten mini erreproduzitzailetik", - "download_location": "Deskargen kokapena", - "local_library": "Liburutegi lokala", - "add_library_location": "Gehitu liburutegira", - "remove_library_location": "Kendu liburutegitik", - "account": "Kontua", - "login_with_spotify": "Hasi saioa zure Spotify kontuarekin", - "connect_with_spotify": "Spotify-rekin konektatu", - "logout": "Itxi saioa", - "logout_of_this_account": "Itxi kontu honen saioa", - "language_region": "Hizkuntza eta Herrialdea", - "language": "Hizkuntza", - "system_default": "Sisteman lehenetsia", - "market_place_region": "Dendaren herrialdea", - "recommendation_country": "Gomendio herrialdea", - "appearance": "Itxura", - "layout_mode": "Diseinua", - "override_layout_settings": "Responsive diseinuaren ezarpenak ezeztatu", - "adaptive": "Moldagarria", - "compact": "Trinkoa", - "extended": "Hedatua", - "theme": "Gaia", - "dark": "Iluna", - "light": "Argia", - "system": "Sistema", - "accent_color": "Azentu kolorea", - "sync_album_color": "Sinkronizatu albumaren kolorea", - "sync_album_color_description": "Albumaren artearen kolore nagusia erabili azentu kolore bezala", - "playback": "Erreprodukzioa", - "audio_quality": "Audioaren kalitatea", - "high": "Altua", - "low": "Baxua", - "pre_download_play": "Aurre-deskargatu eta erreproduzitu", - "pre_download_play_description": "Streaming egin beharrean, byte-ak deskargatu eta erreproduzitu (banda-zabalera handia duten erabiltzaileentzat gomendagarria)", - "skip_non_music": "Musika ez diren segmentuak baztertu (SponsorBlock)", - "blacklist_description": "Zerrenda beltzeko abesti eta artistak", - "wait_for_download_to_finish": "Mesedez, itxaron uneko deskarga bukatu arte", - "desktop": "Mahaigaina", - "close_behavior": "Ixterako Portaera", - "close": "Itxi", - "minimize_to_tray": "Sistemako erretilura minimizatu", - "show_tray_icon": "Erakutsi ikonoa sistemaren erretiluan", - "about": "Honi buruz", - "u_love_spotube": "Badakigu Spotube maite duzula", - "check_for_updates": "Bilatu eguneraketak", - "about_spotube": "Spotube-ri buruz", - "blacklist": "Zerrenda beltza", - "please_sponsor": "Mesedez, babestu/diruz lagundu", - "spotube_description": "Spotube, arina, plataforma-anitza eta doakoa den Spotify-ren bezeroa", - "version": "Bertsioa", - "build_number": "Konpilazio zenbakia", - "founder": "Sortzailea", - "repository": "Errepositorioa", - "bug_issues": "Erroreak eta arazoak", - "made_with": "Bangladesh🇧🇩-en ❤️-z egina", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Lizentzia", - "add_spotify_credentials": "Gehitu zure Spotify kredentzialak hasi ahal izateko", - "credentials_will_not_be_shared_disclaimer": "Ez arduratu, zure kredentzialak ez ditugu bilduko edo inorekin elkarbanatuko", - "know_how_to_login": "Ez dakizu nola egin?", - "follow_step_by_step_guide": "Jarraitu pausoz-pausoko gida", - "spotify_cookie": "Spotify-ren {name} cookiea", - "cookie_name_cookie": "{name} cookiea", - "fill_in_all_fields": "Mesedez, osatu eremu guztiak", - "submit": "Bidali", - "exit": "Irten", - "previous": "Aurrekoa", - "next": "Hurrengoa", - "done": "Eginda", - "step_1": "1. pausua", - "first_go_to": "Hasteko, joan hona", - "login_if_not_logged_in": "eta hasi saioa/sortu kontua lehendik ez baduzu eginda", - "step_2": "2. pausua", - "step_2_steps": "1. Saioa hasita duzularik, sakatu F12 edo saguaren eskuineko botoia klikatu > Ikuskatu nabigatzaileko garapen tresnak irekitzeko.\n2. Joan \"Aplikazio\" (Chrome, Edge, Brave, etab.) edo \"Biltegiratzea\" (Firefox, Palemoon, etab.)\n3. Joan \"Cookieak\" atalera eta gero \"https://accounts.spotify.com\" azpiatalera", - "step_3": "3. pausua", - "step_3_steps": "Kopiatu \"sp_dc\" cookiearen balioa", - "success_emoji": "Eginda! 🥳", - "success_message": "Ongi hasi duzu zure Spotify kontua. Lan bikaina, lagun!", - "step_4": "4. pausua", - "step_4_steps": "Itsatsi \"sp_dc\"-tik kopiatutako balioa", - "something_went_wrong": "Zerbaitek huts egin du", - "piped_instance": "Piped zerbitzariaren instantzia", - "piped_description": "Kanten koizidentzietan erabiltzeko Piped zerbitzariaren instantzia", - "piped_warning": "Batzuk agian ez dute ongi funtzionatuko, zure ardurapean erabili", - "generate_playlist": "Sortu Zerrenda", - "track_exists": "{track} kanta dagoeneko badago", - "replace_downloaded_tracks": "Ordezkatu deskargatutako kanta guztiak", - "skip_download_tracks": "Deskargatutako kanta guztien deskarga baztertu", - "do_you_want_to_replace": "Dagoen kanta ordezkatu nahi duzu??", - "replace": "Ordezkatu", - "skip": "Baztertu", - "select_up_to_count_type": "Aukertu {count} {type}", - "select_genres": "Aukeratu Generoak", - "add_genres": "Gehitu Generoak", - "country": "Herrialdea", - "number_of_tracks_generate": "Sortzeko kanta kopurua", - "acousticness": "Akustikotasuna", - "danceability": "Dantzagarritasuna", - "energy": "Energia", - "instrumentalness": "Instrumentaltasuna", - "liveness": "Zuzenean", - "loudness": "Ozentasuna", - "speechiness": "Hitzaldia", - "valence": "Balentzia", - "popularity": "Populartasuna", - "key": "Tonua", - "duration": "Iraupena (s)", - "tempo": "Tenpoa (BPM)", - "mode": "Modua", - "time_signature": "Konpasa", - "short": "Motza", - "medium": "Ertaina", - "long": "Luzea", - "min": "Min.", - "max": "Max.", - "target": "Helburua", - "moderate": "Moderatua", - "deselect_all": "Desaukeratu dena", - "select_all": "Aukeratu dena", - "are_you_sure": "Ziur zaude?", - "generating_playlist": "Zure pertsonalizatutako zerrenda sortzen...", - "selected_count_tracks": "{count} kanta aukeratuta", - "download_warning": "Abesti guztiak aldi berean deskargatuz gero, argi dago musika pirateatzen ari zarela eta musikaren gizarte sortzaileari kalte egiten diozula. Honen jakitun izan eta artisten lan gogorra errespetatu eta babestea espero dut", - "download_ip_ban_warning": "Bidenabar, baliteke zure IPa YouTuben blokeatzea deskarga eskera gehiegi egiten badituzu. IPa blokeatzeak esan nahi du ezin izango duzula YouTube erabili (nahiz eta saioa hasia izan) gutxienez 2-3 hilabetez IP helbide horretatik. Eta Spotube ez da erantzule izango hori gertatzen bazaizu", - "by_clicking_accept_terms": "'Onartu' klikatzean, ondorengo baldintzak onartzen dituzu:", - "download_agreement_1": "Badakit musika pirateatzen ari naizela. Gaiztoa naiz", - "download_agreement_2": "Ahal dudanean lagunduko diot artistari baina oraingoz ez dut bere artea erosteko dirurik", - "download_agreement_3": "Erabat jakitun naiz YouTubek nire IPa blokea dezakeela eta ez diot Spotube-ri edo bere jabe/laguntzaileei erantzukizunik eskatuko nire oraingo jokaerak ekar ditzakeen arazoengatik", - "decline": "Baztertu", - "accept": "Onartu", - "details": "Xehetasunak", - "youtube": "YouTube", - "channel": "Kanala", - "likes": "Gustukoak", - "dislikes": "Ez gustukoak", - "views": "Ikuspenak", - "streamUrl": "Streaming-aren URLa", - "stop": "Gelditu", - "sort_newest": "Ordenatu gehitu berrienetik", - "sort_oldest": "Ordenatu gehitu zaharrenetik", - "sleep_timer": "Itzaltzeko tenporizadorea", - "mins": "{minutes} minutu", - "hours": "{hours} ordu", - "hour": "{hours} ordu", - "custom_hours": "Ordu pertsonalizatuak", - "logs": "Log-ak", - "developers": "Garatzaileak", - "not_logged_in": "Ez duzu saioa hasi", - "search_mode": "Bilaketa modua", - "audio_source": "Audio Iturria", - "ok": "OK", - "failed_to_encrypt": "Errorea zifratzean", - "encryption_failed_warning": "Spotube-ek zifratzea darabil datuak modu seguruan biltegiratzeko. Baina huts egin du. Hori dela eta, biltegiratzea ez da segurua izango\nLinux erabiltzen ari bazara, ziurtatu edozein sekretu-zerbitzu (gnome-keyring, kde-wallet, keepassxc etab.) instalatuta duzula", - "querying_info": "Informazioa egiaztatzen...", - "piped_api_down": "Piped-en APIa ez dago eskuragarri", - "piped_down_error_instructions": "Piped-en {pipedInstance} instantzia ez dago martxan une honetan\n\nAldatu instantzia edo aldatu 'API mota' YouTuberen API ofizialera\n\nZiurtatu aplikazioa berrabiarazten duzula aldaketa eta gero", - "you_are_offline": "Une honetan konexiorik gabe zaude", - "connection_restored": "Internet konexioa berrezarri egin da", - "use_system_title_bar": "Erabili sistemako izenburu barra", - "crunching_results": "Emaitzak prozesatzen...", - "search_to_get_results": "Bilatu emaitzak lortzeko", - "use_amoled_mode": "Erabili AMOLED modua", - "pitch_dark_theme": "Dart-en gai iluna", - "normalize_audio": "Normalizatu audioa", - "change_cover": "Aldatu azala", - "add_cover": "Gehitu azala", - "restore_defaults": "Berrezarri berezko balioak", - "download_music_codec": "Deskargatutako musikaren codec-a", - "streaming_music_codec": "Streaming musikaren codec-a", - "login_with_lastfm": "Hasi saioa Last.fm-n", - "connect": "Konektatu", - "disconnect_lastfm": "Deskonektatu Last.fm-tik", - "disconnect": "Deskonektatu", - "username": "Erabiltzaile izena", - "password": "Pasahitza", - "login": "Hasi saioa", - "login_with_your_lastfm": "Hasi saioa Last.fm-ko zure kontuarekin", - "scrobble_to_lastfm": "Scrobble Last.fm-ra", - "go_to_album": "Albumera joan", - "discord_rich_presence": "Discord-en presentzia aberatsa", - "browse_all": "Esploratu dena", - "genres": "Generoak", - "explore_genres": "Esploratu generoak", - "friends": "Lagunak", - "no_lyrics_available": "Sentitzen dugu, ezin dira kanta honen hitzak aurkitu", - "start_a_radio": "Hasi Irrati bat", - "how_to_start_radio": "Nola hasi nahi duzu irratia?", - "replace_queue_question": "Uneko zerrenda ordezkatu nahi duzu edo bertan gehitu?", - "endless_playback": "Amaigabeko erreprodukzioa", - "delete_playlist": "Ezabatu zerrenda", - "delete_playlist_confirmation": "Ziur zaude zerrenda ezabatu nahi duzula?", - "local_tracks": "Kanta lokalak", - "local_tab": "Lokalean", - "song_link": "Kantaren lotura", - "skip_this_nonsense": "Utzi txorakeria hau", - "freedom_of_music": "“Musika Askatasuna”", - "freedom_of_music_palm": "“Musika Askatasuna zure eskuetan”", - "get_started": "Has gaitezen", - "youtube_source_description": "Gomendatua eta hobekien dabilena.", - "piped_source_description": "Aske zara? YouTube bezala, baino askeago.", - "jiosaavn_source_description": "Asia hegoaldeko herrialdeetarako hoberena.", - "highest_quality": "Kalitate Onena: {quality}", - "select_audio_source": "Aukeratu Audio Iturria", - "endless_playback_description": "Gehitu automatikoki kanta berriak\n ilararen bukaeran", - "choose_your_region": "Aukeratu zure herrialdea", - "choose_your_region_description": "Honekin Spotube-k zure kokalerakuari dagokion edukia\neskeiniko dizu.", - "choose_your_language": "Aukeratu zure hizkuntza", - "help_project_grow": "Lagundu proiektu honi hazten", - "help_project_grow_description": "Spotube kode irekiko proiektu bat da. Proiektu hau hazten lagundu dezakezu, erroreak jakinaraziz edo ezaugarri berriak proposatuz.", - "contribute_on_github": "GitHub-en lagundu", - "donate_on_open_collective": "Open Collective-en diruz lagundu", - "browse_anonymously": "Nabigatu Anonimoki", - "enable_connect": "Gaitu konexioa", - "enable_connect_description": "Kontrolatu Spotube beste gailu batzuetatik", - "devices": "Gailuak", - "select": "Aukeratu", - "connect_client_alert": "{client} gailuak kontrolatzen zaitu", - "this_device": "Gailu hau", - "remote": "Urrunekoa", - "stats": "Estatistikak", - "and_n_more": "eta {count} gehiago", - "recently_played": "Berriki entzunak", - "browse_more": "Gehiago Bilatu", - "no_title": "Titulurik ez", - "not_playing": "Erreprodukziorik ez", - "epic_failure": "Sekulako errorea!", - "added_num_tracks_to_queue": "{tracks_length} kanta gehitu dira zerrendara", - "spotube_has_an_update": "Spotube-ren eguneraketa bat dago", - "download_now": "Orain deskargatu", - "nightly_version": "Spotube {nightlyBuildNum} Nightly-a argitaratu da", - "release_version": "Spotube v{version} argitaratu da", - "read_the_latest": "Irakurri azken ", - "release_notes": "argitatratze oharrak", - "pick_color_scheme": "Aukeratu kolore eskema", - "save": "Gorde", - "choose_the_device": "Aukeratu gailua:", - "multiple_device_connected": "Hainbat gailu daude konektatuta.\nAukeratu zein gailutan aplikatu nahi duzun ekintza hau", - "nothing_found": "Ezer ez da aurkitu", - "the_box_is_empty": "Kaxa hutsik dago", - "top_artists": "Top Artistak", - "top_albums": "Top Albumak", - "this_week": "Aste honetan", - "this_month": "Hilabete honetan", - "last_6_months": "Azken 6 hilabeteetan", - "this_year": "Aurten", - "last_2_years": "Azken 2 urtetan", - "all_time": "Betidanik", - "powered_by_provider": "{providerName}-ren eskutik", - "email": "Email", - "profile_followers": "Jarraitzaileak", - "birthday": "Jaiotze-data", - "subscription": "Harpidetzak", - "not_born": "Jaio gabe", - "hacker": "Hacker", - "profile": "Profila", - "no_name": "Izenik Ez", - "edit": "Editatu", - "user_profile": "Erabiltzaile Profila", - "count_plays": "{count} erreprodukzio", - "streaming_fees_hypothetical": "Streaming ordainketa (hipotetikoa)", - "minutes_listened": "Entzundako minutuak", - "streamed_songs": "Streaming-ez entzundako kantak", - "count_streams": "{count} stream", - "owned_by_you": "Zure jabetzakoa", - "copied_shareurl_to_clipboard": "{shareUrl} arbelera kopiatua", - "spotify_hipotetical_calculation": "*Sportify-k stream bakoitzeko duen $0.003 eta $0.005\nordainsarian oinarritua da. Kalkulu hipotetiko bat,\nkanta hauek Spotify-n entzun bazenitu,\nberaiek artistari zenbat ordaiduko lioketen jakin dezazun.", - "count_mins": "{minutes} minutu", - "summary_minutes": "minutu", - "summary_listened_to_music": "Musika entzuten", - "summary_songs": "kanta", - "summary_streamed_overall": "Streaming abesti oro har", - "summary_owed_to_artists": "Hilabete honetan\nartistei zor zaiena", - "summary_artists": "artisten", - "summary_music_reached_you": "Musika ailegatu zaizu", - "summary_full_albums": "album osok", - "summary_got_your_love": "Jaso dute zure maitasuna", - "summary_playlists": "zerrenda", - "summary_were_on_repeat": "Dituzu errepikatze moduan", - "total_money": "Guztira {money}", - "webview_not_found": "Ez da Webview aurkitu", - "webview_not_found_description": "Ez dago Webview abiarazte denbora-instalaziorik zure gailuan.\nInstalatuta badago, ziurtatu environment PATH-an dagoela\n\nInstalatu ondoren, berrabiarazi aplikazioa", - "unsupported_platform": "Plataforma ez onartua", - "invidious_instance": "Invidious zerbitzari instantzia", - "invidious_description": "Invidious zerbitzari instantzia, pistak bat egiteko", - "invidious_warning": "Instantzia batzuek ez dute ondo funtzionatuko. Zure erantzukizunpean erabili", - "invidious_source_description": "Piped-en antzekoa, baina eskuragarritasun handiagoarekin", - "cache_music": "Musika cachean", - "open": "Ireki", - "cache_folder": "Cache karpeta", - "export": "Esportatu", - "clear_cache": "Garbitu cachea", - "clear_cache_confirmation": "Cachea garbitu nahi al duzu?", - "export_cache_files": "Esportatu cache fitxategiak", - "found_n_files": "{count} fitxategi aurkitu dira", - "export_cache_confirmation": "Fitxategi hauek esportatu nahi al dituzu", - "exported_n_out_of_m_files": "{filesExported} fitxategi esportatu dira {files} -tik", - "playlist": "Playlist", - "no_loop": "Ez dago loop-ik", - "generate": "Sortu", - "undo": "Desegondu", - "download_all": "Guztia deskargatu", - "add_all_to_playlist": "Guztia playlist-era gehitu", - "add_all_to_queue": "Guztia zerrendara gehitu", - "play_all_next": "Guztia hurrengoan jolastu", - "pause": "Pausatu", - "view_all": "Ikusi guztia", - "no_tracks_added_yet": "Dirudienez, oraindik ez duzu abestirik gehitu.", - "no_tracks": "Ez dirudi hemen abestirik dagoenik.", - "no_tracks_listened_yet": "Dirudienez, oraindik ez duzu ezer entzun.", - "not_following_artists": "Ez zaude artisten atzetik.", - "no_favorite_albums_yet": "Dirudienez, oraindik ez duzu albumik gehitu zure gogokoen artean.", - "no_logs_found": "Ez dira log-ak aurkitu", - "youtube_engine": "YouTube Motorra", - "youtube_engine_not_installed_title": "{engine} ez dago instalatuta", - "youtube_engine_not_installed_message": "{engine} ez dago zure sisteman instalatuta.", - "youtube_engine_set_path": "Ziurtatu PATH aldagaiaren barruan dagoela edo\nezarri {engine} exekutagarriaren helbide absolutua behean.", - "youtube_engine_unix_issue_message": "macOS/Linux/Unix bezalako sistemetan, .zshrc/.bashrc/.bash_profile bezalako fitxategietan bidearen ezarpenak ez dira funtzionatuko.\nBidearen ezarpena shell konfigurazio fitxategian egin behar duzu.", - "download": "Deskargatu", - "file_not_found": "Fitxategia ez da aurkitu", - "custom": "Pertsonalizatua", - "add_custom_url": "Gehitu URL pertsonalizatua", - "edit_port": "Editatu portua", - "port_helper_msg": "Lehenetsitako balioa -1 da, zenbaki aleatorioa adierazten duena. Su firewall konfiguratu baduzu, gomendatzen da hau ezartzea.", - "connect_request": "{client} konektatzea baimendu?", - "connection_request_denied": "Konektatzea ukatu da. Erabiltzaileak sarbidea ukatu du.", - "hipotetical_calculation": "*Kalkulu hau online musika-streaming plataformetako batez besteko irteerako ordainari (0,003–0,005 USD) oinarrituta dago. Hipotetikoa da eta erabiltzaileari ideia bat ematen laguntzen dio artista nork zenbat kobratu zuen jakiteko, bere abestia plataform desberdinetan entzungo balu.", - "an_error_occurred": "Errore bat gertatu da", - "copy_to_clipboard": "Hiztegiraino kopiatzea", - "view_logs": "Erregistroak ikusi", - "retry": "Berriro saiatu", - "no_default_metadata_provider_selected": "Ezarri ez duzu metadaten hornitzaile lehenetsirik", - "manage_metadata_providers": "Metadaten hornitzaileak kudeatu", - "open_link_in_browser": "Esteka nabigatzailean irekiko duzu?", - "do_you_want_to_open_the_following_link": "Hurrengo esteka irekiko duzu?", - "unsafe_url_warning": "Iturri seguru gabeko estekak irekiz gero, ez da seguru suerta daiteke. Arduratu zaitez!\nEsteka ere hiztegirainokoan kopiatu dezakezu.", - "copy_link": "Esteka kopiatu", - "building_your_timeline": "Zure entzuteen arabera zure kronologia eraikitzen…", - "official": "Ofiziala", - "author_name": "Egilea: {author}", - "third_party": "Hirugarrena", - "plugin_requires_authentication": "Pluginak autentifikazioa eskatzen du", - "update_available": "Eguneratze bat dago eskuragarri", - "supports_scrobbling": "Scrobbling-a onartzen du", - "plugin_scrobbling_info": "Plugin honek zure musika scrobbled egiten du zure entzuteen historia sortzeko.", - "default_plugin": "Lehenetsia", - "set_default": "Lehenetsi gisa ezarri", - "support": "Laguntza", - "support_plugin_development": "Pluginaren garapena lagundu", - "can_access_name_api": "- **{name}** API-ra sar daiteke", - "do_you_want_to_install_this_plugin": "Plugin hau instalatu nahiko zenuke?", - "third_party_plugin_warning": "Plugin hau hirugarrenen biltegi batetik dator. Instalatu aurretik iturriari konfiantza behar diozu.", - "author": "Egilea", - "this_plugin_can_do_following": "Plugin honek honako hau egin dezake:", - "install": "Instalatu", - "install_a_metadata_provider": "Metadaten hornitzaile bat instalatu", - "no_tracks_playing": "Une honetan ez dago abestirik erreproduzitzen", - "synced_lyrics_not_available": "Abestiarentzako letra sinkronizatua ez dago erabilgarri. Mesedez, erabili", - "plain_lyrics": "Letra arrunta", - "tab_instead": "horren ordez, Tab teklatxaza erabili.", - "disclaimer": "Aldez aurreko oharra", - "third_party_plugin_dmca_notice": "Spotube taldea ezin da arduratu (“hirugarrenen”) plugin-en>gatik (barne legala). Erabili zure arriskuarekin. Erroreak/ arazoak dituzu, jakinarazi pluginaren biltegiari.\n\nPlugin batek edozein zerbitzu/legalki entitate baten ToS/DMCA hautsi baditu, eska iezaiozu pluginaren egileari edo hosting plataformari (adibidez GitHub/Codeberg) neurriak har ditzaten. “Hirugarrena” etiketatutako plugin guztiak komunitate publikoaren bidez mantentzen dira; ez ditugu kuratoriatu, beraz ezin dugu inplikatu.\n\n", - "input_does_not_match_format": "Sarrera ezin da beharrezko formatutik desberdina izan", - "metadata_provider_plugins": "Metadaten hornitzailearen pluginak", - "paste_plugin_download_url": "Kopiatu deskarga-URLa, GitHub/Codeberg biltegi-URLa edo .smplug fitxategiaren esteka zuzena", - "download_and_install_plugin_from_url": "Download eta instalatu plugin-a URL batetik", - "failed_to_add_plugin_error": "Plugin gehitu ezin izan da: {error}", - "upload_plugin_from_file": "Plugin fitxategi batetik igo", - "installed": "Instalatuta", - "available_plugins": "Eskaintzen diren pluginak", - "configure_your_own_metadata_plugin": "Konfiguratu zureko playlists-/album-/artista-/feed-metadaten hornitzailea", - "audio_scrobblers": "Audio scrobbler-ak", - "scrobbling": "Scrobbling", - "download_music_format": "Musika deskargatzeko formatua", - "streaming_music_format": "Musika streaming bidezko formatua", - "download_music_quality": "Musika deskargaren kalitatea", - "streaming_music_quality": "Streaming bidezko musika kalitatea", - "default_metadata_source": "Metadatu-iturburu lehenetsia", - "set_default_metadata_source": "Ezarri metadatu-iturburu lehenetsia", - "default_audio_source": "Audio-iturburu lehenetsia", - "set_default_audio_source": "Ezarri audio-iturburu lehenetsia", - "plugins": "Pluginak", - "configure_plugins": "Konfiguratu zure metadatu-hornitzaile eta audio-iturburu pluginak", - "source": "Iturburua: ", - "uncompressed": "Konprimitu gabea", - "dab_music_source_description": "Audiozaleentzat. Kalitate handiko/galerarik gabeko audio-streamak eskaintzen ditu. ISRC oinarritutako pistaren parekatze zehatza." -} \ No newline at end of file diff --git a/lib/l10n/app_fa.arb b/lib/l10n/app_fa.arb deleted file mode 100644 index 72f775fc..00000000 --- a/lib/l10n/app_fa.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "مهمان", - "browse": "مرور", - "search": "جستجو", - "library": "مجموعه", - "lyrics": "متن", - "settings": "تنظیمات", - "genre_categories_filter": "دسته ها یا ژانر ها را فیلتر کنید", - "genre": "ژانر", - "personalized": " شخصی سازی شده", - "featured": "ویژه", - "new_releases": "آخرین انتشارات", - "songs": "آهنگ ها", - "playing_track": "درحال پخش {track}", - "queue_clear_alert": "با این کار صف فعلی پاک می شود. {track_length} آهنگ از صف حذف میشود\n؟آیا ادامه میدهید", - "load_more": "بارگذاری بیشتر", - "playlists": "لیست های پخش", - "artists": "هنرمندان", - "albums": "آلبوم ها", - "tracks": "آهنگ ها", - "downloads": "بارگیری شده ها", - "filter_playlists": "لیست پخش خود را فیلتر کنید...", - "liked_tracks": "آهنگ های مورد علاقه", - "liked_tracks_description": "همه آهنگ های دوست داشتنی شما", - "create_playlist": "ساخت لیست پخش", - "create_a_playlist": "ساخت لیست پخش", - "update_playlist": "بروز کردن لیست پخش", - "create": "ساختن", - "cancel": "لغو", - "update": "بروز رسانی", - "playlist_name": "نام لیست پخش", - "name_of_playlist": "نام لیست پخش", - "description": "توضیحات", - "public": "عمومی", - "collaborative": "مبتنی بر همکاری", - "search_local_tracks": "جستجوی آهنگ های محلی...", - "play": "پخش", - "delete": "حذف", - "none": "هیچ کدام", - "sort_a_z": "مرتب سازی بر اساس حروف الفبا", - "sort_z_a": "مرتب سازی برعکس حروف الفبا", - "sort_artist": "مرتب سازی بر اساس هنرمند", - "sort_album": "مرتب سازی بر اساس آلبوم", - "sort_tracks": "مرتب سازی آهنگ ها", - "currently_downloading": "در حال بارگیری ({tracks_length})", - "cancel_all": "لغو همه", - "filter_artist": "فیلتر کردن هنرمند...", - "followers": "{followers} دنبال کننده", - "add_artist_to_blacklist": "اضافه کردن هنرمند به لیست سیاه", - "top_tracks": "بهترین آهنگ ها", - "fans_also_like": "طرفداران هم دوست داشتند", - "loading": "بارگزاری...", - "artist": "هنرمند", - "blacklisted": "در لیست سیاه قرار گرفته است", - "following": "دنبال کننده", - "follow": "دنبال کردن", - "artist_url_copied": "لینک هنرمند در کلیپ بورد کپی شد", - "added_to_queue": "تعداد {tracks} آهنگ به صف اضافه شد", - "filter_albums": "فیلتر کردن آلبوم...", - "synced": "همگام سازی شد", - "plain": "ساده", - "shuffle": "تصادفی", - "search_tracks": "جستجوی آهنگ ها...", - "released": "منتشر شده", - "error": "خطا {error}", - "title": "عنوان", - "time": "زمان", - "more_actions": "اقدامات بیشتر", - "download_count": "دانلود ({count})", - "add_count_to_playlist": "اضافه کردن ({count}) به لیست پخش", - "add_count_to_queue": "اضافه کردن ({count}) به صف", - "play_count_next": "پخش ({count}) بعدی", - "album": "آلبوم", - "copied_to_clipboard": "{data} در کلیپ بورد کپی شد", - "add_to_following_playlists": "اضافه کردن {track} به لیست پخش زیر", - "add": "اضافه کردن", - "added_track_to_queue": "{track} به لیست پخش اضافه شد", - "add_to_queue": "اضافه کردن به صف", - "track_will_play_next": "{track} پخش خواهد شد", - "play_next": "پخش آهنگ بعدی", - "removed_track_from_queue": "{track} از لیست پخش حذف شد", - "remove_from_queue": "از لیست پخش حذف شد", - "remove_from_favorites": "از علاقمندی ها حدف شد", - "save_as_favorite": "ذخیره به عنوان علاقمندی ها", - "add_to_playlist": "به لیست پخش اضافه کردن", - "remove_from_playlist": "از لیست پخش حذف کردن", - "add_to_blacklist": "به لیست سیاه اضافه کردن", - "remove_from_blacklist": "از لیست سیاه حذف کردن", - "share": "اشتراک گذاری", - "mini_player": "پخش کننده ", - "slide_to_seek": "برای جستجو عقب یا جلو بکشید", - "shuffle_playlist": "پخش تصادفی", - "unshuffle_playlist": "خاموش کردن پخش تصادفی", - "previous_track": "آهنگ قبلی", - "next_track": "آهنگ بعدی", - "pause_playback": "توقف آهنگ", - "resume_playback": "ادامه آهنگ", - "loop_track": "تکرار آهنگ", - "repeat_playlist": "تکرار لیست پخش", - "queue": "صف", - "alternative_track_sources": " منبع آهنگ را جاگزین کردن ", - "download_track": "بارگیری آهنگ", - "tracks_in_queue": "{tracks} آهنگ در صف", - "clear_all": "همه را حدف کن", - "show_hide_ui_on_hover": "نمایش/پنهان رابط کاربری در حالت شناور", - "always_on_top": "همیشه روشن", - "exit_mini_player": "از پخش کننده خارج شوید", - "download_location": "محل بارگیری", - "account": "حساب کاربری", - "login_with_spotify": "با حساب اسپوتیفای خود وارد شوید", - "connect_with_spotify": "متصل شدن به اسپوتیفای", - "logout": "خارج شدن", - "logout_of_this_account": "از حساب کاربری خارج شوید", - "language_region": "زبان و منطقه ", - "language": "زبان ", - "system_default": "پیش فرض سیستم", - "market_place_region": "منطقه", - "recommendation_country": "کشور های پیشنهادی", - "appearance": "ظاهر", - "layout_mode": "حالت چیدمان", - "override_layout_settings": "تنطیمات حالت واکنشگرای چیدمان را لغو کن", - "adaptive": "قابل تطبیق", - "compact": "فشرده", - "extended": "گسترده", - "theme": "تم", - "dark": "تاریک", - "light": "روشن", - "system": "سیستم", - "accent_color": "رنگ تاکیدی", - "sync_album_color": "هنگام سازی رنگ البوم", - "sync_album_color_description": "از رنگ البوم هنرمند به عنوان رنگ تاکیدی استفاده میکند", - "playback": "پخش", - "audio_quality": "کیفیت صدا", - "high": "زیاد", - "low": "کم", - "pre_download_play": "دانلود و پخش کنید", - "pre_download_play_description": "به جای پخش جریانی صدا، بایت ها را دانلود کنید و به جای آن پخش کنید (برای کاربران با پهنای باند بالاتر توصیه می شود)", - "skip_non_music": "رد شدن از پخش های غیر موسیقی (SponsorBlock)", - "blacklist_description": "آهنگ ها و هنرمند های در لیست سیاه", - "wait_for_download_to_finish": "لطفا صبر کنید تا دانلود آهنگ جاری تمام شود", - "desktop": "میز کار", - "close_behavior": "رفتار نزدیک", - "close": "بستن", - "minimize_to_tray": "پتجره را کوچک کنید", - "show_tray_icon": "نماد را نمایش بده", - "about": "درباره", - "u_love_spotube": "دوست داریدSpotubeما میدانیم شما ", - "check_for_updates": "بروزرسانی را بررسی کنید", - "about_spotube": "Spotube درباره", - "blacklist": "لیست سیاه", - "please_sponsor": "لطفا کمک/حمایت کنید", - "spotube_description": "یک برنامه سبک و مولتی پلتفرم و رایگان برای همه استSpotube", - "version": "نسخه", - "build_number": "شماره ساخت", - "founder": "بنیانگذار", - "repository": "مخزن", - "bug_issues": "اشکال+مسایل", - "made_with": "🇧🇩ساخته شده با ❤️ در بنگلادش", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "مجوز", - "add_spotify_credentials": "برای شروع اعتبار اسپوتیفای خود را اضافه کنید", - "credentials_will_not_be_shared_disclaimer": "نگران نباشید هیچ کدوما از اعتبارات شما جمع اوری نمیشود یا با کسی اشتراک گزاشته نمیشود", - "know_how_to_login": "نمیدانی چگونه این کار را انجام بدهی؟", - "follow_step_by_step_guide": "راهنما را گام به گام دنبال کنید", - "spotify_cookie": "Spotify {name} کوکی", - "cookie_name_cookie": "{name} کوکی", - "fill_in_all_fields": "لطفا تمام فلید ها را پر کنید", - "submit": "ثبت", - "exit": "خروج", - "previous": "قبلی", - "next": "بعدی ", - "done": "اتمام", - "step_1": "گام 1", - "first_go_to": "اول برو داخل ", - "login_if_not_logged_in": "و اگر وارد نشده اید، وارد/ثبت نام کنید", - "step_2": "گام 2", - "step_2_steps": "1. پس از ورود به سیستم، F12 یا کلیک راست ماوس > Inspect را فشار دهید تا ابزارهای توسعه مرورگر باز شود..\n2. سپس به تب \"Application\" (Chrome, Edge, Brave etc..) یا \"Storage\" Tab (Firefox, Palemoon etc..)\n3. به قسمت \"Cookies\" و به پخش \"https://accounts.spotify.com\" بروید", - "step_3": "گام 3", - "success_emoji": "موفقیت🥳", - "success_message": "اکنون با موفقیت با حساب اسپوتیفای خود وارد شده اید", - "step_4": "مرحله 4", - "something_went_wrong": "اشتباهی رخ داده", - "piped_instance": "مشکل در ارتباط با سرور", - "piped_description": "مشکل در ارتباط با سرور در دریافت آهنگ ها", - "piped_warning": "برخی از آنها ممکن است خوب کارنکند.بنابراین با مسولیت خود استفاده کنید", - "generate_playlist": "ساخت لیست پخش", - "track_exists": "آهنگ {track} وجود دارد", - "replace_downloaded_tracks": "همه ی آهنگ های دانلود شده را جایگزین کنید", - "skip_download_tracks": "همه ی آهنگ های دانلود شده را رد کنید", - "do_you_want_to_replace": "ایا میخواهید آهنگ های موجود جایگزین کنید؟", - "replace": "جایگزین کردن", - "skip": "رد کردن", - "select_up_to_count_type": "انتخاب کنید تا {count} {type}", - "select_genres": "ژانر ها را انتخاب کنید", - "add_genres": "ژانر را اطافه کنید", - "country": "کشور", - "number_of_tracks_generate": "تعداد آهنگ های ساخته شده", - "acousticness": "آکوستیک", - "danceability": "رقصیدن", - "energy": "انرژی", - "instrumentalness": "بی کلام", - "liveness": "حس زندگی", - "loudness": "صدای بلند", - "speechiness": "دکلمه", - "valence": "ظرفیت", - "popularity": "محبوبیت", - "key": "کلید", - "duration": "مدت زمان (ثانیه)", - "tempo": "تمپو (BPM)", - "mode": "حالت", - "time_signature": "امضای زمان", - "short": "کوتاه", - "medium": "متوسط", - "long": "بلند", - "min": "حداقل", - "max": "حداکثر", - "target": "هدف", - "moderate": "حد وسط", - "deselect_all": "همه را لغو انتخاب کنید", - "select_all": "همه را انتخاب کنید", - "are_you_sure": "ایا مطمعن هستید؟", - "generating_playlist": " درحال ایجاد لیست پخش سفارشی شما", - "selected_count_tracks": "آهنگ انتخاب شده {count}", - "download_warning": "اگر همه ی آهنگ ها را به صورت انبو دانلود کنید به وضوح در حال دزدی موسقی هستید و در حال اسیب وارد کردن به جامه ی خلاق هنری می باشید .امیدوارم که از این موضوع اگاه باشید .همیشه سعی کنید به کار سخت هنرمند اخترام بگذارید.", - "download_ip_ban_warning": "راستی آی پی شما می تواند در یوتوب به دلیل درخواست های دانلود بیش از حد معمول مسدود شود. بلوک آی پی به این معنی است که شما نمی توانید از یوتوب (حتی اگر وارد سیستم شده باشید) حداقل 2-3 ماه از آن دستگاه آی پی استفاده کنید. و Spotube هیچ مسئولیتی در صورت وقوع این اتفاق ندارد", - "by_clicking_accept_terms": "با کلیک بر روی قبول با شرایط زیر موافقت می کنید:", - "download_agreement_1": "من میدانم در حال دزدی هستم .من بد هستم", - "download_agreement_2": "من هر کجا ک بتوانم از هنرمندان حمایت میکنم اما این کارا فقط به دلیل اینکه توانایی مالی ندارم انجام میدهم", - "download_agreement_3": "من کاملا میدانم که از طرف یوتوب بلاک میشم و این برنامه و مالکان را مسول این حادثه نمیدانم.", - "decline": "قبول نکردن", - "accept": "قبول", - "details": "جزئیات", - "youtube": "یوتیوب", - "channel": "کانال", - "likes": "دوست داشتن", - "dislikes": "دوست نداشتن", - "views": "بازدید", - "streamUrl": "لینک اثر", - "stop": "توقف", - "sort_newest": "مرتب سازی بر اساس جدید ترین اضافه شده", - "sort_oldest": "مرتب سازی بر اساس قدیمی ترین اضافه شده", - "sleep_timer": "زمان خواب", - "mins": "{minutes} دقیقه", - "hours": "{hours} ساعت", - "hour": "{hours} ساعت", - "custom_hours": "ساعت سفارشی", - "logs": "رسید خطا", - "developers": "توسعه دهنده ها", - "not_logged_in": "شما وارد نشده اید ", - "search_mode": "حالت جستجو", - "audio_source": "منبع صدا", - "ok": "باشد", - "failed_to_encrypt": "رمز گذاری نشده", - "encryption_failed_warning": "Spotube از رمزگذاری برای ذخیره ایمن داده های شما استفاده می کند. اما موفق به انجام این کار نشد. بنابراین به فضای ذخیره‌سازی ناامن تبدیل می‌شود\nاگر از لینوکس استفاده می‌کنید، لطفاً مطمئن شوید که سرویس مخفی (gnome-keyring، kde-wallet، keepassxc و غیره) را نصب کرده‌اید.", - "querying_info": "جستجو درباره ", - "piped_api_down": "ایراد در سرور", - "piped_down_error_instructions": "به دلیل مشکل {pipedInstance} ارتباط با سرور مقدور نیست\n\nنمونه را تغییر دهید یا «نوع API» را به API رسمی YouTube تغییر دهید\n\nحتماً پس از تغییر، برنامه را دوباره راه‌اندازی کنید", - "you_are_offline": "شما در حال حاضر افلاین هستید ", - "connection_restored": "اتصال به اینترنت شما بازیابی شد ", - "use_system_title_bar": "از نوار عنوان سیستم استفاده کنید ", - "crunching_results": "نتایج خرد کردن...", - "search_to_get_results": "جستجو کنید تا به نتیجه برسید", - "use_amoled_mode": "استفاده از حالت AMOLED", - "pitch_dark_theme": "تم تیره دارت", - "normalize_audio": "نرمال کردن صدا", - "change_cover": "تغییر جلد", - "add_cover": "افزودن جلد", - "restore_defaults": "بازیابی پیش فرض ها", - "download_music_codec": "دانلود کدک موسیقی", - "streaming_music_codec": "کدک موسیقی استریمینگ", - "login_with_lastfm": "ورود با Last.fm", - "connect": "اتصال", - "disconnect_lastfm": "قطع ارتباط با Last.fm", - "disconnect": "قطع ارتباط", - "username": "نام کاربری", - "password": "رمز عبور", - "login": "ورود", - "login_with_your_lastfm": "ورود با حساب کاربری Last.fm خود", - "scrobble_to_lastfm": "Scrobble به Last.fm", - "go_to_album": "رفتن به آلبوم", - "discord_rich_presence": "حضور غنی دیسکورد", - "browse_all": "مرور همه", - "genres": "ژانرها", - "explore_genres": "استکشاف ژانرها", - "step_3_steps": "مقدار کوکی \"sp_dc\" را کپی کنید", - "step_4_steps": "مقدار کپی شده \"sp_dc\" را الصاق کنید", - "friends": "دوستان", - "no_lyrics_available": "متاسفیم، قادر به یافتن متن این قطعه نیستیم", - "sort_duration": "مرتب کردن بر اساس مدت زمان", - "start_a_radio": "شروع یک رادیو", - "how_to_start_radio": "چگونه می‌خواهید رادیو را شروع کنید؟", - "replace_queue_question": "آیا می‌خواهید لیست پخش فعلی را جایگزین کنید یا به آن اضافه کنید؟", - "endless_playback": "پخش بی‌پایان", - "delete_playlist": "حذف لیست پخش", - "delete_playlist_confirmation": "آیا مطمئن هستید که می‌خواهید این لیست پخش را حذف کنید؟", - "local_tracks": "موسیقی‌های محلی", - "song_link": "پیوند آهنگ", - "skip_this_nonsense": "این احمقانه را بگذرانید", - "freedom_of_music": "“آزادی موسیقی”", - "freedom_of_music_palm": "“آزادی موسیقی در دستان شما”", - "get_started": "بیایید شروع کنیم", - "youtube_source_description": "پیشنهاد شده و بهترین عمل می‌کند.", - "piped_source_description": "احساس آزادی می‌کنید؟ مانند یوتیوب اما بیشتر آزاد.", - "jiosaavn_source_description": "بهترین برای منطقه جنوب آسیا.", - "highest_quality": "بالاترین کیفیت: {quality}", - "select_audio_source": "انتخاب منبع صوتی", - "endless_playback_description": "خودکار اضافه کردن آهنگ‌های جدید\nبه انتهای صف", - "choose_your_region": "منطقه خود را انتخاب کنید", - "choose_your_region_description": "این به Spotube کمک می‌کند تا محتوای مناسبی را برای موقعیت شما نشان دهد.", - "choose_your_language": "زبان خود را انتخاب کنید", - "help_project_grow": "کمک به رشد این پروژه", - "help_project_grow_description": "Spotube یک پروژه متن باز است. شما می‌توانید با به پروژه کمک کردن، گزارش دادن اشکالات یا پیشنهاد ویژگی‌های جدید، به این پروژه کمک کنید.", - "contribute_on_github": "مشارکت در GitHub", - "donate_on_open_collective": "کمک مالی در Open Collective", - "browse_anonymously": "مرور به صورت ناشناس", - "enable_connect": "فعال‌سازی اتصال", - "enable_connect_description": "کنترل Spotube از دیگر دستگاه‌ها", - "devices": "دستگاه‌ها", - "select": "انتخاب", - "connect_client_alert": "شما توسط {client} کنترل می‌شوید", - "this_device": "این دستگاه", - "remote": "راه‌دور", - "local_library": "کتابخانه محلی", - "add_library_location": "اضافه کردن به کتابخانه", - "remove_library_location": "حذف از کتابخانه", - "local_tab": "محلی", - "stats": "آمار", - "and_n_more": "و {count} بیشتر", - "recently_played": "اخیراً پخش شده", - "browse_more": "بیشتر مرور کنید", - "no_title": "بدون عنوان", - "not_playing": "در حال پخش نیست", - "epic_failure": "شکست حماسی!", - "added_num_tracks_to_queue": "{tracks_length} ترک به صف اضافه شد", - "spotube_has_an_update": "Spotube یک بروزرسانی دارد", - "download_now": "اکنون دانلود کنید", - "nightly_version": "نسخه شبانه Spotube {nightlyBuildNum} منتشر شد", - "release_version": "نسخه Spotube v{version} منتشر شد", - "read_the_latest": "آخرین‌ها را بخوانید", - "release_notes": "یادداشت‌های انتشار", - "pick_color_scheme": "طرح رنگ را انتخاب کنید", - "save": "ذخیره", - "choose_the_device": "دستگاه را انتخاب کنید:", - "multiple_device_connected": "چندین دستگاه متصل هستند.\nدستگاهی را انتخاب کنید که می‌خواهید این عملیات بر روی آن انجام شود", - "nothing_found": "چیزی پیدا نشد", - "the_box_is_empty": "جعبه خالی است", - "top_artists": "بهترین هنرمندان", - "top_albums": "بهترین آلبوم‌ها", - "this_week": "این هفته", - "this_month": "این ماه", - "last_6_months": "۶ ماه گذشته", - "this_year": "امسال", - "last_2_years": "۲ سال گذشته", - "all_time": "همیشه", - "powered_by_provider": "توسط {providerName} پشتیبانی شده است", - "email": "ایمیل", - "profile_followers": "دنبال‌کنندگان", - "birthday": "تولد", - "subscription": "اشتراک", - "not_born": "متولد نشده", - "hacker": "هکر", - "profile": "پروفایل", - "no_name": "بدون نام", - "edit": "ویرایش", - "user_profile": "پروفایل کاربر", - "count_plays": "{count} پخش", - "streaming_fees_hypothetical": "هزینه‌های پخش (فرضی)", - "minutes_listened": "دقایق گوش داده شده", - "streamed_songs": "ترانه‌های پخش شده", - "count_streams": "{count} پخش", - "owned_by_you": "توسط شما مالکیت شده", - "copied_shareurl_to_clipboard": "{shareUrl} به کلیپ‌بورد کپی شد", - "spotify_hipotetical_calculation": "*این بر اساس پرداخت هر پخش اسپاتیفای\nبه مبلغ 0.003 تا 0.005 دلار محاسبه شده است.\nاین یک محاسبه فرضی است که به کاربران نشان دهد چقدر ممکن است\nبه هنرمندان پرداخت می‌کردند اگر ترانه آنها را در اسپاتیفای گوش می‌دادند.", - "count_mins": "{minutes} دقیقه", - "summary_minutes": "دقیقه‌ها", - "summary_listened_to_music": "به موسیقی گوش داده شده", - "summary_songs": "ترانه‌ها", - "summary_streamed_overall": "پخش شده به طور کلی", - "summary_owed_to_artists": "به هنرمندان بدهکار است\nاین ماه", - "summary_artists": "هنرمندان", - "summary_music_reached_you": "موسیقی به شما رسیده است", - "summary_full_albums": "آلبوم‌های کامل", - "summary_got_your_love": "عشق شما را به دست آورد", - "summary_playlists": "لیست‌های پخش", - "summary_were_on_repeat": "در تکرار بودند", - "total_money": "مجموع {money}", - "webview_not_found": "وب‌ویو پیدا نشد", - "webview_not_found_description": "هیچ اجرای وب‌ویو روی دستگاه شما نصب نشده است.\nدر صورت نصب، مطمئن شوید که در environment PATH قرار دارد\n\nپس از نصب، برنامه را مجدداً راه‌اندازی کنید", - "unsupported_platform": "پلتفرم پشتیبانی نمی‌شود", - "invidious_instance": "نمونه سرور Invidious", - "invidious_description": "نمونه سرور Invidious برای تطبیق آهنگ", - "invidious_warning": "برخی از نمونه‌ها ممکن است به خوبی کار نکنند. با احتیاط استفاده کنید", - "invidious_source_description": "شبیه Piped اما با در دسترس بودن بیشتر", - "cache_music": "موسیقی در حافظه موقت", - "open": "باز کردن", - "cache_folder": "پوشه حافظه موقت", - "export": "صادر کردن", - "clear_cache": "پاک کردن حافظه موقت", - "clear_cache_confirmation": "آیا می‌خواهید حافظه موقت را پاک کنید؟", - "export_cache_files": "صادر کردن فایل‌های حافظه موقت", - "found_n_files": "{count} فایل یافت شد", - "export_cache_confirmation": "آیا می‌خواهید این فایل‌ها را صادر کنید به", - "exported_n_out_of_m_files": "{filesExported} از {files} فایل صادر شد", - "playlist": "لیست پخش", - "no_loop": "بدون حلقه", - "generate": "ایجاد", - "undo": "بازگشت", - "download_all": "دانلود همه", - "add_all_to_playlist": "افزودن همه به لیست پخش", - "add_all_to_queue": "افزودن همه به صف", - "play_all_next": "پخش همه بعدی", - "pause": "مکث", - "view_all": "مشاهده همه", - "no_tracks_added_yet": "به نظر می‌رسد هنوز هیچ آهنگی اضافه نکرده‌اید.", - "no_tracks": "به نظر می‌رسد هیچ آهنگی در اینجا وجود ندارد.", - "no_tracks_listened_yet": "به نظر می‌رسد هنوز چیزی نشنیده‌اید.", - "not_following_artists": "شما هیچ هنرمندی را دنبال نمی‌کنید.", - "no_favorite_albums_yet": "به نظر می‌رسد هنوز هیچ آلبومی را به علاقه‌مندی‌هایتان اضافه نکرده‌اید.", - "no_logs_found": "هیچ لاگی پیدا نشد", - "youtube_engine": "موتور YouTube", - "youtube_engine_not_installed_title": "{engine} نصب نشده است", - "youtube_engine_not_installed_message": "{engine} در سیستم شما نصب نشده است.", - "youtube_engine_set_path": "اطمینان حاصل کنید که در متغیر PATH موجود است یا\nآدرس مطلق فایل اجرایی {engine} را در زیر تنظیم کنید.", - "youtube_engine_unix_issue_message": "در macOS/Linux/سیستم‌عامل‌های مشابه Unix، تنظیم مسیر در .zshrc/.bashrc/.bash_profile و غیره کار نمی‌کند.\nباید مسیر را در فایل پیکربندی شل تنظیم کنید.", - "download": "دانلود", - "file_not_found": "فایل پیدا نشد", - "custom": "شخصی‌سازی شده", - "add_custom_url": "اضافه کردن URL سفارشی", - "edit_port": "ویرایش پورت", - "port_helper_msg": "پیش‌فرض -1 است که نشان‌دهنده یک عدد تصادفی است. اگر فایروال شما پیکربندی شده است، توصیه می‌شود این را تنظیم کنید.", - "connect_request": "آیا اجازه می‌دهید {client} متصل شود؟", - "connection_request_denied": "اتصال رد شد. کاربر دسترسی را رد کرد.", - "hipotetical_calculation": "*این محاسبه بر اساس میانگین پرداخت به ازای هر پخش (0.003 تا 0.005 دلار) در پلتفرم‌های استریم موزیک آنلاین انجام شده است. این یک محاسبه فرضی است که به کاربر دیدی از مقدار پرداختی به هنرمندان در صورت گوش دادن به آهنگ آن‌ها در پلتفرم‌های مختلف ارائه می‌دهد.", - "an_error_occurred": "خطایی رخ داد", - "copy_to_clipboard": "کپی به کلیپ‌بورد", - "view_logs": "مشاهده لاگ‌ها", - "retry": "دوباره تلاش کن", - "no_default_metadata_provider_selected": "هیچ ارائه‌دهندهٔ پیش‌فرض متادیتا تعیین نکرده‌اید", - "manage_metadata_providers": "مدیریت ارائه‌دهندگان متادیتا", - "open_link_in_browser": "باز کردن لینک در مرورگر؟", - "do_you_want_to_open_the_following_link": "آیا می‌خواهید لینک زیر را باز کنید؟", - "unsafe_url_warning": "باز کردن لینک از منابع نامطمئن می‌تواند ناامن باشد. مراقب باشید!\nهمچنین می‌توانید لینک را در کلیپ‌بورد خود کپی کنید.", - "copy_link": "کپی لینک", - "building_your_timeline": "در حال ساخت جدول زمانی بر اساس شنیده‌هایتان…", - "official": "رسمی", - "author_name": "نویسنده: {author}", - "third_party": "سوم‌شخص", - "plugin_requires_authentication": "افزونه نیاز به احراز هویت دارد", - "update_available": "به‌روزرسانی در دسترس است", - "supports_scrobbling": "پشتیبانی از اسکراب‌بلینگ", - "plugin_scrobbling_info": "این افزونه موسیقی شما را اسکراب می‌کند تا تاریخچهٔ شنیداری‌تان را تولید کند.", - "default_plugin": "پیش‌فرض", - "set_default": "تنظیم به عنوان پیش‌فرض", - "support": "پشتیبانی", - "support_plugin_development": "حمایت از توسعهٔ افزونه", - "can_access_name_api": "- می‌تواند به API **{name}** دسترسی پیدا کند", - "do_you_want_to_install_this_plugin": "می‌خواهید این افزونه را نصب کنید؟", - "third_party_plugin_warning": "این افزونه از مخزن شخص ثالث آمده است. لطفاً قبل از نصب از منابع آن مطمئن شوید.", - "author": "نویسنده", - "this_plugin_can_do_following": "این افزونه می‌تواند موارد زیر را انجام دهد", - "install": "نصب", - "install_a_metadata_provider": "نصب یک ارائه‌دهندهٔ متادیتا", - "no_tracks_playing": "در حال‌ حاضر هیچ تراکی در حال پخش نیست", - "synced_lyrics_not_available": "متن هم‌زمان‌شده برای این آهنگ در دسترس نیست. لطفاً از", - "plain_lyrics": "متن ساده", - "tab_instead": "به‌جای آن از کلید Tab استفاده کنید.", - "disclaimer": "سلب مسئولیت", - "third_party_plugin_dmca_notice": "تیم Spotube هیچ مسئولیتی (حتی قانونی) در قبال افزونه‌های \"شخص ثالث\" ندارد. از آن‌ها به‌خاطر خود استفاده کنید. برای خطاها/مشکلات، لطفاً در مخزن افزونه گزارش دهید.\n\nاگر هر افزونهٔ \"شخص ثالث\" قوانین ToS/DMCA سرویس یا نهاد قانونی را نقض کند، لطفاً از نویسندهٔ افزونه یا پلتفرم میزبانی (مثل GitHub/Codeberg) درخواست اقدام کنید. افزونه‌هایی که با برچسب \"شخص ثالث\" مشخص شده‌اند، عمومی هستند و توسط جامعه نگهداری می‌شوند؛ ما آن‌ها را تغییر یا مدیریت نمی‌کنیم و نمی‌توانیم دخالت کنیم.\n\n", - "input_does_not_match_format": "ورودی با قالب مورد نیاز تطابق ندارد", - "metadata_provider_plugins": "افزونه‌های ارائه‌دهندهٔ متادیتا", - "paste_plugin_download_url": "URL دانلود یا مخزن GitHub/Codeberg یا لینک مستقیم فایل .smplug را الصاق کنید", - "download_and_install_plugin_from_url": "دانلود و نصب افزونه از طریق لینک", - "failed_to_add_plugin_error": "افزونه اضافه نشد: {error}", - "upload_plugin_from_file": "بارگذاری افزونه از فایل", - "installed": "نصب شد", - "available_plugins": "افزونه‌های موجود", - "configure_your_own_metadata_plugin": "پیکربندی ارائه‌دهندهٔ متادیتا برای پلی‌لیست/آلبوم/هنرمند/فید به‌صورت سفارشی", - "audio_scrobblers": "اسکراب‌بلرهای صوتی", - "scrobbling": "اسکراب‌بلینگ", - "download_music_format": "فرمت دانلود موسیقی", - "streaming_music_format": "فرمت پخش آنلاین موسیقی", - "download_music_quality": "کیفیت دانلود موسیقی", - "streaming_music_quality": "کیفیت پخش آنلاین موسیقی", - "default_metadata_source": "منبع پیش‌فرض فراداده", - "set_default_metadata_source": "تنظیم منبع پیش‌فرض فراداده", - "default_audio_source": "منبع پیش‌فرض صوت", - "set_default_audio_source": "تنظیم منبع پیش‌فرض صوت", - "plugins": "افزونه‌ها", - "configure_plugins": "افزونه‌های منبع صوت و ارائه‌دهنده فراداده خود را پیکربندی کنید", - "source": "منبع: ", - "uncompressed": "بدون فشرده‌سازی", - "dab_music_source_description": "مخصوص علاقه‌مندان صدا. ارائه‌دهنده استریم‌های باکیفیت/بدون افت. تطبیق دقیق آهنگ بر اساس ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_fi.arb b/lib/l10n/app_fi.arb deleted file mode 100644 index d92e5acf..00000000 --- a/lib/l10n/app_fi.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Vieras", - "browse": "Selaa", - "search": "Hae", - "library": "Kirjasto", - "lyrics": "Lyriikat", - "settings": "Asetukset", - "genre_categories_filter": "Suodata kategorioita tai genrejä", - "genre": "Genre", - "personalized": "Personoidut", - "featured": "Esittelyssä", - "new_releases": "Uusi julkaisu", - "songs": "Laulut", - "playing_track": "Soitetaan {track}", - "queue_clear_alert": "Tämä tulee tyhjentämään jonon. {track_length} Kappaleita poistetaan\nHaluatko jatkaa?", - "load_more": "Lataa lisää", - "playlists": "Soittolistat", - "artists": "Artistit", - "albums": "Albumit", - "tracks": "Kappaleet", - "downloads": "Lataukset", - "filter_playlists": "Suodata soittolistasi...", - "liked_tracks": "Tykätyt kappaleet", - "liked_tracks_description": "Kaikki tykättysi kappaleet", - "create_playlist": "Luo soittolista", - "create_a_playlist": "Luo soittolista", - "update_playlist": "Päivitä soittolista", - "create": "Luo", - "cancel": "Peruuta", - "update": "Päivitä", - "playlist_name": "Soittolistan nimi", - "name_of_playlist": "Soittolistan nimi", - "description": "Kuvaus", - "public": "Julkinen", - "collaborative": "Collaborative", - "search_local_tracks": "Hae paikallisia lauluja...", - "play": "Soita", - "delete": "Poista", - "none": "Ei mitään", - "sort_a_z": "Suodata A-Z", - "sort_z_a": "Suodata Z-A", - "sort_artist": "Suodata Artistilta", - "sort_album": "Suodata Albumilta", - "sort_duration": "Suodata Pituudelta", - "sort_tracks": "Suodata Kappaleet", - "currently_downloading": "Ladataan ({tracks_length})", - "cancel_all": "Peru kaikki", - "filter_artist": "Suodata artistit...", - "followers": "{followers} Seuraajaa", - "add_artist_to_blacklist": "Lisää artisti mustalle listalle", - "top_tracks": "Suosituimmat kappaleet", - "fans_also_like": "Fanit myös tykkäsivät", - "loading": "Ladataan...", - "artist": "Artisti", - "blacklisted": "Mustalistattu", - "following": "Seurataan", - "follow": "Seuraa", - "artist_url_copied": "Aristin URL kopioitiin leikepöytään", - "added_to_queue": "Lisättiin {tracks} kappaletta jonoon", - "filter_albums": "Suodata albumit...", - "synced": "Synkronoitu", - "plain": "Tavallinen", - "shuffle": "Sekoita", - "search_tracks": "Hae kappaleita...", - "released": "Julkaistu", - "error": "Virhe {error}", - "title": "Otsikko", - "time": "Aika", - "more_actions": "Lisää toimintoja", - "download_count": "Lataa ({count})", - "add_count_to_playlist": "Lisää ({count}) Soittolistaasi", - "add_count_to_queue": "Lisää ({count}) Jonoon", - "play_count_next": "Soita ({count}) seuraavaksi", - "album": "Albumi", - "copied_to_clipboard": "Kopioitiin {data} leikepöytään", - "add_to_following_playlists": "Lisää {track} seuraaviin soittolistoihin", - "add": "Lisää", - "added_track_to_queue": "Lisättiin {track} jonoon", - "add_to_queue": "Lisää jonoon", - "track_will_play_next": "{track} Soitetaan seuraavaksi", - "play_next": "Soita seuraavaksi", - "removed_track_from_queue": "Poistettiin {track} jonosta", - "remove_from_queue": "Poista jonosta", - "remove_from_favorites": "Poista suosikeista", - "save_as_favorite": "Tallenna soittolistana", - "add_to_playlist": "Lisää soittolistaan", - "remove_from_playlist": "Poista soittolistasta", - "add_to_blacklist": "Lisää mustalle listalle", - "remove_from_blacklist": "Poista mustalistalta", - "share": "Jaa", - "mini_player": "Minisoitin", - "slide_to_seek": "Liu'uta mennäkseen eteenpäin tai taaksepäin", - "shuffle_playlist": "Sekoita soittolista", - "unshuffle_playlist": "Poista sekoitus soittolistasta", - "previous_track": "Äskeinen kappale", - "next_track": "Seuraava kappale", - "pause_playback": "Pysäytä soittolistan toisto", - "resume_playback": "Jatka soittolistan toistoa", - "loop_track": "Uudelleentoista kappale", - "repeat_playlist": "Toista soittolista uudelleen", - "queue": "Jono", - "alternative_track_sources": "Toinen kappale lähde", - "download_track": "Lataa kappale", - "tracks_in_queue": "{tracks} kappaletta jonossa", - "clear_all": "Tyhjennä kaikki", - "show_hide_ui_on_hover": "Näytä/Piilota UI leijumalla", - "always_on_top": "Aina päällimmäisenä", - "exit_mini_player": "Lähde minisoittimesta", - "download_location": "Lataus sijainti", - "account": "Käyttäjä", - "login_with_spotify": "Kirjaudu Spotify-käyttäjällä", - "connect_with_spotify": "Yhdistä Spotify:lla", - "logout": "Kirjaudu ulos", - "logout_of_this_account": "Kirjaudu ulos tältä käyttäjältä", - "language_region": "Kieli ja Maa", - "language": "Kieli", - "system_default": "Järjestelmän oletus", - "market_place_region": "Markkina-alue", - "recommendation_country": "Suositeltu maa", - "appearance": "Ulkomuto", - "layout_mode": "Asettelutila", - "override_layout_settings": "Jätä reagoiva asettelutila huomioimatta", - "adaptive": "Mukautuva", - "compact": "Kompakti", - "extended": "Laajennettu", - "theme": "Teema", - "dark": "Tumma", - "light": "Vaalea", - "system": "Järjestelmä", - "accent_color": "Korostusväri", - "sync_album_color": "Synkronoi albumin väri", - "sync_album_color_description": "Käyttää albumin kansitaiteen vallitsevaa väirä korostuvärinä", - "playback": "Toisto", - "audio_quality": "Äänenlaatu", - "high": "Korkea", - "low": "Matala", - "pre_download_play": "Esilataa ja soita", - "pre_download_play_description": "Audion suoratoiston sijaan, lataa tavut ja soita ne (Suositeltu korkeamman kaistanleveyden käyttäjille)", - "skip_non_music": "Ohita ei-musiikki kohdat (SponsorBlock)", - "blacklist_description": "Mustalistat kappaleet aja artistit", - "wait_for_download_to_finish": "Odota nykyisen latauksen lopetteluun", - "desktop": "Työpöytä", - "close_behavior": "Sulkemisen käyttäytyminen", - "close": "Sulje", - "minimize_to_tray": "Minimisoi tehtäväpalkkiin", - "show_tray_icon": "Näytä järjestelmäkuvake", - "about": "Tietoa", - "u_love_spotube": "Tiedämme että rakastat Spotubea", - "check_for_updates": "Tarkista päivitykset", - "about_spotube": "Tietoa Spotube:sta", - "blacklist": "Mustalista", - "please_sponsor": "Sponsoroi/Lahjoita, kiitos", - "spotube_description": "Spotube, kevyt, cross-platform, vapaa-kaikille spotify clientti", - "version": "Versio", - "build_number": "Rakennusnumero", - "founder": "Perustaja", - "repository": "Arkisto", - "bug_issues": "Bugit+Ongelmat", - "made_with": "Tehty ❤️ Bangladeshista 🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Lisenssi", - "add_spotify_credentials": "Lisää Spotify-tunnuksesi aloittaaksesi", - "credentials_will_not_be_shared_disclaimer": "Älä huoli, tunnuksiasi ei talleteta tai jaeta kenenkään kanssa", - "know_how_to_login": "Etkö tiedä miten tehdä tämä?", - "follow_step_by_step_guide": "Seuraa askel askeleelta opasta", - "spotify_cookie": "Spotify {name} Keksi", - "cookie_name_cookie": "{name} Keksi", - "fill_in_all_fields": "Täytä kaikki kentät", - "submit": "Lähetä", - "exit": "Poistu", - "previous": "Edellinen", - "next": "Seuraava", - "done": "Tehty", - "step_1": "Vaihe 1", - "first_go_to": "Ensiksi, mene", - "login_if_not_logged_in": "ja Kirjaudu/Tee tili jos et ole kirjautunut sisään", - "step_2": "Vaihe 2", - "step_2_steps": "1. Kun olet kirjautunut, paina F12 tai oikeaa hiiren näppäintä > Tarkista ja avaa selaimen kehittäjä työkalut.\n2. Mene sitten \"Application\"-välilehteen (Chrome, Edge, Brave jne..) tai \"Storage\"-välilehteen (Firefox, Palemoon jne..)\n3. Mene \"Cookies\"-osastoon, sitten \"https://accounts.spotify.com\" alakohtaan.", - "step_3": "Vaihe 3", - "step_3_steps": "Kopioi Keksin \"sp_dc\" arvo", - "success_emoji": "Onnistuit🥳", - "success_message": "Olet nyt kirjautunut sisään Spotify-käyttäjällesi. Hyvää työtä toveri!", - "step_4": "Vaihe 4", - "step_4_steps": "Liitä kopioitu \"sp_dc\" arvo", - "something_went_wrong": "Jotain meni pieleen", - "piped_instance": "Johdettu palvelinesiintymä", - "piped_description": "Johdettu palvelinesiintymä Kappale täsmäyksiin", - "piped_warning": "Jotkut niistä eivät toimi hyvin, käytä siis omalla vastuullasi", - "generate_playlist": "Tuota soittolista", - "track_exists": "Kappale {track} on jo olemassa!", - "replace_downloaded_tracks": "Korvaa kaikki ladatut kappaleet", - "skip_download_tracks": "Ohita ladattujen laulujen lataaminen", - "do_you_want_to_replace": "Haluatko korvata olemassa olevan kappaleen??", - "replace": "Korvaa", - "skip": "Ohita", - "select_up_to_count_type": "Valitse enintään {count} {type}", - "select_genres": "Valitse Genret", - "add_genres": "Lisää Genrejä", - "country": "Maa", - "number_of_tracks_generate": "Numero tuotettavia kappaleita", - "acousticness": "Akustisuus", - "danceability": "Tanssittavuus", - "energy": "Energia", - "instrumentalness": "Instrumentaalisuus", - "liveness": "Elävyyttä", - "loudness": "Äänekkyys", - "speechiness": "Puheisuus", - "valence": "Valenssi", - "popularity": "Suosio", - "key": "Sävellaji", - "duration": "Pituus (s)", - "tempo": "Tempo (BPM)", - "mode": "Tila", - "time_signature": "Aikamerkki", - "short": "Lyhyt", - "medium": "Keskikokoinen", - "long": "Pitkä", - "min": "Minimi", - "max": "Maximi", - "target": "Kohde", - "moderate": "Kohtalainen", - "deselect_all": "Poista kaikki valinnat", - "select_all": "Valitse kaikki", - "are_you_sure": "Oletko varma?", - "generating_playlist": "Luodaan mukautettua soittolistoa...", - "selected_count_tracks": "Valittu {count} kappaletta", - "download_warning": "Jos lataat kaikki laulut kerrällä olet selkeästi Piratoimassa ja aiheuttamassa vahinkoa musiikin luovaan yhteiskuntaan. Toivottavasti olet tietoinen tästä. Yritä aina kunnioittaa ja tukea Artistin kovaa työtä.", - "download_ip_ban_warning": "BTW, YouTube voi estää IP-Osoitteesi tavallista liiallisten latauspyyntöjen takia. IP-Osoitteen esto tarkoittaa sitä, ettet voi käyttää YouTubea (vaikka olisit kirjautunut) vähintään 2-3kk aikana kyseiseltä laitteelta. Spotube ei kanna yhtään vastuuta jos se tapahtuu.", - "by_clicking_accept_terms": "Painamalla 'hyväksy' hyväksyt seuraaviin ehtoihin:", - "download_agreement_1": "Tiedän että Piratoin musiikkia. Olen paha.", - "download_agreement_2": "Tuen Artisteja silloin kun pystyn, ja teen tämän vain koska minulla ei ole rahaa ostaa heidän taidetta", - "download_agreement_3": "Ymmärrän että minun YouTube voi estää IP-Osoitteeni ja en pidä Spotubea tai omistajiinsa/avustajia vastuullisena mistään omista teoistsani", - "decline": "Hylkää", - "accept": "Hyväksy", - "details": "Yksityiskohdat", - "youtube": "YouTube", - "channel": "Kanava", - "likes": "Tykkäykset", - "dislikes": "Epä-tykkäykset", - "views": "Näyttökerrat", - "streamUrl": "Suoratoiston URL", - "stop": "Lopeta", - "sort_newest": "Suodata uusimmista", - "sort_oldest": "Suodata vanhimmista", - "sleep_timer": "Uniajastin", - "mins": "{minutes} Minuuttia", - "hours": "{hours} Tuntia", - "hour": "{hours} Tunti", - "custom_hours": "Mukautetut tunnit", - "logs": "Lokit", - "developers": "Kehittäjät", - "not_logged_in": "Et ole kirjautunut sisään.", - "search_mode": "Hakutila", - "audio_source": "Äänilähde", - "ok": "Ok", - "failed_to_encrypt": "Salaaminen epäonnistui", - "encryption_failed_warning": "Spotube käyttää salausta tallentaakseen tietosi, mutta epäonnistui, joten se palaa epäturvalliseen tallennukseen\nJos käytät Linuxia, varmista että sinulla on turvallisuuspalvelu (gnome-keyring, kde-wallet, keepassxc jne) asennettu", - "querying_info": "Hankitaan tietoa...", - "piped_api_down": "Johdettu palvelinesiintymä on alhaalla", - "piped_down_error_instructions": "Johdettu palvelinesiintymä {pipedInstance} on alhaalla.\n\nVaihda joko ilmeytymä tia vahda 'API tyyppi' YouTuben viralliseen API\n\nKäynnistä sovellus uudestaan vaihdon jälkeen", - "you_are_offline": "Et ole yhdistetty verkkoon", - "connection_restored": "Verkkoyhteys palautettu", - "use_system_title_bar": "Käytä järjestelmäpalkkia", - "crunching_results": "Paloitellaan tuloksia...", - "search_to_get_results": "Hae saadakseen tuloksia", - "use_amoled_mode": "Pilkkopimeä tumma teema", - "pitch_dark_theme": "AMOLED Tila", - "normalize_audio": "Normalisoi audio", - "change_cover": "Vaihda koveri", - "add_cover": "Lisää koveri", - "restore_defaults": "Palauta oletukset", - "download_music_codec": "Ladatun musiikin codefc", - "streaming_music_codec": "Suoratoistetun musiikin codec", - "login_with_lastfm": "Kirjaudu sisään Last.fm:llä", - "connect": "Yhdistä", - "disconnect_lastfm": "Katkaise Last.fm", - "disconnect": "Katkaise", - "username": "Käyttäjänimi", - "password": "Salasana", - "login": "Kirjaudu", - "login_with_your_lastfm": "Kirjaudu Last.fm käyttäjälläsi", - "scrobble_to_lastfm": "Scrobble Last.fm:ään", - "go_to_album": "Mene albumiin", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "Selaa kaikki", - "genres": "Genret", - "explore_genres": "Seikkaile genrejä", - "friends": "Kaverit", - "no_lyrics_available": "Anteeksi, emme löytäneet lyriikoita tälle laululle", - "start_a_radio": "Aloita Radio", - "how_to_start_radio": "Kuinka haluat aloittaa radion?", - "replace_queue_question": "Haluatko korvata nykyisen jonon vai lisätä siihen?", - "endless_playback": "Loputon toisto", - "delete_playlist": "Poista soittolista", - "delete_playlist_confirmation": "Oletko varma että haluat poistaa tämän soittolistan?", - "local_tracks": "Paikalliset kappaleet", - "song_link": "Laulun linkki", - "skip_this_nonsense": "Ohita tämä hölynpöly", - "freedom_of_music": "“Musiikin vapaus”", - "freedom_of_music_palm": "“Musiikin vapaus käsissäsi”", - "get_started": "Aloitetaan", - "youtube_source_description": "Suositeltu ja toimii parhaiten.", - "piped_source_description": "Tuntuuko vapaalta? Sama kuin YouTube mutta paljon vapautta", - "jiosaavn_source_description": "Paras Etelä-Aasian alueelle.", - "highest_quality": "Korkein laatu: {quality}", - "select_audio_source": "Valitse äänilähde", - "endless_playback_description": "Lisää automaattisesti uusia lauluja\njonon perään", - "choose_your_region": "Valitse alueesi", - "choose_your_region_description": "Tämä auttaa Spotube näyttämään sinulle oikeaa sisältöä\nsijaintiasi varten.", - "choose_your_language": "Valitse kielesi", - "help_project_grow": "Auta tätä projektia kasvamaan", - "help_project_grow_description": "Spotube projekti minkä lähdekoodi on julkisesti saatavilla. Voit autta tätä projektia kasvamaan muutoksilla, ilmoittamalla bugeista, tai ehdottamalla uusia ominaisuuksia.", - "contribute_on_github": "Auta GitHub:ssa", - "donate_on_open_collective": "Lahjoita avoimessa kollektiivissa", - "browse_anonymously": "Selaa anonyyminä", - "enable_connect": "Ota käyttöön yhdistäminen", - "enable_connect_description": "Ohjaa Spotubea toiselta laitteelta", - "devices": "Laitteet", - "select": "Valitse", - "connect_client_alert": "{client} ohjaa sinua", - "this_device": "Tämä laite", - "remote": "Etä", - "local_library": "Paikallinen kirjasto", - "add_library_location": "Lisää kirjastoon", - "remove_library_location": "Poista kirjastosta", - "local_tab": "Paikallinen", - "stats": "Tilastot", - "and_n_more": "ja {count} lisää", - "recently_played": "Äskettäin soitetut", - "browse_more": "Selaa lisää", - "no_title": "Ei otsikkoa", - "not_playing": "Ei soi", - "epic_failure": "Epäonnistuminen!", - "added_num_tracks_to_queue": "Lisätty {tracks_length} kappaletta jonoon", - "spotube_has_an_update": "Spotubella on päivitys", - "download_now": "Lataa nyt", - "nightly_version": "Spotube Nightly {nightlyBuildNum} on julkaistu", - "release_version": "Spotube v{version} on julkaistu", - "read_the_latest": "Lue viimeisimmät", - "release_notes": "julkaisumuistiinpanot", - "pick_color_scheme": "Valitse värimaailma", - "save": "Tallenna", - "choose_the_device": "Valitse laite:", - "multiple_device_connected": "Useita laitteita on kytketty.\nValitse laite, jossa haluat toiminnon suorittaa", - "nothing_found": "Ei tuloksia", - "the_box_is_empty": "Laatikko on tyhjä", - "top_artists": "Suosituimmat artistit", - "top_albums": "Suosituimmat albumit", - "this_week": "Tällä viikolla", - "this_month": "Tässä kuussa", - "last_6_months": "Viimeiset 6 kuukautta", - "this_year": "Tänä vuonna", - "last_2_years": "Viimeiset 2 vuotta", - "all_time": "Kaikki ajat", - "powered_by_provider": "Tuottanut {providerName}", - "email": "Sähköposti", - "profile_followers": "Seuraajat", - "birthday": "Syntymäpäivä", - "subscription": "Tilaus", - "not_born": "Ei syntynyt", - "hacker": "Hakkeri", - "profile": "Profiili", - "no_name": "Ei nimeä", - "edit": "Muokkaa", - "user_profile": "Käyttäjäprofiili", - "count_plays": "{count} toistoa", - "streaming_fees_hypothetical": "Suoratoiston maksut (hypoteettinen)", - "minutes_listened": "Kuunneltuja minuutteja", - "streamed_songs": "Suoratoistettuja kappaleita", - "count_streams": "{count} suoratoistoa", - "owned_by_you": "Sinun omistama", - "copied_shareurl_to_clipboard": "{shareUrl} kopioitu leikepöydälle", - "spotify_hipotetical_calculation": "*Tämä on laskettu Spotifyn suoratoiston\nmaksun perusteella, joka on 0,003–0,005 dollaria.\nTämä on hypoteettinen laskelma, joka antaa käyttäjälle käsityksen\nsiitä, kuinka paljon he olisivat maksaneet artisteille,\njollei heidän kappaleensa olisi kuunneltu Spotifyssa.", - "count_mins": "{minutes} min", - "summary_minutes": "minuuttia", - "summary_listened_to_music": "Kuunneltu musiikkia", - "summary_songs": "kappaletta", - "summary_streamed_overall": "Suoratoistettu yhteensä", - "summary_owed_to_artists": "Maksettava artisteille\nTässä kuussa", - "summary_artists": "artisti", - "summary_music_reached_you": "Musiikki saavutti sinut", - "summary_full_albums": "täydet albumit", - "summary_got_your_love": "Sai rakkautesi", - "summary_playlists": "soittolistat", - "summary_were_on_repeat": "Olivat toistossa", - "total_money": "Yhteensä {money}", - "webview_not_found": "Webview ei löydy", - "webview_not_found_description": "Laitteellasi ei ole asennettua Webview-ajonaikaa.\nJos se on asennettu, varmista, että se on environment PATH:ssa\n\nAsennuksen jälkeen käynnistä sovellus uudelleen", - "unsupported_platform": "Ei tuettu alusta", - "invidious_instance": "Invidious-palvelinesiintymä", - "invidious_description": "Invidious-palvelinesiintymä raitojen yhteensovittamiseen", - "invidious_warning": "Jotkin esiintymät eivät välttämättä toimi hyvin. Käytä omalla vastuullasi", - "invidious_source_description": "Samankaltainen kuin Piped, mutta korkeammalla saatavuudella", - "cache_music": "Musiikki välimuistissa", - "open": "Avaa", - "cache_folder": "Välimuistikansio", - "export": "Vie", - "clear_cache": "Tyhjennä välimuisti", - "clear_cache_confirmation": "Haluatko tyhjentää välimuistin?", - "export_cache_files": "Vie välimuistitiedostot", - "found_n_files": "Löydettiin {count} tiedostoa", - "export_cache_confirmation": "Haluatko viedä nämä tiedostot", - "exported_n_out_of_m_files": "Vietiin {filesExported}/{files} tiedostoa", - "playlist": "Soittolista", - "no_loop": "Ei silmukkaa", - "generate": "Luo", - "undo": "Peruuta", - "download_all": "Lataa kaikki", - "add_all_to_playlist": "Lisää kaikki soittolistalle", - "add_all_to_queue": "Lisää kaikki jonoon", - "play_all_next": "Toista kaikki seuraavaksi", - "pause": "Pysäytä", - "view_all": "Näytä kaikki", - "no_tracks_added_yet": "Näyttää siltä, että et ole lisännyt vielä mitään kappaleita.", - "no_tracks": "Näyttää siltä, että täällä ei ole kappaleita.", - "no_tracks_listened_yet": "Näyttää siltä, että et ole kuunnellut mitään vielä.", - "not_following_artists": "Et seuraa yhtään artistia.", - "no_favorite_albums_yet": "Näyttää siltä, että et ole lisännyt yhtään albumia suosikkeihisi.", - "no_logs_found": "Ei lokitietoja löydetty", - "youtube_engine": "YouTube-moottori", - "youtube_engine_not_installed_title": "{engine} ei ole asennettu", - "youtube_engine_not_installed_message": "{engine} ei ole asennettu järjestelmääsi.", - "youtube_engine_set_path": "Varmista, että se on saatavilla PATH-muuttujassa tai\nasetetaan {engine} suoritettavan tiedoston absoluuttinen polku alla.", - "youtube_engine_unix_issue_message": "macOS/Linux/unix-tyyppisissä käyttöjärjestelmissä polun asettaminen .zshrc/.bashrc/.bash_profile jne. ei toimi.\nSinun täytyy asettaa polku shellin asetustiedostoon.", - "download": "Lataa", - "file_not_found": "Tiedostoa ei löydy", - "custom": "Mukautettu", - "add_custom_url": "Lisää mukautettu URL", - "edit_port": "Muokkaa porttia", - "port_helper_msg": "Oletusarvo on -1, mikä tarkoittaa satunnaista numeroa. Jos sinulla on palomuuri määritetty, tämän asettamista suositellaan.", - "connect_request": "Salli {client} yhdistää?", - "connection_request_denied": "Yhteys evätty. Käyttäjä eväsi pääsyn.", - "hipotetical_calculation": "*Tämä on laskettu keskimääräisen musiikin suoratoistopalvelun 0,003–0,005 dollarin kappalekohtaisen maksun perusteella. Tämä on hypoteettinen laskelma, joka antaa käyttäjälle käsityksen siitä, kuinka paljon he olisivat maksaneet artisteille, jos he kuuntelisivat heidän kappaleitaan eri musiikin suoratoistopalveluissa.", - "an_error_occurred": "Tapahtui virhe", - "copy_to_clipboard": "Kopioi leikepöydälle", - "view_logs": "Näytä lokit", - "retry": "Yritä uudelleen", - "no_default_metadata_provider_selected": "Et ole asettanut oletusmetatietojen tarjoajaa", - "manage_metadata_providers": "Hallinnoi metatietojen tarjoajia", - "open_link_in_browser": "Avaa linkki selaimessa?", - "do_you_want_to_open_the_following_link": "Haluatko avata seuraavan linkin", - "unsafe_url_warning": "Linkkien avaaminen epäluotettavista lähteistä voi olla vaarallista. Ole varovainen!\nVoit myös kopioida linkin leikepöydälle.", - "copy_link": "Kopioi linkki", - "building_your_timeline": "Rakennetaan aikajanaasi kuuntelujesi perusteella...", - "official": "Virallinen", - "author_name": "Tekijä: {author}", - "third_party": "Kolmannen osapuolen", - "plugin_requires_authentication": "Lisäosa vaatii todentamisen", - "update_available": "Päivitys saatavilla", - "supports_scrobbling": "Tukee scrobblingia", - "plugin_scrobbling_info": "Tämä lisäosa scrobblaa musiikkisi luodakseen kuunteluhistoriasi.", - "default_plugin": "Oletus", - "set_default": "Aseta oletukseksi", - "support": "Tuki", - "support_plugin_development": "Tue lisäosan kehitystä", - "can_access_name_api": "- Voi käyttää **{name}** APIa", - "do_you_want_to_install_this_plugin": "Haluatko asentaa tämän lisäosan?", - "third_party_plugin_warning": "Tämä lisäosa on kolmannen osapuolen arkistosta. Varmista, että luotat lähteeseen ennen asennusta.", - "author": "Tekijä", - "this_plugin_can_do_following": "Tämä lisäosa voi tehdä seuraavaa", - "install": "Asenna", - "install_a_metadata_provider": "Asenna metatietojen tarjoaja", - "no_tracks_playing": "Ei kappaletta toistossa tällä hetkellä", - "synced_lyrics_not_available": "Synkronoidut sanoitukset eivät ole saatavilla tälle kappaleelle. Käytä sen sijaan", - "plain_lyrics": "Pelkät sanoitukset", - "tab_instead": "välilehteä.", - "disclaimer": "Vastuuvapauslauseke", - "third_party_plugin_dmca_notice": "Spotube-tiimi ei ota mitään vastuuta (mukaan lukien oikeudellinen) mistään \"kolmannen osapuolen\" lisäosista.\nKäytä niitä omalla vastuullasi. Ilmoita kaikista virheistä/ongelmista lisäosan arkistoon.\n\nJos jokin \"kolmannen osapuolen\" lisäosa rikkoo jonkin palvelun/oikeushenkilön käyttöehtoja/DMCA:ta, pyydä \"kolmannen osapuolen\" lisäosan tekijää tai isännöintialustaa, esim. GitHubia/Codebergiä, ryhtymään toimiin. Yllä luetellut (\"kolmannen osapuolen\" merkityt) ovat kaikki julkisia/yhteisön ylläpitämiä lisäosia. Emme kuratoi niitä, joten emme voi ryhtyä niihin toimiin.\n\n", - "input_does_not_match_format": "Syöte ei vastaa vaadittua muotoa", - "metadata_provider_plugins": "Metatietojen tarjoajan lisäosat", - "paste_plugin_download_url": "Liitä lataus-URL-osoite tai GitHub/Codeberg-arkiston URL-osoite tai suora linkki .smplug-tiedostoon", - "download_and_install_plugin_from_url": "Lataa ja asenna lisäosa URL-osoitteesta", - "failed_to_add_plugin_error": "Lisäosan lisääminen epäonnistui: {error}", - "upload_plugin_from_file": "Lataa lisäosa tiedostosta", - "installed": "Asennettu", - "available_plugins": "Saatavilla olevat lisäosat", - "configure_your_own_metadata_plugin": "Määritä oma soittolistan/albumin/artistin/syötteen metatietojen tarjoaja", - "audio_scrobblers": "Äänen scrobblerit", - "scrobbling": "Scrobbling", - "download_music_format": "Musiikin latausmuoto", - "streaming_music_format": "Musiikin suoratoistomuoto", - "download_music_quality": "Musiikin latauslaatu", - "streaming_music_quality": "Musiikin suoratoistolaadun", - "default_metadata_source": "Oletusarvoinen metatietolähde", - "set_default_metadata_source": "Aseta oletusmetatietolähde", - "default_audio_source": "Oletusarvoinen äänilähde", - "set_default_audio_source": "Aseta oletusäänilähde", - "plugins": "Laajennukset", - "configure_plugins": "Määritä omat metatietojen tarjoaja- ja äänilähdelaajennukset", - "source": "Lähde: ", - "uncompressed": "Pakkaamaton", - "dab_music_source_description": "Audiofiileille. Tarjoaa korkealaatuisia/häviöttömiä äänivirtoja. Tarkka ISRC-pohjainen kappaleiden tunnistus." -} \ No newline at end of file diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb deleted file mode 100644 index e73c2eb2..00000000 --- a/lib/l10n/app_fr.arb +++ /dev/null @@ -1,495 +0,0 @@ -{ - "guest": "Invité", - "browse": "Explorer", - "search": "Rechercher", - "library": "Bibliothèque", - "lyrics": "Paroles", - "settings": "Paramètres", - "genre_categories_filter": "Filtrer les catégories ou les genres...", - "genre": "Genre", - "personalized": "Personnalisé", - "featured": "En vedette", - "new_releases": "Nouvelles sorties", - "songs": "Chansons", - "playing_track": "Lecture de {track}", - "queue_clear_alert": "Cela effacera la file d'attente actuelle. {track_length} pistes seront supprimées\nVoulez-vous continuer?", - "load_more": "Charger plus", - "playlists": "Listes de lecture", - "artists": "Artistes", - "albums": "Albums", - "tracks": "Pistes", - "downloads": "Téléchargements", - "filter_playlists": "Filtrer vos listes de lecture...", - "liked_tracks": "Pistes aimées", - "liked_tracks_description": "Toutes vos pistes aimées", - "create_playlist": "Créer une liste de lecture", - "create_a_playlist": "Créer une liste de lecture", - "create": "Créer", - "cancel": "Annuler", - "playlist_name": "Nom de la liste de lecture", - "name_of_playlist": "Nom de la liste de lecture", - "description": "Description", - "public": "Public", - "collaborative": "Collaborative", - "search_local_tracks": "Rechercher des pistes locales...", - "play": "Lecture", - "delete": "Supprimer", - "none": "Aucun", - "sort_a_z": "Trier par ordre alphabétique", - "sort_z_a": "Trier par ordre alphabétique inverse", - "sort_artist": "Trier par artiste", - "sort_album": "Trier par album", - "sort_tracks": "Trier les pistes", - "currently_downloading": "Téléchargement en cours ({tracks_length})", - "cancel_all": "Tout annuler", - "filter_artist": "Filtrer les artistes...", - "followers": "{followers} abonnés", - "add_artist_to_blacklist": "Ajouter l'artiste à la liste noire", - "top_tracks": "Meilleures pistes", - "fans_also_like": "Les fans aiment aussi", - "loading": "Chargement...", - "artist": "Artiste", - "blacklisted": "Liste noire", - "following": "Abonné", - "follow": "S'abonner", - "artist_url_copied": "URL de l'artiste copiée dans le presse-papiers", - "added_to_queue": "{tracks} pistes ajoutées à la file d'attente", - "filter_albums": "Filtrer les albums...", - "synced": "Synchronisé", - "plain": "Simple", - "shuffle": "Lecture aléatoire", - "search_tracks": "Rechercher des pistes...", - "released": "Sorti", - "error": "Erreur {error}", - "title": "Titre", - "time": "Durée", - "more_actions": "Plus d'actions", - "download_count": "Téléchargement ({count})", - "add_count_to_playlist": "Ajouter ({count}) à la liste de lecture", - "add_count_to_queue": "Ajouter ({count}) à la file d'attente", - "play_count_next": "Lire ({count}) ensuite", - "album": "Album", - "copied_to_clipboard": "{data} copié dans le presse-papiers", - "add_to_following_playlists": "Ajouter {track} aux listes de lecture suivantes", - "add": "Ajouter", - "added_track_to_queue": "{track} ajouté à la file d'attente", - "add_to_queue": "Ajouter à la file d'attente", - "track_will_play_next": "{track} sera joué ensuite", - "play_next": "Lire ensuite", - "removed_track_from_queue": "{track} retiré de la file d'attente", - "remove_from_queue": "Retirer de la file d'attente", - "remove_from_favorites": "Retirer des favoris", - "save_as_favorite": "Enregistrer comme favori", - "add_to_playlist": "Ajouter à la liste de lecture", - "remove_from_playlist": "Retirer de la liste de lecture", - "add_to_blacklist": "Ajouter à la liste noire", - "remove_from_blacklist": "Retirer de la liste noire", - "share": "Partager", - "mini_player": "Lecteur mini", - "slide_to_seek": "Faites glisser pour avancer ou reculer", - "shuffle_playlist": "Lecture aléatoire de la liste de lecture", - "unshuffle_playlist": "Annuler la lecture aléatoire de la liste de lecture", - "previous_track": "Piste précédente", - "next_track": "Piste suivante", - "pause_playback": "Mettre en pause la lecture", - "resume_playback": "Reprendre la lecture", - "loop_track": "Lecture en boucle de la piste", - "repeat_playlist": "Répéter la liste de lecture", - "queue": "File d'attente", - "alternative_track_sources": "Sources alternatives de pistes", - "download_track": "Télécharger la piste", - "tracks_in_queue": "{tracks} pistes dans la file d'attente", - "clear_all": "Tout effacer", - "show_hide_ui_on_hover": "Afficher/Masquer l'interface utilisateur au survol", - "always_on_top": "Toujours au-dessus", - "exit_mini_player": "Quitter le lecteur mini", - "download_location": "Emplacement de téléchargement", - "account": "Compte", - "login_with_spotify": "Se connecter avec votre compte Spotify", - "connect_with_spotify": "Se connecter avec Spotify", - "logout": "Se déconnecter", - "logout_of_this_account": "Se déconnecter de ce compte", - "language_region": "Langue et région", - "language": "Langue", - "system_default": "Paramètres par défaut du système", - "market_place_region": "Région du marché", - "recommendation_country": "Pays de recommandation", - "appearance": "Apparence", - "layout_mode": "Mode de mise en page", - "override_layout_settings": "Remplacer les paramètres de mise en page adaptative", - "adaptive": "Adaptatif", - "compact": "Compact", - "extended": "Étendu", - "theme": "Thème", - "dark": "Sombre", - "light": "Clair", - "system": "Système", - "accent_color": "Couleur d'accentuation", - "sync_album_color": "Synchroniser la couleur de l'album", - "sync_album_color_description": "Utilise la couleur dominante de l'art de l'album comme couleur d'accentuation", - "playback": "Lecture", - "audio_quality": "Qualité audio", - "high": "Haute", - "low": "Basse", - "pre_download_play": "Pré-télécharger et lire", - "pre_download_play_description": "Au lieu de diffuser de l'audio, téléchargez les octets et lisez-les à la place (recommandé pour les utilisateurs à bande passante élevée)", - "skip_non_music": "Ignorer les segments non musicaux (SponsorBlock)", - "blacklist_description": "Pistes et artistes en liste noire", - "wait_for_download_to_finish": "Veuillez attendre la fin du téléchargement en cours", - "desktop": "Bureau", - "close_behavior": "Comportement de fermeture", - "close": "Fermer", - "minimize_to_tray": "Réduire dans la zone de notification", - "show_tray_icon": "Afficher l'icône de la zone de notification", - "about": "À propos", - "u_love_spotube": "Nous savons que vous aimez Spotube", - "check_for_updates": "Vérifier les mises à jour", - "about_spotube": "À propos de Spotube", - "blacklist": "Liste noire", - "please_sponsor": "S'il vous plaît Sponsoriser/Donner", - "spotube_description": "Spotube, un client Spotify léger, multiplateforme et gratuit pour tous", - "version": "Version", - "build_number": "Numéro de version", - "founder": "Fondateur", - "repository": "Dépôt", - "bug_issues": "Bugs + Problèmes", - "made_with": "Fabriqué avec ❤️ au Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licence", - "add_spotify_credentials": "Ajoutez vos identifiants Spotify pour commencer", - "credentials_will_not_be_shared_disclaimer": "Ne vous inquiétez pas, vos identifiants ne seront ni collectés ni partagés avec qui que ce soit", - "know_how_to_login": "Vous ne savez pas comment faire?", - "follow_step_by_step_guide": "Suivez le guide étape par étape", - "spotify_cookie": "Cookie Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Veuillez remplir tous les champs", - "submit": "Soumettre", - "exit": "Quitter", - "previous": "Précédent", - "next": "Suivant", - "done": "Terminé", - "step_1": "Étape 1", - "first_go_to": "Tout d'abord, allez sur", - "login_if_not_logged_in": "et connectez-vous/inscrivez-vous si vous n'êtes pas connecté", - "step_2": "Étape 2", - "step_2_steps": "1. Une fois connecté, appuyez sur F12 ou clic droit de la souris > Inspecter pour ouvrir les outils de développement du navigateur.\n2. Ensuite, allez dans l'onglet \"Application\" (Chrome, Edge, Brave, etc.) ou l'onglet \"Stockage\" (Firefox, Palemoon, etc.)\n3. Allez dans la section \"Cookies\", puis dans la sous-section \"https://accounts.spotify.com\"", - "step_3": "Étape 3", - "success_emoji": "Succès🥳", - "success_message": "Vous êtes maintenant connecté avec succès à votre compte Spotify. Bon travail, mon ami!", - "step_4": "Étape 4", - "something_went_wrong": "Quelque chose s'est mal passé", - "piped_instance": "Instance pipée", - "piped_description": "L'instance de serveur Piped à utiliser pour la correspondance des pistes", - "piped_warning": "Certaines d'entre elles peuvent ne pas fonctionner correctement. Alors utilisez à vos risques et périls", - "generate_playlist": "Générer une playlist", - "track_exists": "La piste {track} existe déjà", - "replace_downloaded_tracks": "Remplacer toutes les pistes téléchargées", - "skip_download_tracks": "Ignorer le téléchargement de toutes les pistes téléchargées", - "do_you_want_to_replace": "Voulez-vous remplacer la piste existante ?", - "replace": "Remplacer", - "skip": "Passer", - "select_up_to_count_type": "Sélectionnez jusqu'à {count} {type}", - "select_genres": "Sélectionner les genres", - "add_genres": "Ajouter des genres", - "country": "Pays", - "number_of_tracks_generate": "Nombre de pistes à générer", - "acousticness": "Acoustique", - "danceability": "Dansabilité", - "energy": "Énergie", - "instrumentalness": "Instrumentalité", - "liveness": "Interprétation en direct", - "loudness": "Sonorité", - "speechiness": "Parlé", - "valence": "Valeur émotionnelle", - "popularity": "Popularité", - "key": "Clé", - "duration": "Durée (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "Signature rythmique", - "short": "Court", - "medium": "Moyen", - "long": "Long", - "min": "Min", - "max": "Max", - "target": "Cible", - "moderate": "Modéré", - "deselect_all": "Tout désélectionner", - "select_all": "Tout sélectionner", - "are_you_sure": "Êtes-vous sûr(e) ?", - "generating_playlist": "Génération de votre playlist personnalisée en cours...", - "selected_count_tracks": "{count} pistes sélectionnées", - "download_warning": "Si vous téléchargez toutes les pistes en vrac, vous violez clairement les droits d'auteur de la musique et vous causez des dommages à la société créative de la musique. J'espère que vous en êtes conscient. Essayez toujours de respecter et de soutenir le travail acharné des artistes.", - "download_ip_ban_warning": "Au fait, votre adresse IP peut être bloquée sur YouTube en raison d'une demande excessive de téléchargements par rapport à la normale. Le blocage de l'IP signifie que vous ne pourrez pas utiliser YouTube (même si vous êtes connecté) pendant au moins 2 à 3 mois à partir de cet appareil IP. Et Spotube ne peut être tenu responsable si cela se produit.", - "by_clicking_accept_terms": "En cliquant sur 'accepter', vous acceptez les conditions suivantes :", - "download_agreement_1": "Je sais que je pirate de la musique. Je suis méchant(e).", - "download_agreement_2": "Je soutiendrai l'artiste autant que possible et je ne fais cela que parce que je n'ai pas d'argent pour acheter leur art.", - "download_agreement_3": "Je suis parfaitement conscient(e) que mon adresse IP peut être bloquée sur YouTube et je ne tiens pas Spotube ni ses propriétaires/contributeurs responsables de tout accident causé par mon action actuelle.", - "decline": "Refuser", - "accept": "Accepter", - "details": "Détails", - "youtube": "YouTube", - "channel": "Chaîne", - "likes": "J'aime", - "dislikes": "Je n'aime pas", - "views": "Vues", - "streamUrl": "URL de diffusion", - "stop": "Arrêter", - "sort_newest": "Trier par les plus récents", - "sort_oldest": "Trier par les plus anciens", - "sleep_timer": "Minuteur de veille", - "mins": "{minutes} minutes", - "hours": "{hours} heures", - "hour": "{hours} heure", - "custom_hours": "Heures personnalisées", - "logs": "Journaux", - "developers": "Développeurs", - "not_logged_in": "Vous n'êtes pas connecté(e)", - "search_mode": "Mode de recherche", - "audio_source": "Source audio", - "ok": "OK", - "failed_to_encrypt": "Échec de la cryptage", - "encryption_failed_warning": "Spotube utilise le cryptage pour stocker vos données en toute sécurité. Mais cela a échoué. Il basculera donc vers un stockage non sécurisé\nSi vous utilisez Linux, assurez-vous d'avoir installé des services secrets tels que gnome-keyring, kde-wallet et keepassxc", - "querying_info": "Interrogation des info...", - "piped_api_down": "L'API Piped est hors service", - "piped_down_error_instructions": "L'instance Piped {pipedInstance} est actuellement indisponible\n\nChangez soit l'instance, soit le 'Type d'API' pour utiliser l'API officielle de YouTube\n\nN'oubliez pas de redémarrer l'application après la modification", - "you_are_offline": "Vous êtes actuellement hors ligne", - "connection_restored": "Votre connexion internet a été rétablie", - "use_system_title_bar": "Utiliser la barre de titre système", - "update_playlist": "Mettre à jour la playlist", - "update": "Mettre à jour", - "crunching_results": "Traitement des résultats...", - "search_to_get_results": "Recherche pour obtenir des résultats", - "use_amoled_mode": "Utiliser le mode AMOLED", - "pitch_dark_theme": "Thème Dart noir intense", - "normalize_audio": "Normaliser l'audio", - "change_cover": "Changer de couverture", - "add_cover": "Ajouter une couverture", - "restore_defaults": "Restaurer les valeurs par défaut", - "download_music_codec": "Télécharger le codec musical", - "streaming_music_codec": "Codec de musique en streaming", - "login_with_lastfm": "Se connecter avec Last.fm", - "connect": "Connecter", - "disconnect_lastfm": "Déconnecter de Last.fm", - "disconnect": "Déconnecter", - "username": "Nom d'utilisateur", - "password": "Mot de passe", - "login": "Se connecter", - "login_with_your_lastfm": "Se connecter avec votre compte Last.fm", - "scrobble_to_lastfm": "Scrobble à Last.fm", - "go_to_album": "Aller à l'album", - "discord_rich_presence": "Présence riche de Discord", - "browse_all": "Parcourir tout", - "genres": "Genres", - "explore_genres": "Explorer les genres", - "step_3_steps": "Copiez la valeur du cookie \"sp_dc\"", - "step_4_steps": "Collez la valeur copiée de \"sp_dc\"", - "friends": "Amis", - "no_lyrics_available": "Désolé, impossible de trouver les paroles de cette piste", - "sort_duration": "Trier par durée", - "start_a_radio": "Démarrer une radio", - "how_to_start_radio": "Comment voulez-vous démarrer la radio ?", - "replace_queue_question": "Voulez-vous remplacer la file d'attente actuelle ou y ajouter ?", - "endless_playback": "Lecture sans fin", - "delete_playlist": "Supprimer la playlist", - "delete_playlist_confirmation": "Êtes-vous sûr de vouloir supprimer cette playlist ?", - "local_tracks": "Titres locaux", - "song_link": "Lien de la chanson", - "skip_this_nonsense": "Passer cette absurdité", - "freedom_of_music": "“Liberté de la musique”", - "freedom_of_music_palm": "“Liberté de la musique dans la paume de votre main”", - "get_started": "Commençons", - "youtube_source_description": "Recommandé et fonctionne mieux.", - "piped_source_description": "Vous vous sentez libre ? Comme YouTube mais beaucoup plus gratuit.", - "jiosaavn_source_description": "Le meilleur pour la région d'Asie du Sud.", - "highest_quality": "Meilleure qualité : {quality}", - "select_audio_source": "Sélectionner la source audio", - "endless_playback_description": "Ajouter automatiquement de nouvelles chansons à la fin de la file d'attente", - "choose_your_region": "Choisissez votre région", - "choose_your_region_description": "Cela aidera Spotube à vous montrer le bon contenu pour votre emplacement.", - "choose_your_language": "Choisissez votre langue", - "help_project_grow": "Aidez ce projet à grandir", - "help_project_grow_description": "Spotube est un projet open-source. Vous pouvez aider ce projet à grandir en contribuant au projet, en signalant des bugs ou en suggérant de nouvelles fonctionnalités.", - "contribute_on_github": "Contribuer sur GitHub", - "donate_on_open_collective": "Faire un don sur Open Collective", - "browse_anonymously": "Naviguer anonymement", - "enable_connect": "Activer la connexion", - "enable_connect_description": "Contrôlez Spotube depuis d'autres appareils", - "devices": "Appareils", - "select": "Sélectionner", - "connect_client_alert": "Vous êtes contrôlé par {client}", - "this_device": "Cet appareil", - "remote": "À distance", - "local_library": "Bibliothèque locale", - "add_library_location": "Ajouter à la bibliothèque", - "remove_library_location": "Retirer de la bibliothèque", - "local_tab": "Local", - "stats": "Statistiques", - "and_n_more": "et {count} de plus", - "recently_played": "Récemment joué", - "browse_more": "Parcourir plus", - "no_title": "Sans titre", - "not_playing": "Non joué", - "epic_failure": "Échec épique!", - "added_num_tracks_to_queue": "{tracks_length} morceaux ajoutés à la file d'attente", - "spotube_has_an_update": "Spotube a une mise à jour", - "download_now": "Télécharger maintenant", - "nightly_version": "Spotube Nightly {nightlyBuildNum} a été publié", - "release_version": "Spotube v{version} a été publié", - "read_the_latest": "Lisez les dernières ", - "release_notes": "notes de version", - "pick_color_scheme": "Choisissez le schéma de couleurs", - "save": "Sauvegarder", - "choose_the_device": "Choisissez l'appareil:", - "multiple_device_connected": "Plusieurs appareils sont connectés.\nChoisissez l'appareil sur lequel vous souhaitez effectuer cette action", - "nothing_found": "Rien trouvé", - "the_box_is_empty": "La boîte est vide", - "top_artists": "Meilleurs artistes", - "top_albums": "Meilleurs albums", - "this_week": "Cette semaine", - "this_month": "Ce mois-ci", - "last_6_months": "Les 6 derniers mois", - "this_year": "Cette année", - "last_2_years": "Les 2 dernières années", - "all_time": "De tous les temps", - "powered_by_provider": "Propulsé par {providerName}", - "email": "Email", - "profile_followers": "Abonnés", - "birthday": "Anniversaire", - "subscription": "Abonnement", - "not_born": "Non né", - "hacker": "Hacker", - "profile": "Profil", - "no_name": "Sans nom", - "edit": "Modifier", - "user_profile": "Profil utilisateur", - "count_plays": "{count} lectures", - "streaming_fees_hypothetical": "Frais de streaming (hypothétiques)", - "minutes_listened": "Minutes écoutées", - "streamed_songs": "Morceaux diffusés", - "count_streams": "{count} streams", - "owned_by_you": "Possédé par vous", - "copied_shareurl_to_clipboard": "{shareUrl} copié dans le presse-papier", - "spotify_hipotetical_calculation": "*Cela est calculé en fonction du\npaiement par stream de Spotify de 0,003 $ à 0,005 $.\nIl s'agit d'un calcul hypothétique pour donner\nune idée de combien vous auriez\npayé aux artistes si vous aviez\nécouté leur chanson sur Spotify.", - "count_mins": "{minutes} minutes", - "summary_minutes": "minutes", - "summary_listened_to_music": "A écouté de la musique", - "summary_songs": "morceaux", - "summary_streamed_overall": "Diffusé en général", - "summary_owed_to_artists": "Dû aux artistes\nCe mois-ci", - "summary_artists": "artistes", - "summary_music_reached_you": "La musique vous a atteint", - "summary_full_albums": "albums complets", - "summary_got_your_love": "A obtenu votre amour", - "summary_playlists": "playlists", - "summary_were_on_repeat": "Était en répétition", - "total_money": "Total {money}", - "webview_not_found": "Webview non trouvé", - "webview_not_found_description": "Aucun environnement d'exécution Webview installé sur votre appareil.\nSi c'est installé, assurez-vous qu'il soit dans le environment PATH\n\nAprès l'installation, redémarrez l'application", - "unsupported_platform": "Plateforme non prise en charge", - "invidious_instance": "Instance de serveur Invidious", - "invidious_description": "L'instance de serveur Invidious à utiliser pour la correspondance de pistes", - "invidious_warning": "Certaines instances pourraient ne pas bien fonctionner. À utiliser à vos risques et périls", - "invidious_source_description": "Similaire à Piped mais avec une meilleure disponibilité", - "cache_music": "Mettre la musique en cache", - "open": "Ouvrir", - "cache_folder": "Dossier du cache", - "export": "Exporter", - "clear_cache": "Effacer le cache", - "clear_cache_confirmation": "Voulez-vous effacer le cache ?", - "export_cache_files": "Exporter les fichiers en cache", - "found_n_files": "{count} fichiers trouvés", - "export_cache_confirmation": "Voulez-vous exporter ces fichiers vers", - "exported_n_out_of_m_files": "{filesExported} fichiers exportés sur {files}", - "playlist": "Playlist", - "no_loop": "Pas de boucle", - "generate": "Générer", - "undo": "Annuler", - "download_all": "Télécharger tout", - "add_all_to_playlist": "Ajouter tout à la playlist", - "add_all_to_queue": "Ajouter tout à la file d'attente", - "play_all_next": "Lire tout suivant", - "pause": "Pause", - "view_all": "Voir tout", - "no_tracks_added_yet": "Il semble que vous n'avez encore ajouté aucun morceau.", - "no_tracks": "Il semble qu'il n'y ait pas de morceaux ici.", - "no_tracks_listened_yet": "Il semble que vous n'avez encore rien écouté.", - "not_following_artists": "Vous ne suivez aucun artiste.", - "no_favorite_albums_yet": "Il semble que vous n'ayez encore ajouté aucun album à vos favoris.", - "no_logs_found": "Aucun log trouvé", - "youtube_engine": "Moteur YouTube", - "youtube_engine_not_installed_title": "{engine} n'est pas installé", - "youtube_engine_not_installed_message": "{engine} n'est pas installé sur votre système.", - "youtube_engine_set_path": "Assurez-vous qu'il est disponible dans la variable PATH ou\nfixez le chemin absolu du fichier exécutable {engine} ci-dessous.", - "youtube_engine_unix_issue_message": "Dans macOS/Linux/les systèmes d'exploitation similaires à Unix, définir le chemin dans .zshrc/.bashrc/.bash_profile etc. ne fonctionnera pas.\nVous devez définir le chemin dans le fichier de configuration du shell.", - "download": "Télécharger", - "file_not_found": "Fichier non trouvé", - "custom": "Personnalisé", - "add_custom_url": "Ajouter une URL personnalisée", - "edit_port": "Modifier le port", - "port_helper_msg": "La valeur par défaut est -1, ce qui indique un nombre aléatoire. Si vous avez configuré un pare-feu, il est recommandé de le définir.", - "connect_request": "Autoriser {client} à se connecter ?", - "connection_request_denied ": "Connexion refusée. L'utilisateur a refusé l'accès.", - "hipotetical_calculation": "*Ce calcul est basé sur le paiement moyen par lecture des plateformes de streaming musical en ligne, de 0,003 $ à 0,005 $. Il s'agit d'un calcul hypothétique pour donner à l'utilisateur un aperçu de ce qu'il aurait payé aux artistes s'il écoutait leur chanson sur différentes plateformes de streaming musical.", - "connection_request_denied": "Connexion refusée. L'utilisateur a refusé l'accès.", - "an_error_occurred": "Une erreur est survenue", - "copy_to_clipboard": "Copier dans le presse-papiers", - "view_logs": "Afficher les journaux", - "retry": "Réessayer", - "no_default_metadata_provider_selected": "Vous n'avez pas de fournisseur de métadonnées par défaut", - "manage_metadata_providers": "Gérer les fournisseurs de métadonnées", - "open_link_in_browser": "Ouvrir le lien dans le navigateur ?", - "do_you_want_to_open_the_following_link": "Voulez-vous ouvrir le lien suivant", - "unsafe_url_warning": "L'ouverture de liens provenant de sources non fiables peut être dangereuse. Soyez prudent !\nVous pouvez également copier le lien dans votre presse-papiers.", - "copy_link": "Copier le lien", - "building_your_timeline": "Construction de votre chronologie en fonction de vos écoutes...", - "official": "Officiel", - "author_name": "Auteur : {author}", - "third_party": "Tiers", - "plugin_requires_authentication": "Le plugin nécessite une authentification", - "update_available": "Mise à jour disponible", - "supports_scrobbling": "Supporte le scrobbling", - "plugin_scrobbling_info": "Ce plugin scrobble votre musique pour générer votre historique d'écoute.", - "default_plugin": "Par défaut", - "set_default": "Définir par défaut", - "support": "Soutien", - "support_plugin_development": "Soutenir le développement de plugins", - "can_access_name_api": "- Peut accéder à l'API **{name}**", - "do_you_want_to_install_this_plugin": "Voulez-vous installer ce plugin ?", - "third_party_plugin_warning": "Ce plugin provient d'un dépôt tiers. Assurez-vous de faire confiance à la source avant de l'installer.", - "author": "Auteur", - "this_plugin_can_do_following": "Ce plugin peut faire ce qui suit", - "install": "Installer", - "install_a_metadata_provider": "Installer un fournisseur de métadonnées", - "no_tracks_playing": "Aucune piste n'est en cours de lecture actuellement", - "synced_lyrics_not_available": "Les paroles synchronisées ne sont pas disponibles pour cette chanson. Veuillez utiliser l'onglet", - "plain_lyrics": "Paroles simples", - "tab_instead": "à la place.", - "disclaimer": "Avertissement", - "third_party_plugin_dmca_notice": "L'équipe de Spotube n'assume aucune responsabilité (y compris juridique) pour les plugins \"tiers\".\nVeuillez les utiliser à vos propres risques. Pour tout bug/problème, veuillez le signaler au dépôt du plugin.\n\nSi un plugin \"tiers\" enfreint les conditions d'utilisation/DMCA d'un service/entité juridique, veuillez demander à l'auteur du plugin \"tiers\" ou à la plateforme d'hébergement (par exemple GitHub/Codeberg) de prendre des mesures. Les plugins listés ci-dessus (étiquetés \"tiers\") sont tous des plugins publics/maintenus par la communauté. Nous ne les gérons pas, nous ne pouvons donc prendre aucune mesure à leur sujet.\n\n", - "input_does_not_match_format": "L'entrée ne correspond pas au format requis", - "metadata_provider_plugins": "Plugins de fournisseur de métadonnées", - "paste_plugin_download_url": "Collez l'URL de téléchargement ou l'URL du dépôt GitHub/Codeberg ou un lien direct vers le fichier .smplug", - "download_and_install_plugin_from_url": "Télécharger et installer le plugin à partir de l'URL", - "failed_to_add_plugin_error": "Échec de l'ajout du plugin : {error}", - "upload_plugin_from_file": "Télécharger le plugin à partir d'un fichier", - "installed": "Installé", - "available_plugins": "Plugins disponibles", - "configure_your_own_metadata_plugin": "Configurer votre propre fournisseur de métadonnées de playlist/album/artiste/flux", - "audio_scrobblers": "Scrobblers audio", - "scrobbling": "Scrobbling", - "download_music_format": "Format de téléchargement de musique", - "streaming_music_format": "Format de streaming de musique", - "download_music_quality": "Qualité de téléchargement de musique", - "streaming_music_quality": "Qualité de streaming de musique", - "default_metadata_source": "Source de métadonnées par défaut", - "set_default_metadata_source": "Définir la source de métadonnées par défaut", - "default_audio_source": "Source audio par défaut", - "set_default_audio_source": "Définir la source audio par défaut", - "plugins": "Plugins", - "configure_plugins": "Configurez vos propres plugins de fournisseur de métadonnées et de source audio", - "source": "Source : ", - "uncompressed": "Non compressé", - "dab_music_source_description": "Pour les audiophiles. Fournit des flux audio de haute qualité/sans perte. Correspondance précise des pistes basée sur ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_hi.arb b/lib/l10n/app_hi.arb deleted file mode 100644 index 8e8087bb..00000000 --- a/lib/l10n/app_hi.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "अतिथि", - "browse": "ब्राउज़ करें", - "search": "खोजें", - "library": "लाइब्रेरी", - "lyrics": "गीतों के बोल", - "settings": "सेटिंग्स", - "genre_categories_filter": "श्रेणियों या जानरों को फिल्टर करें...", - "genre": "जानर", - "personalized": "व्यक्तिगत", - "featured": "विशेष रुप से प्रदर्शित", - "new_releases": "नई रिलीज़", - "songs": "गाने", - "playing_track": "{track} चल रहा है", - "queue_clear_alert": "यह मौजूदा कतार को साफ़ कर देगा। {track_length} ट्रैक हटा दिए जाएंगे\nक्या आप जारी रखना चाहते हैं?", - "load_more": "और लोड करें", - "playlists": "प्लेलिस्ट", - "artists": "कलाकार", - "albums": "एल्बम", - "tracks": "ट्रैक", - "downloads": "डाउनलोड", - "filter_playlists": "अपनी प्लेलिस्टों को फ़िल्टर करें...", - "liked_tracks": "पसंदीदा ट्रैक", - "liked_tracks_description": "आपके सभी पसंदीदा ट्रैक", - "create_playlist": "प्लेलिस्ट बनाएं", - "create_a_playlist": "एक प्लेलिस्ट बनाएं", - "create": "बनाएं", - "cancel": "रद्द करें", - "playlist_name": "प्लेलिस्ट का नाम", - "name_of_playlist": "प्लेलिस्ट का नाम", - "description": "विवरण", - "public": "सार्वजनिक", - "collaborative": "सहयोगी", - "search_local_tracks": "स्थानीय ट्रैक खोजें...", - "play": "चलाएँ", - "delete": "हटाएँ", - "none": "कोई नहीं", - "sort_a_z": "A-Z सॉर्ट करें", - "sort_z_a": "Z-A सॉर्ट करें", - "sort_artist": "कलाकार के अनुसार सॉर्ट करें", - "sort_album": "एल्बम के अनुसार सॉर्ट करें", - "sort_tracks": "ट्रैक को सॉर्ट करें", - "currently_downloading": "वर्तमान में डाउनलोड हो रहा है ({tracks_length})", - "cancel_all": "सभी को रद्द करें", - "filter_artist": "कलाकारों को फ़िल्टर करें...", - "followers": "{followers} फॉलोअर्स", - "add_artist_to_blacklist": "काल सूची में कलाकार जोड़ें", - "top_tracks": "शीर्ष ट्रैक", - "fans_also_like": "फैंस भी पसंद करते हैं", - "loading": "लोड हो रहा है...", - "artist": "कलाकार", - "blacklisted": "काल सूची में है", - "following": "फॉलो करना", - "follow": "फॉलो करें", - "artist_url_copied": "कलाकार URL क्लिपबोर्ड पर कॉपी हुआ", - "added_to_queue": "{tracks} ट्रैक कतार में जोड़े गए", - "filter_albums": "एल्बमों को फ़िल्टर करें...", - "synced": "सिंक किया गया", - "plain": "सादा", - "shuffle": "शफल", - "search_tracks": "ट्रैक खोजें...", - "released": "जारी हुआ", - "error": "त्रुटि {error}", - "title": "शीर्षक", - "time": "समय", - "more_actions": "अधिक कार्रवाई", - "download_count": "डाउनलोड ({count})", - "add_count_to_playlist": "({count}) को प्लेलिस्ट में जोड़ें", - "add_count_to_queue": "({count}) को कतार में जोड़ें", - "play_count_next": "({count}) अगले में चलाएँ", - "album": "एल्बम", - "copied_to_clipboard": "{data} क्लिपबोर्ड पर कॉपी किया गया", - "add_to_following_playlists": "{track} को निम्नलिखित प्लेलिस्ट में जोड़ें", - "add": "जोड़ें", - "added_track_to_queue": "{track} को कतार में जोड़ दिया गया", - "add_to_queue": "कतार में जोड़ें", - "track_will_play_next": "{track} अगले में चलेगा", - "play_next": "अगले में चलाएँ", - "removed_track_from_queue": "{track} को कतार से हटा दिया गया", - "remove_from_queue": "कतार से हटाएँ", - "remove_from_favorites": "पसंदीदा से हटाएँ", - "save_as_favorite": "पसंदीदा के रूप में सहेजें", - "add_to_playlist": "प्लेलिस्ट में जोड़ें", - "remove_from_playlist": "प्लेलिस्ट से हटाएँ", - "add_to_blacklist": "ब्लैकलिस्ट में जोड़ें", - "remove_from_blacklist": "ब्लैकलिस्ट से हटाएँ", - "share": "साझा करें", - "mini_player": "मिनी प्लेयर", - "slide_to_seek": "आगे या पीछे खोजने के लिए स्लाइड करें", - "shuffle_playlist": "प्लेलिस्ट शफल करें", - "unshuffle_playlist": "अनशफल प्लेलिस्ट", - "previous_track": "पिछला ट्रैक", - "next_track": "अगला ट्रैक", - "pause_playback": "वापसी बंद करें", - "resume_playback": "पुनः चलाना", - "loop_track": "लूप ट्रैक", - "repeat_playlist": "प्लेलिस्ट दोहराएं", - "queue": "कतार", - "alternative_track_sources": "वैकल्पिक ट्रैक स्रोत", - "download_track": "ट्रैक डाउनलोड करें", - "tracks_in_queue": "{tracks} ट्रैक कतार में हैं", - "clear_all": "सभी हटाएं", - "show_hide_ui_on_hover": "होवर पर यूआई दिखाएँ/छिपाएँ", - "always_on_top": "हमेशा ऊपर हो", - "exit_mini_player": "मिनी प्लेयर से बाहर निकलें", - "download_location": "डाउनलोड स्थान", - "account": "खाता", - "login_with_spotify": "अपने Spotify खाते से लॉग इन करें", - "connect_with_spotify": "Spotify से कनेक्ट करें", - "logout": "लॉगआउट", - "logout_of_this_account": "इस खाते से लॉगआउट करें", - "language_region": "भाषा और क्षेत्र", - "language": "भाषा", - "system_default": "सिस्टम डिफ़ॉल्ट", - "market_place_region": "मार्केटप्लेस क्षेत्र", - "recommendation_country": "सिफ़ारिश देने वाला देश", - "appearance": "दिखने में", - "layout_mode": "लेआउट मोड", - "override_layout_settings": "ओवरराइड रेस्पॉन्सिव लेआउट मोड सेटिंग्स", - "adaptive": "अनुकूल", - "compact": "कॉम्पैक्ट", - "extended": "विस्तृत", - "theme": "थीम", - "dark": "डार्क", - "light": "लाइट", - "system": "सिस्टम", - "accent_color": "अक्षरशैली का रंग", - "sync_album_color": "एल्बम का रंग सिंक करें", - "sync_album_color_description": "एल्बम कला का प्रधान रंग एक्सेंट रंग के रूप में उपयोग किया जाता है", - "playback": "प्लेबैक", - "audio_quality": "ऑडियो क्वालिटी", - "high": "उच्च", - "low": "निम्न", - "pre_download_play": "पूर्वावत डाउनलोड और प्ले करें", - "pre_download_play_description": "ऑडियो स्ट्रीमिंग की बजाय बाइट्स डाउनलोड करें और बजाय में प्ले करें (उच्च बैंडविड्थ उपयोगकर्ताओं के लिए सिफारिश किया जाता है)", - "skip_non_music": "गाने के अलावा सेगमेंट्स को छोड़ें (स्पॉन्सरब्लॉक)", - "blacklist_description": "ब्लैकलिस्ट में शामिल ट्रैक और कलाकार", - "wait_for_download_to_finish": "वर्तमान डाउनलोड समाप्त होने तक कृपया प्रतीक्षा करें", - "desktop": "डेस्कटॉप", - "close_behavior": "बंद करने का व्यवहार", - "close": "बंद करें", - "minimize_to_tray": "ट्रे में कम करें", - "show_tray_icon": "सिस्टम ट्रे आइकन दिखाएं", - "about": "के बारे में", - "u_love_spotube": "हम जानते हैं कि आप Spotube से प्यार करते हैं", - "check_for_updates": "अपडेट के लिए जाँच करें", - "about_spotube": "Spotube के बारे में", - "blacklist": "ब्लैकलिस्ट", - "please_sponsor": "कृपया स्पॉन्सर / डोनेट करें", - "spotube_description": "Spotube, एक हल्का, सभी प्लेटफॉर्मों पर चलने वाला, मुफ्त स्पॉटिफाई क्लाइंट", - "version": "संस्करण", - "build_number": "बिल्ड नंबर", - "founder": "संस्थापक", - "repository": "भण्डार", - "bug_issues": "बग+मुद्दे", - "made_with": "बांग्लादेश🇧🇩 में दिल से बनाया गया", - "kingkor_roy_tirtho": "किंगकोर रॉय तिर्थो", - "copyright": "© 2021-{current_year} किंगकोर रॉय तिर्थो", - "license": "लाइसेंस", - "add_spotify_credentials": "शुरू होने के लिए अपने स्पॉटिफाई क्रेडेंशियल जोड़ें", - "credentials_will_not_be_shared_disclaimer": "चिंता न करें, आपके क्रेडेंशियल किसी भी तरह से नहीं एकत्रित या साझा किए जाएंगे", - "know_how_to_login": "इसे कैसे करें पता नहीं?", - "follow_step_by_step_guide": "कदम से कदम गाइड के साथ चलें", - "spotify_cookie": "स्पॉटिफाई {name} कुकी", - "cookie_name_cookie": "{name} कुकी", - "fill_in_all_fields": "कृपया सभी फ़ील्ड भरें", - "submit": "सबमिट", - "exit": "बाहर निकलें", - "previous": "पिछला", - "next": "अगला", - "done": "किया हुआ", - "step_1": "1 चरण", - "first_go_to": "पहले, जाएं", - "login_if_not_logged_in": "और यदि आप लॉगिन नहीं हैं तो लॉगिन / साइनअप करें", - "step_2": "2 चरण", - "step_2_steps": "1. जब आप लॉगिन हो जाएँ, तो F12 दबाएं या माउस राइट क्लिक> निरीक्षण करें ताकि ब्राउज़र डेवटूल्स खुलें।\n2. फिर ब्राउज़र के \"एप्लिकेशन\" टैब (Chrome, Edge, Brave आदि) या \"स्टोरेज\" टैब (Firefox, Palemoon आदि) में जाएं\n3. \"कुकीज़\" अनुभाग में जाएं फिर \"https: //accounts.spotify.com\" उप-अनुभाग में जाएं", - "step_3": "स्टेप 3", - "success_emoji": "सफलता🥳", - "success_message": "अब आप अपने स्पॉटिफाई अकाउंट से सफलतापूर्वक लॉगइन हो गए हैं। अच्छा काम किया!", - "step_4": "स्टेप 4", - "something_went_wrong": "कुछ गलत हो गया", - "piped_instance": "पाइप्ड सर्वर", - "piped_description": "पाइप किए गए सर्वर", - "piped_warning": "गानों का मिलान करने के लिए उपयोग किए जाते हैं, हो सकता है कि उनमें से कुछ के साथ ठीक से काम न करें इसलिए अपने जोखिम पर उपयोग करें", - "generate_playlist": "प्लेलिस्ट बनाएं", - "track_exists": "ट्रैक {track} पहले से मौजूद है", - "replace_downloaded_tracks": "सभी डाउनलोड किए गए ट्रैक्स को बदलें", - "skip_download_tracks": "सभी डाउनलोड किए गए ट्रैक्स को छोड़ें", - "do_you_want_to_replace": "क्या आप मौजूदा ट्रैक को बदलना चाहते हैं?", - "replace": "बदलें", - "skip": "छोड़ें", - "select_up_to_count_type": "{count} {type} तक चुनें", - "select_genres": "जान्र चुनें", - "add_genres": "जान्र जोड़ें", - "country": "देश", - "number_of_tracks_generate": "उत्पन्न करने के लिए ट्रैक की संख्या", - "acousticness": "ध्वनिकता", - "danceability": "नृत्यता", - "energy": "ऊर्जा", - "instrumentalness": "आलापिकता", - "liveness": "जीवंतता", - "loudness": "शोर", - "speechiness": "बोलचालता", - "valence": "मनोदयता", - "popularity": "लोकप्रियता", - "key": "कुंजी", - "duration": "अवधि (सेकंड)", - "tempo": "गति (BPM)", - "mode": "मोड", - "time_signature": "समय छाप", - "short": "संक्षेप", - "medium": "मध्यम", - "long": "लंबा", - "min": "न्यूनतम", - "max": "अधिकतम", - "target": "लक्ष्य", - "moderate": "मध्यम", - "deselect_all": "सभी को अचयनित करें", - "select_all": "सभी को चुनें", - "are_you_sure": "क्या आपको यकीन है?", - "generating_playlist": "आपकी कस्टम प्लेलिस्ट बनाई जा रही है...", - "selected_count_tracks": "{count} ट्रैक्स चयनित हैं", - "download_warning": "यदि आप सभी ट्रैक्स को बल्क में डाउनलोड करते हैं, तो आप स्पष्ट रूप से संगीत की अवैध नकली बना रहे हैं और संगीत के रचनात्मक समाज को क्षति पहुंचा रहे हैं। मुझे आशा है कि आप इसके बारे में जागरूक हैं। हमेशा कोशिश करें कि कलाकार के मेहनत का सम्मान और समर्थन करें।", - "download_ip_ban_warning": "बाहरी डाउनलोड अनुरोधों के कारण आपका आईपी YouTube पर अधिक से अधिक ब्लॉक हो सकता है। आईपी ब्लॉक का अर्थ है कि आप उसी आईपी उपकरण से कम से कम 2-3 महीनों तक YouTube का उपयोग नहीं कर सकेंगे (यदि आप लॉग इन हैं तो भी)। और स्पोट्यूब किसी भी जिम्मेदारी को नहीं उठाता है अगर ऐसा कभी होता है।", - "by_clicking_accept_terms": "'स्वीकार' पर क्लिक करके आप निम्नलिखित शर्तों से सहमत होते हैं:", - "download_agreement_1": "मुझे पता है कि मैं संगीत की अवैध नकली बना रहा हूं। मैं बुरा हूं", - "download_agreement_2": "मैं कलाकार का समर्थन करूंगा जहां भी मुझे संभव हो और मैं केवल इसल िए ऐसा कर रहा हूं क्योंकि मेरे पास उनकी कला खरीदने के लिए पैसे नहीं हैं।", - "download_agreement_3": "मैं पूरी तरह से जागरूक हूं कि मेरा आईपी YouTube पर ब्लॉक हो सकता है और मैं स्पोट्यूब या उसके मालिकों / सहयोगियों को किसी भी दुर्घटना के लिए जिम्मेदार नहीं मानता।", - "decline": "इनकार करें", - "accept": "स्वीकार करें", - "details": "विवरण", - "youtube": "YouTube", - "channel": "चैनल", - "likes": "पसंद", - "dislikes": "अप्रिय", - "views": "दृश्य", - "streamUrl": "स्ट्रीम URL", - "stop": "रोकें", - "sort_newest": "नवीनतम जोड़े गए के अनुसार क्रमबद्ध करें", - "sort_oldest": "सबसे पुराने जोड़े गए के अनुसार क्रमबद्ध करें", - "sleep_timer": "स्लीप टाइमर", - "mins": "{minutes} मिनट", - "hours": "{hours} घंटे", - "hour": "{hours} घंटा", - "custom_hours": "कस्टम घंटे", - "logs": "लॉग", - "developers": "डेवलपर्स", - "not_logged_in": "आप लॉग इन नहीं हैं", - "search_mode": "खोज मोड", - "audio_source": "ऑडियो स्रोत", - "ok": "ठीक है", - "failed_to_encrypt": "एन्क्रिप्ट करने में विफल रहा", - "encryption_failed_warning": "Spotube आपके डेटा को सुरक्षित रूप से स्टोर करने के लिए एन्क्रिप्शन का उपयोग करता है। लेकिन इसमें विफल रहा। इसलिए, यह असुरक्षित स्टोरेज पर फॉलबैक करेगा\nयदि आप Linux का उपयोग कर रहे हैं, तो कृपया सुनिश्चित करें कि आपके पास gnome-keyring, kde-wallet, keepassxc आदि जैसी कोई सीक्रेट-सर्विस इंस्टॉल की गई है", - "querying_info": "जानकारी प्राप्त करना", - "piped_api_down": "पाइप्ड एपीआई डाउन है", - "piped_down_error_instructions": "पाइप्ड इंस्टेंस {pipedInstance} वर्तमान में डाउन है\n\nइंस्टेंस बदलें या 'एपीआई प्रकार' को आधिकृत YouTube एपीआई में बदलें\n\nपरिवर्तन के बाद ऐप को फिर से चालने की सुनिश्चित करें", - "you_are_offline": "आप वर्तमान में ऑफ़लाइन हैं", - "connection_restored": "आपका इंटरनेट कनेक्शन बहाल हो गया है", - "use_system_title_bar": "सिस्टम शीर्षक पट्टी का उपयोग करें", - "update_playlist": "प्लेलिस्ट अपडेट करें", - "update": "अपडेट करें", - "crunching_results": "परिणाम को प्रसंस्कृत किया जा रहा है...", - "search_to_get_results": "परिणाम प्राप्त करने के लिए खोजें", - "use_amoled_mode": "AMOLED मोड का उपयोग करें", - "pitch_dark_theme": "पिच ब्लैक डार्ट थीम", - "normalize_audio": "ऑडियो को सामान्य करें", - "change_cover": "कवर बदलें", - "add_cover": "कवर जोड़ें", - "restore_defaults": "डिफ़ॉल्ट सेटिंग्स को बहाल करें", - "download_music_codec": "संगीत कोडेक डाउनलोड करें", - "streaming_music_codec": "स्ट्रीमिंग संगीत कोडेक", - "login_with_lastfm": "Last.fm से लॉगिन करें", - "connect": "कनेक्ट करें", - "disconnect_lastfm": "Last.fm से डिस्कनेक्ट करें", - "disconnect": "डिस्कनेक्ट करें", - "username": "उपयोगकर्ता नाम", - "password": "पासवर्ड", - "login": "लॉग इन करें", - "login_with_your_lastfm": "अपने Last.fm अकाउंट से लॉगिन करें", - "scrobble_to_lastfm": "Last.fm पर स्क्रॉबल करें", - "go_to_album": "एल्बम पर जाएं", - "discord_rich_presence": "डिस्कॉर्ड रिच प्रेजेंस", - "browse_all": "सभी को ब्राउज़ करें", - "genres": "शैलियाँ", - "explore_genres": "शैलियों का अन्वेषण करें", - "step_3_steps": "\"sp_dc\" कुकी का मूल्य कॉपी करें", - "step_4_steps": "कॉपी किए गए \"sp_dc\" मूल्य को पेस्ट करें", - "friends": "दोस्त", - "no_lyrics_available": "क्षमा करें, इस ट्रैक के लिए गाने नहीं मिल सके", - "sort_duration": "समय के आधार पर क्रमबद्ध करें", - "start_a_radio": "रेडियो शुरू करें", - "how_to_start_radio": "रेडियो कैसे शुरू करना चाहते हैं?", - "replace_queue_question": "क्या आप वर्तमान कतार को बदलना चाहते हैं या इसे जोड़ना चाहते हैं?", - "endless_playback": "अंतहीन प्लेबैक", - "delete_playlist": "प्लेलिस्ट हटाएं", - "delete_playlist_confirmation": "क्या आप वाकई इस प्लेलिस्ट को हटाना चाहते हैं?", - "local_tracks": "स्थानीय ट्रैक्स", - "song_link": "गाने का लिंक", - "skip_this_nonsense": "इस माया को छोड़ें", - "freedom_of_music": "“संगीत की स्वतंत्रता”", - "freedom_of_music_palm": "“हाथ में संगीत की स्वतंत्रता”", - "get_started": "आइए शुरू करें", - "youtube_source_description": "सिफारिश किया गया और सबसे अच्छा काम करता है।", - "piped_source_description": "मुफ्त महसूस कर रहे हैं? YouTube के समान लेकिन काफी अधिक मुफ्त।", - "jiosaavn_source_description": "दक्षिण एशियाई क्षेत्र के लिए सर्वोत्तम।", - "highest_quality": "सर्वोत्तम गुणवत्ता: {quality}", - "select_audio_source": "ऑडियो स्रोत चुनें", - "endless_playback_description": "क्रमबद्ध कतार के अंत में नए गाने स्वचालित रूप से जोड़ें", - "choose_your_region": "अपना क्षेत्र चुनें", - "choose_your_region_description": "यह Spotube को आपके स्थान के लिए सही सामग्री दिखाने में मदद करेगा।", - "choose_your_language": "अपनी भाषा चुनें", - "help_project_grow": "इस परियोजना को बढ़ावा दें", - "help_project_grow_description": "Spotube एक ओपन सोर्स परियोजना है। आप इस परियोजना को योगदान देकर, बग रिपोर्ट करके या नई विशेषताओं का सुझाव देकर इस परियोजना को बढ़ा सकते हैं।", - "contribute_on_github": "GitHub पर योगदान करें", - "donate_on_open_collective": "ओपन कलेक्टिव पर दान करें", - "browse_anonymously": "बिना नाम के ब्राउज़ करें", - "enable_connect": "कनेक्ट सक्षम करें", - "enable_connect_description": "अन्य उपकरणों से Spotube को नियंत्रित करें", - "devices": "उपकरण", - "select": "चयन करें", - "connect_client_alert": "आप {client} द्वारा नियंत्रित हो रहे हैं", - "this_device": "यह उपकरण", - "remote": "रिमोट", - "local_library": "स्थानीय पुस्तकालय", - "add_library_location": "पुस्तकालय में जोड़ें", - "remove_library_location": "पुस्तकालय से हटाएं", - "local_tab": "स्थानीय", - "stats": "आंकड़े", - "and_n_more": "और {count} और", - "recently_played": "हाल ही में खेले गए", - "browse_more": "अधिक ब्राउज़ करें", - "no_title": "कोई शीर्षक नहीं", - "not_playing": "नहीं चल रहा", - "epic_failure": "महान असफलता!", - "added_num_tracks_to_queue": "{tracks_length} ट्रैक्स कतार में जोड़े गए", - "spotube_has_an_update": "Spotube में एक अपडेट है", - "download_now": "अभी डाउनलोड करें", - "nightly_version": "Spotube Nightly {nightlyBuildNum} जारी किया गया है", - "release_version": "Spotube v{version} जारी किया गया है", - "read_the_latest": "नवीनतम पढ़ें", - "release_notes": "रिलीज़ नोट्स", - "pick_color_scheme": "रंग योजना चुनें", - "save": "सहेजें", - "choose_the_device": "उपकरण चुनें:", - "multiple_device_connected": "कई उपकरण जुड़े हुए हैं।\nउस उपकरण को चुनें जिस पर आप यह क्रिया करना चाहते हैं", - "nothing_found": "कुछ भी नहीं मिला", - "the_box_is_empty": "बॉक्स खाली है", - "top_artists": "शीर्ष कलाकार", - "top_albums": "शीर्ष एल्बम", - "this_week": "इस हफ्ते", - "this_month": "इस महीने", - "last_6_months": "पिछले 6 महीने", - "this_year": "इस साल", - "last_2_years": "पिछले 2 साल", - "all_time": "सभी समय", - "powered_by_provider": "{providerName} द्वारा संचालित", - "email": "ईमेल", - "profile_followers": "अनुयायी", - "birthday": "जन्मदिन", - "subscription": "सदस्यता", - "not_born": "अभी पैदा नहीं हुआ", - "hacker": "हैकर", - "profile": "प्रोफ़ाइल", - "no_name": "कोई नाम नहीं", - "edit": "संपादित करें", - "user_profile": "उपयोगकर्ता प्रोफ़ाइल", - "count_plays": "{count} प्ले", - "streaming_fees_hypothetical": "*Spotify की प्रति स्ट्रीम भुगतान के आधार पर\n$0.003 से $0.005 तक गणना की गई है। यह एक काल्पनिक\nगणना है जो उपयोगकर्ता को यह जानकारी देती है कि वे कितना भुगतान\nकरते यदि वे Spotify पर गाने सुनते।", - "count_mins": "{minutes} मिनट", - "summary_minutes": "मिनट", - "summary_listened_to_music": "सुनी गई संगीत", - "summary_songs": "गाने", - "summary_streamed_overall": "कुल स्ट्रीम", - "summary_owed_to_artists": "कलाकारों को देनदार\nइस महीने", - "summary_artists": "कलाकार", - "summary_music_reached_you": "संगीत आपके पास पहुंच गया", - "summary_full_albums": "पूरा एल्बम", - "summary_got_your_love": "आपका प्यार मिला", - "summary_playlists": "प्लेलिस्ट", - "summary_were_on_repeat": "दोहराया गया", - "total_money": "कुल {money}", - "minutes_listened": "सुनिएका मिनेटहरू", - "streamed_songs": "स्ट्रीम गरिएका गीतहरू", - "count_streams": "{count} स्ट्रिम", - "owned_by_you": "तपाईंले स्वामित्व गरेको", - "copied_shareurl_to_clipboard": "{shareUrl} क्लिपबोर्डमा कपी गरियो", - "spotify_hipotetical_calculation": "*यो Spotify को प्रति स्ट्रीम भुगतानको आधारमा\n$0.003 देखि $0.005 को बीचमा गणना गरिएको हो। यो एक काल्पनिक\nगणना हो जसले प्रयोगकर्तालाई देखाउँछ कि उनीहरूले कति\nअर्टिस्टहरूलाई तिनीहरूका गीतहरू Spotify मा सुनेमा\nभुक्तान गर्नुपर्ने थियो।", - "webview_not_found": "वेबव्यू नहीं मिला", - "webview_not_found_description": "आपके डिवाइस पर वेबव्यू रनटाइम इंस्टॉल नहीं है।\nअगर इंस्टॉल है, तो सुनिश्चित करें कि यह environment PATH में है\n\nइंस्टॉल करने के बाद, ऐप को पुनः शुरू करें", - "unsupported_platform": "असमर्थित प्लेटफार्म", - "invidious_instance": "इन्विडियस सर्वर इंस्टेंस", - "invidious_description": "ट्रैक मिलान के लिए इन्विडियस सर्वर इंस्टेंस", - "invidious_warning": "कुछ इंस्टेंस अच्छी तरह से काम नहीं कर सकते। अपने जोखिम पर उपयोग करें", - "invidious_source_description": "पाइप्ड के समान, लेकिन अधिक उपलब्धता के साथ", - "cache_music": "संगीत को कैश करें", - "open": "खोलें", - "cache_folder": "कैश फ़ोल्डर", - "export": "निर्यात करें", - "clear_cache": "कैश साफ़ करें", - "clear_cache_confirmation": "क्या आप कैश साफ़ करना चाहते हैं?", - "export_cache_files": "कैश फ़ाइलें निर्यात करें", - "found_n_files": "{count} फ़ाइलें मिलीं", - "export_cache_confirmation": "क्या आप इन फ़ाइलों को निर्यात करना चाहते हैं", - "exported_n_out_of_m_files": "{filesExported} फ़ाइलें निर्यात की गईं {files} में से", - "playlist": "प्लेलिस्ट", - "no_loop": "कोई लूप नहीं", - "generate": "उत्पन्न करें", - "undo": "पूर्ववत करें", - "download_all": "सभी डाउनलोड करें", - "add_all_to_playlist": "सभी को प्लेलिस्ट में जोड़ें", - "add_all_to_queue": "सभी को कतार में जोड़ें", - "play_all_next": "सभी को अगले खेलने के लिए", - "pause": "रोकें", - "view_all": "सभी देखें", - "no_tracks_added_yet": "लगता है आपने अभी तक कोई ट्रैक नहीं जोड़ा है।", - "no_tracks": "लगता है यहाँ कोई ट्रैक नहीं है।", - "no_tracks_listened_yet": "लगता है आपने अभी तक कुछ नहीं सुना है।", - "not_following_artists": "आप किसी भी कलाकार को फॉलो नहीं कर रहे हैं।", - "no_favorite_albums_yet": "लगता है आपने अभी तक कोई एल्बम अपनी पसंदीदा सूची में नहीं जोड़ा है।", - "no_logs_found": "कोई लॉग नहीं मिला", - "youtube_engine": "YouTube इंजन", - "youtube_engine_not_installed_title": "{engine} स्थापित नहीं है", - "youtube_engine_not_installed_message": "{engine} आपके सिस्टम में स्थापित नहीं है।", - "youtube_engine_set_path": "यह सुनिश्चित करें कि यह PATH वेरिएबल में उपलब्ध हो या\nनीचे {engine} निष्पादन योग्य फ़ाइल का पूर्ण पथ सेट करें।", - "youtube_engine_unix_issue_message": "macOS/Linux/यूनिक्स जैसे OS में, .zshrc/.bashrc/.bash_profile आदि में पथ सेट करना काम नहीं करेगा।\nआपको पथ को शेल कॉन्फ़िगरेशन फ़ाइल में सेट करना होगा।", - "download": "डाउनलोड करें", - "file_not_found": "फाइल नहीं मिली", - "custom": "कस्टम", - "add_custom_url": "कस्टम URL जोड़ें", - "edit_port": "पोर्ट संपादित करें", - "port_helper_msg": "डिफ़ॉल्ट -1 है जो यादृच्छिक संख्या को दर्शाता है। यदि आपने फ़ायरवॉल कॉन्फ़िगर किया है, तो इसे सेट करना अनुशंसित है।", - "connect_request": "{client} को कनेक्ट करने की अनुमति दें?", - "connection_request_denied": "कनेक्शन अस्वीकृत। उपयोगकर्ता ने पहुंच अस्वीकृत कर दी।", - "hipotetical_calculation": "*यह औसत ऑनलाइन संगीत स्ट्रीमिंग प्लेटफ़ॉर्म के प्रति स्ट्रीम भुगतान ($0.003 से $0.005) के आधार पर गणना की गई है। यह एक काल्पनिक गणना है जो उपयोगकर्ता को यह जानकारी देने के लिए है कि यदि वे विभिन्न संगीत स्ट्रीमिंग प्लेटफ़ॉर्म पर अपने गाने सुनते हैं तो उन्होंने कलाकारों को कितना भुगतान किया होगा।", - "an_error_occurred": "एक त्रुटि हुई", - "copy_to_clipboard": "क्लिपबोर्ड पर कॉपी करें", - "view_logs": "लॉग देखें", - "retry": "पुनः प्रयास करें", - "no_default_metadata_provider_selected": "आपने कोई डिफ़ॉल्ट मेटाडेटा प्रदाता सेट नहीं किया है", - "manage_metadata_providers": "मेटाडेटा प्रदाताओं को प्रबंधित करें", - "open_link_in_browser": "ब्राउज़र में लिंक खोलें?", - "do_you_want_to_open_the_following_link": "क्या आप निम्नलिखित लिंक खोलना चाहते हैं", - "unsafe_url_warning": "अविश्वसनीय स्रोतों से लिंक खोलना असुरक्षित हो सकता है। सावधान रहें!\nआप लिंक को अपने क्लिपबोर्ड पर भी कॉपी कर सकते हैं।", - "copy_link": "लिंक कॉपी करें", - "building_your_timeline": "आपकी सुनने की आदतों के आधार पर आपकी टाइमलाइन बनाई जा रही है...", - "official": "आधिकारिक", - "author_name": "लेखक: {author}", - "third_party": "तृतीय-पक्ष", - "plugin_requires_authentication": "प्लगइन को प्रमाणीकरण की आवश्यकता है", - "update_available": "अपडेट उपलब्ध है", - "supports_scrobbling": "स्क्रॉबलिंग का समर्थन करता है", - "plugin_scrobbling_info": "यह प्लगइन आपके सुनने के इतिहास को उत्पन्न करने के लिए आपके संगीत को स्क्रॉबल करता है।", - "default_plugin": "डिफ़ॉल्ट", - "set_default": "डिफ़ॉल्ट सेट करें", - "support": "समर्थन", - "support_plugin_development": "प्लगइन विकास का समर्थन करें", - "can_access_name_api": "- **{name}** API तक पहुंच सकता है", - "do_you_want_to_install_this_plugin": "क्या आप इस प्लगइन को स्थापित करना चाहते हैं?", - "third_party_plugin_warning": "यह प्लगइन एक तृतीय-पक्ष रिपॉजिटरी से है। कृपया सुनिश्चित करें कि आप इसे स्थापित करने से पहले स्रोत पर भरोसा करते हैं।", - "author": "लेखक", - "this_plugin_can_do_following": "यह प्लगइन निम्नलिखित कर सकता है", - "install": "स्थापित करें", - "install_a_metadata_provider": "एक मेटाडेटा प्रदाता स्थापित करें", - "no_tracks_playing": "वर्तमान में कोई ट्रैक नहीं चल रहा है", - "synced_lyrics_not_available": "इस गाने के लिए सिंक्रनाइज़ किए गए बोल उपलब्ध नहीं हैं। कृपया", - "plain_lyrics": "सादे बोल", - "tab_instead": "टैब का उपयोग करें।", - "disclaimer": "अस्वीकरण", - "third_party_plugin_dmca_notice": "स्पॉट्यूब टीम किसी भी \"तृतीय-पक्ष\" प्लगइन के लिए कोई जिम्मेदारी (कानूनी सहित) नहीं लेती है।\nकृपया उन्हें अपने जोखिम पर उपयोग करें। किसी भी बग/समस्या के लिए, कृपया उन्हें प्लगइन रिपॉजिटरी को रिपोर्ट करें।\n\nयदि कोई \"तृतीय-पक्ष\" प्लगइन किसी सेवा/कानूनी इकाई के ToS/DMCA को तोड़ रहा है, तो कृपया \"तृतीय-पक्ष\" प्लगइन लेखक या होस्टिंग प्लेटफ़ॉर्म जैसे GitHub/Codeberg से कार्रवाई करने के लिए कहें। ऊपर सूचीबद्ध (\"तृतीय-पक्ष\" लेबल वाले) सभी सार्वजनिक/समुदाय-द्वारा-रखरखाव किए गए प्लगइन हैं। हम उन्हें क्यूरेट नहीं कर रहे हैं, इसलिए हम उन पर कोई कार्रवाई नहीं कर सकते हैं।\n\n", - "input_does_not_match_format": "इनपुट आवश्यक प्रारूप से मेल नहीं खाता है", - "metadata_provider_plugins": "मेटाडेटा प्रदाता प्लगइन", - "paste_plugin_download_url": "डाउनलोड यूआरएल या गिटहब/कोडबर्ग रेपो यूआरएल या .smplug फ़ाइल का सीधा लिंक पेस्ट करें", - "download_and_install_plugin_from_url": "यूआरएल से प्लगइन डाउनलोड और स्थापित करें", - "failed_to_add_plugin_error": "प्लगइन जोड़ने में विफल: {error}", - "upload_plugin_from_file": "फ़ाइल से प्लगइन अपलोड करें", - "installed": "स्थापित", - "available_plugins": "उपलब्ध प्लगइन", - "configure_your_own_metadata_plugin": "अपनी खुद की प्लेलिस्ट/एल्बम/कलाकार/फ़ीड मेटाडेटा प्रदाता कॉन्फ़िगर करें", - "audio_scrobblers": "ऑडियो स्क्रॉबलर्स", - "scrobbling": "स्क्रॉबलिंग", - "download_music_format": "संगीत डाउनलोड प्रारूप", - "streaming_music_format": "संगीत स्ट्रीमिंग प्रारूप", - "download_music_quality": "संगीत डाउनलोड गुणवत्ता", - "streaming_music_quality": "संगीत स्ट्रीमिंग गुणवत्ता", - "default_metadata_source": "डिफ़ॉल्ट मेटाडेटा स्रोत", - "set_default_metadata_source": "डिफ़ॉल्ट मेटाडेटा स्रोत सेट करें", - "default_audio_source": "डिफ़ॉल्ट ऑडियो स्रोत", - "set_default_audio_source": "डिफ़ॉल्ट ऑडियो स्रोत सेट करें", - "plugins": "प्लगइन्स", - "configure_plugins": "अपने स्वयं के मेटाडेटा प्रदाता और ऑडियो स्रोत प्लगइन्स कॉन्फ़िगर करें", - "source": "स्रोत: ", - "uncompressed": "असंपीड़ित", - "dab_music_source_description": "ऑडियोफाइलों के लिए। उच्च-गुणवत्ता/बिना हानि वाले ऑडियो स्ट्रीम प्रदान करता है। सटीक ISRC आधारित ट्रैक मिलान।" -} \ No newline at end of file diff --git a/lib/l10n/app_id.arb b/lib/l10n/app_id.arb deleted file mode 100644 index 3405fd2f..00000000 --- a/lib/l10n/app_id.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Tamu", - "browse": "Jelajahi", - "search": "Cari", - "library": "Pustaka", - "lyrics": "Lirik", - "settings": "Pengaturan", - "genre_categories_filter": "Urutkan kategori atau genre...", - "genre": "Genre", - "personalized": "Dipersonalisasi", - "featured": "Unggulan", - "new_releases": "Rilis Terbaru", - "songs": "Lagu", - "playing_track": "Memutar {track}", - "queue_clear_alert": "Ini akan menghapus antrian saat ini This will clear the current queue. {track_length} trek akan dihapus\nAnda ingin melanjutkan?", - "load_more": "Lebih Banyak", - "playlists": "Daftar Putar", - "artists": "Artis", - "albums": "Album", - "tracks": "Trek", - "downloads": "Unduhan", - "filter_playlists": "Urutkan daftar putar Anda...", - "liked_tracks": "Lagu Yang Disukai", - "liked_tracks_description": "Semua lagu yang Anda sukai", - "create_playlist": "Buat Daftar Putar", - "create_a_playlist": "Buat daftar putar", - "update_playlist": "Ubah daftar putar", - "create": "Buat", - "cancel": "Batal", - "update": "Ubah", - "playlist_name": "Nama Daftar Putar", - "name_of_playlist": "Nama daftar putar", - "description": "Deskripsi", - "public": "Publik", - "collaborative": "Kolaboratif", - "search_local_tracks": "Cari trek lokal...", - "play": "Putar", - "delete": "Hapus", - "none": "Tidak Ada", - "sort_a_z": "Urutkan berdasarkan A-Z", - "sort_z_a": "Urutkan berdasarkan Z-A", - "sort_artist": "Urutkan berdasarkan Artis", - "sort_album": "Urutkan berdasarkan Album", - "sort_duration": "Urutkan berdasarkan Durasi", - "sort_tracks": "Urutkan trek", - "currently_downloading": "Sedang Mengunduh ({tracks_length})", - "cancel_all": "Batalkan Semua", - "filter_artist": "Urutkan artis...", - "followers": "{followers} Pengikut", - "add_artist_to_blacklist": "Tambah artis ke daftar hitam", - "top_tracks": "Lagu Teratas", - "fans_also_like": "Penggemar juga menyukainya", - "loading": "Memuat...", - "artist": "Artis", - "blacklisted": "Masuk Daftar Hitam", - "following": "Mengikuti", - "follow": "Ikuti", - "artist_url_copied": "URL artis telah disalin", - "added_to_queue": "Menambah trek {tracks} ke antrean", - "filter_albums": "Urutkan album...", - "synced": "Disinkronkan", - "plain": "Normal", - "shuffle": "Acak", - "search_tracks": "Cari trek...", - "released": "Dirilis", - "error": "Kesalahan {error}", - "title": "Judul", - "time": "Waktu", - "more_actions": "Tindakan Lainnya", - "download_count": "Unduhan ({count})", - "add_count_to_playlist": "Menambah ({count}) ke Daftar Putar", - "add_count_to_queue": "Menambah ({count}) ke Antrian", - "play_count_next": "Mainkan ({count}) selanjutnya", - "album": "Album", - "copied_to_clipboard": "{data} telah disalin", - "add_to_following_playlists": "Menambah {track} ke Daftar Putar berikut", - "add": "Tambah", - "added_track_to_queue": "Menambah {track} ke antrian", - "add_to_queue": "Tambah ke antrian", - "track_will_play_next": "{track} akan diputar berikutnya", - "play_next": "Mainkan selanjutnya", - "removed_track_from_queue": "Menghapus {track} dari antrian", - "remove_from_queue": "Hapus dari antrian", - "remove_from_favorites": "Hapus dari favorit", - "save_as_favorite": "Simpan sebagai favorit", - "add_to_playlist": "Tambah ke daftar putar", - "remove_from_playlist": "Hapus dari daftar putar", - "add_to_blacklist": "Tambah ke daftar hitam", - "remove_from_blacklist": "Hapus dari daftar hitam", - "share": "Bagikan", - "mini_player": "Pemutar Mini", - "slide_to_seek": "Geser untuk maju atau mundur", - "shuffle_playlist": "Acak daftar putar", - "unshuffle_playlist": "Batalkan pengacakan daftar putar", - "previous_track": "Lagu sebelumnya", - "next_track": "Lagu berikutnya", - "pause_playback": "Jeda Pemutaran", - "resume_playback": "Lanjutkan Pemutaran", - "loop_track": "Ulangi Pemutaran", - "repeat_playlist": "Ulangi daftar putar", - "queue": "Antrian", - "alternative_track_sources": "Sumber trek alternatif", - "download_track": "Unduh lagu", - "tracks_in_queue": "{tracks} trek dalam antrian", - "clear_all": "Bersihkan semua", - "show_hide_ui_on_hover": "Tampil/Sembunyikan UI saat mengarahkan kursor", - "always_on_top": "Selalu di atas", - "exit_mini_player": "Keluar Pemutar Mini", - "download_location": "Lokasi unduhan", - "account": "Akun", - "login_with_spotify": "Masuk dengan Spotify", - "connect_with_spotify": "Hubungkan dengan Spotify", - "logout": "Keluar", - "logout_of_this_account": "Keluar dari akun", - "language_region": "Bahasa & Wilayah", - "language": "Bahasa", - "system_default": "Bawaan Sistem", - "market_place_region": "Wilayah Pasar", - "recommendation_country": "Negara Rekomendasi", - "appearance": "Tampilan", - "layout_mode": "Mode Tata Letak", - "override_layout_settings": "Ganti pengaturan mode tata letak responsif", - "adaptive": "Adaptif", - "compact": "Ringkas", - "extended": "Diperluas", - "theme": "Tema", - "dark": "Gelap", - "light": "Terang", - "system": "Sistem", - "accent_color": "Warna Aksen", - "sync_album_color": "Sinkronkan warna album", - "sync_album_color_description": "Menggunakan warna dominan sampul album sebagai warna aksen", - "playback": "Pemutaran", - "audio_quality": "Kualitas Suara", - "high": "Tinggi", - "low": "Rendah", - "pre_download_play": "Unduh dan putar", - "pre_download_play_description": "Daripada streaming audio, unduh byte dan mainkan (Direkomendasikan untuk pengguna bandwidth yang lebih tinggi)", - "skip_non_music": "Lewati segmen non-musik (SponsorBlock)", - "blacklist_description": "Lagu dan artis di daftar hitam", - "wait_for_download_to_finish": "Tunggu hingga unduhan saat ini selesai", - "desktop": "Desktop", - "close_behavior": "Tutup Perilaku", - "close": "Tutup", - "minimize_to_tray": "Perkecil ke tray", - "show_tray_icon": "Tampilkan tray ikon sistem", - "about": "Tentang", - "u_love_spotube": "Kami tahu Anda menyukai Spotube", - "check_for_updates": "Periksa pembaruan", - "about_spotube": "Tentang Spotube", - "blacklist": "Daftar Hitam", - "please_sponsor": "Silakan Sponsor/Menyumbang", - "spotube_description": "Spotube, klien Spotify yang ringan, lintas platform, dan gratis untuk semua", - "version": "Versi", - "build_number": "Nomor Pembuatan", - "founder": "Pendiri", - "repository": "Repositori", - "bug_issues": "Bug+Masalah", - "made_with": "Dibuat dengan ❤️ di Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Lisensi", - "add_spotify_credentials": "Tambahkan kredensial Spotify Anda untuk memulai", - "credentials_will_not_be_shared_disclaimer": "Jangan khawatir, kredensial Anda tidak akan dikumpulkan atau dibagikan kepada siapa pun", - "know_how_to_login": "Tidak tahu bagaimana melakukan ini?", - "follow_step_by_step_guide": "Ikuti panduan Langkah demi Langkah", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "Silakan isi semua kolom", - "submit": "Kirim", - "exit": "Keluar", - "previous": "Sebelumnya", - "next": "Berikutnya", - "done": "Selesai", - "step_1": "Langkah 1", - "first_go_to": "Pertama, Pergi ke", - "login_if_not_logged_in": "dan Masuk/Daftar jika Anda belum masuk", - "step_2": "Langkah 2", - "step_2_steps": "1. Setelah Anda masuk, tekan F12 atau Klik Kanan Mouse > Buka Browser Devtools.\n2. Lalu buka Tab \"Aplikasi\" (Chrome, Edge, Brave, dll.) atau Tab \"Penyimpanan\" (Firefox, Palemoon, dll.)\n3. Buka bagian \"Cookie\" lalu subbagian \"https://accounts.spotify.com\"", - "step_3": "Langkah 3", - "step_3_steps": "Salin nilai Cookie \"sp_dc\" ", - "success_emoji": "Berhasil🥳", - "success_message": "Sekarang Anda telah berhasil Masuk dengan akun Spotify Anda. Kerja bagus, sobat!", - "step_4": "Langkah 4", - "step_4_steps": "Tempel nilai \"sp_dc\" yang disalin", - "something_went_wrong": "Terjadi kesalahan", - "piped_instance": "Piped Server Instance", - "piped_description": "The Piped server instance untuk digunakan sebagai pencocokan trek", - "piped_warning": "Beberapa di antaranya mungkin tidak berfungsi dengan baik. Jadi gunakan dengan risiko Anda sendiri", - "generate_playlist": "Hasilkan Daftar Putar", - "track_exists": "Lagu {track} sudah ada", - "replace_downloaded_tracks": "Ganti semua trek yang diunduh", - "skip_download_tracks": "Lewati pengunduhan semua trek yang diunduh", - "do_you_want_to_replace": "Apakah Anda ingin mengganti track yang ada?", - "replace": "Ganti", - "skip": "Lewati", - "select_up_to_count_type": "Pilih hingga {count} {type}", - "select_genres": "Pilih Genre", - "add_genres": "Tambah Genre", - "country": "Negara", - "number_of_tracks_generate": "Jumlah trek yang akan dihasilkan", - "acousticness": "Akustik", - "danceability": "Menari", - "energy": "Energi", - "instrumentalness": "Instrumentalitas", - "liveness": "Kehidupan", - "loudness": "Kekerasan", - "speechiness": "Berbicara", - "valence": "Valensi", - "popularity": "Popularitas", - "key": "Kunci", - "duration": "Durasi (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "Tanda Tangan Waktu", - "short": "Pendek", - "medium": "Sedang", - "long": "Panjang", - "min": "Minimal", - "max": "Maksimal", - "target": "Target", - "moderate": "Sedang", - "deselect_all": "Batalkan Semua", - "select_all": "Pilih Semua", - "are_you_sure": "Anda yakin?", - "generating_playlist": "Menghasilkan daftar putar khusus Anda...", - "selected_count_tracks": "{count} lagu yang dipilih", - "download_warning": "Jika Anda mengunduh semua Lagu secara massal, Anda jelas membajak Musik & menyebabkan kerusakan pada masyarakat kreatif Musik. Saya harap Anda menyadari hal ini. Selalu berusaha menghormati & mendukung kerja keras Artis", - "download_ip_ban_warning": "BTW, IP Anda bisa diblokir di YouTube karena permintaan unduhan yang berlebihan dari biasanya. Blokir IP berarti Anda tidak dapat menggunakan YouTube (meskipun Anda masuk) setidaknya selama 2-3 bulan dari perangkat IP tersebut. Dan Spotube tidak bertanggung jawab jika hal ini terjadi", - "by_clicking_accept_terms": "Dengan mengklik 'terima' Anda menyetujui ketentuan berikut:", - "download_agreement_1": "Saya tahu saya membajak Musik. Saya buruk", - "download_agreement_2": "Saya akan mendukung Artis di mana pun saya bisa dan saya melakukan ini hanya karena saya tidak punya uang untuk membeli karya seni mereka", - "download_agreement_3": "Saya sepenuhnya menyadari bahwa IP saya dapat diblokir di YouTube & saya tidak menganggap Spotube atau pemilik/kontributornya bertanggung jawab atas kecelakaan apa pun yang disebabkan oleh tindakan saya saat ini", - "decline": "Menolak", - "accept": "Setuju", - "details": "Detail", - "youtube": "YouTube", - "channel": "Channel", - "likes": "Suka", - "dislikes": "Tidak Suka", - "views": "Dilihat", - "streamUrl": "URL Stream", - "stop": "Berhenti", - "sort_newest": "Urutkan yang baru ditambah", - "sort_oldest": "Urutkan yang paling lama ditambah", - "sleep_timer": "Pengatur Waktu Tidur", - "mins": "{minutes} Menit", - "hours": "{hours} Jam", - "hour": "{hours} Jam", - "custom_hours": "Jam Kostum", - "logs": "Log", - "developers": "Pengembang", - "not_logged_in": "Anda belum masuk", - "search_mode": "Mode Pencarian", - "audio_source": "Sumber Suara", - "ok": "OK", - "failed_to_encrypt": "Gagal mengenkripsi", - "encryption_failed_warning": "Spotube menggunakan enkripsi untuk menyimpan data Anda dengan aman. Namun gagal melakukannya. Jadi itu akan kembali ke penyimpanan yang tidak aman\nJika Anda menggunakan linux, pastikan Anda telah menginstal layanan rahasia (gnome-keyring, kde-wallet, keepassxc, dll)", - "querying_info": "Mencari informasi...", - "piped_api_down": "Piped API tidak aktif", - "piped_down_error_instructions": "Piped Instance {pipedInstance} saat ini tidak aktif\n\nUbah instance atau ubah 'jenis API' menjadi API YouTube resmi\n\nPastikan untuk memulai ulang aplikasi setelah perubahan", - "you_are_offline": "Anda sedang offline", - "connection_restored": "Koneksi internet Anda telah pulih", - "use_system_title_bar": "Gunakan bilah judul sistem", - "crunching_results": "Mengolah hasil...", - "search_to_get_results": "Cari untuk mendapatkan hasil", - "use_amoled_mode": "Tema gelap gulita", - "pitch_dark_theme": "Mode AMOLED", - "normalize_audio": "Normalisasi audio", - "change_cover": "Ganti sampul", - "add_cover": "Tambah sampul", - "restore_defaults": "Kembalikan semula", - "download_music_codec": "Unduh codec musik", - "streaming_music_codec": "Streaming codec musik", - "login_with_lastfm": "Masuk dengan Last.fm", - "connect": "Hubungkan", - "disconnect_lastfm": "Memutuskan Last.fm", - "disconnect": "Memutuskan", - "username": "Username", - "password": "Password", - "login": "Masuk", - "login_with_your_lastfm": "Masuk dengan Last.fm Anda", - "scrobble_to_lastfm": "Scrobble ke Last.fm", - "go_to_album": "Pergi ke Album", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "Lihat Semua", - "genres": "Genre", - "explore_genres": "Jelajahi Genre", - "friends": "Daftar Teman", - "no_lyrics_available": "Maaf, tidak dapat menemukan lirik untuk lagu ini", - "start_a_radio": "Putar Radio", - "how_to_start_radio": "Bagaimana Anda ingin memutar radio?", - "replace_queue_question": "Apakah Anda ingin mengganti antrean saat ini atau menambahkannya?", - "endless_playback": "Pemutaran Tanpa Akhir", - "delete_playlist": "Hapus Daftar Putar", - "delete_playlist_confirmation": "Anda yakin ingin menghapus daftar putar ini?", - "local_tracks": "Trek Lokal", - "song_link": "Tautan Lagu", - "skip_this_nonsense": "Lewati omong kosong ini", - "freedom_of_music": "“Kebebasan Musik”", - "freedom_of_music_palm": "“Kebebasan Musik di telapak tangan Anda”", - "get_started": "Mari kita mulai", - "youtube_source_description": "Direkomendasikan dan berfungsi paling baik.", - "piped_source_description": "Merasa bebas? Sama seperti YouTube tetapi banyak yang gratis.", - "jiosaavn_source_description": "Terbaik untuk wilayah Asia Selatan.", - "highest_quality": "Kualitas Terbaik: {quality}", - "select_audio_source": "Pilih Sumber Suara", - "endless_playback_description": "Tambahkan lagu baru secara otomatis\nke akhir antrean", - "choose_your_region": "Pilih wilayah Anda", - "choose_your_region_description": "Ini akan membantu Spotube menampilkan konten yang tepat\nuntuk lokasi Anda.", - "choose_your_language": "Pilih bahasa Anda", - "help_project_grow": "Bantu proyek ini berkembang", - "help_project_grow_description": "Spotube adalah proyek sumber terbuka. Anda dapat membantu proyek ini berkembang dengan berkontribusi pada proyek, melaporkan bug, atau menyarankan fitur baru.", - "contribute_on_github": "Berkontribusi di GitHub", - "donate_on_open_collective": "Donasi di Open Collective", - "browse_anonymously": "Jelajahi Secara Anonim", - "enable_connect": "Aktifkan Hubungkan", - "enable_connect_description": "Kontrol Spotube dari perangkat lain", - "devices": "Perangkat", - "select": "Pilih", - "connect_client_alert": "Anda dikendalikan oleh {client}", - "this_device": "Perangkat Ini", - "remote": "Remot", - "local_library": "Perpustakaan lokal", - "add_library_location": "Tambahkan ke perpustakaan", - "remove_library_location": "Hapus dari perpustakaan", - "local_tab": "Lokal", - "stats": "Statistik", - "and_n_more": "dan {count} lainnya", - "recently_played": "Baru saja diputar", - "browse_more": "Telusuri lebih banyak", - "no_title": "Tanpa judul", - "not_playing": "Tidak diputar", - "epic_failure": "Kegagalan epik!", - "added_num_tracks_to_queue": "Menambahkan {tracks_length} trek ke antrean", - "spotube_has_an_update": "Spotube memiliki pembaruan", - "download_now": "Unduh sekarang", - "nightly_version": "Spotube Nightly {nightlyBuildNum} telah dirilis", - "release_version": "Spotube v{version} telah dirilis", - "read_the_latest": "Baca yang terbaru ", - "release_notes": "catatan rilis", - "pick_color_scheme": "Pilih skema warna", - "save": "Simpan", - "choose_the_device": "Pilih perangkat:", - "multiple_device_connected": "Beberapa perangkat terhubung.\nPilih perangkat tempat Anda ingin melakukan tindakan ini", - "nothing_found": "Tidak ditemukan apa pun", - "the_box_is_empty": "Kotak kosong", - "top_artists": "Artis Teratas", - "top_albums": "Album Teratas", - "this_week": "Minggu ini", - "this_month": "Bulan ini", - "last_6_months": "6 bulan terakhir", - "this_year": "Tahun ini", - "last_2_years": "2 tahun terakhir", - "all_time": "Sepanjang waktu", - "powered_by_provider": "Didukung oleh {providerName}", - "email": "Email", - "profile_followers": "Pengikut", - "birthday": "Ulang Tahun", - "subscription": "Langganan", - "not_born": "Belum lahir", - "hacker": "Hacker", - "profile": "Profil", - "no_name": "Tanpa nama", - "edit": "Edit", - "user_profile": "Profil pengguna", - "count_plays": "{count} pemutaran", - "streaming_fees_hypothetical": "Biaya streaming (hipotetis)", - "minutes_listened": "Menit didengarkan", - "streamed_songs": "Lagu yang disiarkan", - "count_streams": "{count} streams", - "owned_by_you": "Dimiliki oleh Anda", - "copied_shareurl_to_clipboard": "{shareUrl} disalin ke clipboard", - "spotify_hipotetical_calculation": "*Ini dihitung berdasarkan pembayaran\nper stream Spotify dari $0,003 hingga $0,005.\nIni adalah perhitungan hipotetis untuk memberi\npengguna gambaran tentang berapa banyak\nmereka akan membayar kepada artis jika\nmereka mendengarkan lagu mereka di Spotify.", - "count_mins": "{minutes} menit", - "summary_minutes": "menit", - "summary_listened_to_music": "Mendengarkan musik", - "summary_songs": "lagu", - "summary_streamed_overall": "Disiarkan secara keseluruhan", - "summary_owed_to_artists": "Terhutang kepada artis\nBulan ini", - "summary_artists": "artis", - "summary_music_reached_you": "Musik mencapai Anda", - "summary_full_albums": "album lengkap", - "summary_got_your_love": "Mendapatkan cinta Anda", - "summary_playlists": "daftar putar", - "summary_were_on_repeat": "Sedang diulang", - "total_money": "Total {money}", - "webview_not_found": "Webview tidak ditemukan", - "webview_not_found_description": "Tidak ada runtime Webview yang diinstal di perangkat Anda.\nJika sudah diinstal, pastikan itu ada di environment PATH\n\nSetelah diinstal, restart aplikasi", - "unsupported_platform": "Platform tidak didukung", - "invidious_instance": "Invidious Server Instance", - "invidious_description": "The Invidious server instance to use for track matching", - "invidious_warning": "Some of them might not work well. So use at your own risk", - "invidious_source_description": "Similar to Piped but with higher availability.", - "cache_music": "Cache music", - "open": "Open", - "cache_folder": "Cache folder", - "export": "Export", - "clear_cache": "Clear cache", - "clear_cache_confirmation": "Do you want to clear the cache?", - "export_cache_files": "Export Cached Files", - "found_n_files": "Found {count} files", - "export_cache_confirmation": "Do you want to export these files to", - "exported_n_out_of_m_files": "Exported {filesExported} out of {files} files", - "playlist": "Playlist", - "no_loop": "No loop", - "generate": "Generate", - "undo": "Undo", - "download_all": "Download all", - "add_all_to_playlist": "Add all to playlist", - "add_all_to_queue": "Add all to queue", - "play_all_next": "Play all next", - "pause": "Pause", - "view_all": "View all", - "no_tracks_added_yet": "Looks like you haven't added any tracks yet", - "no_tracks": "Looks like there are no tracks here", - "no_tracks_listened_yet": "Looks like you haven't listened to anything yet", - "not_following_artists": "You're not following any artists", - "no_favorite_albums_yet": "Looks like you haven't added any albums to your favorites yet", - "no_logs_found": "No logs found", - "youtube_engine": "YouTube Engine", - "youtube_engine_not_installed_title": "{engine} is not installed", - "youtube_engine_not_installed_message": "{engine} is not installed in your system.", - "youtube_engine_set_path": "Make sure it's available in the PATH variable or\nset the absolute path to the {engine} executable below", - "youtube_engine_unix_issue_message": "In macOS/Linux/unix like OS's, setting path on .zshrc/.bashrc/.bash_profile etc. won't work.\nYou need to set the path in the shell configuration file", - "download": "Download", - "file_not_found": "File not found", - "custom": "Custom", - "add_custom_url": "Add custom URL", - "edit_port": "Edit port", - "port_helper_msg": "Default adalah -1 yang menunjukkan angka acak. Jika Anda telah mengonfigurasi firewall, disarankan untuk mengatur ini.", - "connect_request": "Izinkan {client} untuk terhubung?", - "connection_request_denied": "Koneksi ditolak. Pengguna menolak akses.", - "hipotetical_calculation": "*Ini dihitung berdasarkan pembayaran rata-rata per streaming dari platform streaming musik online sebesar $0,003 hingga $0,005. Ini adalah perhitungan hipotetis untuk memberikan wawasan kepada pengguna tentang seberapa banyak yang akan mereka bayarkan kepada artis jika mereka mendengarkan lagu mereka di platform streaming musik yang berbeda.", - "an_error_occurred": "Terjadi kesalahan", - "copy_to_clipboard": "Salin ke papan klip", - "view_logs": "Lihat log", - "retry": "Coba lagi", - "no_default_metadata_provider_selected": "Anda belum mengatur penyedia metadata default", - "manage_metadata_providers": "Kelola penyedia metadata", - "open_link_in_browser": "Buka Tautan di Peramban?", - "do_you_want_to_open_the_following_link": "Apakah Anda ingin membuka tautan berikut", - "unsafe_url_warning": "Tidak aman untuk membuka tautan dari sumber yang tidak tepercaya. Berhati-hatilah!\nAnda juga dapat menyalin tautan ke papan klip Anda.", - "copy_link": "Salin Tautan", - "building_your_timeline": "Membangun garis waktu Anda berdasarkan riwayat mendengarkan Anda...", - "official": "Resmi", - "author_name": "Penulis: {author}", - "third_party": "Pihak ketiga", - "plugin_requires_authentication": "Plugin memerlukan otentikasi", - "update_available": "Pembaruan tersedia", - "supports_scrobbling": "Mendukung scrobbling", - "plugin_scrobbling_info": "Plugin ini scrobble musik Anda untuk menghasilkan riwayat mendengarkan Anda.", - "default_plugin": "Bawaan", - "set_default": "Atur sebagai bawaan", - "support": "Dukungan", - "support_plugin_development": "Dukung pengembangan plugin", - "can_access_name_api": "- Dapat mengakses API **{name}**", - "do_you_want_to_install_this_plugin": "Apakah Anda ingin menginstal plugin ini?", - "third_party_plugin_warning": "Plugin ini berasal dari repositori pihak ketiga. Pastikan Anda memercayai sumbernya sebelum menginstal.", - "author": "Penulis", - "this_plugin_can_do_following": "Plugin ini dapat melakukan hal berikut", - "install": "Instal", - "install_a_metadata_provider": "Instal Penyedia Metadata", - "no_tracks_playing": "Tidak ada Lagu yang sedang diputar saat ini", - "synced_lyrics_not_available": "Lirik tersinkronisasi tidak tersedia untuk lagu ini. Silakan gunakan tab", - "plain_lyrics": "Lirik Polos", - "tab_instead": "sebagai gantinya.", - "disclaimer": "Penafian", - "third_party_plugin_dmca_notice": "Tim Spotube tidak bertanggung jawab (termasuk hukum) atas plugin \"Pihak ketiga\" mana pun.\nSilakan gunakan dengan risiko Anda sendiri. Untuk bug/masalah apa pun, silakan laporkan ke repositori plugin.\n\nJika ada plugin \"Pihak ketiga\" yang melanggar ToS/DMCA dari layanan/entitas hukum mana pun, silakan minta penulis plugin \"Pihak ketiga\" atau platform hosting, mis. GitHub/Codeberg, untuk mengambil tindakan. Yang tercantum di atas (berlabel \"Pihak ketiga\") adalah semua plugin publik/yang dikelola oleh komunitas. Kami tidak mengkurasi mereka, jadi kami tidak dapat mengambil tindakan apa pun terhadap mereka.\n\n", - "input_does_not_match_format": "Masukan tidak cocok dengan format yang diperlukan", - "metadata_provider_plugins": "Plugin Penyedia Metadata", - "paste_plugin_download_url": "Tempel url unduhan atau url repo GitHub/Codeberg atau tautan langsung ke file .smplug", - "download_and_install_plugin_from_url": "Unduh dan instal plugin dari url", - "failed_to_add_plugin_error": "Gagal menambahkan plugin: {error}", - "upload_plugin_from_file": "Unggah plugin dari file", - "installed": "Terinstal", - "available_plugins": "Plugin yang tersedia", - "configure_your_own_metadata_plugin": "Konfigurasi penyedia metadata playlist/album/artis/feed Anda sendiri", - "audio_scrobblers": "Scrobblers Audio", - "scrobbling": "Scrobbling", - "download_music_format": "Format unduh musik", - "streaming_music_format": "Format streaming musik", - "download_music_quality": "Kualitas unduh musik", - "streaming_music_quality": "Kualitas streaming musik", - "default_metadata_source": "Sumber metadata default", - "set_default_metadata_source": "Atur sumber metadata default", - "default_audio_source": "Sumber audio default", - "set_default_audio_source": "Atur sumber audio default", - "plugins": "Plugin", - "configure_plugins": "Konfigurasi plugin penyedia metadata dan sumber audio Anda sendiri", - "source": "Sumber: ", - "uncompressed": "Tidak terkompresi", - "dab_music_source_description": "Untuk audiophile. Menyediakan aliran audio berkualitas tinggi/tanpa kehilangan. Pencocokkan trek yang akurat berdasarkan ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb deleted file mode 100644 index c544dbf3..00000000 --- a/lib/l10n/app_it.arb +++ /dev/null @@ -1,495 +0,0 @@ -{ - "guest": "Ospite", - "browse": "Sfoglia", - "search": "Cerca", - "library": "Libreria", - "lyrics": "Testi", - "settings": "Impostazioni", - "genre_categories_filter": "Filtra categorie e generi...", - "genre": "Genere", - "personalized": "Personalizzato", - "featured": "In evidenza", - "new_releases": "Novità", - "songs": "Canzoni", - "playing_track": "Riproduzione {track}", - "queue_clear_alert": "Questo cancellerà la coda corrente. {track_length} tracce saranno rimosse\nVuoi continuare?", - "load_more": "Carica altro", - "playlists": "Playlist", - "artists": "Artisti", - "albums": "Album", - "tracks": "Tracce", - "downloads": "Downloads", - "filter_playlists": "Filtra le tue playlist...", - "liked_tracks": "Tracce piaciute", - "liked_tracks_description": "Tutte le tracce piaciute", - "create_playlist": "Crea Playlist", - "create_a_playlist": "Crea una playlist", - "update_playlist": "Aggiorna playlist", - "create": "Crea", - "cancel": "Annulla", - "update": "Aggiorna", - "playlist_name": "Nome Playlist", - "name_of_playlist": "Nome della playlist", - "description": "Descrizione", - "public": "Pubblico", - "collaborative": "Collaborativo", - "search_local_tracks": "Cerca tracce locali...", - "play": "Riproduci", - "delete": "Cancella", - "none": "Nessuno", - "sort_a_z": "Ordina dalla A-Z", - "sort_z_a": "Ordina dalla Z-A", - "sort_artist": "Ordina per Artista", - "sort_album": "Ordina per Album", - "sort_tracks": "Ordina tracce", - "currently_downloading": "Attualmente in Download ({tracks_length})", - "cancel_all": "Annulla Tutto", - "filter_artist": "Filtra artisti...", - "followers": "{followers} Seguaci", - "add_artist_to_blacklist": "Aggiungi artista alla lista nera", - "top_tracks": "Tracce Top", - "fans_also_like": "Ai fan piace anche", - "loading": "Caricamento...", - "artist": "Artista", - "blacklisted": "In lista nera", - "following": "Seguendo", - "follow": "Segui", - "artist_url_copied": "URL artista copiato negli appunti", - "added_to_queue": "Aggiunto {tracks} tracce alla coda", - "filter_albums": "Filtra album...", - "synced": "Sincronizzato", - "plain": "Semplice", - "shuffle": "Casuale", - "search_tracks": "Cerca tracce...", - "released": "Rilasciato", - "error": "Errore {error}", - "title": "Titolo", - "time": "Durata", - "more_actions": "Più azioni", - "download_count": "Scaricato ({count})", - "add_count_to_playlist": "Aggiungi ({count}) alla playlist", - "add_count_to_queue": "Aggiungi ({count}) alla Coda", - "play_count_next": "Riproduci ({count}) prossime", - "album": "Album", - "copied_to_clipboard": "Copiato {data} negli appunti", - "add_to_following_playlists": "Aggiungi {track} nelle seguenti Playlist", - "add": "Aggiungi", - "added_track_to_queue": "Aggiunto {track} alla coda", - "add_to_queue": "Aggiungi alla coda", - "track_will_play_next": "in seguito sarà riprodotta {track}", - "play_next": "Riproduci prossimo", - "removed_track_from_queue": "Rimosso {track} dalla coda", - "remove_from_queue": "Rimuovi dalla coda", - "remove_from_favorites": "Rimuovi dai preferiti", - "save_as_favorite": "Salva come preferito", - "add_to_playlist": "Aggiungi alla playlist", - "remove_from_playlist": "Rimuovi dalla playlist", - "add_to_blacklist": "Aggiungi alla blacklist", - "remove_from_blacklist": "Rimuovi dalla blacklist", - "share": "Condividi", - "mini_player": "Mini Riproduttore", - "slide_to_seek": "Scorri per cercare avanti o indietro", - "shuffle_playlist": "Playlist casuale", - "unshuffle_playlist": "Ordina playlist", - "previous_track": "Traccia precedente", - "next_track": "Traccia successiva", - "pause_playback": "Pausa Playback", - "resume_playback": "Riprendi Playback", - "loop_track": "Cicla traccia", - "repeat_playlist": "Ripeti playlist", - "queue": "Coda", - "alternative_track_sources": "Sorgenti traccia alternative", - "download_track": "Scarica traccia", - "tracks_in_queue": "{tracks} tracce in coda", - "clear_all": "Cancella tutto", - "show_hide_ui_on_hover": "Mostra/Nascondi UI al passaggio", - "always_on_top": "Sempre in cima", - "exit_mini_player": "Esci da Mini player", - "download_location": "Cartella di scarico", - "account": "Account", - "login_with_spotify": "Login con il tuo account Spotify", - "connect_with_spotify": "Connetti con Spotify", - "logout": "Esci", - "logout_of_this_account": "Esci da questo account", - "language_region": "Lingua & Regione", - "language": "Lingua", - "system_default": "Default sistema", - "market_place_region": "Regione del mercato", - "recommendation_country": "Paese Raccomandato", - "appearance": "Aspetto", - "layout_mode": "Modalità Layout", - "override_layout_settings": "Sovrascrivi le impostazioni del layout responsivo", - "adaptive": "Adattiva", - "compact": "Compatta", - "extended": "Estesa", - "theme": "Tema", - "dark": "Scuro", - "light": "Chiaro", - "system": "Sistema", - "accent_color": "Colore accento", - "sync_album_color": "Syncronizza colore album", - "sync_album_color_description": "Usa il colore dominante della copertina dell'album come colore accento", - "playback": "Riproduzione", - "audio_quality": "Qualità Audio", - "high": "Alta", - "low": "Bassa", - "pre_download_play": "Pre-scarica e riproduci", - "pre_download_play_description": "Anzi che effettuare lo stream dell'audio, scarica invece i byte e li riproduce (raccomandato per gli utenti con banda più alta)", - "skip_non_music": "Salta i segmenti non di musica (SponsorBlock)", - "blacklist_description": "Tracce e artisti in blacklist", - "wait_for_download_to_finish": "Prego attendere che lo scaricamento corrente finisca", - "desktop": "Desktop", - "close_behavior": "Comportamento Chiusura", - "close": "Chiudi", - "minimize_to_tray": "Minimizza in tray", - "show_tray_icon": "Mostra icona in tray di sistema", - "about": "A proposito di", - "u_love_spotube": "Sappiamo che ami Spotube", - "check_for_updates": "Controlla aggiornamenti", - "about_spotube": "A proposito di Spotube", - "blacklist": "Blacklist", - "please_sponsor": "Per favore sponsorizza/dona", - "spotube_description": "Spotube, un client spotify gratis per tutti, multipiattaforma e leggero", - "version": "Versione", - "build_number": "Numero Build", - "founder": "Fondatore", - "repository": "Repository", - "bug_issues": "Bug+Problemi", - "made_with": "Fatto con ❤️ in Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licenza", - "add_spotify_credentials": "Aggiungi le tue credenziali spotify per iniziare", - "credentials_will_not_be_shared_disclaimer": "Non ti preoccupare, le tue credenziali non saranno inviate o condivise con nessuno", - "know_how_to_login": "Non sai come farlo?", - "follow_step_by_step_guide": "Segui la guida passo-passo", - "spotify_cookie": "Cookie Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Inserire tutti i campi", - "submit": "Invia", - "exit": "Esci", - "previous": "Precedente", - "next": "Prossimo", - "done": "Finito", - "step_1": "Passo 1", - "first_go_to": "Prim, vai a", - "login_if_not_logged_in": "ed effettua il login o iscrizione se non sei già acceduto", - "step_2": "Passo 2", - "step_2_steps": "1. Quando sei acceduto premi F12 o premi il tasto destro del Mouse > Ispeziona per aprire gli strumenti di sviluppo del browser.\n2. Vai quindi nel tab \"Applicazione\" (Chrome, Edge, Brave etc..) o tab \"Archiviazione\" (Firefox, Palemoon etc..)\n3. Vai nella sezione \"Cookies\" quindi nella sezione \"https://accounts.spotify.com\"", - "step_3": "Passo 3", - "success_emoji": "Successo🥳", - "success_message": "Ora hai correttamente effettuato il login al tuo account Spotify. Bel lavoro, amico!", - "step_4": "Passo 4", - "something_went_wrong": "Qualcosa è andato storto", - "piped_instance": "Istanza Server Piped", - "piped_description": "L'istanza server Piped da usare per il match della tracccia", - "piped_warning": "Alcune di queste non funzioneranno benen. Usa quindi a tuo rischio", - "generate_playlist": "Genera Playlist", - "track_exists": "La traccia {track} esiste già", - "replace_downloaded_tracks": "Sostituisci tutte le tracce scaricate", - "skip_download_tracks": "Salta lo scaricamento di tutte le tracce scaricate", - "do_you_want_to_replace": "Vuoi sovrascrivere la traccia esistente??", - "replace": "Sovrascrivi", - "skip": "Salta", - "select_up_to_count_type": "Seleziona fino a {count} {type}", - "select_genres": "Seleziona Generi", - "add_genres": "Aggiungi Generi", - "country": "Paese", - "number_of_tracks_generate": "Nnumero di tracce da generare", - "acousticness": "Acustica", - "danceability": "Ballabilità", - "energy": "Energia", - "instrumentalness": "Strumentalità", - "liveness": "Vitalità", - "loudness": "Sonorità", - "speechiness": "Loquacità", - "valence": "Valenza", - "popularity": "Popolarità", - "key": "Chiave", - "duration": "Durata (s)", - "tempo": "Tempo (BPM)", - "mode": "Modo", - "time_signature": "Indicazione di tempo", - "short": "Corta", - "medium": "Media", - "long": "Lunga", - "min": "Min", - "max": "Max", - "target": "Obiettivo", - "moderate": "Moderato", - "deselect_all": "Deseleziona Tutto", - "select_all": "Seleziona Tutto", - "are_you_sure": "Sei certo?", - "generating_playlist": "Generazione delle tue playlist custom...", - "selected_count_tracks": "{count} tracce selezionate", - "download_warning": "Se scarichi tutte le Tracce in massa stai chiaramente piratando Musica e causando un danno alla società creativa della Musica. Spero che tu sia cosciente di questo. Cerca di rispettare e supportare sempre il duro lavoro degli Artisti", - "download_ip_ban_warning": "A proposito, il tuo IP può essere bloccato da YouTube per il numero di richieste di download eccessive rispetto la norma. Il blocco IP significa che non puoi usare YoutTube (anche hai effettuato l'accesso) per almeno 2-3 mesi dal dispositivo con questo IP. Spotube non ha responsabilità se questo dovesse accadere", - "by_clicking_accept_terms": "Cliccando su 'accetta' concordi con i seguenti termini:", - "download_agreement_1": "So che sto piratando Musica. Sono cattivo", - "download_agreement_2": "Supporterò l'Artista come potrò e sto facendo questo solo perchè non ho denaro per acquistare il suo prodotto dell'ingegno", - "download_agreement_3": "Sono completamente cosciente che il mio IP può essere bloccato da YouTube & non riterrò responsabili Spotube o i suoi autori/contributori per ogni inconveniente causato dalla mia azione corrente", - "decline": "Declino", - "accept": "Accetto", - "details": "Dettagli", - "youtube": "YouTube", - "channel": "Canale", - "likes": "Mi Piace", - "dislikes": "Non Mi Piace", - "views": "Viste", - "streamUrl": "URL dello streaming", - "stop": "Stop", - "sort_newest": "Ordina per nuovi aggiunti", - "sort_oldest": "Ordina per aggiunta più vecchia", - "sleep_timer": "Timer Dormire", - "mins": "{minutes} Minuti", - "hours": "{hours} Ore", - "hour": "{hours} Ora", - "custom_hours": "Orari Personalizzati", - "logs": "Log", - "developers": "Sviluppatori", - "not_logged_in": "Non hai effettuato l'accesso", - "search_mode": "Modalità Ricerca", - "youtube_api_type": "Tipo API", - "ok": "Ok", - "failed_to_encrypt": "Criptazione fallita", - "encryption_failed_warning": "Spotube usa la criptazione per memorizzare in modo sicuro i dati. Ma ha fallito a farlo. Passerà quindi in ripiego alla memorizzazione non siscura\nSe stai usando Linux assicurati di avere un servizio di segretezza installato (gnome-keyring, kde-wallet, keepassxc etc)", - "querying_info": "Richiesta informazioni...", - "piped_api_down": "Le Piped API non funzionano", - "piped_down_error_instructions": "L'istanza di Piped {pipedInstance} è correntemente offline\n\nCambia istanza o cambia 'Tipo API' alle API ufficiali YouTube\n\nAssicurati di riavviare l'app dopo il cambio", - "you_are_offline": "Sei correntemente offline", - "connection_restored": "Connessione ad internet ripristinata", - "use_system_title_bar": "Usa la barra del titolo di sistema", - "crunching_results": "Elaborazione risultati...", - "search_to_get_results": "Cerca per ottenere risultati", - "use_amoled_mode": "Usa modalità AMOLED", - "pitch_dark_theme": "Tema nero profondo", - "normalize_audio": "Normalizza audio", - "change_cover": "Cambia copertina", - "add_cover": "Aggiungi copertina", - "restore_defaults": "Ripristina default", - "download_music_codec": "Codec musicale scaricamento", - "streaming_music_codec": "Codec musicale streaming", - "login_with_lastfm": "Accesso a Last.fm", - "connect": "Connetti", - "disconnect_lastfm": "Disconnetti Last.fm", - "disconnect": "Disconnetti", - "username": "Nome utente", - "password": "Password", - "login": "Accesso", - "login_with_your_lastfm": "Accedi con il tuo account Last.fm", - "scrobble_to_lastfm": "Invia a Last.fm", - "audio_source": "Fonte audio", - "go_to_album": "Vai all'album", - "discord_rich_presence": "Presenza ricca di Discord", - "browse_all": "Esplora tutto", - "genres": "Generi", - "explore_genres": "Esplora generi", - "step_3_steps": "Copia il valore del cookie \"sp_dc\"", - "step_4_steps": "Incolla il valore copiato di \"sp_dc\"", - "friends": "Amici", - "no_lyrics_available": "Spiacente, impossibile trovare il testo di questa traccia", - "sort_duration": "Ordina per Durata", - "start_a_radio": "Avvia una Radio", - "how_to_start_radio": "Come vuoi avviare la radio?", - "replace_queue_question": "Vuoi sostituire la coda attuale o aggiungerla?", - "endless_playback": "Riproduzione Infinita", - "delete_playlist": "Elimina Playlist", - "delete_playlist_confirmation": "Sei sicuro di voler eliminare questa playlist?", - "local_tracks": "Tracce Locali", - "song_link": "Link della Canzone", - "skip_this_nonsense": "Salta questa sciocchezza", - "freedom_of_music": "“Libertà della Musica”", - "freedom_of_music_palm": "“Libertà della Musica nel palmo della tua mano”", - "get_started": "Cominciamo", - "youtube_source_description": "Consigliato e funziona meglio.", - "piped_source_description": "Ti senti libero? Come YouTube ma molto più gratuito.", - "jiosaavn_source_description": "Il migliore per la regione dell'Asia meridionale.", - "highest_quality": "Massima Qualità: {quality}", - "select_audio_source": "Seleziona Sorgente Audio", - "endless_playback_description": "Aggiungi automaticamente nuove canzoni alla fine della coda", - "choose_your_region": "Scegli la tua regione", - "choose_your_region_description": "Questo aiuterà Spotube a mostrarti il contenuto giusto per la tua posizione.", - "choose_your_language": "Scegli la tua lingua", - "help_project_grow": "Aiuta questo progetto a crescere", - "help_project_grow_description": "Spotube è un progetto open-source. Puoi aiutare questo progetto a crescere contribuendo al progetto, segnalando bug o suggerendo nuove funzionalità.", - "contribute_on_github": "Contribuisci su GitHub", - "donate_on_open_collective": "Dona su Open Collective", - "browse_anonymously": "Naviga in modo anonimo", - "enable_connect": "Abilita connessione", - "enable_connect_description": "Controlla Spotube da altri dispositivi", - "devices": "Dispositivi", - "select": "Seleziona", - "connect_client_alert": "Stai venendo controllato da {client}", - "this_device": "Questo dispositivo", - "remote": "Remoto", - "local_library": "Biblioteca locale", - "add_library_location": "Aggiungi alla biblioteca", - "remove_library_location": "Rimuovi dalla biblioteca", - "local_tab": "Locale", - "stats": "Statistiche", - "and_n_more": "e {count} in più", - "recently_played": "Riprodotti di recente", - "browse_more": "Esplora di più", - "no_title": "Nessun titolo", - "not_playing": "Non in riproduzione", - "epic_failure": "Fallimento epico!", - "added_num_tracks_to_queue": "Aggiunti {tracks_length} brani alla coda", - "spotube_has_an_update": "Spotube ha un aggiornamento", - "download_now": "Scarica ora", - "nightly_version": "Spotube Nightly {nightlyBuildNum} è stato rilasciato", - "release_version": "Spotube v{version} è stato rilasciato", - "read_the_latest": "Leggi l'ultimo ", - "release_notes": "note di rilascio", - "pick_color_scheme": "Scegli uno schema di colori", - "save": "Salva", - "choose_the_device": "Scegli il dispositivo:", - "multiple_device_connected": "Sono collegati più dispositivi.\nScegli il dispositivo su cui vuoi che venga eseguita questa azione", - "nothing_found": "Nessun risultato", - "the_box_is_empty": "La scatola è vuota", - "top_artists": "Artisti Top", - "top_albums": "Album Top", - "this_week": "Questa settimana", - "this_month": "Questo mese", - "last_6_months": "Ultimi 6 mesi", - "this_year": "Quest'anno", - "last_2_years": "Ultimi 2 anni", - "all_time": "Di tutti i tempi", - "powered_by_provider": "Sostenuto da {providerName}", - "email": "Email", - "profile_followers": "Follower", - "birthday": "Compleanno", - "subscription": "Abbonamento", - "not_born": "Non nato", - "hacker": "Hacker", - "profile": "Profilo", - "no_name": "Nessun nome", - "edit": "Modifica", - "user_profile": "Profilo utente", - "count_plays": "{count} riproduzioni", - "streaming_fees_hypothetical": "Spese di streaming (ipotetico)", - "minutes_listened": "Minuti ascoltati", - "streamed_songs": "Brani in streaming", - "count_streams": "{count} streaming", - "owned_by_you": "Di tua proprietà", - "copied_shareurl_to_clipboard": "Copiato {shareUrl} negli appunti", - "spotify_hipotetical_calculation": "*Questo è calcolato in base al pagamento per streaming di Spotify\nche va da $0.003 a $0.005. Questo è un calcolo ipotetico\nper dare all'utente un'idea di quanto avrebbe pagato agli artisti se avesse ascoltato\ne loro canzoni su Spotify.", - "count_mins": "{minutes} min", - "summary_minutes": "minuti", - "summary_listened_to_music": "Musica ascoltata", - "summary_songs": "brani", - "summary_streamed_overall": "Streaming complessivo", - "summary_owed_to_artists": "Dovuto agli artisti\nquesto mese", - "summary_artists": "dell'artista", - "summary_music_reached_you": "La musica ti ha raggiunto", - "summary_full_albums": "album completi", - "summary_got_your_love": "Ha ricevuto il tuo amore", - "summary_playlists": "playlist", - "summary_were_on_repeat": "Erano in ripetizione", - "total_money": "Totale {money}", - "webview_not_found": "Webview non trovato", - "webview_not_found_description": "Nessun runtime Webview installato nel tuo dispositivo.\nSe è installato, assicurati che sia nel environment PATH\n\nDopo l'installazione, riavvia l'app", - "unsupported_platform": "Piattaforma non supportata", - "invidious_instance": "Istanza del server Invidious", - "invidious_description": "L'istanza del server Invidious da utilizzare per il matching delle tracce", - "invidious_warning": "Alcuni potrebbero non funzionare bene. Usali a tuo rischio", - "invidious_source_description": "Simile a Piped ma con maggiore disponibilità.", - "cache_music": "Cache musica", - "open": "Apri", - "cache_folder": "Cartella cache", - "export": "Esporta", - "clear_cache": "Cancella cache", - "clear_cache_confirmation": "Vuoi cancellare la cache?", - "export_cache_files": "Esporta file nella cache", - "found_n_files": "Trovati {count} file", - "export_cache_confirmation": "Vuoi esportare questi file su", - "exported_n_out_of_m_files": "Esportati {filesExported} su {files} file", - "playlist": "Playlist", - "no_loop": "Nessun ciclo", - "generate": "Genera", - "undo": "Annulla", - "download_all": "Scarica tutto", - "add_all_to_playlist": "Aggiungi tutto alla playlist", - "add_all_to_queue": "Aggiungi tutto alla coda", - "play_all_next": "Riproduci tutto dopo", - "pause": "Pausa", - "view_all": "Vedi tutto", - "no_tracks_added_yet": "Sembra che non hai ancora aggiunto nessun brano", - "no_tracks": "Sembra che non ci siano brani qui", - "no_tracks_listened_yet": "Sembra che non hai ascoltato nulla ancora", - "not_following_artists": "Non stai seguendo alcun artista", - "no_favorite_albums_yet": "Sembra che non hai ancora aggiunto album ai tuoi preferiti", - "no_logs_found": "Nessun registro trovato", - "youtube_engine": "Motore YouTube", - "youtube_engine_not_installed_title": "{engine} non è installato", - "youtube_engine_not_installed_message": "{engine} non è installato nel tuo sistema.", - "youtube_engine_set_path": "Assicurati che sia disponibile nella variabile PATH o\nimposta il percorso assoluto all'eseguibile {engine} qui sotto", - "youtube_engine_unix_issue_message": "In macOS/Linux/os simili a unix, impostare il percorso su .zshrc/.bashrc/.bash_profile ecc. non funzionerà.\nDevi impostare il percorso nel file di configurazione della shell", - "download": "Scarica", - "file_not_found": "File non trovato", - "custom": "Personalizzato", - "add_custom_url": "Aggiungi URL personalizzato", - "edit_port": "Modifica porta", - "port_helper_msg": "Il valore predefinito è -1, che indica un numero casuale. Se hai configurato un firewall, si consiglia di impostarlo.", - "connect_request": "Consentire a {client} di connettersi?", - "connection_request_denied": "Connessione negata. L'utente ha negato l'accesso.", - "hipotetical_calculation": "*Questo è calcolato in base al pagamento medio per stream delle piattaforme di streaming musicale online, che va da $0.003 a $0.005. Si tratta di un calcolo ipotetico per dare all'utente un'idea di quanto avrebbe pagato agli artisti se avesse ascoltato la loro canzone su diverse piattaforme di streaming musicale.", - "an_error_occurred": "Si è verificato un errore", - "copy_to_clipboard": "Copia negli appunti", - "view_logs": "Visualizza log", - "retry": "Riprova", - "no_default_metadata_provider_selected": "Non hai impostato alcun provider di metadati predefinito", - "manage_metadata_providers": "Gestisci provider di metadati", - "open_link_in_browser": "Aprire il link nel browser?", - "do_you_want_to_open_the_following_link": "Vuoi aprire il seguente link", - "unsafe_url_warning": "Potrebbe essere pericoloso aprire link da fonti non attendibili. Sii cauto!\nPuoi anche copiare il link negli appunti.", - "copy_link": "Copia link", - "building_your_timeline": "Creazione della tua cronologia in base ai tuoi ascolti...", - "official": "Ufficiale", - "author_name": "Autore: {author}", - "third_party": "Terze parti", - "plugin_requires_authentication": "Il plugin richiede l'autenticazione", - "update_available": "Aggiornamento disponibile", - "supports_scrobbling": "Supporta lo scrobbling", - "plugin_scrobbling_info": "Questo plugin scrobbla la tua musica per generare la tua cronologia di ascolti.", - "default_plugin": "Predefinito", - "set_default": "Imposta come predefinito", - "support": "Supporto", - "support_plugin_development": "Sostieni lo sviluppo del plugin", - "can_access_name_api": "- Può accedere all'API **{name}**", - "do_you_want_to_install_this_plugin": "Vuoi installare questo plugin?", - "third_party_plugin_warning": "Questo plugin proviene da un repository di terze parti. Assicurati di fidarti della fonte prima di installarlo.", - "author": "Autore", - "this_plugin_can_do_following": "Questo plugin può fare quanto segue", - "install": "Installa", - "install_a_metadata_provider": "Installa un provider di metadati", - "no_tracks_playing": "Nessun brano in riproduzione al momento", - "synced_lyrics_not_available": "Testi sincronizzati non disponibili per questa canzone. Si prega di utilizzare la scheda", - "plain_lyrics": "Testi semplici", - "tab_instead": "invece.", - "disclaimer": "Disclaimer", - "third_party_plugin_dmca_notice": "Il team di Spotube non si assume alcuna responsabilità (anche legale) per i plugin di \"terze parti\".\nUsali a tuo rischio e pericolo. Per eventuali bug/problemi, segnalali al repository del plugin.\n\nSe un plugin di \"terze parti\" sta violando i ToS/DMCA di un servizio/entità legale, per favore chiedi all'autore del plugin \"terzo\" o alla piattaforma di hosting, ad esempio GitHub/Codeberg, di agire. Quelli elencati sopra (etichettati come \"terze parti\") sono tutti plugin pubblici/mantenuti dalla comunità. Non li curiamo, quindi non possiamo intraprendere alcuna azione su di essi.\n\n", - "input_does_not_match_format": "L'input non corrisponde al formato richiesto", - "metadata_provider_plugins": "Plugin del provider di metadati", - "paste_plugin_download_url": "Incolla l'URL di download o l'URL del repository GitHub/Codeberg o il link diretto al file .smplug", - "download_and_install_plugin_from_url": "Scarica e installa il plugin da URL", - "failed_to_add_plugin_error": "Impossibile aggiungere il plugin: {error}", - "upload_plugin_from_file": "Carica plugin da file", - "installed": "Installato", - "available_plugins": "Plugin disponibili", - "configure_your_own_metadata_plugin": "Configura il tuo provider di metadati per playlist/album/artista/feed", - "audio_scrobblers": "Scrobbler audio", - "scrobbling": "Scrobbling", - "download_music_format": "Formato download musica", - "streaming_music_format": "Formato streaming musica", - "download_music_quality": "Qualità download musica", - "streaming_music_quality": "Qualità streaming musica", - "default_metadata_source": "Fonte metadati predefinita", - "set_default_metadata_source": "Imposta fonte metadati predefinita", - "default_audio_source": "Fonte audio predefinita", - "set_default_audio_source": "Imposta fonte audio predefinita", - "plugins": "Plugin", - "configure_plugins": "Configura i tuoi plugin per fornitore metadati e fonte audio", - "source": "Fonte: ", - "uncompressed": "Non compresso", - "dab_music_source_description": "Per audiophile. Fornisce flussi audio di alta qualità/senza perdita. Abbinamento traccia accurato basato su ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb deleted file mode 100644 index 991f56be..00000000 --- a/lib/l10n/app_ja.arb +++ /dev/null @@ -1,493 +0,0 @@ -{ - "guest": "ゲスト", - "browse": "閲覧", - "search": "検索", - "library": "ライブラリ", - "lyrics": "歌詞", - "settings": "設定", - "genre_categories_filter": "カテゴリーやジャンルを絞り込み...", - "genre": "ジャンル", - "personalized": "あなたにおすすめ", - "featured": "注目", - "new_releases": "新着", - "songs": "曲", - "playing_track": "{track} を再生", - "queue_clear_alert": "現在のキューを消去します。{track_length} 曲を消去します。\n続行しますか?", - "load_more": "もっと読み込む", - "playlists": "再生リスト", - "artists": "アーティスト", - "albums": "アルバム", - "tracks": "曲", - "downloads": "ダウンロード", - "filter_playlists": "あなたの再生リストを絞り込み...", - "liked_tracks": "いいねした曲", - "liked_tracks_description": "いいねしたすべての曲", - "playlist": "再生リスト", - "create_a_playlist": "再生リストの作成", - "create": "作成", - "cancel": "キャンセル", - "playlist_name": "再生リスト名", - "name_of_playlist": "再生リストの名前", - "description": "説明", - "public": "公開", - "collaborative": "コラボ", - "search_local_tracks": "端末内の曲を検索...", - "play": "再生", - "delete": "削除", - "none": "なし", - "sort_a_z": "A-Z 順に並び替え", - "sort_z_a": "Z-A 順に並び替え", - "sort_artist": "アーティスト順に並び替え", - "sort_album": "アルバム順に並び替え", - "sort_duration": "長さ順に並べ替え", - "sort_tracks": "曲の並び替え", - "currently_downloading": "ダウンロード中 ({tracks_length}) 曲", - "cancel_all": "すべてキャンセル", - "filter_artist": "アーティストを絞り込み...", - "followers": "{followers} フォロワー", - "add_artist_to_blacklist": "このアーティストをブラックリストに追加", - "top_tracks": "人気の曲", - "fans_also_like": "ファンの間で人気", - "loading": "読み込み中...", - "artist": "アーティスト", - "blacklisted": "ブラックリスト", - "following": "フォロー中", - "follow": "フォローする", - "artist_url_copied": "アーティストの URL をクリップボードにコピーしました", - "added_to_queue": "{tracks} をキューに追加しました", - "filter_albums": "アルバムを絞り込み...", - "synced": "同期する", - "plain": "そのまま", - "shuffle": "シャッフル", - "search_tracks": "曲を検索...", - "released": "リリース日", - "error": "エラー {error}", - "title": "タイトル", - "time": "長さ", - "more_actions": "ほかの操作", - "download_count": "ダウンロード ({count}) 曲", - "add_count_to_playlist": "再生リストに ({count}) 曲を追加", - "add_count_to_queue": "キューに ({count}) 曲を追加", - "play_count_next": "次に ({count}) 曲を再生", - "album": "アルバム", - "copied_to_clipboard": "{data} をクリップボードにコピーしました", - "add_to_following_playlists": "{track} をこの再生リストに追加", - "add": "追加", - "added_track_to_queue": "キューに {track} を追加しました", - "add_to_queue": "キューに追加", - "track_will_play_next": "{track} を次に再生", - "play_next": "次に再生", - "removed_track_from_queue": "キューから {track} を除去しました", - "remove_from_queue": "キューから除去", - "remove_from_favorites": "お気に入りから除去", - "save_as_favorite": "お気に入りに保存", - "add_to_playlist": "再生リストに追加", - "remove_from_playlist": "再生リストから除去", - "add_to_blacklist": "ブラックリストに追加", - "remove_from_blacklist": "ブラックリストから除去", - "share": "共有", - "mini_player": "ミニプレイヤー", - "slide_to_seek": "前後にスライドしてシーク", - "shuffle_playlist": "再生リストをシャッフル", - "unshuffle_playlist": "再生リストのシャッフル解除", - "previous_track": "前の曲", - "next_track": "次の曲", - "pause_playback": "再生を停止", - "resume_playback": "再生を再開", - "loop_track": "曲をループ", - "no_loop": "ループなし", - "repeat_playlist": "再生リストをリピート", - "queue": "再生キュー", - "alternative_track_sources": "この曲の別の音源を選ぶ", - "download_track": "曲のダウンロード", - "tracks_in_queue": "{tracks}曲の再生キュー", - "clear_all": "すべて消去l", - "show_hide_ui_on_hover": "マウスを乗せてUIを表示/隠す", - "always_on_top": "常に手前に表示", - "exit_mini_player": "ミニプレイヤーを終了", - "download_location": "ダウンロード先", - "account": "アカウント", - "login_with_spotify": "Spotify アカウントでログイン", - "connect_with_spotify": "Spotify に接続", - "logout": "ログアウト", - "logout_of_this_account": "このアカウントからログアウト", - "language_region": "言語 & 地域", - "language": "言語", - "system_default": "システムの既定値", - "market_place_region": "音楽市場の地域", - "recommendation_country": "おすすめの国", - "appearance": "外観", - "layout_mode": "レイアウトの種類", - "override_layout_settings": "レスポンシブなレイアウトの種類の設定を上書きする", - "adaptive": "適応的", - "compact": "コンパクト", - "extended": "幅広", - "theme": "テーマ", - "dark": "ダーク", - "light": "ライト", - "system": "システムに従う", - "accent_color": "アクセントカラー", - "sync_album_color": "アルバムの色に合わせる", - "sync_album_color_description": "アルバムアートの主張色をアクセントカラーとして使用", - "playback": "再生", - "audio_quality": "音声品質", - "high": "高", - "low": "低", - "pre_download_play": "事前ダウンロードと再生", - "pre_download_play_description": "音声をストリーミングする代わりに、データをバイト単位でダウンロードして再生 (回線速度が早いユーザーにおすすめ)", - "skip_non_music": "音楽でない部分をスキップ (SponsorBlock)", - "blacklist_description": "曲とアーティストのブラックリスト", - "wait_for_download_to_finish": "現在のダウンロードが完了するまでお待ちください", - "desktop": "デスクトップ", - "close_behavior": "閉じた時の動作", - "close": "閉じる", - "minimize_to_tray": "トレイに最小化", - "show_tray_icon": "システムトレイにアイコンを表示", - "about": "このアプリについて", - "u_love_spotube": "Spotube が好きだと知っていますよ", - "check_for_updates": "アップデートの確認", - "about_spotube": "Spotube について", - "blacklist": "ブラックリスト", - "please_sponsor": "出資/寄付もお待ちします", - "spotube_description": "Spotube は、軽量でクロスプラットフォームな、すべて無料の spotify クライアント", - "version": "バージョン", - "build_number": "ビルド番号", - "founder": "創始者", - "repository": "リポジトリ", - "bug_issues": "バグや問題", - "made_with": "❤️ を込めてバングラディシュ🇧🇩で開発", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "ライセンス", - "add_spotify_credentials": "Spotify のログイン情報を追加してはじめましょう", - "credentials_will_not_be_shared_disclaimer": "心配ありません。個人情報を収集したり、共有されることはありません", - "know_how_to_login": "やり方が分からないですか?", - "follow_step_by_step_guide": "やり方の説明を見る", - "spotify_cookie": "Spotify {name} Cookies", - "cookie_name_cookie": "{name} Cookies", - "fill_in_all_fields": "すべての欄に入力してください", - "submit": "送信", - "exit": "終了", - "previous": "前へ", - "next": "次へ", - "done": "完了", - "step_1": "ステップ 1", - "first_go_to": "最初にここを開き", - "login_if_not_logged_in": "、ログインしてないならログインまたは登録します", - "step_2": "ステップ 2", - "step_2_steps": "1. ログインしたら、F12を押すか、マウス右クリック > 調査(検証)でブラウザの開発者ツール (devtools) を開きます。\n2. アプリケーション (Application) タブ (Chrome, Edge, Brave など) またはストレージタブ (Firefox, Palemoon など)\n3. Cookies 欄を選択し、https://accounts.spotify.com の枝を選びます", - "step_3": "ステップ 3", - "step_3_steps": "\"sp_dc\" Cookieの値をコピー", - "success_emoji": "成功🥳", - "success_message": "アカウントへのログインに成功しました。よくできました!", - "step_4": "ステップ 4", - "step_4_steps": "コピーした\"sp_dc\"の値を貼り付け", - "something_went_wrong": "何か誤りがあります", - "piped_instance": "Piped サーバーのインスタンス", - "piped_description": "曲の一致に使う Piped サーバーのインスタンス", - "piped_warning": "それらの一部ではうまく動作しないこともあります。自己責任で使用してください", - "invidious_instance": "Invidiousサーバーインスタンス", - "invidious_description": "曲の一致に使用するInvidiousサーバーインスタンス", - "invidious_warning": "一部はうまく機能しない可能性があります。自己責任で使用してください", - "generate_playlist": "再生リストの生成", - "track_exists": "曲 {track} は既に存在します", - "replace_downloaded_tracks": "すべてのダウンロード済みの曲を置換", - "skip_download_tracks": "すべてのダウンロード済みの曲をスキップ", - "do_you_want_to_replace": "既存の曲と置換しますか?", - "replace": "置換する", - "skip": "スキップ", - "select_up_to_count_type": "{type}を最大{count} 個まで選択", - "select_genres": "ジャンルを選択", - "add_genres": "ジャンルを追加", - "country": "国", - "number_of_tracks_generate": "生成する曲数", - "acousticness": "アコースティック感", - "danceability": "ダンス感", - "energy": "エネルギー", - "instrumentalness": "インストゥルメンタル", - "liveness": "ライブ感", - "loudness": "ラウドネス", - "speechiness": "会話感", - "valence": "多幸性", - "popularity": "人気度", - "key": "キー", - "duration": "長さ (秒)", - "tempo": "テンポ (BPM)", - "mode": "長調", - "time_signature": "拍子記号", - "short": "短", - "medium": "中", - "long": "長", - "min": "最小", - "max": "最大", - "target": "目標", - "moderate": "中", - "deselect_all": "すべて選択解除", - "select_all": "すべて選択", - "are_you_sure": "よろしいですか?", - "generating_playlist": "カスタムの再生リストを生成中...", - "selected_count_tracks": "{count} 曲が選ばれました", - "download_warning": "全曲の一括ダウンロードは明らかに音楽への海賊行為であり、音楽を生み出す共同体に損害を与えるでしょう。気づいてほしい。アーティストの多大な努力に敬意を払い、支援するようにしてください", - "download_ip_ban_warning": "また、通常よりも過剰なダウンロード要求があれば、YouTubeはあなたのIPをブロックします。つまりそのIPの端末からは、少なくとも2-3か月の間、(ログインしても)YouTubeを利用できなくなりす。そうなっても Spotube は一切の責任を負いません", - "by_clicking_accept_terms": "「同意する」のクリックにより、以下への同意となります:", - "download_agreement_1": "ええ、音楽への海賊行為だ。私はよくない", - "download_agreement_2": "芸術作品を買うお金がないのでそうするしかないが、アーティストをできる限り支援する", - "download_agreement_3": "私のIPがYouTubeにブロックされることがあると完全に把握した。私のこの行動により起きたどんな事故も、Spotube やその所有者/貢献者に責任はありません。", - "decline": "同意しない", - "accept": "同意する", - "details": "詳細", - "youtube": "YouTube", - "channel": "チャンネル", - "likes": "高評価", - "dislikes": "低評価", - "views": "視聴回数", - "streamUrl": "動画の URL", - "stop": "中止", - "sort_newest": "追加日の新しい順に並び替え", - "sort_oldest": "追加日の古い順に並び替え", - "sleep_timer": "スリープタイマー", - "mins": "{minutes} 分", - "hours": "{hours} 時間", - "hour": "{hours} 時間", - "custom_hours": "時間を指定", - "logs": "ログ", - "developers": "開発", - "not_logged_in": "ログインしていません", - "search_mode": "検索モード", - "audio_source": "音声の提供元", - "ok": "OK", - "failed_to_encrypt": "暗号化に失敗しました", - "encryption_failed_warning": "SpoTubeはデータを安全に保存するために暗号化を用いますが、暗号化に失敗しました。このため、安全でない保存領域への保存に切り替えます\nOSがLinuxなら、gnome-keyring、kde-wallet、keepassxcなどの管理ツールがインストールされていることを確認してください", - "querying_info": "情報を取得中...", - "piped_api_down": "Piped APIがダウンしています", - "piped_down_error_instructions": "Pipedインスタンス {pipedInstance} は現在ダウンしています\n\nインスタンスを変更するか、「APIの種類」を公式のYouTube APIに変更してください\n\n変更後にアプリを再起動してください", - "you_are_offline": "現在、オフラインです", - "connection_restored": "インターネット接続が復旧しました", - "use_system_title_bar": "システムのタイトルバーを使う", - "update_playlist": "再生リストを更新", - "update": "更新", - "local_library": "端末内ライブラリ", - "add_library_location": "ライブラリに追加", - "remove_library_location": "ライブラリから削除", - "crunching_results": "結果を処理中...", - "search_to_get_results": "結果を取得するために検索", - "use_amoled_mode": "AMOLEDモードを使用", - "pitch_dark_theme": "ピッチブラック ダークテーマ", - "normalize_audio": "音声を正規化", - "change_cover": "カバーを変更", - "add_cover": "カバーを追加", - "restore_defaults": "設定を初期化", - "download_music_codec": "ダウンロード用の音声コーデック", - "streaming_music_codec": "ストリーミング用の音声コーデック", - "login_with_lastfm": "Last.fmでログイン", - "connect": "接続", - "disconnect_lastfm": "Last.fmから切断", - "disconnect": "切断", - "username": "ユーザー名", - "password": "パスワード", - "login": "ログイン", - "login_with_your_lastfm": "Last.fmアカウントでログイン", - "scrobble_to_lastfm": "Last.fmにスクロブルする", - "go_to_album": "アルバムに移動", - "discord_rich_presence": "Discord リッチプレゼンス", - "browse_all": "すべてを閲覧", - "genres": "ジャンル", - "explore_genres": "ジャンルを探索", - "friends": "友達", - "no_lyrics_available": "すみません、この曲の歌詞が見つかりません", - "start_a_radio": "ラジオを開始", - "how_to_start_radio": "ラジオをどのように開始しますか?", - "replace_queue_question": "現在のキューを置き換えるか、追加しますか?", - "endless_playback": "エンドレス再生", - "delete_playlist": "再生リストを削除", - "delete_playlist_confirmation": "この再生リストを削除しますか?", - "local_tracks": "端末内の曲", - "local_tab": "端末内", - "song_link": "曲のリンク", - "skip_this_nonsense": "こんなことはスキップ", - "freedom_of_music": "“音楽の自由”", - "freedom_of_music_palm": "“音楽の自由を思いのままに”", - "get_started": "さあ始めましょう", - "youtube_source_description": "推奨され、最適に機能します。", - "piped_source_description": "自由を感じる?YouTubeと同じだけど、はるかに自由です。", - "jiosaavn_source_description": "南アジア地域では最適です。", - "invidious_source_description": "Pipedに似ていますが、より利用性があります。", - "highest_quality": "最高品質:{quality}", - "select_audio_source": "音声の提供元を選択", - "endless_playback_description": "キューの最後に新しい曲を自動で追加", - "choose_your_region": "地域を選択", - "choose_your_region_description": "Spotubeがあなたの地域に適したコンテンツを表示します。", - "choose_your_language": "言語を選択してください", - "help_project_grow": "プロジェクトの成長を支援する", - "help_project_grow_description": "SpoTubeはオープンソースプロジェクトです。貢献したり、バグ報告したり、新機能を提案することで、プロジェクトの成長に貢献できます。", - "contribute_on_github": "GitHubで貢献", - "donate_on_open_collective": "Open Collectiveで寄付", - "browse_anonymously": "匿名で閲覧する", - "enable_connect": "接続する", - "enable_connect_description": "他の端末からSpotubeを制御する", - "devices": "機器", - "select": "選択", - "connect_client_alert": "{client} から操作されています", - "this_device": "この端末", - "remote": "リモート", - "stats": "統計", - "and_n_more": "さらに {count} 項目", - "recently_played": "最近聴いた曲", - "browse_more": "もっと表示", - "no_title": "タイトルなし", - "not_playing": "再生なし", - "epic_failure": "壮大なエラー!", - "added_num_tracks_to_queue": "{tracks_length} 曲をキューに追加しました", - "spotube_has_an_update": "Spotube の最新版あり", - "download_now": "今すぐダウンロード", - "nightly_version": "Spotube Nightly {nightlyBuildNum} がリリースされました", - "release_version": "Spotube v{version} がリリースされました", - "read_the_latest": "最新の ", - "release_notes": "更新情報を読む", - "pick_color_scheme": "カラーテーマを選択", - "save": "保存", - "choose_the_device": "端末を選択:", - "multiple_device_connected": "複数の端末が接続されています。\nこの操作を実行する端末を選択", - "nothing_found": "何も見つかりませんでした", - "the_box_is_empty": "ボックスは空です", - "top_artists": "トップアーティスト", - "top_albums": "トップアルバム", - "this_week": "今週", - "this_month": "今月", - "last_6_months": "過去6か月", - "this_year": "今年", - "last_2_years": "過去2年間", - "all_time": "全期間", - "powered_by_provider": "{providerName} 提供", - "email": "メール", - "profile_followers": "フォロワー", - "birthday": "誕生日", - "subscription": "登録", - "not_born": "未出生", - "hacker": "ハッカー", - "profile": "プロフィール", - "no_name": "名前なし", - "edit": "編集", - "user_profile": "ユーザープロフィール", - "count_plays": "{count} 回再生", - "streaming_fees_hypothetical": "ストリーミング料金 (概算)", - "minutes_listened": "視聴時間", - "streamed_songs": "ストリーミングされた曲", - "count_streams": "{count} 回のストリーム", - "owned_by_you": "あなたが所有", - "copied_shareurl_to_clipboard": "{shareUrl} をクリップボードにコピーしました", - "spotify_hipotetical_calculation": "*これは、Spotifyのストリームあたり\n$0.003 から $0.005 として計算されています。\n概算であり、Spotify で曲を聴いていたら、アーティストに\nどれくらい支払われたかを示すものです。", - "count_mins": "{minutes} 分", - "summary_minutes": "分", - "summary_listened_to_music": "音楽を聴いた", - "summary_songs": "曲", - "summary_streamed_overall": "まるごと聴いた", - "summary_owed_to_artists": "今月アーティストに払う\nべき額", - "summary_artists": "アーティスト", - "summary_music_reached_you": "の音楽が届いた", - "summary_full_albums": "フルアルバム", - "summary_got_your_love": "があなたの愛を受け取った", - "summary_playlists": "再生リスト", - "summary_were_on_repeat": "をリピートしました", - "total_money": "計 {money}", - "webview_not_found": "Webviewが見つかりません", - "webview_not_found_description": "端末にWebviewランタイムがインストールされていません。\nインストールされている場合は、環境変数のパスにあるか確認してください\n\nインストール後、アプリを再起動してください", - "unsupported_platform": "未対応のプラットフォーム", - "cache_music": "音楽をキャッシュ", - "open": "開く", - "cache_folder": "キャッシュフォルダー", - "export": "エクスポート", - "clear_cache": "キャッシュをクリア", - "clear_cache_confirmation": "キャッシュをクリアしますか?", - "export_cache_files": "キャッシュされたファイルをエクスポート", - "found_n_files": "{count}ファイルが見つかりました", - "export_cache_confirmation": "これらのファイルをエクスポートしますか", - "exported_n_out_of_m_files": "{filesExported} / {files}ファイルがエクスポートされました", - "generate": "生成", - "undo": "元に戻す", - "download_all": "すべてダウンロード", - "add_all_to_playlist": "すべて再生リストに追加", - "add_all_to_queue": "すべてキューに追加", - "play_all_next": "すべてを次に再生", - "pause": "一時停止", - "view_all": "すべて表示", - "no_tracks_added_yet": "まだ曲を追加していないようです", - "no_tracks": "ここには曲がないようです", - "no_tracks_listened_yet": "まだ何も聞いていないようです", - "not_following_artists": "アーティストをフォローしていません", - "no_favorite_albums_yet": "まだお気に入りのアルバムを追加していないようです", - "no_logs_found": "ログなし", - "youtube_engine": "YouTubeエンジン", - "youtube_engine_not_installed_title": "{engine}はインストールされていません", - "youtube_engine_not_installed_message": "{engine}はシステムにインストールされていません。", - "youtube_engine_set_path": "PATH変数に設定されていることを確認するか\n{engine}実行ファイルの絶対パスを下記に設定してください", - "youtube_engine_unix_issue_message": "macOS/Linux/Unix系OSでは、.zshrc/.bashrc/.bash_profileなどでパスを設定しても動作しません。\nシェルの設定ファイルにパスを設定する必要があります", - "download": "ダウンロード", - "file_not_found": "ファイルが見つかりません", - "custom": "独自", - "add_custom_url": "独自にURLを追加", - "edit_port": "ポートを編集", - "port_helper_msg": "初期設定は-1で、ランダムな番号を示します。ファイアウォールを設定している場合に設定することを推奨します。", - "connect_request": "{client}の接続を許可しますか?", - "connection_request_denied": "接続が拒否されました。ユーザーがアクセスを拒否しました。", - "hipotetical_calculation": "*これは、オンライン音楽ストリーミングプラットフォームの1ストリームあたりの平均支払い額である$0.003〜$0.005に基づいて計算されています。これは、ユーザーが異なる音楽ストリーミングプラットフォームで曲を聴いた場合に、アーティストにどれだけ支払ったかを把握するための仮説的な計算です。", - "an_error_occurred": "エラーが発生しました", - "copy_to_clipboard": "クリップボードにコピー", - "view_logs": "ログを表示", - "retry": "再試行", - "no_default_metadata_provider_selected": "デフォルトのメタデータプロバイダーが設定されていません", - "manage_metadata_providers": "メタデータプロバイダーを管理", - "open_link_in_browser": "リンクをブラウザで開きますか?", - "do_you_want_to_open_the_following_link": "次のリンクを開きますか", - "unsafe_url_warning": "信頼できないソースからのリンクを開くのは安全ではない場合があります。注意してください!\nリンクをクリップボードにコピーすることもできます。", - "copy_link": "リンクをコピー", - "building_your_timeline": "あなたの視聴履歴に基づいてタイムラインを作成しています...", - "official": "公式", - "author_name": "作者: {author}", - "third_party": "サードパーティ", - "plugin_requires_authentication": "プラグインには認証が必要です", - "update_available": "アップデートが利用可能です", - "supports_scrobbling": "scrobblingに対応", - "plugin_scrobbling_info": "このプラグインは、あなたの音楽をscrobbleして視聴履歴を生成します。", - "default_plugin": "デフォルト", - "set_default": "デフォルトに設定", - "support": "サポート", - "support_plugin_development": "プラグイン開発をサポート", - "can_access_name_api": "- **{name}** APIにアクセスできます", - "do_you_want_to_install_this_plugin": "このプラグインをインストールしますか?", - "third_party_plugin_warning": "このプラグインはサードパーティのリポジトリからのものです。インストールする前にソースを信頼できるか確認してください。", - "author": "作者", - "this_plugin_can_do_following": "このプラグインは以下のことができます", - "install": "インストール", - "install_a_metadata_provider": "メタデータプロバイダーをインストール", - "no_tracks_playing": "現在再生中のトラックはありません", - "synced_lyrics_not_available": "この曲の同期歌詞は利用できません。代わりに", - "plain_lyrics": "シンプルな歌詞", - "tab_instead": "タブを使用してください。", - "disclaimer": "免責事項", - "third_party_plugin_dmca_notice": "Spotubeチームは、いかなる「サードパーティ」プラグインについても責任(法的責任を含む)を負いません。\nご自身の責任でご使用ください。バグや問題については、プラグインリポジトリに報告してください。\n\n「サードパーティ」プラグインが何らかのサービス/法人のToS/DMCAを侵害している場合、その「サードパーティ」プラグインの作者またはホスティングプラットフォーム(例:GitHub/Codeberg)に措置を講じるよう依頼してください。上記に記載されている(「サードパーティ」とラベル付けされた)ものはすべて、パブリック/コミュニティによって維持されているプラグインです。私たちはそれらをキュレーションしていないため、それらに対して措置を講じることはできません。\n\n", - "input_does_not_match_format": "入力が必須フォーマットと一致しません", - "metadata_provider_plugins": "メタデータプロバイダープラグイン", - "paste_plugin_download_url": "ダウンロードURL、GitHub/CodebergリポジトリURL、または.smplugファイルへの直接リンクを貼り付けます", - "download_and_install_plugin_from_url": "URLからプラグインをダウンロードしてインストール", - "failed_to_add_plugin_error": "プラグインの追加に失敗しました: {error}", - "upload_plugin_from_file": "ファイルからプラグインをアップロード", - "installed": "インストール済み", - "available_plugins": "利用可能なプラグイン", - "configure_your_own_metadata_plugin": "独自のプレイリスト/アルバム/アーティスト/フィードのメタデータプロバイダーを構成", - "audio_scrobblers": "オーディオスクロッブラー", - "scrobbling": "Scrobbling", - "download_music_format": "音楽ダウンロード形式", - "streaming_music_format": "音楽ストリーミング形式", - "download_music_quality": "音楽ダウンロード品質", - "streaming_music_quality": "音楽ストリーミング品質", - "default_metadata_source": "デフォルトメタデータソース", - "set_default_metadata_source": "デフォルトメタデータソースを設定", - "default_audio_source": "デフォルトオーディオソース", - "set_default_audio_source": "デフォルトオーディオソースを設定", - "plugins": "プラグイン", - "configure_plugins": "独自のメタデータプロバイダーとオーディオソースプラグインを設定", - "source": "ソース: ", - "uncompressed": "非圧縮", - "dab_music_source_description": "オーディオファイル向け。高品質/ロスレスオーディオストリームを提供。正確なISRCベースのトラックマッチング。" -} \ No newline at end of file diff --git a/lib/l10n/app_ka.arb b/lib/l10n/app_ka.arb deleted file mode 100644 index 6a0cb06c..00000000 --- a/lib/l10n/app_ka.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "სტუმარი", - "browse": "ნახვა", - "search": "ძებნა", - "library": "ბიბლიოთეკა", - "lyrics": "ტექსტები", - "settings": "კონფიგურაციები", - "genre_categories_filter": "კატეგორიების ან ჟანრების ფილტრი...", - "genre": "ჟანრი", - "personalized": "პეერსონალიზებული", - "featured": "გამორჩეული", - "new_releases": "ახალი გამოცემები", - "songs": "სიმღერები", - "playing_track": "უკრავს {track}", - "queue_clear_alert": "ეს გაასუფთავებს მიმდინარე რიგს. {track_length} ტრეკი წაიშლება\nᲒინდა გააგრძელო?", - "load_more": "მეტის ჩატვირთვა", - "playlists": "ფლეილისტები", - "artists": "არტისტები", - "albums": "ალბომები", - "tracks": "ტრეკები", - "downloads": "ჩამოტვირთვები", - "filter_playlists": "ფლეილისტების გაფილტვრა...", - "liked_tracks": "მოწონებული ტრეკები", - "liked_tracks_description": "ყველა შენი მოწონებული ტრეკი", - "create_playlist": "ფლეილისტის შექმნა", - "create_a_playlist": "ფლეილისტის შექმნა", - "update_playlist": "ფლეილისტის განახლება", - "create": "შექმნა", - "cancel": "გაუქმება", - "update": "განახლება", - "playlist_name": "ფლეილისტის სახელი", - "name_of_playlist": "ფლეილისტის სახელი", - "description": "აღწერა", - "public": "საჯარო", - "collaborative": "კოლაბორაციული", - "search_local_tracks": "ლოცალური ტრეკების ძებნა...", - "play": "დაკვრა", - "delete": "წაშლა", - "none": "არცერთი", - "sort_a_z": "დალაგება A-Z-ს მიხედვით", - "sort_z_a": "დალაგება Z-A-ს მიხედვით", - "sort_artist": "დალაგება არტისტის მიხედვით", - "sort_album": "დალაგება ალბომის მიხედვით", - "sort_duration": "დალაგება ხანგრძლივობის მიხედვით", - "sort_tracks": "ტრეკების დალაგება", - "currently_downloading": "მიმდინარეობს ჩამოტვირთვა ({tracks_length})", - "cancel_all": "ყველას გაუქმება", - "filter_artist": "არტისტების ფილტრი...", - "followers": "{followers} ფოლოვერები", - "add_artist_to_blacklist": "არტისტის შავ სიაში დამატება", - "top_tracks": "ტოპ ტრეკები", - "fans_also_like": "ფანებს ასევე მოსწონთ", - "loading": "იტვირთება...", - "artist": "არტისტი", - "blacklisted": "შავ სიაში მყოფი", - "following": "ფოლოვინგი", - "follow": "დაფოლოვება", - "artist_url_copied": "არტისტის ლინკი დაკოპირებულია", - "added_to_queue": "{tracks} ტრეკი დაემატა რიგში", - "filter_albums": "ალბომების გაფილტვრა...", - "synced": "სინქრონიზებული", - "plain": "Plain", - "shuffle": "რიგის არევა", - "search_tracks": "ტრეკების ძებნა...", - "released": "გამოშვებული", - "error": "შეცდომა {error}", - "title": "სათაური", - "time": "დრო", - "more_actions": "მეტი მოქმედებები", - "download_count": "გადმოწერა ({count})", - "add_count_to_playlist": "ფლეილისტში ({count})-ის დამატება", - "add_count_to_queue": "რიგში ({count})-ის დამატება", - "play_count_next": "შემდეგი ({count})-ის დაკვრა", - "album": "ალბომი", - "copied_to_clipboard": "{data} დაკოპირებულია", - "add_to_following_playlists": "დაამატე {track} ამ ფლეილისტებში", - "add": "დამატება", - "added_track_to_queue": "რიგში დაემატა {track}", - "add_to_queue": "რიგში დამატება", - "track_will_play_next": "{track} დაუკრავს შემდეგს", - "play_next": "შემდეგის დაკვრა", - "removed_track_from_queue": "რიგიდან წაიშალა {track}", - "remove_from_queue": "რიგიდან წაშლა", - "remove_from_favorites": "ფავორიტებიდან წაშლა", - "save_as_favorite": "ფავორიტებში დამატება", - "add_to_playlist": "ფლეილისტში დამატება", - "remove_from_playlist": "ფლეილისტიდან წაშლა", - "add_to_blacklist": "შავ სიაში დამატება", - "remove_from_blacklist": "შავი სიიდან წაშლა", - "share": "გაზიარება", - "mini_player": "მინი დამკვრელი", - "slide_to_seek": "გადახვევისთვის გაასრიალეთ წინ ან უკან", - "shuffle_playlist": "ფლეილისტის არევა", - "unshuffle_playlist": "ფლეილისტის დალაგება", - "previous_track": "წინა ტრეკი", - "next_track": "შემდეგი ტრეკი", - "pause_playback": "დაკვრის გაჩერება", - "resume_playback": "დაკვრის გაგრძელება", - "loop_track": "ტრეკის ლუპზე დაკვრა", - "repeat_playlist": "ფლეილისტის გამეორება", - "queue": "რიგი", - "alternative_track_sources": "ალტერნატიული ტრეკების წყაროები", - "download_track": "გადმოწერე ტრეკი", - "tracks_in_queue": "{tracks} ტრეკი რიგში", - "clear_all": "ყველას წაშლა", - "show_hide_ui_on_hover": "UI-ის ჩვენება/დამალვა ჰოვერზე", - "always_on_top": "ტოველთვის ზემოდან", - "exit_mini_player": "მინი დამკვრელიდან გამოსვლა", - "download_location": "ჩამოტვირთვის მდებარეობა", - "account": "ანგარიში", - "login_with_spotify": "შედით თქვენი Spotify ანგარიშით", - "connect_with_spotify": "დაუკავშირდით Spotify-ს", - "logout": "გასვლა", - "logout_of_this_account": "ანგარიშიდან გასვლა", - "language_region": "ენა და რეგიონი", - "language": "ენა", - "system_default": "სისტემის ნაგულისხმევი", - "market_place_region": "მარკეტფლეისის რეგიონი", - "recommendation_country": "რეკომენდირებული ქვეყანა", - "appearance": "გარეგნობა", - "layout_mode": "განლაგების რეჟიმი", - "override_layout_settings": "რესფონსივ განლაგების რეჟიმის კონფიგურაციაზე გადაწერა", - "adaptive": "ადაპტირებული", - "compact": "კომპაქტური", - "extended": "გაფართოებული", - "theme": "თემა", - "dark": "ბნელი", - "light": "ღია", - "system": "სისტემის", - "accent_color": "აქცენტის ფერი", - "sync_album_color": "ალბომის ფერის სინქრონიზაცია", - "sync_album_color_description": "დომინანტური ალბომის ფერის აქცენტის ფერად გამოყენება", - "playback": "დაკვრა", - "audio_quality": "აუდიოს ხარისხი", - "high": "მაღალი", - "low": "დაბალი", - "pre_download_play": "წინასწარ ჩამოტვირთვა და დაკვრა", - "pre_download_play_description": "აუდიოს სტრიმინგის ნაცვლად, ბაიტების ჩამოტვირთვა და დაკვრა (რეკომენდებულია უფრო მაღალი გამტარუნარიანობის მომხმარებლებისთვის)", - "skip_non_music": "არა მუსიკალური ნაწილის გამოტოვება (სპონსორის ბლოკი)", - "blacklist_description": "შავ სიაში მყოფი არტისტები და ტრეკები", - "wait_for_download_to_finish": "გთხოვთ, დაელოდოთ მიმდინარე ჩამოტვირთვის დასრულებას", - "desktop": "დესკტოპი", - "close_behavior": "დახურვის ქცევა", - "close": "დახურვა", - "minimize_to_tray": "მინიმიზაცია", - "show_tray_icon": "სისტემის აიკონის ჩვენება", - "about": "ჩვენს შესახებ", - "u_love_spotube": "We know you love Spotube", - "check_for_updates": "განახლებების შემოწმება", - "about_spotube": "Spotube-ს შესახებ", - "blacklist": "შავი სია", - "please_sponsor": "გთხოვთ დაგვასპონსოროთ", - "spotube_description": "Spotube, a lightweight, cross-platform, free-for-all spotify client", - "version": "ვერსია", - "build_number": "Build Number", - "founder": "დამფუძნებელი", - "repository": "რეპოზიტორია", - "bug_issues": "Bug+Issues", - "made_with": "Made with ❤️ in Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "ლიცენზია", - "add_spotify_credentials": "დასაწყებად დაამატეთ თქვენი Spotify მონაცემები", - "credentials_will_not_be_shared_disclaimer": "არ ინერვიულოთ, თქვენი მონაცემები არ იქნება შეგროვებული ან გაზიარებული ვინმესთან", - "know_how_to_login": "არ იცით როგორ გააკეთოთ ეს?", - "follow_step_by_step_guide": "მიჰყევით ნაბიჯ-ნაბიჯ სახელმძღვანელოს", - "spotify_cookie": "Spotify {name} ქუქი", - "cookie_name_cookie": "{name} ქუქი", - "fill_in_all_fields": "გთხოვთ შეავსოთ ყველა ველი", - "submit": "გაგზავნა", - "exit": "გამოსვლა", - "previous": "წინა", - "next": "შემდეგი", - "done": "მზადაა", - "step_1": "ნაბიჯი 1", - "first_go_to": "პირველი, გადადით", - "login_if_not_logged_in": "და შესვლა/რეგისტრაცია, თუ არ ხართ შესული", - "step_2": "ნაბიჯი 2", - "step_2_steps": "1. როცა შეხვალთ, დააჭირეთ F12-ს ან მაუსის მარჯვენა ღილაკს > Inspect to Open the Browser devtools.\n2. შემდეგ გახსენით \"Application\" განყოფილება (Chrome, Edge, Brave etc..) ან \"Storage\" განყოფილება (Firefox, Palemoon etc..)\n3. შედით \"Cookies\" სექციაში და შემდეგ \"https://accounts.spotify.com\" სუბსექციაში", - "step_3": "ნაბიჯი 3", - "step_3_steps": "დააკოპირეთ \"sp_dc\" ქუქი-ფაილის მნიშვნელობა", - "success_emoji": "წარმატება🥳", - "success_message": "თქვენ წარმატებით შეხვედით თქვენი Spotify ანგარიშით.", - "step_4": "ნაბიჯი 4", - "step_4_steps": "ჩასვით კოპირებული \"sp_dc\" მნიშვნელობა", - "something_went_wrong": "Რაღაც არასწორად წავიდა", - "piped_instance": "Piped Server Instance", - "piped_description": "The Piped server instance to use for track matching", - "piped_warning": "ზოგიერთი მათგანმა შეიძლება კარგად არ იმუშაოს. ", - "generate_playlist": "ფლეილისტის დაგენერირება", - "track_exists": "ტრეკი {track} უკვე არსებობს", - "replace_downloaded_tracks": "ყველა ჩამოტვირთული ტრეკის შეცვლა", - "skip_download_tracks": "ყველა ჩამოტვირთული ტრეკის გამოტოვება", - "do_you_want_to_replace": "გსურთ შეცვალოთ არსებული ტრეკი??", - "replace": "შეცვლა", - "skip": "გამოტოვება", - "select_up_to_count_type": "აირჩიე {count}-მდე {type}", - "select_genres": "ჟანრების არჩევა", - "add_genres": "ჟანრების დამატება", - "country": "ქვეყანა", - "number_of_tracks_generate": "დასაგენერირებელი ტრეკების რაოდენობა", - "acousticness": "Acousticness", - "danceability": "Danceability", - "energy": "Energy", - "instrumentalness": "Instrumentalness", - "liveness": "Liveness", - "loudness": "Loudness", - "speechiness": "Speechiness", - "valence": "Valence", - "popularity": "Popularity", - "key": "Key", - "duration": "Duration (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "Time Signature", - "short": "Short", - "medium": "საშუალო", - "long": "გრძელი", - "min": "მინიმალური", - "max": "მაქსიმალური", - "target": "სამიზნე", - "moderate": "საშუალო", - "deselect_all": "ყველა მონიშვნის გაუქმება", - "select_all": "ყველას მონიშვნა", - "are_you_sure": "Დარწმუნებული ხართ?", - "generating_playlist": "მიმდინარეობს თქვენი მორგებული ფლეილისტის გენერირება...", - "selected_count_tracks": "არჩეულია {count} ტრეკი", - "download_warning": "If you download all Tracks at bulk you're clearly pirating Music & causing damage to the creative society of Music. I hope you are aware of this. Always, try respecting & supporting Artist's hard work", - "download_ip_ban_warning": "BTW, your IP can get blocked on YouTube due excessive download requests than usual. IP block means you can't use YouTube (even if you're logged in) for at least 2-3 months from that IP device. And Spotube doesn't hold any responsibility if this ever happens", - "by_clicking_accept_terms": "By clicking 'accept' you agree to following terms:", - "download_agreement_1": "I know I'm pirating Music. I'm bad", - "download_agreement_2": "I'll support the Artist wherever I can and I'm only doing this because I don't have money to buy their art", - "download_agreement_3": "I'm completely aware that my IP can get blocked on YouTube & I don't hold Spotube or his owners/contributors responsible for any accidents caused by my current action", - "decline": "უარყოფა", - "accept": "დათანხმება", - "details": "დეტალები", - "youtube": "YouTube", - "channel": "Channel", - "likes": "მოწონებები", - "dislikes": "არ მოწონებები", - "views": "ნახვები", - "streamUrl": "სტრიმის ლინკი", - "stop": "გაჩერება", - "sort_newest": "ფალაგება სიახლის მიხედიტ", - "sort_oldest": "დალაგება სიძველის მიხედვით", - "sleep_timer": "ძილის ტაიმერი", - "mins": "{minutes} წუთი", - "hours": "{hours} საათი", - "hour": "{hours} საათი", - "custom_hours": "მორგებული საათები", - "logs": "ლოგები", - "developers": "დეველოპერები", - "not_logged_in": "არ ხარ დალოგინებული", - "search_mode": "ძებნის რეჟიმი", - "audio_source": "აუდიოს წყარო", - "ok": "ოკ", - "failed_to_encrypt": "დაშიფვრა ვერ მოხერხდა", - "encryption_failed_warning": "Spotube uses encryption to securely store your data. But failed to do so. So it'll fallback to insecure storage\nIf you're using linux, please make sure you've any secret-service (gnome-keyring, kde-wallet, keepassxc etc) installed", - "querying_info": "Querying info...", - "piped_api_down": "Piped API is down", - "piped_down_error_instructions": "The Piped instance {pipedInstance} is currently down\n\nEither change the instance or change the 'API type' to official YouTube API\n\nMake sure to restart the app after change", - "you_are_offline": "ამჟამად ხაზგარეშე ხართ", - "connection_restored": "თქვენი ინტერნეტ კავშირი აღდგა", - "use_system_title_bar": "სისტემის სათაურის ზოლის გამოყენება", - "crunching_results": "იტვირთება შედეგები...", - "search_to_get_results": "მოძებნეთ შედეგების მისაღებად", - "use_amoled_mode": "Pitch black dark theme", - "pitch_dark_theme": "AMOLED Mode", - "normalize_audio": "აუდიოს ნორმალიზება", - "change_cover": "Ქავერის შეცვლა", - "add_cover": "Ქავერის ფოტოს დამატება", - "restore_defaults": "ნაგულისხმევი პარამეტრების აღდგენა", - "download_music_codec": "მუსიკის კოდეკის გადმოწერა", - "streaming_music_codec": "სტრიმინგ მუსიკის კოდეკი", - "login_with_lastfm": "Last.fm-ით შესვლა", - "connect": "დაკავშირება", - "disconnect_lastfm": "Last.fm-იდან გამოსვლა", - "disconnect": "გამოსვლა", - "username": "მომხმარებელი", - "password": "პაროლი", - "login": "შესვლა", - "login_with_your_lastfm": "Last.fm ანგარიშით შესვლა", - "scrobble_to_lastfm": "Scrobble to Last.fm", - "go_to_album": "ალბომზე გადასვლა", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "ყველას ნახვა", - "genres": "ჟანრები", - "explore_genres": "შეისწავლეთ ჟანრები", - "friends": "მეგობრები", - "no_lyrics_available": "უკაცრავად, ამ ტრეკისთვის ტექსტის პოვნა შეუძლებელია", - "start_a_radio": "რადიოს ჩართვა", - "how_to_start_radio": "როგორ გნებავთ რადიოს ჩართვა?", - "replace_queue_question": "გნებავთ ჩაანაცვლოთ არსებული რიგი თუ დაამატოთ მასზე?", - "endless_playback": "დაუსრულებელი დაკვრა", - "delete_playlist": "ფლეილისტის წაშლა", - "delete_playlist_confirmation": "დარწმუნებული ხართ რომ გნებავთ ფლეილისტის წაშლა?", - "local_tracks": "ლოკალური ტრეკები", - "song_link": "ტრეკის ლინკი", - "skip_this_nonsense": "ამ სისულელის გამოტოვება", - "freedom_of_music": "“მუსიკის თავისუფლება”", - "freedom_of_music_palm": "“მუსიკის თავისუფლება შენს ხელის გულზე”", - "get_started": "დავიწყოთ", - "youtube_source_description": "რეკომენდებულია და მუშაობს საუკეთესოდ.", - "piped_source_description": "თავისუფლად გრძნობთ თავს? იგივეა, რაც YouTube, მაგრამ ბევრი თავისუფალი.", - "jiosaavn_source_description": "საუკეთესოა სამხრეთ აზიის რეგიონისთვის.", - "highest_quality": "საუკეთესო ხარისხი: {quality}", - "select_audio_source": "აუდიოს წყაროს არჩევა", - "endless_playback_description": "ახალი სიმთერების ავტომატურად რიგის ბოლოში დამატება", - "choose_your_region": "აირჩიე შენი რეგიონი", - "choose_your_region_description": "This will help Spotube show you the right content\nfor your location.", - "choose_your_language": "აირჩიე ენა", - "help_project_grow": "დაეხმარეთ ამ პროექტს განვითარებაში", - "help_project_grow_description": "Spotube is an open-source project. You can help this project grow by contributing to the project, reporting bugs, or suggesting new features.", - "contribute_on_github": "GitHub-ზე კონტრიბუცია", - "donate_on_open_collective": "Open Collective-ზე დონაცია", - "browse_anonymously": "ანონიმურად ნახვა", - "enable_connect": "დაკავშირების ჩართვა", - "enable_connect_description": "აკონტროლე Spotube სხვა მოწყობილობებიდან", - "devices": "მოწყობილობები", - "select": "არჩევა", - "connect_client_alert": "თქვენ კონტროლირებული ხართ {client} მოწყობილობით", - "this_device": "ეს მოწყობილობა", - "remote": "დისტანციური", - "local_library": "ადგილობრივი ბიბლიოთეკა", - "add_library_location": "ბიბლიოთეკაში დამატება", - "remove_library_location": "ბიბლიოთეკიდან წაშლა", - "local_tab": "ადგილობრივი", - "stats": "სტატისტიკა", - "and_n_more": "და {count} მეტი", - "recently_played": "მიუწვდელი", - "browse_more": "დაიცალეთ მეტი", - "no_title": "არ აქვს სათაური", - "not_playing": "არ ერთვის", - "epic_failure": "ეპიკური მარცხი!", - "added_num_tracks_to_queue": "დამატებული {tracks_length} ტრეკი რიგში", - "spotube_has_an_update": "Spotube-ს აქვს განახლება", - "download_now": "ჩამოტვირთეთ ახლავე", - "nightly_version": "Spotube Nightly {nightlyBuildNum} გამოშვებულია", - "release_version": "Spotube v{version} გამოშვებულია", - "read_the_latest": "წაიკითხეთ უახლესი ", - "release_notes": "გამოშვების შენიშვნები", - "pick_color_scheme": "აირჩიეთ ფერის სქემა", - "save": "შეინახეთ", - "choose_the_device": "აირჩიეთ მოწყობილობა:", - "multiple_device_connected": "დაკავშირებულია რამდენიმე მოწყობილობა.\nაირჩიეთ მოწყობილობა, რომელზეც უნდა განხორციელდეს ეს მოქმედება", - "nothing_found": "არაფერი მოიძებნა", - "the_box_is_empty": "კვადრატია ცარიელი", - "top_artists": "ტოპ არტისტები", - "top_albums": "ტოპ ალბომები", - "this_week": "ამ კვირას", - "this_month": "ამ თვეში", - "last_6_months": "ბოლო 6 თვე", - "this_year": "ამ წელს", - "last_2_years": "ბოლო 2 წელი", - "all_time": "ყველა დრო", - "powered_by_provider": "{providerName}-ით გაწვდილი", - "email": "ელ. ფოსტა", - "profile_followers": "გამყვანები", - "birthday": "დაბადების დღე", - "subscription": "გამოწერა", - "not_born": "არ დაბადებულა", - "hacker": "ჰაკერი", - "profile": "პროფილი", - "no_name": "არ არის სახელი", - "edit": "რედაქტირება", - "user_profile": "მომხმარებლის პროფილი", - "count_plays": "{count} გაწვდვა", - "streaming_fees_hypothetical": "*ეს рассчитывается на основе выплат за поток от Spotify\nот $0.003 до $0.005. ეს ჰიპოთეტური გამოთვლა იძლევა მომხმარებელს წარმოდგენას იმაზე, რამდენად\nგადახდილი იქნებოდა არტისტებისთვის, თუ მათ მოუსმინოს Spotify-ს ტრეკებს.", - "count_mins": "{minutes} წუთი", - "summary_minutes": "წუთები", - "summary_listened_to_music": "მუსიკა გაწვდილი", - "summary_songs": "მელოდია", - "summary_streamed_overall": "გაწვდილი საერთო", - "summary_owed_to_artists": "გადასახადი არტისტებს\nამ თვეში", - "summary_artists": "არტისტების", - "summary_music_reached_you": "მუსიკა ჩაგივარდა", - "summary_full_albums": "სრული ალბომები", - "summary_got_your_love": "მოსულა თქვენი სიყვარული", - "summary_playlists": "პლეილისტები", - "summary_were_on_repeat": "გადაწვდილი იყო", - "total_money": "მთლიანი {money}", - "minutes_listened": "წუთები მოუსმინეს", - "streamed_songs": "სტრიმირებული სიმღერები", - "count_streams": "{count} სტრიმი", - "owned_by_you": "შენ მიერ საკუთრებული", - "copied_shareurl_to_clipboard": "{shareUrl} აიღო კლიპბორდზე", - "spotify_hipotetical_calculation": "*ეს გამოითვლება Spotify-ის თითოეულ სტრიმზე\nგადახდის შესაბამისად, რომელიც $0.003 დან $0.005-მდეა. ეს არის ჰიპოთეტური\nგამოთვლა, რომელიც აჩვენებს მომხმარებელს რამდენი გადაიხდიდა\nარტისტებს, თუკი ისინი უსმენდნენ მათ სიმღერებს Spotify-ზე.", - "webview_not_found": "ვებვიუ ვერ მოიძებნა", - "webview_not_found_description": "თქვენს მოწყობილობაზე ვებვიუის შესრულების დრო არ არის დაყენებული.\nთუ დაყენებულია, დარწმუნდით, რომ ის environment PATH-შია\n\nდაყენების შემდეგ, გადატვირთეთ აპი", - "unsupported_platform": "მოუხერხებელი პლატფორმა", - "invidious_instance": "Invidious სერვერის ინსტანცია", - "invidious_description": "Invidious სერვერის ინსტანცია, რომელიც გამოიყენება ტრეკის შესატყვისად", - "invidious_warning": "ზოგიერთი შეიძლება კარგად არ მუშაობდეს. გამოიყენეთ თქვენს პასუხისმგებლობაზე", - "invidious_source_description": "მსგავსია Piped-ის, მაგრამ მაღალი ხელმისაწვდომობით.", - "cache_music": "მუსიკის ქეში", - "open": "გახსენით", - "cache_folder": "ქეშის საქაღალდე", - "export": "ექსპორტი", - "clear_cache": "ქეშის გასუფთავება", - "clear_cache_confirmation": "გსურთ ქეშის გასუფთავება?", - "export_cache_files": "ქეშირებული ფაილების ექსპორტი", - "found_n_files": "ნაპოვნია {count} ფაილი", - "export_cache_confirmation": "გსურთ ამ ფაილების ექსპორტი", - "exported_n_out_of_m_files": "{filesExported} ფაილი {files}-დან ექსპორტირებულია", - "playlist": "პლეისთი", - "no_loop": "არ არის ციკლი", - "generate": "გააგენერირეთ", - "undo": "დაბრუნება", - "download_all": "ყველას ჩამოტვირთვა", - "add_all_to_playlist": "ყველა დაამატეთ პლეისთში", - "add_all_to_queue": "ყველა დაამატეთ რიგში", - "play_all_next": "ყველა შემდეგ ითამაშე", - "pause": "შეჩერება", - "view_all": "ყველა ნახვა", - "no_tracks_added_yet": "გაჩნდება რომ ჯერ არ გაქვთ დამატებული ტრეკები", - "no_tracks": "გავლებული არ ჩანს არ არსებობს ტრეკები", - "no_tracks_listened_yet": "გქონდეთ გრძნობა, რომ ჯერ არაფერი უსმენია", - "not_following_artists": "არ მიჰყვებით რომელიმე არტისტს", - "no_favorite_albums_yet": "გაჩნდება რომ ჯერ არ გაქვთ დამატებული ალბომები თქვენს ფავორიტებში", - "no_logs_found": "ჩაწერები ვერ მოიძებნა", - "youtube_engine": "YouTube ძრავა", - "youtube_engine_not_installed_title": "{engine} არ არის ინსტალირებული", - "youtube_engine_not_installed_message": "{engine} არ არის ინსტალირებული თქვენს სისტემაში.", - "youtube_engine_set_path": "დარწმუნდით, რომ ის ხელმისაწვდომია PATH ცვლადში ან\nდაუყავით {engine} პროგრამის ფაილის სრული გზა", - "youtube_engine_unix_issue_message": "macOS/Linux/Unix მსგავსი ოპერაციული სისტემებში, .zshrc/.bashrc/.bash_profile-ით პათის დაყენება ვერ იმუშავებს.\nთქვენ უნდა დააყენოთ პათი შელ ფაილში", - "download": "ჩამოტვირთვა", - "file_not_found": "ფაილი ვერ მოიძებნა", - "custom": "პერსონალიზირებული", - "add_custom_url": "დამატება პერსონალური URL", - "edit_port": "პორტის რედაქტირება", - "port_helper_msg": "ნაგულისხმევი არის -1, რაც შემთხვევითი ნომრის მითითებას ნიშნავს. თუ لديك firewall настроен, рекомендуется установить это.", - "connect_request": "{client}-ის დაკავშირების ნებართვა?", - "connection_request_denied": "კავშირი უარყოფილია. მომხმარებელმა უარყო წვდომა.", - "hipotetical_calculation": "*ეს გამოითვლება ონლაინ მუსიკალური სტრიმინგის პლატფორმების საშუალო ანაზღაურების საფუძველზე, რომელიც შეადგენს $0.003-დან $0.005-მდე. ეს არის ჰიპოთეტური გაანგარიშება, რომელიც მომხმარებელს აძლევს წარმოდგენას, თუ რამდენს გადაუხდიდნენ ისინი არტისტებს, თუ მათ სიმღერებს მოუსმენდნენ სხვადასხვა მუსიკალურ სტრიმინგ პლატფორმაზე.", - "an_error_occurred": "მოხდა შეცდომა", - "copy_to_clipboard": "კოპირება ბუფერში", - "view_logs": "იხილეთ ჟურნალები", - "retry": "ხელახლა ცდა", - "no_default_metadata_provider_selected": "თქვენ არ გაქვთ დაყენებული ნაგულისხმევი მეტამონაცემების პროვაიდერი", - "manage_metadata_providers": "მეტამონაცემების პროვაიდერების მართვა", - "open_link_in_browser": "ბმულის გახსნა ბრაუზერში?", - "do_you_want_to_open_the_following_link": "გსურთ გახსნათ შემდეგი ბმული", - "unsafe_url_warning": "შეიძლება სახიფათო იყოს ბმულების გახსნა უნდობელი წყაროებიდან. იყავით ფრთხილად!\nასევე შეგიძლიათ დააკოპიროთ ბმული თქვენს ბუფერში.", - "copy_link": "ბმულის კოპირება", - "building_your_timeline": "თქვენი დროის ხაზის აგება თქვენი მოსმენების საფუძველზე...", - "official": "ოფიციალური", - "author_name": "ავტორი: {author}", - "third_party": "მესამე მხარის", - "plugin_requires_authentication": "პლაგინი საჭიროებს ავთენტიფიკაციას", - "update_available": "განახლება ხელმისაწვდომია", - "supports_scrobbling": "მხარს უჭერს სქრობლინგს", - "plugin_scrobbling_info": "ეს პლაგინი აწარმოებს თქვენი მუსიკის სქრობლინგს, რათა შექმნას თქვენი მოსმენის ისტორია.", - "default_plugin": "ნაგულისხმევი", - "set_default": "ნაგულისხმევად დაყენება", - "support": "მხარდაჭერა", - "support_plugin_development": "პლაგინის განვითარების მხარდაჭერა", - "can_access_name_api": "- შეუძლია წვდომა **{name}** API-ზე", - "do_you_want_to_install_this_plugin": "გსურთ ამ პლაგინის დაყენება?", - "third_party_plugin_warning": "ეს პლაგინი არის მესამე მხარის საცავიდან. გთხოვთ, დარწმუნდეთ, რომ ენდობით წყაროს დაყენებამდე.", - "author": "ავტორი", - "this_plugin_can_do_following": "ამ პლაგინს შეუძლია შემდეგის გაკეთება", - "install": "დაყენება", - "install_a_metadata_provider": "დააყენეთ მეტამონაცემების პროვაიდერი", - "no_tracks_playing": "ამჟამად არ უკრავს არცერთი ტრეკი", - "synced_lyrics_not_available": "ამ სიმღერისთვის სინქრონიზებული ტექსტები არ არის ხელმისაწვდომი. გთხოვთ, გამოიყენოთ", - "plain_lyrics": "მარტივი ტექსტები", - "tab_instead": "ჩანართი, სანაცვლოდ.", - "disclaimer": "პასუხისმგებლობის უარყოფა", - "third_party_plugin_dmca_notice": "Spotube-ის გუნდი არ იღებს პასუხისმგებლობას (მათ შორის, იურიდიულს) არცერთ \"მესამე მხარის\" პლაგინზე.\nგთხოვთ, გამოიყენოთ ისინი თქვენი რისკის ქვეშ. ნებისმიერი ხარვეზის/პრობლემის შესახებ შეატყობინეთ პლაგინის საცავს.\n\nთუ რომელიმე \"მესამე მხარის\" პლაგინი არღვევს რაიმე სერვისის/იურიდიული პირის ToS/DMCA-ს, გთხოვთ, სთხოვეთ \"მესამე მხარის\" პლაგინის ავტორს ან ჰოსტინგის პლატფორმას, მაგალითად GitHub/Codeberg, მიიღოს ზომები. ზემოთ ჩამოთვლილი (\"მესამე მხარის\" ეტიკეტის მქონე) ყველა არის საჯარო/საზოგადოების მიერ შენარჩუნებული პლაგინები. ჩვენ მათ არ ვაკონტროლებთ, ამიტომ არ შეგვიძლია მათზე რაიმე ზომების მიღება.\n\n", - "input_does_not_match_format": "შეყვანა არ ემთხვევა საჭირო ფორმატს", - "metadata_provider_plugins": "მეტამონაცემების პროვაიდერების პლაგინები", - "paste_plugin_download_url": "ჩასვით ჩამოტვირთვის url ან GitHub/Codeberg-ის რეპოს url ან პირდაპირი ბმული .smplug ფაილზე", - "download_and_install_plugin_from_url": "პლაგინის ჩამოტვირთვა და დაყენება url-დან", - "failed_to_add_plugin_error": "პლაგინის დამატება ვერ მოხერხდა: {error}", - "upload_plugin_from_file": "პლაგინის ატვირთვა ფაილიდან", - "installed": "დაინსტალირებული", - "available_plugins": "ხელმისაწვდომი პლაგინები", - "configure_your_own_metadata_plugin": "დააყენეთ თქვენი საკუთარი პლეილისტის/ალბომის/არტისტის/ფიდის მეტამონაცემების პროვაიდერი", - "audio_scrobblers": "აუდიო სქრობლერები", - "scrobbling": "სქრობლინგი", - "download_music_format": "მუსიკის ჩამოტვირთვის ფორმატი", - "streaming_music_format": "სტრიმინგის მუსიკის ფორმატი", - "download_music_quality": "ჩამოტვირთვის ხარისხი", - "streaming_music_quality": "სტრიმინგის ხარისხი", - "default_metadata_source": "ნაგულისხმევი მეტამონაცემების წყარო", - "set_default_metadata_source": "ნაგულისხმევი მეტამონაცემების წყაროს დაყენება", - "default_audio_source": "ნაგულისხმევი აუდიო წყარო", - "set_default_audio_source": "ნაგულისხმევი აუდიო წყაროს დაყენება", - "plugins": "პლაგინები", - "configure_plugins": "თქვენი საკუთარი მეტამონაცემებისა და აუდიო წყაროს პლაგინების კონფიგურაცია", - "source": "წყარო: ", - "uncompressed": "შეუკუმშავი", - "dab_music_source_description": "აუდიოფილებისთვის. უზრუნველყოფს მაღალი ხარისხის/უკომპრესო აუდიო სტრიმებს. ზუსტი შესაბამისობა ISRC-ის მიხედვით." -} \ No newline at end of file diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb deleted file mode 100644 index 70a68f8b..00000000 --- a/lib/l10n/app_ko.arb +++ /dev/null @@ -1,495 +0,0 @@ -{ - "guest": "게스트", - "browse": "찾아보기", - "search": "검색", - "library": "라이브러리", - "lyrics": "가사", - "settings": "설정", - "genre_categories_filter": "카테고리 혹은 장르별로 불러오기", - "genre": "장르", - "personalized": "맞춤 추천", - "featured": "인기", - "new_releases": "신곡", - "songs": "노래", - "playing_track": "{track} 을 재생", - "queue_clear_alert": "현재 재생 대기열을 없앱니다。{track_length} 곡이 제거됩니다。\n계속 진행할까요?", - "load_more": "더 불러오기", - "playlists": "플레이리스트", - "artists": "아티스트", - "albums": "앨범", - "tracks": "곡", - "downloads": "다운로드한 곡", - "filter_playlists": "플레이리스트를 필터링", - "liked_tracks": "좋아하는 곡", - "liked_tracks_description": "좋아요를 남긴 곡들", - "create_playlist": "플레이리스트 생성", - "create_a_playlist": "플레이리스트를 생성", - "create": "생성", - "cancel": "취소", - "playlist_name": "플레이리스트명", - "name_of_playlist": "플레이리스트의 이름", - "description": "설명", - "public": "공개", - "collaborative": "공유 플레이리스트", - "search_local_tracks": "기기에 저장된 곡을 검색하기", - "play": "재생", - "delete": "삭제", - "none": "없음", - "sort_a_z": "A-Z 순으로 정렬", - "sort_z_a": "Z-A 순으로 정렬", - "sort_artist": "아티스트 순으로 정렬", - "sort_album": "앨범 순으로 정렬", - "sort_tracks": "곡명 순으로 정렬", - "currently_downloading": "현재 ({tracks_length}) 곡 다운로드 중", - "cancel_all": "모두 취소", - "filter_artist": "아티스트 필터링", - "followers": "{followers} 팔로워", - "add_artist_to_blacklist": "이 아티스트를 블랙리스트에 추가", - "top_tracks": "인기곡", - "fans_also_like": "애청자들이 좋아하는 곡", - "loading": "불러오는 중...", - "artist": "아티스트", - "blacklisted": "블랙리스트", - "following": "팔로우 중", - "follow": "팔로우하기", - "artist_url_copied": "아티스트의 URL 주소를 클립보드에 복사함", - "added_to_queue": "{tracks} 곡을 대기열에 추가함", - "filter_albums": "앨범 필터링", - "synced": "동기화됨", - "plain": "그대로", - "shuffle": "셔플", - "search_tracks": "곡 검색하기", - "released": "공개일", - "error": "에러", - "title": "타이틀", - "time": "길이", - "more_actions": "다른 작업", - "download_count": "({count}) 곡 다운로드", - "add_count_to_playlist": "플레이리스트에 ({count}) 곡을 추가", - "add_count_to_queue": "대기열에 ({count}) 곡을 추가", - "play_count_next": "이 다음에 ({count}) 곡을 재생", - "album": "앨범", - "copied_to_clipboard": "{data} 를 클립보드에 복사함", - "add_to_following_playlists": "{track} 을 이 플레이리스트에 추가", - "add": "추가", - "added_track_to_queue": "대기열에 {track} 을 추가함", - "add_to_queue": "대기열에 추가", - "track_will_play_next": "{track} 을 이 다음에 재생", - "play_next": "이 다음에 재생", - "removed_track_from_queue": "대기열에서 {track} 를 제거함", - "remove_from_queue": "대기열에서 제거", - "remove_from_favorites": "즐겨찾기에서 제거", - "save_as_favorite": "즐겨찾기에 추가", - "add_to_playlist": "플레이리스트에 추가", - "remove_from_playlist": "플레이리스트에서 제거", - "add_to_blacklist": "블랙리스트에 추가", - "remove_from_blacklist": "블랙리스트에서 제거", - "share": "공유", - "mini_player": "미니 플레이어", - "slide_to_seek": "앞뒤로 슬라이드하여 탐색", - "shuffle_playlist": "플레이리스트를 섞기", - "unshuffle_playlist": "플레이리스트를 섞지 않기", - "previous_track": "이전 곡", - "next_track": "다음 곡", - "pause_playback": "일시정지", - "resume_playback": "재개", - "loop_track": "반복 재생", - "repeat_playlist": "플레이리스트 반복", - "queue": "재생 대기열", - "alternative_track_sources": "대체가능한 음악 서버", - "download_track": "곡 다운로드", - "tracks_in_queue": "대기열에 {tracks} 곡이 있음", - "clear_all": "모두 제거", - "show_hide_ui_on_hover": "마우스를 올리면 UI를 표시/숨김", - "always_on_top": "항상 위에 표시", - "exit_mini_player": "미니 플레이어 닫기", - "download_location": "다운로드 경로", - "account": "계정", - "login_with_spotify": "Spotify 계정으로 로그인", - "connect_with_spotify": "Spotify에 연결", - "logout": "로그아웃", - "logout_of_this_account": "이 계정에서 로그아웃", - "language_region": "언어 & 지역", - "language": "언어", - "system_default": "시스템 기본설정", - "market_place_region": "마켓플레이스 지역", - "recommendation_country": "추천 국가", - "appearance": "디자인", - "layout_mode": "레이아웃 모드", - "override_layout_settings": "반응형 레이아웃 모드 설정 덮어씌우기", - "adaptive": "적응형", - "compact": "컴팩트", - "extended": "확장", - "theme": "테마", - "dark": "다크", - "light": "라이트", - "system": "시스템과 동일", - "accent_color": "보조색", - "sync_album_color": "앨범 색상", - "sync_album_color_description": "앨범아트의 주요 색상을 보조색으로 사용", - "playback": "재생", - "audio_quality": "음질", - "high": "높음", - "low": "낮음", - "pre_download_play": "재생할 곡을 미리 다운로드", - "pre_download_play_description": "스트리밍 방식을 쓰는 대신 파일 단위로 다운로드 받고 재생 (인터넷 대역폭이 높은 환경에서 추천)", - "skip_non_music": "음악이 아닌 부분을 스킵 (SponsorBlock)", - "blacklist_description": "블랙리스트에 추가된 곡과 아티스트", - "wait_for_download_to_finish": "현재 진행중인 다운로드가 끝날 때까지 기다려주세요", - "desktop": "데스크톱", - "close_behavior": "닫을 때의 동작", - "close": "닫기", - "minimize_to_tray": "트레이로 최소화", - "show_tray_icon": "시스템 트레이 아이콘 표시", - "about": "앱 정보", - "u_love_spotube": "Spotube... 사랑하시죠?", - "check_for_updates": "업데이트 확인", - "about_spotube": "Spotube에 관해", - "blacklist": "블랙리스트", - "please_sponsor": "후원해주시면 감사하겠습니다.", - "spotube_description": "Spotube는, 경량에 크로스플랫폼인데다 무료이기까지한 스포티파이 클라이언트입니다", - "version": "버전", - "build_number": "빌드 번호", - "founder": "창시자", - "repository": "리포지토리", - "bug_issues": "버그 및 이슈", - "made_with": "❤️을 담아 방글라데시에서 만듦", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "라이선스", - "add_spotify_credentials": "먼저 Spotify의 로그인정보를 추가하기", - "credentials_will_not_be_shared_disclaimer": "걱정마세요. 개인정보를 수집하거나 공유하지 않습니다.", - "know_how_to_login": "어떻게 하는건지 모르겠나요?", - "follow_step_by_step_guide": "사용법 확인하기", - "spotify_cookie": "Spotify {name} Cookies", - "cookie_name_cookie": "{name} Cookies", - "fill_in_all_fields": "모든 필드에 정보를 입력해주세요", - "submit": "제출", - "exit": "종료", - "previous": "이전으로", - "next": "다음으로", - "done": "완료", - "step_1": "1단계", - "first_go_to": "가장 먼저 먼저 들어갈 곳은 ", - "login_if_not_logged_in": "그리고 로그인을 하지 않았다면 로그인해주세요", - "step_2": "2단계", - "step_2_steps": "1. 로그인에 성공하면、F12나 마우스 우클릭 > 검사(Inspect)을 눌러 브라우저의 개발자 도구(devtools)를 열어주세요.\n2. 애플리케이션 (Application) 탭 (Chrome, Edge, Brave 등) 또는 스토리지 탭 (Firefox, Palemoon 등)을 열어주세요.\n3. 쿠키 (Cookies) 섹션으로 들어가서, https://accounts.spotify.com 서브섹션으로 들어가주세요.", - "step_3": "3단계", - "success_emoji": "성공🥳", - "success_message": "성공적으로 스포티파이 게정으로 로그인했습니다. 잘했어요!", - "step_4": "4단계", - "something_went_wrong": "알 수 없는 이유로 동작에 실패했습니다.", - "piped_instance": "Piped 서버의 인스턴스", - "piped_description": "곡 탐색에 사용할 Piped 서버 인스턴스", - "piped_warning": "몇몇 서버는 제대로 동작하지 않을 수 있습니다. 본인 책임 하에 이용해주세요.", - "generate_playlist": "플레이리스트 생성", - "track_exists": "곡 {track} 은 이미 리스트에 있습니다", - "replace_downloaded_tracks": "다운로드한 모든 곡을 교체", - "skip_download_tracks": "다운로드가 끝난 곡을 모두 건너뛰기", - "do_you_want_to_replace": "현재 곡을 교체하시겠습니까?", - "replace": "교체", - "skip": "건너뛰기", - "select_up_to_count_type": "{type}을 {count}개까지 선택", - "select_genres": "장르 선택", - "add_genres": "장르 추가", - "country": "국가", - "number_of_tracks_generate": "생성할 곡 수", - "acousticness": "반주 구간 (Acousticness)", - "danceability": "흥겨운 정도 (Danceability)", - "energy": "에너지 (Energy)", - "instrumentalness": "기악성 (Instrumentalness)", - "liveness": "생동감 (Liveness)", - "loudness": "라우드니스 (Loudness)", - "speechiness": "회화성 (Speechniss)", - "valence": "감정가 (Valence)", - "popularity": "인기도 (Popularity)", - "key": "조성 (키)", - "duration": "길이 (초)", - "tempo": "템포 (BPM)", - "mode": "장조", - "time_signature": "박자", - "short": "짧음", - "medium": "중간", - "long": "긺", - "min": "최소", - "max": "최대", - "target": "목표", - "moderate": "보통", - "deselect_all": "모두 선택해제", - "select_all": "모두 선택", - "are_you_sure": "괜찮겠습니까?", - "generating_playlist": "커스텀 플레이리스트를 생성하는 중...", - "selected_count_tracks": "{count} 곡이 선택되었습니다.", - "download_warning": "모든 트랙을 대량으로 다운로드하는 것은 명백한 불법 복제이며 음악 창작 사회에 피해를 입히는 행위입니다. 이 점을 알아주셨으면 합니다. 항상 아티스트의 노력을 존중하고 응원해 주세요.", - "download_ip_ban_warning": "참고로, 평소보다 과도한 다운로드 요청으로 인해 YouTube에서 IP가 차단될 수 있습니다. IP 차단은 해당 IP 기기에서 최소 2~3개월 동안 (로그인한 상태에서도) YouTube를 사용할 수 없음을 의미합니다. 그리고 이런 일이 발생하더라도 스포튜브는 어떠한 책임도 지지 않습니다.", - "by_clicking_accept_terms": "'동의'를 클릭하면 다음 약관에 동의하는 것입니다:", - "download_agreement_1": "알고 있습니다. 전 나쁜 사람입니다.", - "download_agreement_2": "제가 할 수 있는 모든 곳에서 아티스트를 지원할 것이며, 저는 그들의 작품을 살 돈이 없기 때문에 이렇게 하는 것뿐입니다.", - "download_agreement_3": "본인은 YouTube에서 내 IP가 차단될 수 있음을 완전히 알고 있으며, 현재 내 행동으로 인해 발생하는 사고에 대해 Spotube 또는 그 소유자/기여자에게 책임을 묻지 않습니다.", - "decline": "거절", - "accept": "동의", - "details": "상세", - "youtube": "YouTube", - "channel": "채널", - "likes": "좋아요", - "dislikes": "싫어요", - "views": "조회수", - "streamUrl": "스트림 URL", - "stop": "중지", - "sort_newest": "최근에 추가된 순으로 정렬", - "sort_oldest": "예전에 추가된 순으로 정렬", - "sleep_timer": "취침 타이머", - "mins": "{minutes} 분", - "hours": "{hours} 시간", - "hour": "{hours} 시간", - "custom_hours": "시간 설정", - "logs": "로그", - "developers": "개발", - "not_logged_in": "로그인하지 않았습니다", - "search_mode": "검색 모드", - "audio_source": "오디오 출처", - "ok": "알겠습니다", - "failed_to_encrypt": "암호화에 실패했습니다", - "encryption_failed_warning": "Spotube는 암호화를 사용하여 데이터를 안전하게 저장합니다. 하지만 그렇게 하지 못했습니다. 따라서 안전하지 않은 저장소로 대체됩니다.\n리눅스를 사용하는 경우, 비밀 서비스(gnome-keyring, kde-wallet, keepassxc 등)가 설치되어 있는지 확인하세요.", - "querying_info": "정보를 얻는 중...", - "piped_api_down": "Piped API가 응답하지 않습니다", - "piped_down_error_instructions": "Piped 인스턴스 {pipedInstance}가 현재 다운되었습니다.\n\n인스턴스를 변경하거나 'API 유형'을 공식 YouTube API로 변경하세요.\n\n변경 후 앱을 다시 시작해야 합니다.", - "you_are_offline": "현재 오프라인입니다", - "connection_restored": "인터넷에 다시 연결되었습니다", - "use_system_title_bar": "시스템 타이틀바를 사용", - "update_playlist": "플레이리스트를 업데이트", - "update": "업데이트", - "crunching_results": "결과를 처리하는 중...", - "search_to_get_results": "결과를 얻으려면 검색해주세요", - "use_amoled_mode": "AMOLED모드를 사용", - "pitch_dark_theme": "검정색 기반의 어두운 테마", - "normalize_audio": "오디오 노멀라이즈", - "change_cover": "커버 변경", - "add_cover": "커버 추가", - "restore_defaults": "기본값으로 복원", - "download_music_codec": "다운로드 음악 코덱", - "streaming_music_codec": "스트리밍 음악 코덱", - "login_with_lastfm": "Last.fm에 로그인", - "connect": "연결", - "disconnect_lastfm": "Last.fm에서 연결 해제", - "disconnect": "연결 해제", - "username": "사용자명", - "password": "비밀번호", - "login": "로그인", - "login_with_your_lastfm": "내 Last.fm 계정으로로그인", - "scrobble_to_lastfm": "Scrobble to Last.fm", - "go_to_album": "앨범으로 이동", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "모두 탐색", - "genres": "장르", - "explore_genres": "장르 탐색", - "step_3_steps": "\"sp_dc\" 쿠키의 값을 복사", - "step_4_steps": "복사한 \"sp_dc\"값을 붙여넣기", - "friends": "친구", - "no_lyrics_available": "죄송하지만 이 곡의 가사를 찾지 못했습니다", - "@@locale": "ko", - "sort_duration": "시간순 정렬", - "start_a_radio": "라디오 시작", - "how_to_start_radio": "라디오를 어떻게 시작하시겠습니까?", - "replace_queue_question": "현재 큐를 대체하시겠습니까 아니면 추가하시겠습니까?", - "endless_playback": "끝없는 재생", - "delete_playlist": "재생 목록 삭제", - "delete_playlist_confirmation": "이 재생 목록을 삭제하시겠습니까?", - "local_tracks": "로컬 트랙", - "song_link": "곡 링크", - "skip_this_nonsense": "이 허튼소리 건너뛰기", - "freedom_of_music": "“음악의 자유”", - "freedom_of_music_palm": "“손바닥 안의 음악의 자유”", - "get_started": "시작합시다", - "youtube_source_description": "추천되며 가장 잘 작동합니다.", - "piped_source_description": "자유로운 기분이 듭니까? YouTube와 같지만 훨씬 더 무료합니다.", - "jiosaavn_source_description": "남아시아 지역에 최적입니다.", - "highest_quality": "최고 품질: {quality}", - "select_audio_source": "오디오 소스 선택", - "endless_playback_description": "자동으로 새로운 노래를 대기열의 끝에 추가", - "choose_your_region": "지역 선택", - "choose_your_region_description": "이것은 Spotube가 위치에 맞는 콘텐츠를 표시하는 데 도움이 됩니다.", - "choose_your_language": "언어 선택", - "help_project_grow": "이 프로젝트 성장에 도움을 주세요", - "help_project_grow_description": "Spotube는 오픈 소스 프로젝트입니다. 프로젝트에 기여하거나 버그를 보고하거나 새로운 기능을 제안하여이 프로젝트의 성장에 도움을 줄 수 있습니다.", - "contribute_on_github": "GitHub에서 기여하기", - "donate_on_open_collective": "Open Collective에 기부하기", - "browse_anonymously": "익명으로 둘러보기", - "enable_connect": "연결 활성화", - "enable_connect_description": "다른 장치에서 Spotube 제어", - "devices": "장치", - "select": "선택", - "connect_client_alert": "{client}님에 의해 제어되고 있습니다", - "this_device": "이 장치", - "remote": "원격", - "local_library": "로컬 도서관", - "add_library_location": "도서관에 추가", - "remove_library_location": "도서관에서 제거", - "local_tab": "로컬", - "stats": "통계", - "and_n_more": "그리고 {count}개 더", - "recently_played": "최근 재생", - "browse_more": "더 보기", - "no_title": "제목 없음", - "not_playing": "재생 중이 아님", - "epic_failure": "서사적 실패!", - "added_num_tracks_to_queue": "{tracks_length} 곡을 대기열에 추가했습니다", - "spotube_has_an_update": "Spotube에 업데이트가 있습니다", - "download_now": "지금 다운로드", - "nightly_version": "Spotube Nightly {nightlyBuildNum}이 출시되었습니다", - "release_version": "Spotube v{version}이 출시되었습니다", - "read_the_latest": "최신 ", - "release_notes": "릴리스 노트", - "pick_color_scheme": "색상 테마 선택", - "save": "저장", - "choose_the_device": "디바이스 선택:", - "multiple_device_connected": "여러 디바이스가 연결되어 있습니다.\n이 작업을 실행할 디바이스를 선택하세요", - "nothing_found": "찾을 수 없음", - "the_box_is_empty": "상자가 비어 있습니다", - "top_artists": "톱 아티스트", - "top_albums": "톱 앨범", - "this_week": "이번 주", - "this_month": "이번 달", - "last_6_months": "지난 6개월", - "this_year": "올해", - "last_2_years": "지난 2년", - "all_time": "모든 시간", - "powered_by_provider": "{providerName} 제공", - "email": "이메일", - "profile_followers": "팔로워", - "birthday": "생일", - "subscription": "구독", - "not_born": "태어나지 않음", - "hacker": "해커", - "profile": "프로필", - "no_name": "이름 없음", - "edit": "편집", - "user_profile": "사용자 프로필", - "count_plays": "{count} 재생", - "streaming_fees_hypothetical": "*이것은 Spotify의 스트림당 지급액\n$0.003에서 $0.005를 기준으로 계산된 것입니다.\n이것은 사용자가 Spotify에서 곡을 들었을 때\n아티스트에게 지불했을 금액에 대한 통찰을 제공하기 위한\n가상의 계산입니다.", - "count_mins": "{minutes} 분", - "summary_minutes": "분", - "summary_listened_to_music": "듣는 음악", - "summary_songs": "곡", - "summary_streamed_overall": "전체 스트리밍", - "summary_owed_to_artists": "이번 달 아티스트에게 지급해야 할 금액", - "summary_artists": "아티스트의", - "summary_music_reached_you": "음악이 도달함", - "summary_full_albums": "전체 앨범", - "summary_got_your_love": "당신의 사랑을 받음", - "summary_playlists": "플레이리스트", - "summary_were_on_repeat": "반복 재생됨", - "total_money": "총 {money}", - "minutes_listened": "청취한 시간", - "streamed_songs": "스트리밍된 곡", - "count_streams": "{count} 스트림", - "owned_by_you": "당신이 소유", - "copied_shareurl_to_clipboard": "{shareUrl}를 클립보드에 복사했습니다", - "spotify_hipotetical_calculation": "*Spotify의 스트림당 지불금 $0.003에서 $0.005까지의\n기준으로 계산되었습니다. 이는 사용자가 Spotify에서\n곡을 들을 때 아티스트에게 얼마를 지불했을지를\n알려주기 위한 가상의 계산입니다.", - "webview_not_found": "웹뷰를 찾을 수 없음", - "webview_not_found_description": "기기에 웹뷰 런타임이 설치되지 않았습니다.\n설치되어 있으면 environment PATH에 있는지 확인하십시오\n\n설치 후 앱을 다시 시작하세요", - "unsupported_platform": "지원되지 않는 플랫폼", - "invidious_instance": "Invidious 서버 인스턴스", - "invidious_description": "트랙 매칭에 사용할 Invidious 서버 인스턴스", - "invidious_warning": "일부는 제대로 작동하지 않을 수 있습니다. 자신의 책임 하에 사용하세요", - "invidious_source_description": "Piped와 비슷하지만 가용성이 높습니다.", - "cache_music": "음악 캐시", - "open": "열기", - "cache_folder": "캐시 폴더", - "export": "내보내기", - "clear_cache": "캐시 지우기", - "clear_cache_confirmation": "캐시를 지우시겠습니까?", - "export_cache_files": "캐시된 파일 내보내기", - "found_n_files": "{count}개의 파일을 찾았습니다", - "export_cache_confirmation": "이 파일들을 내보내시겠습니까", - "exported_n_out_of_m_files": "{files}개 중 {filesExported}개 파일을 내보냈습니다", - "playlist": "재생 목록", - "no_loop": "반복 없음", - "generate": "생성", - "undo": "실행 취소", - "download_all": "모두 다운로드", - "add_all_to_playlist": "모두 재생 목록에 추가", - "add_all_to_queue": "모두 큐에 추가", - "play_all_next": "모두 다음에 재생", - "pause": "일시 정지", - "view_all": "모두 보기", - "no_tracks_added_yet": "아직 트랙을 추가하지 않은 것 같습니다", - "no_tracks": "여기에 트랙이 없는 것 같습니다", - "no_tracks_listened_yet": "아직 아무 것도 듣지 않은 것 같습니다", - "not_following_artists": "아티스트를 팔로우하지 않고 있습니다", - "no_favorite_albums_yet": "아직 즐겨찾기 앨범을 추가하지 않은 것 같습니다", - "no_logs_found": "로그를 찾을 수 없습니다", - "youtube_engine": "YouTube 엔진", - "youtube_engine_not_installed_title": "{engine}가 설치되지 않았습니다", - "youtube_engine_not_installed_message": "{engine}가 시스템에 설치되지 않았습니다.", - "youtube_engine_set_path": "PATH 변수에서 사용할 수 있는지 확인하거나\n아래에 {engine} 실행 파일의 절대 경로를 설정하세요", - "youtube_engine_unix_issue_message": "macOS/Linux/unix와 같은 운영 체제에서는 .zshrc/.bashrc/.bash_profile 등에 경로 설정이 작동하지 않습니다.\n셸 구성 파일에 경로를 설정해야 합니다", - "download": "다운로드", - "file_not_found": "파일을 찾을 수 없습니다", - "custom": "사용자 정의", - "add_custom_url": "사용자 정의 URL 추가", - "edit_port": "포트 편집", - "port_helper_msg": "기본값은 -1로 무작위 숫자를 나타냅니다. 방화벽이 구성된 경우 이를 설정하는 것이 좋습니다.", - "connect_request": "{client}의 연결을 허용하시겠습니까?", - "connection_request_denied": "연결이 거부되었습니다. 사용자가 액세스를 거부했습니다.", - "hipotetical_calculation": "*이것은 온라인 음악 스트리밍 플랫폼의 스트림당 평균 지불액인 $0.003에서 $0.005를 기준으로 계산됩니다. 이것은 사용자가 다른 음악 스트리밍 플랫폼에서 노래를 들었다면 아티스트에게 얼마를 지불했을지에 대한 통찰력을 제공하기 위한 가상 계산입니다.", - "an_error_occurred": "오류가 발생했습니다", - "copy_to_clipboard": "클립보드에 복사", - "view_logs": "로그 보기", - "retry": "다시 시도", - "no_default_metadata_provider_selected": "기본 메타데이터 제공자가 설정되지 않았습니다", - "manage_metadata_providers": "메타데이터 제공자 관리", - "open_link_in_browser": "브라우저에서 링크를 여시겠습니까?", - "do_you_want_to_open_the_following_link": "다음 링크를 여시겠습니까", - "unsafe_url_warning": "신뢰할 수 없는 출처의 링크를 여는 것은 안전하지 않을 수 있습니다. 주의하세요!\n링크를 클립보드에 복사할 수도 있습니다.", - "copy_link": "링크 복사", - "building_your_timeline": "청취 기록을 기반으로 타임라인을 구축하고 있습니다...", - "official": "공식", - "author_name": "저자: {author}", - "third_party": "타사", - "plugin_requires_authentication": "플러그인에 인증이 필요합니다", - "update_available": "업데이트 사용 가능", - "supports_scrobbling": "스크로블링 지원", - "plugin_scrobbling_info": "이 플러그인은 음악을 스크로블하여 청취 기록을 생성합니다.", - "default_plugin": "기본", - "set_default": "기본값으로 설정", - "support": "지원", - "support_plugin_development": "플러그인 개발 지원", - "can_access_name_api": "- **{name}** API에 액세스할 수 있습니다", - "do_you_want_to_install_this_plugin": "이 플러그인을 설치하시겠습니까?", - "third_party_plugin_warning": "이 플러그인은 타사 리포지토리에서 제공됩니다. 설치하기 전에 출처를 신뢰하는지 확인하세요.", - "author": "저자", - "this_plugin_can_do_following": "이 플러그인은 다음을 수행할 수 있습니다", - "install": "설치", - "install_a_metadata_provider": "메타데이터 제공자 설치", - "no_tracks_playing": "현재 재생 중인 트랙이 없습니다", - "synced_lyrics_not_available": "이 노래에 대한 동기화된 가사를 사용할 수 없습니다. 대신", - "plain_lyrics": "일반 가사", - "tab_instead": "탭을 사용하세요.", - "disclaimer": "면책 조항", - "third_party_plugin_dmca_notice": "Spotube 팀은 어떠한 \"타사\" 플러그인에 대해서도 (법적 포함) 어떠한 책임도 지지 않습니다.\n사용자 자신의 책임하에 사용하시기 바랍니다. 버그/문제에 대해서는 플러그인 리포지토리에 보고해 주세요.\n\n만약 \"타사\" 플러그인이 서비스/법인의 ToS/DMCA를 위반하는 경우, \"타사\" 플러그인 저자 또는 호스팅 플랫폼(예: GitHub/Codeberg)에 조치를 취하도록 요청해 주세요. 위에 나열된 (\"타사\"로 표시된) 플러그인은 모두 공개/커뮤니티에서 유지 관리하는 플러그인입니다. 저희는 이를 큐레이션하지 않으므로 어떠한 조치도 취할 수 없습니다.\n\n", - "input_does_not_match_format": "입력이 필요한 형식과 일치하지 않습니다", - "metadata_provider_plugins": "메타데이터 제공자 플러그인", - "paste_plugin_download_url": "다운로드 URL, GitHub/Codeberg 리포지토리 URL 또는 .smplug 파일에 대한 직접 링크를 붙여넣으세요", - "download_and_install_plugin_from_url": "URL에서 플러그인 다운로드 및 설치", - "failed_to_add_plugin_error": "플러그인 추가 실패: {error}", - "upload_plugin_from_file": "파일에서 플러그인 업로드", - "installed": "설치됨", - "available_plugins": "사용 가능한 플러그인", - "configure_your_own_metadata_plugin": "자신만의 플레이리스트/앨범/아티스트/피드 메타데이터 제공자 구성", - "audio_scrobblers": "오디오 스크로블러", - "scrobbling": "스크로블링", - "download_music_format": "다운로드 음악 포맷", - "streaming_music_format": "스트리밍 음악 포맷", - "download_music_quality": "다운로드 음질", - "streaming_music_quality": "스트리밍 음질", - "default_metadata_source": "기본 메타데이터 소스", - "set_default_metadata_source": "기본 메타데이터 소스 설정", - "default_audio_source": "기본 오디오 소스", - "set_default_audio_source": "기본 오디오 소스 설정", - "plugins": "플러그인", - "configure_plugins": "직접 메타데이터 제공자와 오디오 소스 플러그인을 구성하세요", - "source": "출처: ", - "uncompressed": "비압축", - "dab_music_source_description": "오디오파일을 위한 소스입니다. 고음질/무손실 오디오 스트림을 제공하며 ISRC 기반으로 정확한 트랙 매칭을 지원합니다." -} \ No newline at end of file diff --git a/lib/l10n/app_ne.arb b/lib/l10n/app_ne.arb deleted file mode 100644 index 874c28a5..00000000 --- a/lib/l10n/app_ne.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "अतिथि", - "browse": "ब्राउज़ गर्नुहोस्", - "search": "खोजी गर्नुहोस्", - "library": "पुस्तकालय", - "lyrics": "गीतको शब्द", - "settings": "सेटिङ", - "genre_categories_filter": "शैली वा शैलीहरू फिल्टर गर्नुहोस्...", - "genre": "शैली", - "personalized": "व्यक्तिगत", - "featured": "विशेष", - "new_releases": "नयाँ रिलिज", - "songs": "गीतहरू", - "playing_track": "{track} बज्यो", - "queue_clear_alert": "यो हालको कतारलाई हटाउँछ। {track_length} ट्र्याकहरू हटाईन्छ\nके तपाईं जारी राख्न चाहनुहुन्छ?", - "load_more": "थप लोड गर्नुहोस्", - "playlists": "प्लेलिस्टहरू", - "artists": "कलाकारहरू", - "albums": "आल्बमहरू", - "tracks": "ट्र्याकहरू", - "downloads": "डाउनलोडहरू", - "filter_playlists": "तपाईंको प्लेलिस्टहरू फिल्टर गर्नुहोस्...", - "liked_tracks": "मन परेका ट्र्याकहरू", - "liked_tracks_description": "तपाईंको मन परेका सबै ट्र्याकहरू", - "create_playlist": "प्लेलिस्ट बनाउनुहोस्", - "create_a_playlist": "प्लेलिस्ट बनाउनुहोस्", - "update_playlist": "प्लेलिस्ट अपडेट गर्नुहोस्", - "create": "बनाउनुहोस्", - "cancel": "रद्द गर्नुहोस्", - "update": "अपडेट गर्नुहोस्", - "playlist_name": "प्लेलिस्टको नाम", - "name_of_playlist": "प्लेलिस्टको नाम", - "description": "विवरण", - "public": "सार्वजनिक", - "collaborative": "सहकारी", - "search_local_tracks": "स्थानीय ट्र्याकहरू खोजी गर्नुहोस्...", - "play": "बजाउनुहोस्", - "delete": "मेटाउनुहोस्", - "none": "कुनै पनि होइन", - "sort_a_z": "A-Zमा क्रमबद्ध गर्नुहोस्", - "sort_z_a": "Z-Aमा क्रमबद्ध गर्नुहोस्", - "sort_artist": "कलाकारबाट क्रमबद्ध गर्नुहोस्", - "sort_album": "आल्बमबाट क्रमबद्ध गर्नुहोस्", - "sort_tracks": "ट्र्याकहरूलाई क्रमबद्ध गर्नुहोस्", - "currently_downloading": "हाल डाउनलोड गर्दैछ ({tracks_length})", - "cancel_all": "सब रद्द गर्नुहोस्", - "filter_artist": "कलाकारहरूलाई फिल्टर गर्नुहोस्...", - "followers": "{followers} अनुयायीहरू", - "add_artist_to_blacklist": "कलाकारलाई कालोसूचीमा थप्नुहोस्", - "top_tracks": "शीर्ष ट्र्याकहरू", - "fans_also_like": "अनुयायीहरू पनि लाइक गर्छन्", - "loading": "लोड हुँदैछ...", - "artist": "कलाकार", - "blacklisted": "कालोसूचीमा", - "following": "फल्लो गर्दै", - "follow": "फल्लो गर्नुहोस्", - "artist_url_copied": "कलाकार URL क्लिपबोर्डमा प्रतिलिपि गरिएको छ", - "added_to_queue": "{tracks} ट्र्याकहरूलाई कतारमा थपिएको छ", - "filter_albums": "आल्बमहरूलाई फिल्टर गर्नुहोस्...", - "synced": "सिङ्क गरिएको", - "plain": "साधा", - "shuffle": "शफल", - "search_tracks": "ट्र्याकहरू खोजी गर्नुहोस्...", - "released": "रिलिज गरिएको", - "error": "त्रुटि {error}", - "title": "शीर्षक", - "time": "समय", - "more_actions": "थप कार्यहरू", - "download_count": "डाउनलोड ({count})", - "add_count_to_playlist": "प्लेलिस्टमा थप्नुहोस् ({count})", - "add_count_to_queue": "कतारमा थप्नुहोस् ({count})", - "play_count_next": "प्लेगरी गर्नुहोस् ({count})", - "album": "आल्बम", - "copied_to_clipboard": "{data} क्लिपबोर्डमा प्रतिलिपि गरिएको छ", - "add_to_following_playlists": "{track} लाई तलका प्लेलिस्टमा थप्नुहोस्", - "add": "थप्नुहोस्", - "added_track_to_queue": "{track} लाई कतारमा थपिएको छ", - "add_to_queue": "कतारमा थप्नुहोस्", - "track_will_play_next": "{track} अरूलाई पहिलोमा बज्नेछ", - "play_next": "पछिबजाउनुहोस्", - "removed_track_from_queue": "{track} लाई कतारबाट हटाइएको छ", - "remove_from_queue": "कतारबाट हटाउनुहोस्", - "remove_from_favorites": "पसन्दीदामा बाट हटाउनुहोस्", - "save_as_favorite": "पसन्दीदा बनाउनुहोस्", - "add_to_playlist": "प्लेलिस्टमा थप्नुहोस्", - "remove_from_playlist": "प्लेलिस्टबाट हटाउनुहोस्", - "add_to_blacklist": "कालोसूचीमा थप्नुहोस्", - "remove_from_blacklist": "कालोसूचीबाट हटाउनुहोस्", - "share": "साझा गर्नुहोस्", - "mini_player": "मिनि प्लेयर", - "slide_to_seek": "अगाडि वा पछाडि खोजी गर्नका लागि स्लाइड गर्नुहोस्", - "shuffle_playlist": "प्लेलिस्ट शफल गर्नुहोस्", - "unshuffle_playlist": "प्लेलिस्ट शफल नगर्नुहोस्", - "previous_track": "पूर्व ट्र्याक", - "next_track": "अरू ट्र्याक", - "pause_playback": "प्लेब्याक रोक्नुहोस्", - "resume_playback": "प्लेब्याक पुनः सुरु गर्नुहोस्", - "loop_track": "ट्र्याकलाई दोहोरोपट्टी बजाउनुहोस्", - "repeat_playlist": "प्लेलिस्ट पुनः बजाउनुहोस्", - "queue": "कतार", - "alternative_track_sources": "वैकल्पिक ट्र्याक स्रोतहरू", - "download_track": "ट्र्याक डाउनलोड गर्नुहोस्", - "tracks_in_queue": "कतारमा {tracks} ट्र्याकहरू", - "clear_all": "सब मेटाउनुहोस्", - "show_hide_ui_on_hover": "हवर गरेपछि UI देखाउनुहोस्/लुकाउनुहोस्", - "always_on_top": "सधैं टपमा राख्नुहोस्", - "exit_mini_player": "मिनि प्लेयर बाट बाहिर निस्कनुहोस्", - "download_location": "डाउनलोड स्थान", - "account": "खाता", - "login_with_spotify": "तपाईंको Spotify खातासँग लगइन गर्नुहोस्", - "connect_with_spotify": "Spotify सँग जडान गर्नुहोस्", - "logout": "बाहिर निस्कनुहोस्", - "logout_of_this_account": "यो खाताबाट बाहिर निस्कनुहोस्", - "language_region": "भाषा र क्षेत्र", - "language": "भाषा", - "system_default": "सिस्टम पूर्वनिर्धारित", - "market_place_region": "बजार स्थान", - "recommendation_country": "सिफारिस गरिएको देश", - "appearance": "दृष्टिकोण", - "layout_mode": "लेआउट मोड", - "override_layout_settings": "अनुकूलित प्रतिकृयात्मक लेआउट मोड सेटिङ्गहरू", - "adaptive": "अनुकूलित", - "compact": "संकुचित", - "extended": "बढाइएको", - "theme": "थिम", - "dark": "गाढा", - "light": "प्रकाश", - "system": "सिस्टम", - "accent_color": "एक्सेन्ट रङ्ग", - "sync_album_color": "एल्बम रङ्ग सिङ्क गर्नुहोस्", - "sync_album_color_description": "एल्बम कला को प्रमुख रङ्गलाई एक्सेन्ट रङ्गको रूपमा प्रयोग गर्दछ", - "playback": "प्लेब्याक", - "audio_quality": "आडियो गुणस्तर", - "high": "उच्च", - "low": "न्यून", - "pre_download_play": "पूर्व-डाउनलोड र प्ले गर्नुहोस्", - "pre_download_play_description": "आडियो स्ट्रिम गर्नु नगरी बाइटहरू डाउनलोड गरी बजाउँछ (उच्च ब्यान्डविथ उपयोगकर्ताहरूको लागि सिफारिस गरिएको)", - "skip_non_music": "गीतहरू बाहेक कुनै अनुष्ठान छोड्नुहोस् (स्पन्सरब्लक)", - "blacklist_description": "कालोसूची गीत र कलाकारहरू", - "wait_for_download_to_finish": "कृपया हालको डाउनलोड समाप्त हुन लागि पर्खनुहोस्", - "desktop": "डेस्कटप", - "close_behavior": "बन्द व्यवहार", - "close": "बन्द गर्नुहोस्", - "minimize_to_tray": "ट्रेमा कम गर्नुहोस्", - "show_tray_icon": "सिस्टम ट्रे आइकन देखाउनुहोस्", - "about": "बारेमा", - "u_love_spotube": "हामीले थाहा पारेका छौं तपाईंलाई Spotube मन पर्छ", - "check_for_updates": "अपडेटहरूको लागि जाँच गर्नुहोस्", - "about_spotube": "Spotube को बारेमा", - "blacklist": "कालोसूची", - "please_sponsor": "कृपया स्पन्सर/डोनेट गर्नुहोस्", - "spotube_description": "Spotube, एक हल्का, समृद्ध, स्वतन्त्र Spotify क्लाइयन", - "version": "संस्करण", - "build_number": "निर्माण नम्बर", - "founder": "संस्थापक", - "repository": "पुनरावलोकन स्थल", - "bug_issues": "त्रुटि + समस्याहरू", - "made_with": "❤️ 2021-2024 बाट बनाइएको", - "kingkor_roy_tirtho": "किङ्कोर राय तिर्थो", - "copyright": "© 2021-{current_year} किङ्कोर राय तिर्थो", - "license": "लाइसेन्स", - "add_spotify_credentials": "सुरु हुनका लागि तपाईंको स्पटिफाई क्रेडेन्शियल थप्नुहोस्", - "credentials_will_not_be_shared_disclaimer": "चिन्ता नगर्नुहोस्, तपाईंको कुनै पनि क्रेडेन्शियलहरूले कसैले संग्रह वा साझा गर्नेछैन", - "know_how_to_login": "कसरी लगिन गर्ने भन्ने थाहा छैन?", - "follow_step_by_step_guide": "चरणबद्ध मार्गदर्शनमा साथी बनाउनुहोस्", - "spotify_cookie": "Spotify {name} कुकी", - "cookie_name_cookie": "{name} कुकी", - "fill_in_all_fields": "कृपया सबै क्षेत्रहरू भर्नुहोस्", - "submit": "पेश गर्नुहोस्", - "exit": "बाहिर निस्कनुहोस्", - "previous": "पूर्ववत", - "next": "अरू", - "done": "गरिएको", - "step_1": "कदम 1", - "first_go_to": "पहिलो, जानुहोस्", - "login_if_not_logged_in": "र लगइन/साइनअप गर्नुहोस् जुन तपाईंले लगइन गरेनन्", - "step_2": "कदम 2", - "step_2_steps": "1. एकबार तपाईं लगइन गरे पछि, F12 थिच्नुहोस् वा माउस राइट क्लिक गर्नुहोस् > इन्स्पेक्ट गर्नुहोस् भने ब्राउजर डेभटुलहरू खुलाउनका लागि।\n2. तपाईंको \"एप्लिकेसन\" ट्याबमा जानुहोस् (Chrome, Edge, Brave इत्यादि) वा \"स्टोरेज\" ट्याबमा जानुहोस् (Firefox, Palemoon इत्यादि)\n3. तपाईंको इन्सेक्ट गरेको ब्राउजर डेभटुलहरूमा \"कुकीहरू\" खण्डमा जानुहोस् अनि \"https://accounts.spotify.com\" उपकोणमा जानुहोस्", - "step_3": "कदम 3", - "step_3_steps": "\"sp_dc\" र \"sp_key\" (वा sp_gaid) कुकीहरूको मानहरू प्रतिलिपि गर्नुहोस्", - "success_emoji": "सफलता 🥳", - "success_message": "हाम्रो सानो भाइ, अब तपाईं सफलतापूर्वक आफ्नो Spotify खातामा लगइन गरेका छौं। राम्रो काम गरेको!", - "step_4": "कदम 4", - "step_4_steps": "प्रतिलिपि गरेको \"sp_dc\" र \"sp_key\" (वा sp_gaid) मानहरूलाई आफ्नो ठाउँमा पेस्ट गर्नुहोस्", - "something_went_wrong": "केहि गल्ति भएको छ", - "piped_instance": "पाइपड सर्भर इन्स्ट्यान्स", - "piped_description": "गीत मिलाउको लागि प्रयोग गर्ने पाइपड सर्भर इन्स्ट्यान्स", - "piped_warning": "तिनीहरूमध्ये केहि ठिक गर्न सक्छ। यसलाई आफ्नो जोखिममा प्रयोग गर्नुहोस्", - "generate_playlist": "प्लेलिस्ट बनाउनुहोस्", - "track_exists": "ट्र्याक {track} पहिले नै छ", - "replace_downloaded_tracks": "सबै डाउनलोड गरिएका ट्र्याकहरूलाई परिवर्तन गर्नुहोस्", - "skip_download_tracks": "सबै डाउनलोड गरिएका ट्र्याकहरूलाई छोड्नुहोस्", - "do_you_want_to_replace": "के तपाईंले वर्तमान ट्र्याकलाई परिवर्तन गर्न चाहनुहुन्छ?", - "replace": "परिवर्तन गर्नुहोस्", - "skip": "छोड्नुहोस्", - "select_up_to_count_type": "{count} {type} सम्म चयन गर्नुहोस्", - "select_genres": "जनरहरू चयन गर्नुहोस्", - "add_genres": "जनरहरू थप्नुहोस्", - "country": "देश", - "number_of_tracks_generate": "बनाउनका लागि ट्र्याकहरूको संख्या", - "acousticness": "एकोस्टिकनेस", - "danceability": "नृत्यक्षमता", - "energy": "ऊर्जा", - "instrumentalness": "साजा रहेकोता", - "liveness": "प्राणिकता", - "loudness": "शोर", - "speechiness": "भाषण", - "valence": "मानसिक स्वभाव", - "popularity": "लोकप्रियता", - "key": "कुञ्जी", - "duration": "अवधि (सेकेण्ड)", - "tempo": "गति (बीपीएम)", - "mode": "मोड", - "time_signature": "समय हस्ताक्षर", - "short": "सानो", - "medium": "मध्यम", - "long": "लामो", - "min": "न्यून", - "max": "अधिक", - "target": "लक्ष्य", - "moderate": "मध्यस्थ", - "deselect_all": "सबै छान्नुहोस्", - "select_all": "सबै चयन गर्नुहोस्", - "are_you_sure": "के तपाईं सुनिश्चित हुनुहुन्छ?", - "generating_playlist": "तपाईंको विशेष प्लेलिस्ट बनाइएको छ...", - "selected_count_tracks": "{count} ट्र्याकहरू छन् चयन गरिएका", - "download_warning": "यदि तपाईं सबै ट्र्याकहरूलाई बल्कमा डाउनलोड गर्छनु हो भने तपाईं स्पष्ट रूपमा साङ्गीत चोरी गरिरहेका छन् र यो साङ्गीतको रचनात्मक समाजलाई क्षति पनि पुर्याउँछ। उमेराइएको छ कि तपाईं यसको बारेमा जागरूक छिनुहुन्छ। सधैं, कला गर्दै र कलाकारको कडा परम्परा समर्थन गर्दै आइन्छ।", - "download_ip_ban_warning": "बितिएका डाउनलोड अनुरोधहरूका कारण तपाईंको आइपीले YouTube मा ब्लक हुन सक्छ। आइपी ब्लक भनेको कम्तीमा 2-3 महिनासम्म तपाईं त्यस आइपी यन्त्रबाट YouTube प्रयोग गर्न सक्नुहुन्छ। र यदि यो हुँदैछ भने स्पट्यूबले यसलाई कसैले गरेको बारेमा कुनै दायित्व लिन्छैन।", - "by_clicking_accept_terms": "'स्वीकृत' गरेर तपाईं निम्नलिखित निर्वाचन गर्दैछिन्:", - "download_agreement_1": "म मन्ने छु कि म साङ्गीत चोरी गरिरहेको छु। म बुरो हुँ", - "download_agreement_2": "म कहिल्यै कहिल्यै तिनीहरूलाई समर्थन गर्नेछु र म यो तिनीहरूको कला किन्ने पैसा छैन भने मा मात्र यो गरेको छु", - "download_agreement_3": "म पूरा रूपमा जान्छु कि मेरो आइपी YouTube मा ब्लक हुन सक्छ र म मन्छेहरूले मेरो चासोबाट भएको कुनै दुर्घटनामा स्पट्यूब वा तिनीहरूको मालिकहरू/सहयोगीहरूलाई दायित्वी ठान्छुँभन्ने पूर्ण जानकारी छैन", - "decline": "अस्वीकृत", - "accept": "स्वीकृत", - "details": "विवरण", - "youtube": "YouTube", - "channel": "च्यानल", - "likes": "लाइकहरू", - "dislikes": "असुनुहरू", - "views": "हेरिएको", - "streamUrl": "स्ट्रिम यूआरएल", - "stop": "रोक्नुहोस्", - "sort_newest": "नयाँ थपिएकोमा क्रमबद्ध गर्नुहोस्", - "sort_oldest": "पुरानो थपिएकोमा क्रमबद्ध गर्नुहोस्", - "sleep_timer": "सुत्ने टाइमर", - "mins": "{minutes} मिनेटहरू", - "hours": "{hours} घण्टाहरू", - "hour": "{hours} घण्टा", - "custom_hours": "कस्टम घण्टाहरू", - "logs": "लगहरू", - "developers": "डेभेलपर्स", - "not_logged_in": "तपाईंले लगइन गरेका छैनौं", - "search_mode": "खोज मोड", - "audio_source": "अडियो स्रोत", - "ok": "ठिक छ", - "failed_to_encrypt": "एन्क्रिप्ट गर्न सकिएन", - "encryption_failed_warning": "स्पट्यूबले तपाईंको डेटा सुरक्षित रूपमा स्टोर गर्नका लागि एन्क्रिप्ट गर्न खोजेको छ। तर यसले गरेको छैन। यसले असुरक्षित स्टोरेजमा फल्लब्याक गर्दछ\nयदि तपाईंले लिनक्स प्रयोग गरिरहेका छन् भने कृपया सुनिश्चित गर्नुहोस् कि तपाईंले कुनै सीक्रेट-सर्भिस (गोनोम-किरिङ, केडीइ-वालेट, किपासेक्ससि इत्यादि) इन्स्टल गरेका छौं", - "querying_info": "जानकारी हेर्दै...", - "piped_api_down": "पाइपड एपीआई डाउन छ", - "piped_down_error_instructions": "पाइपड इन्स्ट्यान्स {pipedInstance} हाल डाउन छ\n\nजीसनै इन्स्ट्यान्स परिवर्तन गर्नुहोस् वा 'एपीआई प्रकार' लाइ YouTube आफिसियल एपीआईमा परिवर्तन गर्नुहोस्\n\nपरिवर्तनपछि एप्लिकेसन पुन: सुरु गर्नुहोस्", - "you_are_offline": "तपाईं वर्तमान अफलाइन हुनुहुन्छ", - "connection_restored": "तपाईंको इन्टरनेट कनेक्सन पुन: स्थापित भएको छ", - "use_system_title_bar": "सिस्टम शीर्षक पट्टी प्रयोग गर्नुहोस्", - "crunching_results": "परिणामहरू कपालबाट पीस्दै...", - "search_to_get_results": "परिणामहरू प्राप्त गर्नका लागि खोज्नुहोस्", - "use_amoled_mode": "कृष्ण ब्ल्याक गाढा थिम प्रयोग गर्नुहोस्", - "pitch_dark_theme": "एमोलेड मोड", - "normalize_audio": "अडियो सामान्य गर्नुहोस्", - "change_cover": "कवर परिवर्तन गर्नुहोस्", - "add_cover": "कवर थप्नुहोस्", - "restore_defaults": "पूर्वनिर्धारितहरू पुनः स्थापित गर्नुहोस्", - "download_music_codec": "साङ्गीत कोडेक डाउनलोड गर्नुहोस्", - "streaming_music_codec": "स्ट्रिमिङ साङ्गीत कोडेक", - "login_with_lastfm": "लास्ट.एफ.एम सँग लगइन गर्नुहोस्", - "connect": "जडान गर्नुहोस्", - "disconnect_lastfm": "लास्ट.एफ.एम डिसकनेक्ट गर्नुहोस्", - "disconnect": "डिसकनेक्ट", - "username": "प्रयोगकर्ता नाम", - "password": "पासवर्ड", - "login": "लगइन", - "login_with_your_lastfm": "तपाईंको लास्ट.एफ.एम खातामा लगइन गर्नुहोस्", - "scrobble_to_lastfm": "लास्ट.एफ.एम मा स्क्रबल गर्नुहोस्", - "go_to_album": "आल्बममा जानुहोस्", - "discord_rich_presence": "डिस्कर्ड धनी उपस्थिति", - "browse_all": "सबै हेर्नुहोस्", - "genres": "शैलीहरू", - "explore_genres": "शैलीहरू अन्वेषण गर्नुहोस्", - "friends": "साथीहरू", - "no_lyrics_available": "क्षमा गर्दैछौं, यस ट्र्याकका लागि गीतका शब्दहरू फेला परेन", - "sort_duration": "अवधिको अनुसार क्रमबद्ध गर्नुहोस्", - "start_a_radio": "रेडियो सुरु गर्नुहोस्", - "how_to_start_radio": "तपाईं रेडियो कसरी सुरु गर्न चाहानुहुन्छ?", - "replace_queue_question": "के तपाईं वर्तमान कताक्ष कोट बदल्न चाहानुहुन्छ वा यसलाई थप्नुहुन्छ?", - "endless_playback": "अनन्त प्लेब्याक", - "delete_playlist": "प्लेलिस्ट मेटाउनुहोस्", - "delete_playlist_confirmation": "के तपाईं यो प्लेलिस्ट मेटाउन निश्चित हुनुहुन्छ?", - "local_tracks": "स्थानिय ट्र्याकहरू", - "song_link": "गीत लिंक", - "skip_this_nonsense": "यस अबश्यकता छोड्नुहोस्", - "freedom_of_music": "“संगीतको स्वतन्त्रता”", - "freedom_of_music_palm": "“तपाईंको हातमा संगीतको स्वतन्त्रता”", - "get_started": "आइयाँ प्रारम्भ गरौं", - "youtube_source_description": "सिफारिस गरिएको र बेस्ट काम गर्दछ।", - "piped_source_description": "मुक्त सुस्त? YouTube जस्तै तर धेरै मुक्त।", - "jiosaavn_source_description": "दक्षिण एशियाली क्षेत्रको लागि सर्वोत्तम।", - "highest_quality": "उच्चतम गुणस्तर: {quality}", - "select_audio_source": "आडियो स्रोत चयन गर्नुहोस्", - "endless_playback_description": "नयाँ गीतहरूलाई स्वचालित रूपमा कताक्षको अन्तमा जोड्नुहोस्", - "choose_your_region": "तपाईंको क्षेत्र छनौट गर्नुहोस्", - "choose_your_region_description": "यो Spotubeलाई तपाईंको स्थानका लागि सहि सामग्री देखाउने मद्दत गर्नेछ।", - "choose_your_language": "तपाईंको भाषा छनौट गर्नुहोस्", - "help_project_grow": "यस परियोजनामा वृद्धि गराउनुहोस्", - "help_project_grow_description": "Spotube एक खुला स्रोतको परियोजना हो। तपाईं परियोजनामा योगदान गरेर, त्रुटिहरू सूचिकै, वा नयाँ सुविधाहरू सुझाव दिएर यस परियोजनामा वृद्धि गर्न सक्नुहुन्छ।", - "contribute_on_github": "GitHubमा योगदान गर्नुहोस्", - "donate_on_open_collective": "खुला संगठनमा दान गर्नुहोस्", - "browse_anonymously": "अनामित रूपमा ब्राउज़ गर्नुहोस्", - "enable_connect": "कनेक्ट सक्रिय गर्नुहोस्", - "enable_connect_description": "अन्य उपकरणहरूबाट Spotube कन्ट्रोल गर्नुहोस्", - "devices": "उपकरणहरू", - "select": "चयन गर्नुहोस्", - "connect_client_alert": "तपाईंलाई {client} द्वारा नियन्त्रित गरिएको छ", - "this_device": "यो उपकरण", - "remote": "दूरसंचार", - "local_library": "स्थानिय पुस्तकालय", - "add_library_location": "पुस्तकालयमा थप्नुहोस्", - "remove_library_location": "पुस्तकालयबाट हटाउनुहोस्", - "local_tab": "स्थानिय", - "stats": "तथ्याङ्क", - "and_n_more": "राम्रो {count} थप", - "recently_played": "हालै खेलेको", - "browse_more": "थप हेर्नुहोस्", - "no_title": "शीर्षक छैन", - "not_playing": "खेलिरहेको छैन", - "epic_failure": "महाकवि असफलता!", - "added_num_tracks_to_queue": "{tracks_length} ट्र्याकहरू तालिकामा थपिएका छन्", - "spotube_has_an_update": "Spotube मा अपडेट छ", - "download_now": "अहिले डाउनलोड गर्नुहोस्", - "nightly_version": "Spotube Nightly {nightlyBuildNum} रिलिज गरिएको छ", - "release_version": "Spotube v{version} रिलिज गरिएको छ", - "read_the_latest": "अर्को ", - "release_notes": "रिलिज नोटहरू", - "pick_color_scheme": "रंग योजना चयन गर्नुहोस्", - "save": "सुरक्षित गर्नुहोस्", - "choose_the_device": "उपकरण चयन गर्नुहोस्:", - "multiple_device_connected": "धेरै उपकरण जडान गरिएको छ।\nयो क्रियाकलाप गर्ने उपकरण चयन गर्नुहोस्", - "nothing_found": "केही फेला परेन", - "the_box_is_empty": "बक्स खाली छ", - "top_artists": "शीर्ष कलाकारहरू", - "top_albums": "शीर्ष एल्बमहरू", - "this_week": "यो हप्ता", - "this_month": "यो महिना", - "last_6_months": "पछिल्लो ६ महिना", - "this_year": "यो वर्ष", - "last_2_years": "पछिल्लो २ वर्ष", - "all_time": "सबै समय", - "powered_by_provider": "{providerName} द्वारा शक्ति प्राप्त", - "email": "ईमेल", - "profile_followers": "अनुयायीहरू", - "birthday": "जन्मदिन", - "subscription": "सदस्यता", - "not_born": "जन्मिएको छैन", - "hacker": "ह्याकर", - "profile": "प्रोफाइल", - "no_name": "नाम छैन", - "edit": "सम्पादन गर्नुहोस्", - "user_profile": "प्रयोगकर्ता प्रोफाइल", - "count_plays": "{count} खेलाइन्छ", - "streaming_fees_hypothetical": "*यो Spotify को प्रति स्ट्रिमको आधारमा गणना गरिएको छ\n$0.003 देखि $0.005 बीचको भुक्तानी। यो एक काल्पनिक गणना हो\nउपयोगकर्तालाई यो थाहा दिनको लागि कि उनीहरूले अर्टिस्टहरूलाई\nSpotify मा गीत सुनेको भए कति भुक्तानी गर्ने थिए।", - "count_mins": "{minutes} मिनेट", - "summary_minutes": "मिनेट", - "summary_listened_to_music": "सङ्गीत सुन्नु", - "summary_songs": "गीतहरू", - "summary_streamed_overall": "सामान्य रूपले स्ट्रीम गरिएको", - "summary_owed_to_artists": "यस महिना कलाकारहरूलाई देन", - "summary_artists": "कलाकारको", - "summary_music_reached_you": "सङ्गीत तपाईंलाई पुग्यो", - "summary_full_albums": "पूर्ण एल्बमहरू", - "summary_got_your_love": "तपाईंको माया प्राप्त गरियो", - "summary_playlists": "प्लेइस्ट", - "summary_were_on_repeat": "पुनरावृत्ति गरियो", - "total_money": "कुल {money}", - "minutes_listened": "सुनिएका मिनेटहरू", - "streamed_songs": "स्ट्रीम गरिएका गीतहरू", - "count_streams": "{count} स्ट्रिम", - "owned_by_you": "तपाईंले स्वामित्व गरेको", - "copied_shareurl_to_clipboard": "{shareUrl} क्लिपबोर्डमा कपी गरियो", - "spotify_hipotetical_calculation": "*यो Spotify को प्रति स्ट्रीम भुगतानको आधारमा\n$0.003 देखि $0.005 को बीचमा गणना गरिएको हो। यो एक काल्पनिक\nगणना हो जसले प्रयोगकर्तालाई देखाउँछ कि उनीहरूले कति\nअर्टिस्टहरूलाई तिनीहरूका गीतहरू Spotify मा सुनेमा\nभुक्तान गर्नुपर्ने थियो।", - "webview_not_found": "वेबभ्यू फेला परेन", - "webview_not_found_description": "तपाईंको उपकरणमा कुनै वेबभ्यू रनटाइम स्थापना गरिएको छैन।\nयदि स्थापना गरिएको छ भने, environment PATH मा छ कि छैन भनेर सुनिश्चित गर्नुहोस्\n\nस्थापना पछि, अनुप्रयोग पुनः सुरु गर्नुहोस्", - "unsupported_platform": "असमर्थित प्लेटफार्म", - "invidious_instance": "Invidious सर्भर इन्स्टेन्स", - "invidious_description": "ट्र्याक मिलाउनका लागि प्रयोग हुने Invidious सर्भर इन्स्टेन्स", - "invidious_warning": "केहीले राम्रोसँग काम नगर्न सक्छ। आफ्नो जोखिममा प्रयोग गर्नुहोस्", - "invidious_source_description": "Piped जस्तै तर उच्च उपलब्धतासँग।", - "cache_music": "सङ्गीत क्यास गर्नुहोस्", - "open": "खोल्नुहोस्", - "cache_folder": "क्यास फोल्डर", - "export": "निर्यात गर्नुहोस्", - "clear_cache": "क्यास खाली गर्नुहोस्", - "clear_cache_confirmation": "के तपाई क्यास खाली गर्न चाहनुहुन्छ?", - "export_cache_files": "क्यास फाइलहरू निर्यात गर्नुहोस्", - "found_n_files": "{count} फाइलहरू फेला परे", - "export_cache_confirmation": "यी फाइलहरू निर्यात गर्न चाहनुहुन्छ", - "exported_n_out_of_m_files": "{filesExported} मध्ये {files} फाइलहरू निर्यात गरियो", - "playlist": "प्लेलिस्ट", - "no_loop": "कोई लूप नहीं", - "generate": "जनरेट", - "undo": "पूर्ववत", - "download_all": "सभी डाउनलोड करें", - "add_all_to_playlist": "सभी को प्लेलिस्ट में जोड़ें", - "add_all_to_queue": "सभी को कतार में जोड़ें", - "play_all_next": "सभी को अगला प्ले करें", - "pause": "विराम", - "view_all": "सभी देखें", - "no_tracks_added_yet": "लगता है आपने अभी तक कोई ट्रैक नहीं जोड़ा है", - "no_tracks": "यहाँ कोई ट्रैक नहीं दिख रहे हैं", - "no_tracks_listened_yet": "आपने अभी तक कुछ नहीं सुना है ऐसा लगता है", - "not_following_artists": "आप किसी कलाकार को फॉलो नहीं कर रहे हैं", - "no_favorite_albums_yet": "लगता है आपने अभी तक कोई एल्बम पसंदीदा में नहीं जोड़ा है", - "no_logs_found": "कोई लॉग नहीं मिला", - "youtube_engine": "YouTube इंजन", - "youtube_engine_not_installed_title": "{engine} इंस्टॉल नहीं है", - "youtube_engine_not_installed_message": "{engine} आपके सिस्टम में इंस्टॉल नहीं है।", - "youtube_engine_set_path": "सुनिश्चित करें कि यह PATH वेरिएबल में उपलब्ध है या\nनीचे {engine} एक्जीक्यूटेबल का पूर्ण पथ सेट करें", - "youtube_engine_unix_issue_message": "macOS/Linux/unix जैसे ऑपरेटिंग सिस्टम में, .zshrc/.bashrc/.bash_profile आदि में पथ सेट करना काम नहीं करेगा।\nआपको शेल कॉन्फ़िगरेशन फ़ाइल में पथ सेट करना होगा", - "download": "डाउनलोड", - "file_not_found": "फ़ाइल नहीं मिली", - "custom": "कस्टम", - "add_custom_url": "कस्टम URL जोड़ें", - "edit_port": "पोर्ट सम्पादन गर्नुहोस्", - "port_helper_msg": "डिफ़ॉल्ट -1 हो जुन यादृच्छिक संख्या जनाउँछ। यदि तपाईंले फायरवाल कन्फिगर गर्नुभएको छ भने, यसलाई सेट गर्न सिफारिस गरिन्छ।", - "connect_request": "{client} लाई जडान गर्न अनुमति दिनुहोस्?", - "connection_request_denied": "जडान अस्वीकृत। प्रयोगकर्ताले पहुँच अस्वीकृत गर्यो।", - "hipotetical_calculation": "*यो अनलाइन संगीत स्ट्रिमिङ प्लेटफर्मको प्रति स्ट्रिम भुक्तानी $0.003 देखि $0.005 को औसतमा आधारित छ। यो एक काल्पनिक गणना हो जुन प्रयोगकर्तालाई उनीहरूले विभिन्न संगीत स्ट्रिमिङ प्लेटफर्ममा आफ्ना गीतहरू सुनेमा कलाकारहरूलाई कति भुक्तानी गर्ने थिए भन्ने बारेमा अन्तरदृष्टि दिनको लागि हो।", - "an_error_occurred": "त्रुटि भयो", - "copy_to_clipboard": "क्लिपबोर्डमा प्रतिलिपि गर्नुहोस्", - "view_logs": "लगहरू हेर्नुहोस्", - "retry": "पुनः प्रयास गर्नुहोस्", - "no_default_metadata_provider_selected": "तपाईंले कुनै पूर्वनिर्धारित मेटाडेटा प्रदायक सेट गर्नुभएको छैन", - "manage_metadata_providers": "मेटाडेटा प्रदायकहरू प्रबन्ध गर्नुहोस्", - "open_link_in_browser": "ब्राउजरमा लिङ्क खोल्ने?", - "do_you_want_to_open_the_following_link": "के तपाईं निम्न लिङ्क खोल्न चाहनुहुन्छ", - "unsafe_url_warning": "अविश्वसनीय स्रोतहरूबाट लिङ्कहरू खोल्नु असुरक्षित हुन सक्छ। सावधान रहनुहोस्!\nतपाईं लिङ्कलाई आफ्नो क्लिपबोर्डमा पनि प्रतिलिपि गर्न सक्नुहुन्छ।", - "copy_link": "लिङ्क प्रतिलिपि गर्नुहोस्", - "building_your_timeline": "तपाईंको सुन्ने आधारमा तपाईंको समयरेखा निर्माण गर्दै...", - "official": "आधिकारिक", - "author_name": "लेखक: {author}", - "third_party": "तेस्रो-पक्ष", - "plugin_requires_authentication": "प्लगइनलाई प्रमाणीकरण चाहिन्छ", - "update_available": "अपडेट उपलब्ध छ", - "supports_scrobbling": "स्क्रब्बलिंगलाई समर्थन गर्दछ", - "plugin_scrobbling_info": "यो प्लगइनले तपाईंको सुन्ने इतिहास उत्पन्न गर्न तपाईंको संगीतलाई स्क्रब्बल गर्दछ।", - "default_plugin": "पूर्वनिर्धारित", - "set_default": "पूर्वनिर्धारित सेट गर्नुहोस्", - "support": "समर्थन", - "support_plugin_development": "प्लगइन विकासलाई समर्थन गर्नुहोस्", - "can_access_name_api": "- **{name}** API मा पहुँच गर्न सक्छ", - "do_you_want_to_install_this_plugin": "के तपाईं यो प्लगइन स्थापना गर्न चाहनुहुन्छ?", - "third_party_plugin_warning": "यो प्लगइन तेस्रो-पक्ष रिपोसिटरीबाट हो। कृपया स्थापना गर्नु अघि तपाईंले स्रोतमा विश्वास गर्नुहुन्छ भनी सुनिश्चित गर्नुहोस्।", - "author": "लेखक", - "this_plugin_can_do_following": "यो प्लगइनले निम्न गर्न सक्छ", - "install": "स्थापना गर्नुहोस्", - "install_a_metadata_provider": "मेटाडेटा प्रदायक स्थापना गर्नुहोस्", - "no_tracks_playing": "हाल कुनै ट्र्याक बजिरहेको छैन", - "synced_lyrics_not_available": "यो गीतको लागि सिङ्क गरिएका बोलहरू उपलब्ध छैनन्। कृपया यसको सट्टा", - "plain_lyrics": "सादा बोलहरू", - "tab_instead": "ट्याब प्रयोग गर्नुहोस्।", - "disclaimer": "अस्वीकरण", - "third_party_plugin_dmca_notice": "स्पोट्यूब टोलीले कुनै पनि \"तेस्रो-पक्ष\" प्लगइनहरूको लागि कुनै जिम्मेवारी (कानुनी सहित) लिँदैन।\nकृपया तिनीहरूलाई आफ्नो जोखिममा प्रयोग गर्नुहोस्। कुनै पनि बग/समस्याहरूको लागि, कृपया तिनीहरूलाई प्लगइन रिपोसिटरीमा रिपोर्ट गर्नुहोस्।\n\nयदि कुनै \"तेस्रो-पक्ष\" प्लगइनले कुनै सेवा/कानुनी संस्थाको ToS/DMCA तोडिरहेको छ भने, कृपया \"तेस्रो-पक्ष\" प्लगइन लेखक वा होस्टिङ प्लेटफर्म e.g. GitHub/Codeberg लाई कारबाही गर्न अनुरोध गर्नुहोस्। माथि सूचीबद्ध (\"तेस्रो-पक्ष\" लेबल गरिएका) सबै सार्वजनिक/सामुदायिक रूपमा राखिएका प्लगइनहरू हुन्। हामी तिनीहरूलाई क्युरेट गरिरहेका छैनौं, त्यसैले हामी तिनीहरूमा कुनै कारबाही गर्न सक्दैनौं।\n\n", - "input_does_not_match_format": "इनपुट आवश्यक ढाँचासँग मेल खाँदैन", - "metadata_provider_plugins": "मेटाडेटा प्रदायक प्लगइनहरू", - "paste_plugin_download_url": "डाउनलोड url वा GitHub/Codeberg repo url वा .smplug फाइलमा सिधा लिङ्क टाँस्नुहोस्", - "download_and_install_plugin_from_url": "url बाट प्लगइन डाउनलोड र स्थापना गर्नुहोस्", - "failed_to_add_plugin_error": "प्लगइन थप्न असफल: {error}", - "upload_plugin_from_file": "फाइलबाट प्लगइन अपलोड गर्नुहोस्", - "installed": "स्थापित", - "available_plugins": "उपलब्ध प्लगइनहरू", - "configure_your_own_metadata_plugin": "तपाईंको आफ्नै प्लेलिस्ट/एल्बम/कलाकार/फिड मेटाडेटा प्रदायक कन्फिगर गर्नुहोस्", - "audio_scrobblers": "अडियो स्क्रब्बलरहरू", - "scrobbling": "स्क्रब्बलिंग", - "download_music_format": "सङ्गीत डाउनलोड ढाँचा", - "streaming_music_format": "स्ट्रिमिङ सङ्गीत ढाँचा", - "download_music_quality": "डाउनलोड गुणस्तर", - "streaming_music_quality": "स्ट्रिमिङ गुणस्तर", - "default_metadata_source": "पूर्वनिर्धारित मेटाडाटा स्रोत", - "set_default_metadata_source": "पूर्वनिर्धारित मेटाडाटा स्रोत सेट गर्नुहोस्", - "default_audio_source": "पूर्वनिर्धारित अडियो स्रोत", - "set_default_audio_source": "पूर्वनिर्धारित अडियो स्रोत सेट गर्नुहोस्", - "plugins": "प्लगइनहरू", - "configure_plugins": "आफ्नै मेटाडाटा प्रदायक र अडियो स्रोत प्लगइनहरू कन्फिगर गर्नुहोस्", - "source": "स्रोत: ", - "uncompressed": "असंक्षिप्त", - "dab_music_source_description": "अडियोप्रेमीहरूका लागि। उच्च गुणस्तर/लसलेस अडियो स्ट्रिमहरू उपलब्ध गराउँछ। ISRC-मा आधारित सटीक ट्र्याक मिलान।" -} \ No newline at end of file diff --git a/lib/l10n/app_nl.arb b/lib/l10n/app_nl.arb deleted file mode 100644 index 4d8deac1..00000000 --- a/lib/l10n/app_nl.arb +++ /dev/null @@ -1,495 +0,0 @@ -{ - "guest": "Gast", - "browse": "Bladeren", - "search": "Zoeken", - "library": "Bibliotheek", - "lyrics": "Teksten", - "settings": "Instellingen", - "genre_categories_filter": "Categorieën of genres filteren…", - "genre": "Genre", - "personalized": "Gepersonaliseerd", - "featured": "Aanbevolen", - "new_releases": "Nieuwe uitgaven", - "songs": "Liedjes", - "playing_track": "{track} afspelen", - "queue_clear_alert": "Dit zal de huidige wachtrij wissen. {track_length} nummers worden verwijderd\nWil je doorgaan?", - "load_more": "Meer laden", - "playlists": "Afspeellijsten", - "artists": "Artiesten", - "albums": "Albums", - "tracks": "Nummers", - "downloads": "Downloads", - "filter_playlists": "Afspeellijsten filteren…", - "liked_tracks": "Geliefde tracks", - "liked_tracks_description": "Al je favoriete nummers", - "create_playlist": "Afspeellijst aanmaken", - "create_a_playlist": "Een afspeellijst aanmaken", - "update_playlist": "Afspeellijst bijwerken", - "create": "Aanmaken", - "cancel": "Annuleren", - "update": "Bijwerken", - "playlist_name": "Naam afspeellijst", - "name_of_playlist": "Naam van de afspeellijst", - "description": "Beschrijving", - "public": "Openbaar", - "collaborative": "Samenwerkend", - "search_local_tracks": "Lokale nummers zoeken…", - "play": "Afspelen", - "delete": "Wissen", - "none": "Geen", - "sort_a_z": "Sorteren op A-Z", - "sort_z_a": "Sorteren op Z-A", - "sort_artist": "Sorteren op artiest", - "sort_album": "Sorteren op album", - "sort_duration": "Sorteren op lengte", - "sort_tracks": "Nummers sorteren", - "currently_downloading": "Momenteel aan het downloaden ({tracks_length})", - "cancel_all": "Alles annuleren", - "filter_artist": "Artiesten filteren…", - "followers": "{followers} volgers", - "add_artist_to_blacklist": "Artiest toevoegen aan zwarte lijst", - "top_tracks": "Topnummers", - "fans_also_like": "Fans luisteren ook", - "loading": "Laden…", - "artist": "Artiest", - "blacklisted": "Zwarte lijst", - "following": "Volgen", - "follow": "Volgen", - "artist_url_copied": "URL artiest gekopieerd naar klembord", - "added_to_queue": "{tracks} nummers toegevoegd aan wachtrij", - "filter_albums": "Albums filteren…", - "synced": "Gesynchroniseerd", - "plain": "Eenvoudig", - "shuffle": "Willekeurig", - "search_tracks": "Nummers zoeken…", - "released": "Uitgegeven", - "error": "Fout {error}", - "title": "Titel", - "time": "Tijd", - "more_actions": "Meer acties", - "download_count": "({count}) downloads", - "add_count_to_playlist": "({count}) aan afspeellijst toevoegen", - "add_count_to_queue": "({count}) aan wachtrij toevoegen", - "play_count_next": "Volgende ({count}) afspelen", - "album": "Album", - "copied_to_clipboard": "{data} naar klembord gekopieerd", - "add_to_following_playlists": "{track} aan volgende afspeellijsten toevoegen", - "add": "Toevoegen", - "added_track_to_queue": "{track} aan wachtrij toegevoegd", - "add_to_queue": "Toevoegen aan wachtrij", - "track_will_play_next": "{track} wordt hierna afgespeeld", - "play_next": "Volgende afspelen", - "removed_track_from_queue": "{track} van wachtrij verwijderd", - "remove_from_queue": "Van wachtrij verwijderen", - "remove_from_favorites": "Van favorieten verwijderen", - "save_as_favorite": "Opslaan als favoriet", - "add_to_playlist": "Aan afspeellijst toevoegen", - "remove_from_playlist": "Van afspeellijst verwijderen", - "add_to_blacklist": "Aan zwarte lijst toevoegen", - "remove_from_blacklist": "Van zwarte lijst verwijderen", - "share": "Delen", - "mini_player": "Minispeler", - "slide_to_seek": "Schuiven om vooruit of achteruit te zoeken", - "shuffle_playlist": "Afspeellijst willekeurig", - "unshuffle_playlist": "Afspeellijst op volgorde", - "previous_track": "Vorige nummer", - "next_track": "Volgende nummer", - "pause_playback": "Afspelen pauzeren", - "resume_playback": "Afspelen hervatten", - "loop_track": "Nummer herhalen", - "repeat_playlist": "Afspeellijst herhalen", - "queue": "Wachtrij", - "alternative_track_sources": "Alternatieve bronnen voor nummers", - "download_track": "Nummer downloaden", - "tracks_in_queue": "{tracks} nummers in wachtrij", - "clear_all": "Alles wissen", - "show_hide_ui_on_hover": "UI tonen/verbergen bij zweven", - "always_on_top": "Altijd bovenaan", - "exit_mini_player": "Minispeler afsluiten", - "download_location": "Downloadlocatie", - "account": "Account", - "login_with_spotify": "Inloggen met je Spotify-account", - "connect_with_spotify": "Verbinden met Spotify", - "logout": "Afmelden", - "logout_of_this_account": "Afmelden van dit account", - "language_region": "Taal & regio", - "language": "Taal", - "system_default": "Systeemstandaard", - "market_place_region": "Marktplaats-regio", - "recommendation_country": "Aanbeveling Land", - "appearance": "Uiterlijk", - "layout_mode": "Opmaakmodus", - "override_layout_settings": "Instellingen voor responsieve opmaakmodus opheffen", - "adaptive": "Adaptief", - "compact": "Compact", - "extended": "Uitgebreid", - "theme": "Thema", - "dark": "Donker", - "light": "Licht", - "system": "Systeem", - "accent_color": "Accentkleur", - "sync_album_color": "Albumkleur synchroniseren", - "sync_album_color_description": "Gebruikt de overheersende kleur van het album als accentkleur", - "playback": "Weergave", - "audio_quality": "Audiokwaliteit", - "high": "Hoog", - "low": "Laag", - "pre_download_play": "Vooraf downloaden en afspelen", - "pre_download_play_description": "In plaats van audio te streamen, kun je bytes downloaden en afspelen (aanbevolen voor gebruikers met een hogere bandbreedte)", - "skip_non_music": "Niet-muzieksegmenten overslaan (SponsorBlock)", - "blacklist_description": "Nummers en artiesten op de zwarte lijst", - "wait_for_download_to_finish": "Wacht tot de huidige download is voltooid", - "desktop": "Bureaublad", - "close_behavior": "Sluitgedrag", - "close": "Afsluiten", - "minimize_to_tray": "Minimaliseren naar systeemvak", - "show_tray_icon": "Systeemvakpictogram tonen", - "about": "Over", - "u_love_spotube": "We weten dat je van Spotube houd", - "check_for_updates": "Controleren op updates", - "about_spotube": "Over Spotube", - "blacklist": "Zwarte lijst", - "please_sponsor": "Sponsor/Doneer a.u.b.", - "spotube_description": "Spotube, een lichtgewicht, cross-platform, vrij-voor-alles Spotify-client", - "version": "Versie", - "build_number": "Bouwnummer", - "founder": "Grondlegger", - "repository": "Opslagplaats", - "bug_issues": "Bug+problemen", - "made_with": "Met ❤️ gemaakt in Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licentie", - "add_spotify_credentials": "Voeg om te beginnen je spotify-aanmeldgegevens toe", - "credentials_will_not_be_shared_disclaimer": "Maak je geen zorgen, je gegevens worden niet verzameld of gedeeld met anderen.", - "know_how_to_login": "Weet je niet hoe je dit moet doen?", - "follow_step_by_step_guide": "Volg de stapsgewijze handleiding", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "Vul alle velden in a.u.b.", - "submit": "Verzenden", - "exit": "Afronden", - "previous": "Vorige", - "next": "Volgende", - "done": "Klaar", - "step_1": "Stap 1", - "first_go_to": "Ga eerst naar", - "login_if_not_logged_in": "en Inloggen/Aanmelden als je niet bent ingelogd", - "step_2": "Stap 2", - "step_2_steps": "1. Zodra je bent aangemeld, druk je op F12 of klik je met de rechtermuisknop > Inspect om de Browser devtools te openen.\n2. Ga vervolgens naar het tabblad \"Toepassing\" (Chrome, Edge, Brave enz..) of naar het tabblad \"Opslag\" (Firefox, Palemoon enz..).\n3. Ga naar de sectie \"Cookies\" en vervolgens naar de subsectie \"https://accounts.spotify.com\".", - "step_3": "Stap 3", - "step_3_steps": "De waarde van cookie \"sp_dc\" kopiëren", - "success_emoji": "Succes🥳", - "success_message": "Je bent nu ingelogd met je Spotify account. Goed gedaan!", - "step_4": "Stap 4", - "step_4_steps": "De gekopieerde waarde \"sp_dc\" plakken", - "something_went_wrong": "Er ging iets mis", - "piped_instance": "Piped-serverinstantie", - "piped_description": "De Piped-serverinstantie die moet worden gebruikt voor overeenkomstige nummers", - "piped_warning": "Sommige werken misschien niet goed. Dus gebruik ze op eigen risico", - "generate_playlist": "Afspeellijst genereren", - "track_exists": "Nummer {track} bestaat al", - "replace_downloaded_tracks": "Alle gedownloade nummers vervangen", - "skip_download_tracks": "Downloaden van alle gedownloade nummers overslaan", - "do_you_want_to_replace": "Wil je het bestaande nummer vervangen?", - "replace": "Vervangen", - "skip": "Overslaan", - "select_up_to_count_type": "Selecteer tot {count} {type}", - "select_genres": "Genres selecteren", - "add_genres": "Genres toevoegen", - "country": "Land", - "number_of_tracks_generate": "Aantal nummers om te genereren", - "acousticness": "Akoestiek", - "danceability": "Dansbaarheid", - "energy": "Energie", - "instrumentalness": "Instrumentaliteit", - "liveness": "Levendigheid", - "loudness": "Luidheid", - "speechiness": "Spraak", - "valence": "Valentie", - "popularity": "Populariteit", - "key": "Sleutel", - "duration": "Tijdsduur (s)", - "tempo": "Tempo (SPM)", - "mode": "Modus", - "time_signature": "Tijdsnotatie", - "short": "Kort", - "medium": "Middel", - "long": "Lang", - "min": "Min", - "max": "Max", - "target": "Doel", - "moderate": "Matig", - "deselect_all": "Selectie opheffen", - "select_all": "Alles selecteren", - "are_you_sure": "Weet je het zeker?", - "generating_playlist": "Aangepaste afspeellijst genereren…", - "selected_count_tracks": "{count} nummers geselecteerd", - "download_warning": "Als je alle nummers in bulk downloadt, ben je duidelijk bezig met muziekpiraterij en breng je schade toe aan de creatieve muziekmaatschappij. Ik hoop dat je je hiervan bewust bent. Probeer altijd het harde werk van artiesten te respecteren en te steunen.", - "download_ip_ban_warning": "BTW, je IP-adres kan worden geblokkeerd op YouTube als gevolg van buitensporige downloadverzoeken. IP-blokkering betekent dat je YouTube niet kunt gebruiken (zelfs als je ingelogd bent) voor tenminste 2-3 maanden vanaf dat IP-apparaat. Spotube is niet verantwoordelijk als dit ooit gebeurt.", - "by_clicking_accept_terms": "Door op 'accepteren' te klikken ga je akkoord met de volgende voorwaarden:", - "download_agreement_1": "Ik weet dat ik muziek illegaal donload. Ik ben slecht.", - "download_agreement_2": "Ik steun de artiest waar ik kan en ik doe dit alleen omdat ik geen geld heb om hun kunst te kopen.", - "download_agreement_3": "Ik ben me er volledig van bewust dat mijn IP geblokkeerd kan worden op YouTube & ik houd Spotube of zijn eigenaars/contributeurs niet verantwoordelijk voor ongelukken die veroorzaakt worden door mijn huidige actie.", - "decline": "Weigeren", - "accept": "Accepteren", - "details": "Bijzonderheden", - "youtube": "YouTube", - "channel": "Kanaal", - "likes": "Liefs", - "dislikes": "Hekels", - "views": "Weergaven", - "streamUrl": "Stream-URL", - "stop": "Stoppen", - "sort_newest": "Sorteren op recent toegevoegd", - "sort_oldest": "Sorteren op langst toegevoegd", - "sleep_timer": "Slaaptimer", - "mins": "{minutes} minuten", - "hours": "{hours} uren", - "hour": "{hours} uur", - "custom_hours": "Aangepaste uren", - "logs": "Logboeken", - "developers": "Ontwikkelaars", - "not_logged_in": "Je bent niet aangemeld", - "search_mode": "Zoekmodus", - "youtube_api_type": "API-type", - "ok": "Oké", - "failed_to_encrypt": "Versleuteling mislukt", - "encryption_failed_warning": "Spotube gebruikt versleuteling om je gegevens veilig op te slaan. Maar dat is niet gelukt. Dus zal het terugvallen op onveilige opslag.\nAls je linux gebruikt, zorg er dan voor dat je een geheim-dienst (gnome-keyring, kde-wallet, keepassxc etc) hebt geïnstalleerd.", - "querying_info": "Info opvragen…", - "piped_api_down": "Piped API is uit", - "piped_down_error_instructions": "De Piped-instantie {pipedInstance} is momenteel uitgevallen\n\nVerander de instantie of verander het 'API-type' naar de officiële YouTube API.\n\nZorg ervoor dat u de app herstart na de wijziging", - "you_are_offline": "Je bent momenteel offline", - "connection_restored": "Je internetverbinding is hersteld", - "use_system_title_bar": "Systeemtitelbalk gebruiken", - "crunching_results": "Resultaten verwerken…", - "search_to_get_results": "Zoeken naar resultaten", - "use_amoled_mode": "Pikzwart donkerthema", - "pitch_dark_theme": "AMOLED-modus", - "normalize_audio": "Audio normaliseren", - "change_cover": "Hoes aanpassen", - "add_cover": "Hoes toevoegen", - "restore_defaults": "Standaardwaarden herstellen", - "download_music_codec": "Download-codec", - "streaming_music_codec": "Streaming-codec", - "login_with_lastfm": "Inloggen met Last.fm", - "connect": "Verbinden", - "disconnect_lastfm": "Last.fm verbreken", - "disconnect": "Verbeken", - "username": "Gebruikersnaam", - "password": "Wachtwoord", - "login": "Inloggen", - "login_with_your_lastfm": "Inloggen met je Last.fm account", - "scrobble_to_lastfm": "Scrobbelen naar Last.fm", - "go_to_album": "Ga naar album", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "Alles doorbladeren", - "genres": "Genres", - "explore_genres": "Genres verkennen", - "friends": "Vrienden", - "no_lyrics_available": "Sorry, geen teksten gevonden voor dit nummer", - "start_a_radio": "Een radio starten", - "how_to_start_radio": "Hoe wil je de radio starten?", - "replace_queue_question": "Wil je de huidige wachtrij vervangen of eraan toevoegen?", - "endless_playback": "Oneindig afspelen", - "delete_playlist": "Afspeellijst verwijderen", - "delete_playlist_confirmation": "Weet je zeker dat je deze afspeellijst wilt verwijderen?", - "local_tracks": "Lokale nummers", - "song_link": "Song-link", - "skip_this_nonsense": "Deze onzin overslaan", - "freedom_of_music": "“Vrijheid van muziek”", - "freedom_of_music_palm": "“Vrijheid van muziek in je hand”", - "get_started": "Laten we beginnen", - "youtube_source_description": "Aangeraden en werkt het best.", - "piped_source_description": "Voel je je vrij? Net als YouTube, maar meer vrij.", - "jiosaavn_source_description": "Het beste voor de regio Zuid-Azië.", - "highest_quality": "Hoogste kwaliteit: {quality}", - "select_audio_source": "Audiobron kiezen", - "endless_playback_description": "Nieuwe nummers automatisch achteraan de wachtrij toevoegen", - "choose_your_region": "Kies je regio", - "choose_your_region_description": "Dit helpt Spotube om de juiste inhoud\nvoor jouw locatie te tonen.", - "choose_your_language": "Kies je taal", - "help_project_grow": "Help dit project met groeien", - "help_project_grow_description": "Spotube is een open-source project. Je kunt dit project helpen groeien door eraan bij te dragen, problemen te melden of nieuwe functies voor te stellen.", - "contribute_on_github": "Bijdragen on GitHub", - "donate_on_open_collective": "Doneren on Open Collective", - "browse_anonymously": "Anoniem browsen", - "enable_connect": "Verbinding inschakelen", - "enable_connect_description": "Spotube bedienen vanaf andere apparaten", - "devices": "Apparaten", - "select": "Selecteren", - "connect_client_alert": "Je wordt gecontroleerd door {client}", - "this_device": "Dit apparaat", - "remote": "Afstandsbediening", - "local_library": "Lokale bibliotheek", - "add_library_location": "Toevoegen aan bibliotheek", - "remove_library_location": "Verwijderen uit bibliotheek", - "local_tab": "Lokaal", - "stats": "Statistieken", - "and_n_more": "en {count} meer", - "recently_played": "Onlangs afgespeeld", - "browse_more": "Meer bekijken", - "no_title": "Geen titel", - "not_playing": "Niet aan het afspelen", - "epic_failure": "Epische mislukking!", - "added_num_tracks_to_queue": "{tracks_length} nummers aan de wachtrij toegevoegd", - "spotube_has_an_update": "Spotube heeft een update", - "download_now": "Nu downloaden", - "nightly_version": "Spotube Nightly {nightlyBuildNum} is uitgebracht", - "release_version": "Spotube v{version} is uitgebracht", - "read_the_latest": "Lees de nieuwste ", - "release_notes": "release-opmerkingen", - "pick_color_scheme": "Kies kleurenschema", - "save": "Opslaan", - "choose_the_device": "Kies het apparaat:", - "multiple_device_connected": "Er zijn meerdere apparaten verbonden.\nKies het apparaat waarop je deze actie wilt uitvoeren", - "nothing_found": "Niets gevonden", - "the_box_is_empty": "De doos is leeg", - "top_artists": "Topartiesten", - "top_albums": "Topalbums", - "this_week": "Deze week", - "this_month": "Deze maand", - "last_6_months": "Laatste 6 maanden", - "this_year": "Dit jaar", - "last_2_years": "Laatste 2 jaar", - "all_time": "All time", - "powered_by_provider": "Aangedreven door {providerName}", - "email": "E-mail", - "profile_followers": "Volgers", - "birthday": "Verjaardag", - "subscription": "Abonnement", - "not_born": "Niet geboren", - "hacker": "Hacker", - "profile": "Profiel", - "no_name": "Geen naam", - "edit": "Bewerken", - "user_profile": "Gebruikersprofiel", - "count_plays": "{count} afspeelbeurten", - "streaming_fees_hypothetical": "*Dit is berekend op basis van Spotify's uitbetaling per stream\nvan $0.003 tot $0.005. Dit is een hypothetische\nberekening om gebruikers inzicht te geven in hoeveel ze\naan de artiesten zouden hebben betaald als ze hun lied op Spotify zouden hebben beluisterd.", - "count_mins": "{minutes} min", - "summary_minutes": "minuten", - "summary_listened_to_music": "Beluisterde muziek", - "summary_songs": "nummers", - "summary_streamed_overall": "Totaal gestreamd", - "summary_owed_to_artists": "Te betalen aan artiesten\ndeze maand", - "summary_artists": "van de artiest", - "summary_music_reached_you": "Muziek heeft je bereikt", - "summary_full_albums": "volledige albums", - "summary_got_your_love": "Kreeg je liefde", - "summary_playlists": "afspeellijsten", - "summary_were_on_repeat": "Was op herhaling", - "total_money": "Totaal {money}", - "minutes_listened": "Luistertijd", - "streamed_songs": "Gestreamde nummers", - "count_streams": "{count} streams", - "owned_by_you": "Bezit door jou", - "copied_shareurl_to_clipboard": "{shareUrl} gekopieerd naar klembord", - "spotify_hipotetical_calculation": "*Dit is berekend op basis van Spotify's betaling per stream\nvan $0.003 tot $0.005. Dit is een hypothetische\nberekening om de gebruiker inzicht te geven in hoeveel ze\naan de artiesten zouden hebben betaald als ze hun liedjes op Spotify\nzouden luisteren.", - "webview_not_found": "Webview niet gevonden", - "webview_not_found_description": "Er is geen Webview-runtime geïnstalleerd op uw apparaat.\nAls het is geïnstalleerd, zorg ervoor dat het in het environment PATH staat\n\nHerstart de app na installatie", - "unsupported_platform": "Niet ondersteund platform", - "invidious_instance": "Invidious-serverinstantie", - "invidious_description": "De Invidious-serverinstantie die gebruikt wordt voor trackmatching", - "invidious_warning": "Sommigen werken mogelijk niet goed. Gebruik op eigen risico", - "invidious_source_description": "Vergelijkbaar met Piped, maar met een hogere beschikbaarheid.", - "cache_music": "Cache muziek", - "open": "Open", - "cache_folder": "Cachemap", - "export": "Exporteren", - "clear_cache": "Cache wissen", - "clear_cache_confirmation": "Wilt u de cache wissen?", - "export_cache_files": "Gecacheerde bestanden exporteren", - "found_n_files": "{count} bestanden gevonden", - "export_cache_confirmation": "Wilt u deze bestanden exporteren naar", - "exported_n_out_of_m_files": "{filesExported} van de {files} bestanden geëxporteerd", - "playlist": "Afspeellijst", - "no_loop": "Geen herhaling", - "generate": "Genereren", - "undo": "Ongedaan maken", - "download_all": "Alles downloaden", - "add_all_to_playlist": "Voeg alles toe aan afspeellijst", - "add_all_to_queue": "Voeg alles toe aan wachtrij", - "play_all_next": "Speel alles volgende", - "pause": "Pauzeren", - "view_all": "Bekijk alles", - "no_tracks_added_yet": "Het lijkt erop dat je nog geen nummers hebt toegevoegd", - "no_tracks": "Het lijkt erop dat er hier geen nummers zijn", - "no_tracks_listened_yet": "Het lijkt erop dat je nog niets hebt beluisterd", - "not_following_artists": "Je volgt geen artiesten", - "no_favorite_albums_yet": "Het lijkt erop dat je nog geen albums aan je favorieten hebt toegevoegd", - "no_logs_found": "Geen logbestanden gevonden", - "youtube_engine": "YouTube Engine", - "youtube_engine_not_installed_title": "{engine} is niet geïnstalleerd", - "youtube_engine_not_installed_message": "{engine} is niet geïnstalleerd op je systeem.", - "youtube_engine_set_path": "Zorg ervoor dat het beschikbaar is in de PATH-variabele of\nstel het absolute pad naar de {engine} uitvoerbare bestanden in", - "youtube_engine_unix_issue_message": "Op macOS/Linux/unix-achtige besturingssystemen werkt het instellen van paden in .zshrc/.bashrc/.bash_profile enz. niet.\nJe moet het pad instellen in het shell-configuratiebestand", - "download": "Downloaden", - "file_not_found": "Bestand niet gevonden", - "custom": "Aangepast", - "add_custom_url": "Voeg aangepaste URL toe", - "edit_port": "Poort bewerken", - "port_helper_msg": "Standaard is -1, wat een willekeurig nummer aangeeft. Als je een firewall hebt geconfigureerd, wordt aanbevolen dit in te stellen.", - "connect_request": "Toestaan dat {client} verbinding maakt?", - "connection_request_denied": "Verbinding geweigerd. Gebruiker heeft toegang geweigerd.", - "hipotetical_calculation": "*Dit is berekend op basis van de gemiddelde uitbetaling per stream van online muziekstreamingplatforms van $0,003 tot $0,005. Dit is een hypothetische berekening om de gebruiker inzicht te geven in hoeveel ze aan de artiesten zouden hebben betaald als ze hun nummer op een ander muziekstreamingplatform zouden beluisteren.", - "an_error_occurred": "Er is een fout opgetreden", - "copy_to_clipboard": "Kopiëren naar klembord", - "view_logs": "Logboeken bekijken", - "retry": "Opnieuw proberen", - "no_default_metadata_provider_selected": "U heeft geen standaard metadata-aanbieder ingesteld", - "manage_metadata_providers": "Metadata-aanbieders beheren", - "open_link_in_browser": "Link openen in browser?", - "do_you_want_to_open_the_following_link": "Wilt u de volgende link openen", - "unsafe_url_warning": "Het kan onveilig zijn om links van onbetrouwbare bronnen te openen. Wees voorzichtig!\nU kunt de link ook naar uw klembord kopiëren.", - "copy_link": "Link kopiëren", - "building_your_timeline": "Uw tijdlijn wordt opgebouwd op basis van uw luistergedrag...", - "official": "Officieel", - "author_name": "Auteur: {author}", - "third_party": "Derden", - "plugin_requires_authentication": "Plugin vereist authenticatie", - "update_available": "Update beschikbaar", - "supports_scrobbling": "Ondersteunt scrobbling", - "plugin_scrobbling_info": "Deze plugin scrobblet uw muziek om uw luistergeschiedenis te genereren.", - "default_plugin": "Standaard", - "set_default": "Instellen als standaard", - "support": "Ondersteuning", - "support_plugin_development": "Ondersteun plugin-ontwikkeling", - "can_access_name_api": "- Kan de **{name}** API benaderen", - "do_you_want_to_install_this_plugin": "Wilt u deze plugin installeren?", - "third_party_plugin_warning": "Deze plugin is afkomstig van een repository van derden. Zorg ervoor dat u de bron vertrouwt voordat u installeert.", - "author": "Auteur", - "this_plugin_can_do_following": "Deze plugin kan het volgende doen", - "install": "Installeren", - "install_a_metadata_provider": "Een metadata-aanbieder installeren", - "no_tracks_playing": "Er wordt momenteel geen nummer afgespeeld", - "synced_lyrics_not_available": "Gesynchroniseerde songteksten zijn niet beschikbaar voor dit nummer. Gebruik in plaats daarvan het tabblad", - "plain_lyrics": "Eenvoudige songteksten", - "tab_instead": "in plaats daarvan.", - "disclaimer": "Disclaimer", - "third_party_plugin_dmca_notice": "Het Spotube-team draagt geen enkele verantwoordelijkheid (inclusief juridische) voor \"derden\" plugins.\nGebruik ze op eigen risico. Voor bugs/problemen kunt u deze melden bij de plugin-repository.\n\nAls een \"derden\" plugin de ToS/DMCA van een service/juridische entiteit schendt, vraag dan de auteur van de \"derden\" plugin of het hostingplatform, bijvoorbeeld GitHub/Codeberg, om actie te ondernemen. De hierboven vermelde (gelabelde \"derden\") plugins zijn allemaal openbare/door de gemeenschap onderhouden plugins. We beheren ze niet, dus we kunnen geen actie tegen ze ondernemen.\n\n", - "input_does_not_match_format": "Invoer komt niet overeen met het vereiste formaat", - "metadata_provider_plugins": "Metadata-aanbieder Plugins", - "paste_plugin_download_url": "Plak de download-URL of de URL van de GitHub/Codeberg-repository of een directe link naar het .smplug-bestand", - "download_and_install_plugin_from_url": "Download en installeer de plugin via URL", - "failed_to_add_plugin_error": "Kon de plugin niet toevoegen: {error}", - "upload_plugin_from_file": "Plugin uploaden vanuit bestand", - "installed": "Geïnstalleerd", - "available_plugins": "Beschikbare plugins", - "configure_your_own_metadata_plugin": "Configureer uw eigen metadata-aanbieder voor afspeellijst/album/artiest/feed", - "audio_scrobblers": "Audioscrobblers", - "scrobbling": "Scrobbling", - "download_music_format": "Download muziekformaat", - "streaming_music_format": "Streaming muziekformaat", - "download_music_quality": "Downloadkwaliteit", - "streaming_music_quality": "Streamingkwaliteit", - "default_metadata_source": "Standaard metadata-bron", - "set_default_metadata_source": "Standaard metadata-bron instellen", - "default_audio_source": "Standaard audiobron", - "set_default_audio_source": "Standaard audiobron instellen", - "plugins": "Plug-ins", - "configure_plugins": "Configureer je eigen metadata- en audiobron-plug-ins", - "source": "Bron: ", - "uncompressed": "Ongecomprimeerd", - "dab_music_source_description": "Voor audiofielen. Biedt hoge kwaliteit/lossless audiostreams. Nauwkeurige trackmatching op basis van ISRC.", - "audio_source": "Audiobron" -} \ No newline at end of file diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb deleted file mode 100644 index 80da1e89..00000000 --- a/lib/l10n/app_pl.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Gość", - "browse": "Przeglądaj", - "search": "Szukaj", - "library": "Biblioteka", - "lyrics": "Tekst utworu", - "settings": "Ustawienia", - "genre_categories_filter": "Filtruj kategorie lub gatunki...", - "genre": "Gatunki", - "personalized": "Spersonalizowane", - "featured": "Wyróżnione", - "new_releases": "Nowo wydane", - "songs": "Utwory", - "playing_track": "Odtwarzanie {track}", - "queue_clear_alert": "To spowoduje wyczyszczenie całej kolejki! {track_length} pozycji zostanie usuniętych.\nCzy chcesz kontynuować?", - "load_more": "Załaduj więcej", - "playlists": "Playlisty", - "artists": "Artyści", - "albums": "Albumy", - "tracks": "Utwory", - "downloads": "Pobrane", - "filter_playlists": "Filtruj swoje playlisty...", - "liked_tracks": "Ulubione utwory", - "liked_tracks_description": "Wszystkie twoje ulubione utwory", - "create_playlist": "Utwórz playlistę", - "create_a_playlist": "Utwórz playlistę", - "create": "Utwórz", - "cancel": "Anuluj", - "playlist_name": "Nazwa playlisty", - "name_of_playlist": "Nazwa playlisty", - "description": "Opis", - "public": "Publiczny", - "collaborative": "Współpraca", - "search_local_tracks": "Szukanie lokalnych utworów...", - "play": "Odtwórz", - "delete": "Usuń", - "none": "Brak", - "sort_a_z": "Sortuj od A do Z", - "sort_z_a": "Sortuj od Z do A", - "sort_artist": "Sortuj po Artyście", - "sort_album": "Sortuj po Albumie", - "sort_tracks": "Sortuj Utwory", - "currently_downloading": "Obecnie pobieram {tracks_length} utworów.", - "cancel_all": "Anuluj wszystkie", - "filter_artist": "Filtruj artystów...", - "followers": "{followers} obserwujących", - "add_artist_to_blacklist": "Dodaj artystę do czarnej listy", - "top_tracks": "Popularne Utwory", - "fans_also_like": "Fani lubią także", - "loading": "Ładowanie...", - "artist": "Artysta", - "blacklisted": "Dodano do czarnej listy", - "following": "Obserwujesz", - "follow": "Zaobserwuj", - "artist_url_copied": "Skopiowano URL artysty do schowka", - "added_to_queue": "Dodano {tracks} utworów do kolejki", - "filter_albums": "Filtruj albumy...", - "synced": "Zsynchronizowano", - "plain": "Zwykły", - "shuffle": "Losowe odtwarzanie", - "search_tracks": "Szukam utworu...", - "released": "Wydano", - "error": "Błąd {error}", - "title": "Tytuł", - "time": "Czas", - "more_actions": "Więcej akcji", - "download_count": "Pobrane ({count})", - "add_count_to_playlist": "Dodaj ({count}) do Playlisty", - "add_count_to_queue": "Dodaj ({count}) do Kolejki", - "play_count_next": "Odtwórz ({count}) następne", - "album": "Album", - "copied_to_clipboard": "Skopiowano {data} do schowka", - "add_to_following_playlists": "Dodano {track} do danych Playlist", - "add": "Dodaj", - "added_track_to_queue": "Dodano {track} do kolejki", - "add_to_queue": "Dodano do kolejki", - "track_will_play_next": "{track} następny", - "play_next": "Odtwórz następny", - "removed_track_from_queue": "Usunięto {track} z kolejki", - "remove_from_queue": "Usunięto z kolejki", - "remove_from_favorites": "Usunięto z ulubionych", - "save_as_favorite": "Zapisz do ulubionych", - "add_to_playlist": "Dodaj do playlisty", - "remove_from_playlist": "Usuń z playlisty", - "add_to_blacklist": "Dodaj do czarnej listy", - "remove_from_blacklist": "Usuń z czarnej listy", - "share": "Udostępnij", - "mini_player": "Mały odwarzacz", - "slide_to_seek": "Przesuń, aby przewinąć do przodu lub do tyłu.", - "shuffle_playlist": "Odtwarzaj losowo z playlisty", - "unshuffle_playlist": "Nie odtwarzaj losowo z playlisty", - "previous_track": "Poprzedni utwór", - "next_track": "Następny utwór", - "pause_playback": "Zatrzymaj odwarzanie", - "resume_playback": "Wznów odwarzanie", - "loop_track": "Zapętl utwór", - "repeat_playlist": "Powtarzaj playlistę", - "queue": "Kolejka", - "alternative_track_sources": "Alternatywne źródła utworów", - "download_track": "Pobierz utwór", - "tracks_in_queue": "{tracks} utworów w kolejce", - "clear_all": "Wyczyść wszystko", - "show_hide_ui_on_hover": "Pokaż/Ukryj unoszący się interfejs", - "always_on_top": "Zawsze na wierzchu", - "exit_mini_player": "Opuść Mały odtwarzacz", - "download_location": "Zmień lokalizację", - "account": "Konto", - "login_with_spotify": "Zaloguj się używając konta Spotify", - "connect_with_spotify": "Połącz z Spotify", - "logout": "Wyloguj", - "logout_of_this_account": "Wyloguj z tego konta", - "language_region": "Język i Region", - "language": "Język", - "system_default": "Domyślny systemowy", - "market_place_region": "Region Rynku", - "recommendation_country": "Kraj rekomendacji", - "appearance": "Wygląd", - "layout_mode": "Tryb Układu", - "override_layout_settings": "Nadpisz responsywne ustawienia trybu układu", - "adaptive": "Adaptacyjny", - "compact": "Kompaktowy", - "extended": "Rozszerzony", - "theme": "Motyw", - "dark": "Ciemny", - "light": "Jasny", - "system": "Systemowy", - "accent_color": "Kolor Akcentu", - "sync_album_color": "Synchronizuj kolor albumu", - "sync_album_color_description": "Używa dominującego koloru okładki albumu jako koloru akcentującego", - "playback": "Odtwarzanie", - "audio_quality": "Jakość dźwięku", - "high": "Duża", - "low": "Mała", - "pre_download_play": "Wstępnie pobierz i odtwórz", - "pre_download_play_description": "Zamiast przesyłać strumieniowo dźwięk, pobiera odpowiedni bufor i odtwarza (zalecane dla użytkowników o większej przepustowości)", - "skip_non_music": "Pomiń nie-muzyczne segmenty (SponsorBlock)", - "blacklist_description": "Czarna lista utworów i artystów", - "wait_for_download_to_finish": "Proszę poczekać na zakończenie obecnego pobierania.", - "desktop": "Pulpit", - "close_behavior": "Zamknij", - "close": "Zamknij", - "minimize_to_tray": "Zminimalizuj do zasobnika", - "show_tray_icon": "Pokazuj ikonę w zasobniku", - "about": "O projekcie", - "u_love_spotube": "Wiemy jak kochacie Spotube", - "check_for_updates": "Sprawdź aktualizacje", - "about_spotube": "O Spotube", - "blacklist": "Czarna lista", - "please_sponsor": "Proszę wesprzyj projekt", - "spotube_description": "Spotube, lekki, wieloplatformowy, darmowy dla wszystkich klient Spotify", - "version": "Wersja", - "build_number": "Numer Build'a", - "founder": "Twórca Założyciel", - "repository": "Repozytorium", - "bug_issues": "Błędy i propozycje", - "made_with": "Stworzono z ❤️ w Bangladesh'u 🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licencja", - "add_spotify_credentials": "Dodaj swoje dane logowania Spotify, aby zacząć", - "credentials_will_not_be_shared_disclaimer": "Nie martw się, żadne dane logowania nie są zbierane ani udostępniane nikomu", - "know_how_to_login": "Nie wiesz, jak się zalogować?", - "follow_step_by_step_guide": "Postępuj zgodnie z poradnikiem krok po kroku", - "spotify_cookie": "Spotify {name} Ciasteczko", - "cookie_name_cookie": "{name} Ciasteczko", - "fill_in_all_fields": "Proszę wypełnić wszystkie pola", - "submit": "Zatwierdź", - "exit": "Zamknij", - "previous": "Poprzedni", - "next": "Następny", - "done": "Gotowe 🙂", - "step_1": "Krok 1", - "first_go_to": "Po pierwsze przejdź do", - "login_if_not_logged_in": "i Zaloguj się/Zarejestruj jeśli nie jesteś zalogowany", - "step_2": "Krok 2", - "step_2_steps": "1. Jeśli jesteś zalogowany, naciśnij klawisz F12 lub Kliknij prawym przyciskiem myszy > Zbadaj, aby odtworzyć narzędzia developerskie.\n2. Następnie przejdź do zakładki \"Application\" (Chrome, Edge, Brave etc..) lub zakładki \"Storage\" (Firefox, Palemoon etc..)\n3. Przejdź do sekcji \"Cookies\" a następnie do pod-sekcji \"https://accounts.spotify.com\"", - "step_3": "Krok 3", - "success_emoji": "Sukces!🥳", - "success_message": "Udało ci się zalogować! Dobra robota, stary!", - "step_4": "Krok 4", - "something_went_wrong": "Coś poszło nie tak 🙁", - "piped_instance": "Instancja serwera Piped", - "piped_description": "Instancja serwera Piped używana jest do dopasowania utworów.", - "piped_warning": "Niektóre z nich mogą nie działać. Używasz na własną odpowiedzialność!", - "generate_playlist": "Wygeneruj playlistę", - "track_exists": "Utwór {track} już istnieje", - "replace_downloaded_tracks": "Zamień wszystkie pobrane utwory", - "skip_download_tracks": "Pomiń pobieranie wszystkich pobranych utworów", - "do_you_want_to_replace": "Chcesz zamienić istniejący utwór ??", - "replace": "Zamień", - "skip": "Pomiń", - "select_up_to_count_type": "Wybierz do {count} {type}", - "select_genres": "Wybierz Gatunki", - "add_genres": "Dodaj Gatunki", - "country": "Kraj", - "number_of_tracks_generate": "Liczba utworów do wygenerowania", - "acousticness": "Akustyczna", - "danceability": "Taneczna", - "energy": "Energiczna", - "instrumentalness": "Instrumentalna", - "liveness": "Żywa", - "loudness": "Głośna", - "speechiness": "Wymowna", - "valence": "Wartościowa", - "popularity": "Popularność", - "key": "Kluczowa", - "duration": "Długość (s)", - "tempo": "Tempo (BPM)", - "mode": "Tryb", - "time_signature": "Sygnatura Czasowa", - "short": "Krótka", - "medium": "Średnia", - "long": "Długa", - "min": "Minimalnie", - "max": "Maksymalnie", - "target": "Cel", - "moderate": "Umiarkowanie", - "deselect_all": "Odznacz wszystkie", - "select_all": "Zaznacz wszystkie", - "are_you_sure": "Jesteś pewny?", - "generating_playlist": "Generowanie twojej własnej playlisty...", - "selected_count_tracks": "Wybrano {count} utworów", - "download_warning": "Jeśli hurtowo pobierasz wszystkie utwory, wyraźnie piracisz muzykę i wyrządzasz szkody kreatywnej społeczności muzycznej. Mam nadzieję, że jesteś tego świadomy. Zawsze staraj się szanować i wspierać ciężką pracę Artysty", - "download_ip_ban_warning": "Przy okazji, Twój adres IP może zostać zablokowany w YouTube z powodu nadmiernych żądań pobierania niż zwykle. Blokada IP oznacza, że nie możesz korzystać z YouTube (nawet jeśli jesteś zalogowany) przez co najmniej 2-3 miesiące z IP tego urządzenia. Spotube nie ponosi żadnej odpowiedzialności, jeśli tak się stanie", - "by_clicking_accept_terms": "Klikając 'Akceptuj' zgadzasz się z następującymi warunkami:", - "download_agreement_1": "Wiem, że piracę muzykę. Jestem zły.", - "download_agreement_2": "Będę wspierał artystę i robię to tylko dlatego, że nie mam pieniędzy na albumy wykonawcy. ", - "download_agreement_3": "Jestem całkowicie świadomy, że moje IP może zostać zablokowane w YouTube i nie pociągam Spotube ani jego właścicieli/współtwórców do odpowiedzialności za jakiekolwiek wypadki spowodowane moimi obecnymi działaniami", - "decline": "Odrzuć", - "accept": "Akceptuj", - "details": "Szczegóły", - "youtube": "YouTube", - "channel": "Kanał", - "likes": "Polubienia", - "dislikes": "Nie lubi", - "views": "Wyświetlenia", - "streamUrl": "URL strumienia", - "stop": "Stop", - "sort_newest": "Sortuj według ostatnio dodanych", - "sort_oldest": "Sortuj według najstarszych dodanych", - "sleep_timer": "Minutnik", - "mins": "{minutes} Minuty", - "hours": "{hours} Godziny", - "hour": "{hours} Godzina", - "custom_hours": "Własne godziny", - "logs": "Logi", - "developers": "Developerzy", - "not_logged_in": "Nie jesteś zalogowany", - "search_mode": "Tryb szukania", - "audio_source": "Źródło dźwięku", - "ok": "Ok", - "failed_to_encrypt": "Nie można zaszyfrować :(", - "encryption_failed_warning": "Spotube używa szyfrowania do bezpiecznego przechowywania danych. Ale nie udało się tego zrobić. Więc powróci do niezabezpieczonego przechowywania\nJeśli używasz Linuksa, upewnij się, że masz zainstalowane jakieś usługi do szyfrowania (gnome-keyring, kde-wallet, keepassxc itp.)", - "querying_info": "Szukam informacji...", - "piped_api_down": "API Piped jest niedostępne", - "piped_down_error_instructions": "Instancja Piped {pipedInstance} jest obecnie niedostępna\n\nZmień instancję lub zmień 'Rodzaj API' na oficjalne API YouTube\n\nUpewnij się, że po zmianie zrestartujesz aplikację", - "you_are_offline": "Obecnie jesteś offline", - "connection_restored": "Twoje połączenie z internetem zostało przywrócone", - "use_system_title_bar": "Użyj paska tytułu systemu", - "update_playlist": "Zaktualizuj playlistę", - "update": "Aktualizuj", - "crunching_results": "Przetwarzanie wyników...", - "search_to_get_results": "Szukaj, aby uzyskać wyniki", - "use_amoled_mode": "Tryb AMOLED", - "pitch_dark_theme": "Ciemny motyw", - "normalize_audio": "Normalizuj dźwięk", - "change_cover": "Zmień okładkę", - "add_cover": "Dodaj okładkę", - "restore_defaults": "Przywróć domyślne", - "download_music_codec": "Pobierz kodek muzyczny", - "streaming_music_codec": "Kodek strumieniowy muzyki", - "login_with_lastfm": "Zaloguj się z Last.fm", - "connect": "Połącz", - "disconnect_lastfm": "Rozłącz z Last.fm", - "disconnect": "Rozłącz", - "username": "Nazwa użytkownika", - "password": "Hasło", - "login": "Zaloguj", - "login_with_your_lastfm": "Zaloguj się na swoje konto Last.fm", - "scrobble_to_lastfm": "Scrobbluj do Last.fm", - "go_to_album": "Przejdź do albumu", - "discord_rich_presence": "Obecność na Discordzie", - "browse_all": "Przeglądaj wszystko", - "genres": "Gatunki muzyczne", - "explore_genres": "Eksploruj gatunki", - "step_3_steps": "Skopiuj wartość ciasteczka \"sp_dc\"", - "step_4_steps": "Wklej skopiowaną wartość \"sp_dc\"", - "friends": "Przyjaciele", - "no_lyrics_available": "Przepraszamy, nie można znaleźć tekstu dla tego utworu", - "sort_duration": "Sortuj według Czasu Trwania", - "start_a_radio": "Uruchom radio", - "how_to_start_radio": "Jak chcesz uruchomić radio?", - "replace_queue_question": "Czy chcesz zastąpić bieżącą kolejkę czy dodać do niej?", - "endless_playback": "Nieskończona Odtwarzanie", - "delete_playlist": "Usuń Playlistę", - "delete_playlist_confirmation": "Czy na pewno chcesz usunąć tę listę odtwarzania?", - "local_tracks": "Lokalne Utwory", - "song_link": "Link do Utworu", - "skip_this_nonsense": "Pomiń tę bzdurę", - "freedom_of_music": "“Wolność Muzyki”", - "freedom_of_music_palm": "“Wolność Muzyki w Twojej dłoni”", - "get_started": "Zacznijmy", - "youtube_source_description": "Polecane i działa najlepiej.", - "piped_source_description": "Czujesz się wolny? To samo co YouTube, ale dużo za darmo.", - "jiosaavn_source_description": "Najlepszy dla regionu Azji Południowej.", - "highest_quality": "Najwyższa Jakość: {quality}", - "select_audio_source": "Wybierz Źródło Audio", - "endless_playback_description": "Automatycznie dodaj nowe utwory na koniec kolejki", - "choose_your_region": "Wybierz swoją region", - "choose_your_region_description": "To pomoże Spotube pokazać Ci odpowiednią treść dla Twojej lokalizacji.", - "choose_your_language": "Wybierz swój język", - "help_project_grow": "Pomóż temu projektowi rosnąć", - "help_project_grow_description": "Spotube to projekt open-source. Możesz pomóc temu projektowi rosnąć, przyczyniając się do projektu, zgłaszając błędy lub sugerując nowe funkcje.", - "contribute_on_github": "Przyczyniaj się na GitHubie", - "donate_on_open_collective": "Dotuj na Open Collective", - "browse_anonymously": "Przeglądaj Anonimowo", - "enable_connect": "Włącz połączenie", - "enable_connect_description": "Kontroluj Spotube z innych urządzeń", - "devices": "Urządzenia", - "select": "Wybierz", - "connect_client_alert": "Jesteś sterowany przez {client}", - "this_device": "To urządzenie", - "remote": "Zdalny", - "local_library": "Biblioteka lokalna", - "add_library_location": "Dodaj do biblioteki", - "remove_library_location": "Usuń z biblioteki", - "local_tab": "Lokalny", - "stats": "Statystyki", - "and_n_more": "i {count} więcej", - "recently_played": "Ostatnio odtwarzane", - "browse_more": "Zobacz więcej", - "no_title": "Brak tytułu", - "not_playing": "Nie odtwarzane", - "epic_failure": "Epicka porażka!", - "added_num_tracks_to_queue": "Dodano {tracks_length} utworów do kolejki", - "spotube_has_an_update": "Spotube ma aktualizację", - "download_now": "Pobierz teraz", - "nightly_version": "Spotube Nightly {nightlyBuildNum} został wydany", - "release_version": "Spotube v{version} został wydany", - "read_the_latest": "Przeczytaj najnowsze ", - "release_notes": "notatki o wersji", - "pick_color_scheme": "Wybierz schemat kolorów", - "save": "Zapisz", - "choose_the_device": "Wybierz urządzenie:", - "multiple_device_connected": "Jest wiele urządzeń podłączonych.\nWybierz urządzenie, na którym chcesz wykonać tę akcję", - "nothing_found": "Nic nie znaleziono", - "the_box_is_empty": "Pudełko jest puste", - "top_artists": "Najlepsi artyści", - "top_albums": "Najlepsze albumy", - "this_week": "W tym tygodniu", - "this_month": "W tym miesiącu", - "last_6_months": "Ostatnie 6 miesięcy", - "this_year": "W tym roku", - "last_2_years": "Ostatnie 2 lata", - "all_time": "Wszystkie czasy", - "powered_by_provider": "Napędzane przez {providerName}", - "email": "E-mail", - "profile_followers": "Obserwujący", - "birthday": "Data urodzenia", - "subscription": "Subskrypcja", - "not_born": "Nie urodzony", - "hacker": "Haker", - "profile": "Profil", - "no_name": "Brak nazwy", - "edit": "Edytuj", - "user_profile": "Profil użytkownika", - "count_plays": "{count} odtworzeń", - "streaming_fees_hypothetical": "*Obliczone na podstawie wypłaty Spotify za stream\nod $0.003 do $0.005. Jest to hipotetyczne\nobliczenie, które ma na celu pokazanie, ile\nużytkownik zapłaciłby artystom, gdyby odsłuchał\ntych utworów na Spotify.", - "count_mins": "{minutes} min", - "summary_minutes": "minuty", - "summary_listened_to_music": "Słuchana muzyka", - "summary_songs": "utwory", - "summary_streamed_overall": "Ogółem streamowane", - "summary_owed_to_artists": "Do zapłaty artystom\nw tym miesiącu", - "summary_artists": "artystów", - "summary_music_reached_you": "Muzyka dotarła do Ciebie", - "summary_full_albums": "pełne albumy", - "summary_got_your_love": "Otrzymał Twoją miłość", - "summary_playlists": "playlisty", - "summary_were_on_repeat": "Były na powtarzaniu", - "total_money": "Łącznie {money}", - "minutes_listened": "Minuty odsłuchane", - "streamed_songs": "Strumieniowane utwory", - "count_streams": "{count} strumieni", - "owned_by_you": "Własność Twoja", - "copied_shareurl_to_clipboard": "{shareUrl} skopiowano do schowka", - "spotify_hipotetical_calculation": "*Obliczone na podstawie płatności Spotify za strumień\nw zakresie od $0.003 do $0.005. Jest to hipotetyczne\nobliczenie mające na celu pokazanie użytkownikowi, ile\nzapłaciliby artystom, gdyby słuchali ich utworów na Spotify.", - "webview_not_found": "Nie znaleziono Webview", - "webview_not_found_description": "Na twoim urządzeniu nie zainstalowano środowiska uruchomieniowego Webview.\nJeśli jest zainstalowany, upewnij się, że jest w environment PATH\n\nPo instalacji uruchom ponownie aplikację", - "unsupported_platform": "Nieobsługiwana platforma", - "invidious_instance": "Instancja serwera Invidious", - "invidious_description": "Instancja serwera Invidious do dopasowywania utworów", - "invidious_warning": "Niektóre z nich mogą nie działać dobrze. Używaj na własne ryzyko", - "invidious_source_description": "Podobne do Piped, ale o wyższej dostępności.", - "cache_music": "Pamięć podręczna muzyki", - "open": "Otwórz", - "cache_folder": "Folder pamięci podręcznej", - "export": "Eksportuj", - "clear_cache": "Wyczyść pamięć podręczną", - "clear_cache_confirmation": "Czy chcesz wyczyścić pamięć podręczną?", - "export_cache_files": "Eksportuj pliki z pamięci podręcznej", - "found_n_files": "Znaleziono {count} plików", - "export_cache_confirmation": "Czy chcesz wyeksportować te pliki do", - "exported_n_out_of_m_files": "Wyeksportowano {filesExported} z {files} plików", - "playlist": "Playlista", - "no_loop": "Brak pętli", - "generate": "Generuj", - "undo": "Cofnij", - "download_all": "Pobierz wszystko", - "add_all_to_playlist": "Dodaj wszystko do playlisty", - "add_all_to_queue": "Dodaj wszystko do kolejki", - "play_all_next": "Odtwórz wszystko następnie", - "pause": "Pauza", - "view_all": "Zobacz wszystko", - "no_tracks_added_yet": "Wygląda na to, że jeszcze nie dodałeś żadnych utworów", - "no_tracks": "Wygląda na to, że tutaj nie ma żadnych utworów", - "no_tracks_listened_yet": "Wygląda na to, że jeszcze nic nie słuchałeś", - "not_following_artists": "Nie obserwujesz żadnych artystów", - "no_favorite_albums_yet": "Wygląda na to, że jeszcze nie dodałeś żadnych albumów do ulubionych", - "no_logs_found": "Nie znaleziono żadnych logów", - "youtube_engine": "Silnik YouTube", - "youtube_engine_not_installed_title": "{engine} nie jest zainstalowany", - "youtube_engine_not_installed_message": "{engine} nie jest zainstalowany w systemie.", - "youtube_engine_set_path": "Upewnij się, że jest dostępny w zmiennej PATH lub\nustaw absolutną ścieżkę do pliku wykonywalnego {engine} poniżej", - "youtube_engine_unix_issue_message": "W systemach macOS/Linux/unix, ustawianie ścieżki w .zshrc/.bashrc/.bash_profile itp. nie będzie działać.\nMusisz ustawić ścieżkę w pliku konfiguracyjnym powłoki", - "download": "Pobierz", - "file_not_found": "Plik nie znaleziony", - "custom": "Niestandardowy", - "add_custom_url": "Dodaj niestandardowy URL", - "edit_port": "Edytuj port", - "port_helper_msg": "Domyślna wartość to -1, co oznacza losową liczbę. Jeśli masz skonfigurowany zaporę, zaleca się jej ustawienie.", - "connect_request": "Zezwolić {client} na połączenie?", - "connection_request_denied": "Połączenie odrzucone. Użytkownik odmówił dostępu.", - "hipotetical_calculation": "*Jest to obliczone na podstawie średniej wypłaty z internetowych platform streamingowych za jeden stream w wysokości 0,003 do 0,005 USD. Jest to hipotetyczne obliczenie, które ma na celu dać użytkownikowi wgląd w to, ile zapłaciłby artystom, gdyby słuchał ich piosenek na różnych platformach streamingowych.", - "an_error_occurred": "Wystąpił błąd", - "copy_to_clipboard": "Kopiuj do schowka", - "view_logs": "Wyświetl logi", - "retry": "Ponów", - "no_default_metadata_provider_selected": "Nie masz ustawionego domyślnego dostawcy metadanych", - "manage_metadata_providers": "Zarządzaj dostawcami metadanych", - "open_link_in_browser": "Otworzyć link w przeglądarce?", - "do_you_want_to_open_the_following_link": "Czy chcesz otworzyć następujący link", - "unsafe_url_warning": "Otwieranie linków z niezaufanych źródeł może być niebezpieczne. Zachowaj ostrożność!\nMożesz również skopiować link do schowka.", - "copy_link": "Kopiuj link", - "building_your_timeline": "Budowanie Twojej osi czasu na podstawie Twoich odsłuchań...", - "official": "Oficjalny", - "author_name": "Autor: {author}", - "third_party": "Zewnętrzny", - "plugin_requires_authentication": "Wtyczka wymaga uwierzytelnienia", - "update_available": "Dostępna aktualizacja", - "supports_scrobbling": "Obsługuje scrobbling", - "plugin_scrobbling_info": "Ta wtyczka scrobbluje Twoją muzykę, aby wygenerować historię odsłuchań.", - "default_plugin": "Domyślna", - "set_default": "Ustaw jako domyślną", - "support": "Wsparcie", - "support_plugin_development": "Wspieraj rozwój wtyczki", - "can_access_name_api": "- Może uzyskać dostęp do API **{name}**", - "do_you_want_to_install_this_plugin": "Czy chcesz zainstalować tę wtyczkę?", - "third_party_plugin_warning": "Ta wtyczka pochodzi z zewnętrznego repozytorium. Upewnij się, że ufasz źródłu przed instalacją.", - "author": "Autor", - "this_plugin_can_do_following": "Ta wtyczka może wykonywać następujące czynności", - "install": "Instaluj", - "install_a_metadata_provider": "Zainstaluj dostawcę metadanych", - "no_tracks_playing": "Obecnie nie odtwarzany jest żaden utwór", - "synced_lyrics_not_available": "Zsynchronizowane teksty nie są dostępne dla tego utworu. Zamiast tego użyj zakładki", - "plain_lyrics": "Zwykłe teksty", - "tab_instead": "zamiast tego.", - "disclaimer": "Zastrzeżenie", - "third_party_plugin_dmca_notice": "Zespół Spotube nie ponosi żadnej odpowiedzialności (w tym prawnej) za żadne wtyczki \"zewnętrzne\".\nUżywaj ich na własne ryzyko. Wszelkie błędy/problemy prosimy zgłaszać w repozytorium wtyczki.\n\nJeśli jakakolwiek wtyczka \"zewnętrzna\" narusza ToS/DMCA jakiejkolwiek usługi/podmiotu prawnego, prosimy o kontakt z autorem wtyczki \"zewnętrznej\" lub platformą hostingową, np. GitHub/Codeberg, w celu podjęcia działań. Wymienione powyżej (oznaczone jako \"zewnętrzne\") są publicznymi wtyczkami utrzymywanymi przez społeczność. Nie kuratujemy ich, więc nie możemy podjąć żadnych działań w ich sprawie.\n\n", - "input_does_not_match_format": "Wprowadzony tekst nie pasuje do wymaganego formatu", - "metadata_provider_plugins": "Wtyczki dostawców metadanych", - "paste_plugin_download_url": "Wklej adres URL do pobrania lub adres URL repozytorium GitHub/Codeberg lub bezpośredni link do pliku .smplug", - "download_and_install_plugin_from_url": "Pobierz i zainstaluj wtyczkę z adresu URL", - "failed_to_add_plugin_error": "Nie udało się dodać wtyczki: {error}", - "upload_plugin_from_file": "Prześlij wtyczkę z pliku", - "installed": "Zainstalowane", - "available_plugins": "Dostępne wtyczki", - "configure_your_own_metadata_plugin": "Skonfiguruj własnego dostawcę metadanych dla playlisty/albumu/artysty/kanału", - "audio_scrobblers": "Scrobblery audio", - "scrobbling": "Scrobbling", - "download_music_format": "Format pobierania muzyki", - "streaming_music_format": "Format strumieniowania muzyki", - "download_music_quality": "Jakość pobierania", - "streaming_music_quality": "Jakość strumieniowania", - "default_metadata_source": "Domyślne źródło metadanych", - "set_default_metadata_source": "Ustaw domyślne źródło metadanych", - "default_audio_source": "Domyślne źródło audio", - "set_default_audio_source": "Ustaw domyślne źródło audio", - "plugins": "Wtyczki", - "configure_plugins": "Skonfiguruj własne wtyczki dostawców metadanych i źródeł audio", - "source": "Źródło: ", - "uncompressed": "Nieskompresowany", - "dab_music_source_description": "Dla audiofilów. Oferuje strumienie audio wysokiej jakości/lossless. Precyzyjne dopasowanie utworów na podstawie ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb deleted file mode 100644 index fa7845c3..00000000 --- a/lib/l10n/app_pt.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Visitante", - "browse": "Explorar", - "search": "Buscar", - "library": "Biblioteca", - "lyrics": "Letras", - "settings": "Configurações", - "genre_categories_filter": "Filtrar categorias ou gêneros...", - "genre": "Gênero", - "personalized": "Personalizado", - "featured": "Destaque", - "new_releases": "Novos Lançamentos", - "songs": "Músicas", - "playing_track": "Tocando {track}", - "queue_clear_alert": "Isso irá limpar a fila atual. {track_length} músicas serão removidas.\nDeseja continuar?", - "load_more": "Carregar mais", - "playlists": "Playlists", - "artists": "Artistas", - "albums": "Álbuns", - "tracks": "Faixas", - "downloads": "Downloads", - "filter_playlists": "Filtrar suas playlists...", - "liked_tracks": "Músicas Curtidas", - "liked_tracks_description": "Todas as suas músicas curtidas", - "create_playlist": "Criar Playlist", - "create_a_playlist": "Criar uma playlist", - "create": "Criar", - "cancel": "Cancelar", - "playlist_name": "Nome da Playlist", - "name_of_playlist": "Nome da playlist", - "description": "Descrição", - "public": "Pública", - "collaborative": "Colaborativa", - "search_local_tracks": "Buscar músicas locais...", - "play": "Reproduzir", - "delete": "Excluir", - "none": "Nenhum", - "sort_a_z": "Ordenar de A-Z", - "sort_z_a": "Ordenar de Z-A", - "sort_artist": "Ordenar por Artista", - "sort_album": "Ordenar por Álbum", - "sort_tracks": "Ordenar Faixas", - "currently_downloading": "Baixando no momento ({tracks_length})", - "cancel_all": "Cancelar Tudo", - "filter_artist": "Filtrar artistas...", - "followers": "{followers} Seguidores", - "add_artist_to_blacklist": "Adicionar artista à lista negra", - "top_tracks": "Principais Músicas", - "fans_also_like": "Fãs também curtiram", - "loading": "Carregando...", - "artist": "Artista", - "blacklisted": "Na Lista Negra", - "following": "Seguindo", - "follow": "Seguir", - "artist_url_copied": "URL do artista copiada para a área de transferência", - "added_to_queue": "Adicionadas {tracks} músicas à fila", - "filter_albums": "Filtrar álbuns...", - "synced": "Sincronizado", - "plain": "Simples", - "shuffle": "Aleatório", - "search_tracks": "Buscar músicas...", - "released": "Lançado", - "error": "Erro {error}", - "title": "Título", - "time": "Tempo", - "more_actions": "Mais ações", - "download_count": "Baixar ({count})", - "add_count_to_playlist": "Adicionar ({count}) à Playlist", - "add_count_to_queue": "Adicionar ({count}) à Fila", - "play_count_next": "Reproduzir ({count}) em seguida", - "album": "Álbum", - "copied_to_clipboard": "{data} copiado para a área de transferência", - "add_to_following_playlists": "Adicionar {track} às Playlists Seguintes", - "add": "Adicionar", - "added_track_to_queue": "Adicionada {track} à fila", - "add_to_queue": "Adicionar à fila", - "track_will_play_next": "{track} será reproduzida em seguida", - "play_next": "Reproduzir em seguida", - "removed_track_from_queue": "{track} removida da fila", - "remove_from_queue": "Remover da fila", - "remove_from_favorites": "Remover dos favoritos", - "save_as_favorite": "Salvar como favorita", - "add_to_playlist": "Adicionar à playlist", - "remove_from_playlist": "Remover da playlist", - "add_to_blacklist": "Adicionar à lista negra", - "remove_from_blacklist": "Remover da lista negra", - "share": "Compartilhar", - "mini_player": "Mini Player", - "slide_to_seek": "Arraste para avançar ou retroceder", - "shuffle_playlist": "Embaralhar playlist", - "unshuffle_playlist": "Desembaralhar playlist", - "previous_track": "Faixa anterior", - "next_track": "Próxima faixa", - "pause_playback": "Pausar Reprodução", - "resume_playback": "Continuar Reprodução", - "loop_track": "Repetir faixa", - "repeat_playlist": "Repetir playlist", - "queue": "Fila", - "alternative_track_sources": "Fontes alternativas de faixas", - "download_track": "Baixar faixa", - "tracks_in_queue": "{tracks} músicas na fila", - "clear_all": "Limpar tudo", - "show_hide_ui_on_hover": "Mostrar/Ocultar UI ao passar o mouse", - "always_on_top": "Sempre no topo", - "exit_mini_player": "Sair do Mini player", - "download_location": "Local de download", - "account": "Conta", - "login_with_spotify": "Fazer login com sua conta do Spotify", - "connect_with_spotify": "Conectar ao Spotify", - "logout": "Sair", - "logout_of_this_account": "Sair desta conta", - "language_region": "Idioma e Região", - "language": "Idioma", - "system_default": "Padrão do Sistema", - "market_place_region": "Região da Loja", - "recommendation_country": "País de Recomendação", - "appearance": "Aparência", - "layout_mode": "Modo de Layout", - "override_layout_settings": "Substituir configurações do modo de layout responsivo", - "adaptive": "Adaptável", - "compact": "Compacto", - "extended": "Estendido", - "theme": "Tema", - "dark": "Escuro", - "light": "Claro", - "system": "Sistema", - "accent_color": "Cor de Destaque", - "sync_album_color": "Sincronizar cor do álbum", - "sync_album_color_description": "Usa a cor predominante da capa do álbum como cor de destaque", - "playback": "Reprodução", - "audio_quality": "Qualidade do Áudio", - "high": "Alta", - "low": "Baixa", - "pre_download_play": "Pré-download e reprodução", - "pre_download_play_description": "Em vez de transmitir áudio, baixar bytes e reproduzir (recomendado para usuários com maior largura de banda)", - "skip_non_music": "Pular segmentos não musicais (SponsorBlock)", - "blacklist_description": "Faixas e artistas na lista negra", - "wait_for_download_to_finish": "Aguarde o download atual ser concluído", - "desktop": "Desktop", - "close_behavior": "Comportamento de Fechamento", - "close": "Fechar", - "minimize_to_tray": "Minimizar para a bandeja", - "show_tray_icon": "Mostrar ícone na bandeja do sistema", - "about": "Sobre", - "u_love_spotube": "Sabemos que você adora o Spotube", - "check_for_updates": "Verificar atualizações", - "about_spotube": "Sobre o Spotube", - "blacklist": "Lista Negra", - "please_sponsor": "Por favor, patrocine/doe", - "spotube_description": "Spotube, um cliente leve, multiplataforma e gratuito para o Spotify", - "version": "Versão", - "build_number": "Número de Build", - "founder": "Fundador", - "repository": "Repositório", - "bug_issues": "Bugs/Problemas", - "made_with": "Feito com ❤️ em Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Licença", - "add_spotify_credentials": "Adicione suas credenciais do Spotify para começar", - "credentials_will_not_be_shared_disclaimer": "Não se preocupe, suas credenciais não serão coletadas nem compartilhadas com ninguém", - "know_how_to_login": "Não sabe como fazer isso?", - "follow_step_by_step_guide": "Siga o guia passo a passo", - "spotify_cookie": "Cookie do Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Preencha todos os campos, por favor", - "submit": "Enviar", - "exit": "Sair", - "previous": "Anterior", - "next": "Próximo", - "done": "Concluído", - "step_1": "Passo 1", - "first_go_to": "Primeiro, vá para", - "login_if_not_logged_in": "e faça login/cadastro se ainda não estiver logado", - "step_2": "Passo 2", - "step_2_steps": "1. Uma vez logado, pressione F12 ou clique com o botão direito do mouse > Inspecionar para abrir as ferramentas de desenvolvimento do navegador.\n2. Em seguida, vá para a guia \"Aplicativo\" (Chrome, Edge, Brave, etc.) ou \"Armazenamento\" (Firefox, Palemoon, etc.)\n3. Acesse a seção \"Cookies\" e depois a subseção \"https://accounts.spotify.com\"", - "step_3": "Passo 3", - "success_emoji": "Sucesso🥳", - "success_message": "Agora você está logado com sucesso em sua conta do Spotify. Bom trabalho!", - "step_4": "Passo 4", - "something_went_wrong": "Algo deu errado", - "piped_instance": "Instância do Servidor Piped", - "piped_description": "A instância do servidor Piped a ser usada para correspondência de faixas", - "piped_warning": "Algumas delas podem não funcionar bem. Use por sua conta e risco", - "generate_playlist": "Gerar Playlist", - "track_exists": "A faixa {track} já existe", - "replace_downloaded_tracks": "Substituir todas as faixas baixadas", - "skip_download_tracks": "Pular o download de todas as faixas baixadas", - "do_you_want_to_replace": "Deseja substituir a faixa existente?", - "replace": "Substituir", - "skip": "Pular", - "select_up_to_count_type": "Selecione até {count} {type}", - "select_genres": "Selecionar Gêneros", - "add_genres": "Adicionar Gêneros", - "country": "País", - "number_of_tracks_generate": "Número de faixas a gerar", - "acousticness": "Acústica", - "danceability": "Dançabilidade", - "energy": "Energia", - "instrumentalness": "Instrumentalidade", - "liveness": "Vivacidade", - "loudness": "Volume", - "speechiness": "Discurso", - "valence": "Valência", - "popularity": "Popularidade", - "key": "Tonalidade", - "duration": "Duração (s)", - "tempo": "Tempo (BPM)", - "mode": "Modo", - "time_signature": "Assinatura de tempo", - "short": "Curto", - "medium": "Médio", - "long": "Longo", - "min": "Min", - "max": "Máx", - "target": "Alvo", - "moderate": "Moderado", - "deselect_all": "Desmarcar Todos", - "select_all": "Selecionar Todos", - "are_you_sure": "Tem certeza?", - "generating_playlist": "Gerando sua playlist personalizada...", - "selected_count_tracks": "{count} faixas selecionadas", - "download_warning": "Se você baixar todas as faixas em massa, estará claramente pirateando música e causando danos à sociedade criativa da música. Espero que você esteja ciente disso. Sempre tente respeitar e apoiar o trabalho árduo dos artistas", - "download_ip_ban_warning": "Além disso, seu IP pode ser bloqueado no YouTube devido a solicitações de download excessivas. O bloqueio de IP significa que você não poderá usar o YouTube (mesmo se estiver conectado) por pelo menos 2-3 meses a partir do dispositivo IP. E o Spotube não se responsabiliza se isso acontecer", - "by_clicking_accept_terms": "Ao clicar em 'aceitar', você concorda com os seguintes termos:", - "download_agreement_1": "Eu sei que estou pirateando música. Sou mau", - "download_agreement_2": "Vou apoiar o artista onde puder e estou fazendo isso porque não tenho dinheiro para comprar sua arte", - "download_agreement_3": "Estou completamente ciente de que meu IP pode ser bloqueado no YouTube e não responsabilizo o Spotube ou seus proprietários/colaboradores por quaisquer acidentes causados pela minha ação atual", - "decline": "Recusar", - "accept": "Aceitar", - "details": "Detalhes", - "youtube": "YouTube", - "channel": "Canal", - "likes": "Curtidas", - "dislikes": "Descurtidas", - "views": "Visualizações", - "streamUrl": "URL do Stream", - "stop": "Parar", - "sort_newest": "Ordenar por mais recente adicionado", - "sort_oldest": "Ordenar por mais antigo adicionado", - "sleep_timer": "Temporizador de Sono", - "mins": "{minutes} Minutos", - "hours": "{hours} Horas", - "hour": "{hours} Hora", - "custom_hours": "Horas Personalizadas", - "logs": "Registros", - "developers": "Desenvolvedores", - "not_logged_in": "Você não está logado", - "search_mode": "Modo de Busca", - "audio_source": "Fonte de Áudio", - "ok": "Ok", - "failed_to_encrypt": "Falha ao criptografar", - "encryption_failed_warning": "O Spotube usa criptografia para armazenar seus dados com segurança, mas falhou em fazê-lo. Portanto, ele voltará para o armazenamento não seguro.\nSe você estiver usando o Linux, certifique-se de ter algum serviço secreto (gnome-keyring, kde-wallet, keepassxc, etc.) instalado", - "querying_info": "Consultando informações...", - "piped_api_down": "A API do Piped está indisponível", - "piped_down_error_instructions": "A instância do Piped {pipedInstance} está atualmente indisponível\n\nMude a instância ou mude o 'Tipo de API' para a API oficial do YouTube\n\nCertifique-se de reiniciar o aplicativo após a alteração", - "you_are_offline": "Você está offline no momento", - "connection_restored": "Sua conexão com a internet foi restaurada", - "use_system_title_bar": "Usar a barra de título do sistema", - "update_playlist": "Atualizar lista de reprodução", - "update": "Atualizar", - "crunching_results": "Processando resultados...", - "search_to_get_results": "Pesquisar para obter resultados", - "use_amoled_mode": "Modo AMOLED", - "pitch_dark_theme": "Tema escuro", - "normalize_audio": "Normalizar áudio", - "change_cover": "Alterar capa", - "add_cover": "Adicionar capa", - "restore_defaults": "Restaurar padrões", - "download_music_codec": "Descarregar codec de música", - "streaming_music_codec": "Codec de streaming de música", - "login_with_lastfm": "Iniciar sessão com o Last.fm", - "connect": "Ligar", - "disconnect_lastfm": "Desligar do Last.fm", - "disconnect": "Desligar", - "username": "Nome de utilizador", - "password": "Palavra-passe", - "login": "Iniciar sessão", - "login_with_your_lastfm": "Inicie sessão na sua conta Last.fm", - "scrobble_to_lastfm": "Scrobble para o Last.fm", - "go_to_album": "Ir para o álbum", - "discord_rich_presence": "Presença rica no Discord", - "browse_all": "Navegar por tudo", - "genres": "Gêneros", - "explore_genres": "Explorar gêneros", - "step_3_steps": "Copie o valor do cookie \"sp_dc\"", - "step_4_steps": "Cole o valor copiado de \"sp_dc\"", - "friends": "Amigos", - "no_lyrics_available": "Desculpe, não foi possível encontrar a letra desta faixa", - "sort_duration": "Ordenar por Duração", - "start_a_radio": "Iniciar uma Rádio", - "how_to_start_radio": "Como você deseja iniciar a rádio?", - "replace_queue_question": "Você deseja substituir a fila atual ou acrescentar a ela?", - "endless_playback": "Reprodução sem fim", - "delete_playlist": "Excluir Lista de Reprodução", - "delete_playlist_confirmation": "Tem certeza de que deseja excluir esta lista de reprodução?", - "local_tracks": "Faixas Locais", - "song_link": "Link da Música", - "skip_this_nonsense": "Pular essa bobagem", - "freedom_of_music": "“Liberdade da Música”", - "freedom_of_music_palm": "“Liberdade da Música na palma da sua mão”", - "get_started": "Vamos começar", - "youtube_source_description": "Recomendado e funciona melhor.", - "piped_source_description": "Sentindo-se livre? Igual ao YouTube, mas muito mais grátis.", - "jiosaavn_source_description": "Melhor para a região da Ásia do Sul.", - "highest_quality": "Melhor Qualidade: {quality}", - "select_audio_source": "Selecionar Fonte de Áudio", - "endless_playback_description": "Adicionar automaticamente novas músicas\nao final da fila", - "choose_your_region": "Escolha sua região", - "choose_your_region_description": "Isso ajudará o Spotube a mostrar o conteúdo certo\npara sua localização.", - "choose_your_language": "Escolha seu idioma", - "help_project_grow": "Ajude este projeto a crescer", - "help_project_grow_description": "Spotube é um projeto de código aberto. Você pode ajudar este projeto a crescer contribuindo para o projeto, relatando bugs ou sugerindo novos recursos.", - "contribute_on_github": "Contribuir no GitHub", - "donate_on_open_collective": "Doar no Open Collective", - "browse_anonymously": "Navegar Anonimamente", - "enable_connect": "Ativar conexão", - "enable_connect_description": "Controle o Spotube a partir de outros dispositivos", - "devices": "Dispositivos", - "select": "Selecionar", - "connect_client_alert": "Você está sendo controlado por {client}", - "this_device": "Este dispositivo", - "remote": "Remoto", - "local_library": "Biblioteca local", - "add_library_location": "Adicionar à biblioteca", - "remove_library_location": "Remover da biblioteca", - "local_tab": "Local", - "stats": "Estatísticas", - "and_n_more": "e {count} mais", - "recently_played": "Reproduzido Recentemente", - "browse_more": "Ver Mais", - "no_title": "Sem Título", - "not_playing": "Não está a reproduzir", - "epic_failure": "Fracasso épico!", - "added_num_tracks_to_queue": "Adicionados {tracks_length} faixas à fila", - "spotube_has_an_update": "Spotube tem uma atualização", - "download_now": "Baixar Agora", - "nightly_version": "Spotube Nightly {nightlyBuildNum} foi lançado", - "release_version": "Spotube v{version} foi lançado", - "read_the_latest": "Leia o mais recente ", - "release_notes": "notas de versão", - "pick_color_scheme": "Escolha o esquema de cores", - "save": "Salvar", - "choose_the_device": "Escolha o dispositivo:", - "multiple_device_connected": "Há vários dispositivos conectados.\nEscolha o dispositivo no qual deseja executar esta ação", - "nothing_found": "Nada encontrado", - "the_box_is_empty": "A caixa está vazia", - "top_artists": "Principais Artistas", - "top_albums": "Principais Álbuns", - "this_week": "Esta semana", - "this_month": "Este mês", - "last_6_months": "Últimos 6 meses", - "this_year": "Este ano", - "last_2_years": "Últimos 2 anos", - "all_time": "De todos os tempos", - "powered_by_provider": "Desenvolvido por {providerName}", - "email": "E-mail", - "profile_followers": "Seguidores", - "birthday": "Aniversário", - "subscription": "Assinatura", - "not_born": "Não nascido", - "hacker": "Hacker", - "profile": "Perfil", - "no_name": "Sem Nome", - "edit": "Editar", - "user_profile": "Perfil do Usuário", - "count_plays": "{count} reproduzidos", - "streaming_fees_hypothetical": "*Calculado com base no pagamento por stream do Spotify\nque varia de $0.003 a $0.005. Isso é um cálculo hipotético\npara fornecer uma visão ao usuário sobre quanto eles\nteriam pago aos artistas se estivessem ouvindo\no seu som no Spotify.", - "count_mins": "{minutes} min", - "summary_minutes": "minutos", - "summary_listened_to_music": "Música ouvida", - "summary_songs": "faixas", - "summary_streamed_overall": "Total de streams", - "summary_owed_to_artists": "Devido aos artistas\neste mês", - "summary_artists": "artista", - "summary_music_reached_you": "A música chegou até você", - "summary_full_albums": "álbuns completos", - "summary_got_your_love": "Recebeu seu amor", - "summary_playlists": "playlists", - "summary_were_on_repeat": "Estavam em repetição", - "total_money": "Total {money}", - "minutes_listened": "Minutos ouvidos", - "streamed_songs": "Músicas transmitidas", - "count_streams": "{count} streams", - "owned_by_you": "De sua propriedade", - "copied_shareurl_to_clipboard": "{shareUrl} copiado para a área de transferência", - "spotify_hipotetical_calculation": "*Isso é calculado com base no pagamento por stream do Spotify\nque varia de $0.003 a $0.005. Esta é uma cálculo hipotético\npara dar ao usuário uma visão de quanto teriam pago aos artistas\nse eles ouvissem suas músicas no Spotify.", - "webview_not_found": "Webview não encontrado", - "webview_not_found_description": "Nenhum runtime Webview está instalado no seu dispositivo.\nSe estiver instalado, certifique-se de que está no environment PATH\n\nApós a instalação, reinicie o aplicativo", - "unsupported_platform": "Plataforma não suportada", - "invidious_instance": "Instância do Servidor Invidious", - "invidious_description": "A instância do servidor Invidious a ser usada para correspondência de faixas", - "invidious_warning": "Alguns podem não funcionar bem. Use por sua conta e risco", - "invidious_source_description": "Semelhante ao Piped, mas com maior disponibilidade.", - "cache_music": "Música em cache", - "open": "Abrir", - "cache_folder": "Pasta de cache", - "export": "Exportar", - "clear_cache": "Limpar cache", - "clear_cache_confirmation": "Deseja limpar o cache?", - "export_cache_files": "Exportar Arquivos em Cache", - "found_n_files": "Encontrados {count} arquivos", - "export_cache_confirmation": "Deseja exportar estes arquivos para", - "exported_n_out_of_m_files": "Exportados {filesExported} de {files} arquivos", - "playlist": "Playlist", - "no_loop": "Sem loop", - "generate": "Gerar", - "undo": "Desfazer", - "download_all": "Baixar tudo", - "add_all_to_playlist": "Adicionar tudo à playlist", - "add_all_to_queue": "Adicionar tudo à fila", - "play_all_next": "Reproduzir tudo a seguir", - "pause": "Pausar", - "view_all": "Ver tudo", - "no_tracks_added_yet": "Parece que você ainda não adicionou nenhuma faixa", - "no_tracks": "Parece que não há faixas aqui", - "no_tracks_listened_yet": "Parece que você ainda não ouviu nada", - "not_following_artists": "Você não está seguindo nenhum artista", - "no_favorite_albums_yet": "Parece que você ainda não adicionou nenhum álbum aos favoritos", - "no_logs_found": "Nenhum log encontrado", - "youtube_engine": "Motor YouTube", - "youtube_engine_not_installed_title": "{engine} não está instalado", - "youtube_engine_not_installed_message": "{engine} não está instalado no seu sistema.", - "youtube_engine_set_path": "Certifique-se de que está disponível na variável PATH ou\ndefina o caminho absoluto para o executável {engine} abaixo", - "youtube_engine_unix_issue_message": "Em sistemas macOS/Linux/unix, definir o caminho no .zshrc/.bashrc/.bash_profile etc. não funcionará.\nVocê precisa definir o caminho no arquivo de configuração do shell", - "download": "Baixar", - "file_not_found": "Arquivo não encontrado", - "custom": "Personalizado", - "add_custom_url": "Adicionar URL personalizada", - "edit_port": "Editar porta", - "port_helper_msg": "O padrão é -1, que indica um número aleatório. Se você tiver um firewall configurado, é recomendável definir isso.", - "connect_request": "Permitir que {client} se conecte?", - "connection_request_denied": "Conexão negada. O usuário negou o acesso .", - "hipotetical_calculation": "*Isso é calculado com base no pagamento médio por stream de plataformas de streaming de música online de US$ 0,003 a US$ 0,005. Esta é uma estimativa hipotética para dar ao usuário uma ideia de quanto ele teria pago aos artistas se ouvisse sua música em diferentes plataformas de streaming de música.", - "an_error_occurred": "Ocorreu um erro", - "copy_to_clipboard": "Copiar para a área de transferência", - "view_logs": "Ver logs", - "retry": "Tentar novamente", - "no_default_metadata_provider_selected": "Você não tem um provedor de metadados padrão definido", - "manage_metadata_providers": "Gerenciar provedores de metadados", - "open_link_in_browser": "Abrir link no navegador?", - "do_you_want_to_open_the_following_link": "Você deseja abrir o seguinte link", - "unsafe_url_warning": "Pode ser inseguro abrir links de fontes não confiáveis. Tenha cautela!\nVocê também pode copiar o link para sua área de transferência.", - "copy_link": "Copiar link", - "building_your_timeline": "Construindo sua linha do tempo com base em suas audições...", - "official": "Oficial", - "author_name": "Autor: {author}", - "third_party": "Terceiros", - "plugin_requires_authentication": "Plugin requer autenticação", - "update_available": "Atualização disponível", - "supports_scrobbling": "Suporta scrobbling", - "plugin_scrobbling_info": "Este plugin faz o scrobbling de sua música para gerar seu histórico de audição.", - "default_plugin": "Padrão", - "set_default": "Definir como padrão", - "support": "Suporte", - "support_plugin_development": "Apoiar o desenvolvimento do plugin", - "can_access_name_api": "- Pode acessar a API **{name}**", - "do_you_want_to_install_this_plugin": "Você deseja instalar este plugin?", - "third_party_plugin_warning": "Este plugin é de um repositório de terceiros. Certifique-se de que você confia na fonte antes de instalá-lo.", - "author": "Autor", - "this_plugin_can_do_following": "Este plugin pode fazer o seguinte", - "install": "Instalar", - "install_a_metadata_provider": "Instalar um provedor de metadados", - "no_tracks_playing": "Nenhuma música sendo reproduzida no momento", - "synced_lyrics_not_available": "As letras sincronizadas não estão disponíveis para esta música. Por favor, use a aba", - "plain_lyrics": "Letras simples", - "tab_instead": "em vez disso.", - "disclaimer": "Aviso", - "third_party_plugin_dmca_notice": "A equipe Spotube não se responsabiliza (incluindo legalmente) por quaisquer plugins de \"terceiros\".\nUse-os por sua conta e risco. Para quaisquer bugs/problemas, por favor, relate-os ao repositório do plugin.\n\nSe algum plugin de \"terceiros\" estiver violando os Termos de Serviço/DMCA de qualquer serviço/entidade legal, por favor, peça ao autor do plugin \"terceiro\" ou à plataforma de hospedagem, por exemplo, GitHub/Codeberg, para tomar medidas. Os plugins listados acima (rotulados como \"terceiros\") são todos plugins públicos/mantidos pela comunidade. Não os estamos curando, então não podemos tomar nenhuma medida sobre eles.\n\n", - "input_does_not_match_format": "A entrada não corresponde ao formato exigido", - "metadata_provider_plugins": "Plugins do provedor de metadados", - "paste_plugin_download_url": "Cole a url de download ou a url do repositório GitHub/Codeberg ou o link direto para o arquivo .smplug", - "download_and_install_plugin_from_url": "Baixar e instalar o plugin a partir da url", - "failed_to_add_plugin_error": "Falha ao adicionar plugin: {error}", - "upload_plugin_from_file": "Carregar plugin a partir de arquivo", - "installed": "Instalado", - "available_plugins": "Plugins disponíveis", - "configure_your_own_metadata_plugin": "Configure seu próprio provedor de metadados de playlist/álbum/artista/feed", - "audio_scrobblers": "Scrobblers de áudio", - "scrobbling": "Scrobbling", - "download_music_format": "Formato de download de música", - "streaming_music_format": "Formato de streaming de música", - "download_music_quality": "Qualidade de download", - "streaming_music_quality": "Qualidade de streaming", - "default_metadata_source": "Fonte padrão de metadados", - "set_default_metadata_source": "Definir fonte padrão de metadados", - "default_audio_source": "Fonte de áudio padrão", - "set_default_audio_source": "Definir fonte de áudio padrão", - "plugins": "Plugins", - "configure_plugins": "Configure seus próprios plugins de provedores de metadados e fontes de áudio", - "source": "Fonte: ", - "uncompressed": "Não comprimido", - "dab_music_source_description": "Para audiófilos. Fornece streams de áudio de alta qualidade/sem perdas. Correspondência precisa de faixas baseada em ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb deleted file mode 100644 index 2e864268..00000000 --- a/lib/l10n/app_ru.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Гость", - "browse": "Обзор", - "search": "Поиск", - "library": "Библиотека", - "lyrics": "Текст", - "settings": "Настройки", - "genre_categories_filter": "Фильтр по категориям или жанрам...", - "genre": "Жанр", - "personalized": "Персонализированный", - "featured": "Популярное", - "new_releases": "Новое", - "songs": "Треки", - "playing_track": "Играет {track}", - "queue_clear_alert": "Это удалит текущую очередь. {track_length} треков будет удалено. Вы хотите продолжить?", - "load_more": "Загрузить больше", - "playlists": "Плейлисты", - "artists": "Исполнители", - "albums": "Альбомы", - "tracks": "Треки", - "downloads": "Загрузки", - "filter_playlists": "Применить фильтры к вашим плейлистам...", - "liked_tracks": "Понравившиеся треки", - "liked_tracks_description": "Все понравившиеся треки", - "create_playlist": "Создание плейлиста", - "create_a_playlist": "Создать плейлист", - "create": "Создать", - "cancel": "Отмена", - "update": "Обновить", - "playlist_name": "Назвать плейлист", - "name_of_playlist": "Название плейлиста", - "description": "Описание", - "public": "Публичный", - "collaborative": "Совместный", - "search_local_tracks": "Поиск песен на вашем устройстве...", - "play": "Играть", - "delete": "Удалить", - "none": "Пусто", - "sort_a_z": "Сортировка по алфавиту", - "sort_z_a": "Сортировка по алфавиту в обратную сторону", - "sort_artist": "Сортировать по исполнителю", - "sort_album": "Сортировать по альбомам", - "sort_duration": "Сортировать по длительности", - "sort_tracks": "Сортировать треки", - "currently_downloading": "Загружается ({tracks_length})", - "cancel_all": "Отменить все", - "filter_artist": "Фильтровать по исполнителю...", - "followers": "{followers} Подписчики", - "add_artist_to_blacklist": "Добавить исполнителя в черный список", - "top_tracks": "Чарт", - "fans_also_like": "Поклонникам также нравится", - "loading": "Загрузка...", - "artist": "Исполнитель", - "blacklisted": "Внесен в черный список", - "following": "Подписаны", - "follow": "Подписаться", - "artist_url_copied": "URL-адрес исполнителя скопирован в буфер обмена", - "added_to_queue": "Добавлено {tracks} треков в очередь", - "filter_albums": "Фильтровать альбомы...", - "synced": "Синхронизировано", - "plain": "Обычный", - "shuffle": "Перемешать", - "search_tracks": "Поиск треков...", - "released": "Дата выхода", - "error": "Ошибка {error}", - "title": "Заголовок", - "time": "Время", - "more_actions": "Больше действий", - "download_count": "Скачать ({count})", - "add_count_to_playlist": "Добавить ({count}) в плейлист", - "add_count_to_queue": "Добавить ({count}) в очередь", - "play_count_next": "Воспроизвести ({count}) следующий", - "album": "Альбом", - "copied_to_clipboard": "Скопировано {data} в буфер обмена", - "add_to_following_playlists": "Добавить {track} в этот плейлист", - "add": "Добавить", - "added_track_to_queue": "Добавлен {track} в очередь", - "add_to_queue": "Добавить в очередь", - "track_will_play_next": "{track} будет воспроизведен следующим", - "play_next": "Воспроизвести следующий", - "removed_track_from_queue": "{track} удален из очереди", - "remove_from_queue": "Удалить из очереди", - "remove_from_favorites": "Удалить из избранного", - "save_as_favorite": "Сохранить в избранное", - "add_to_playlist": "Добавить в плейлист", - "remove_from_playlist": "Удалить из плейлиста", - "add_to_blacklist": "Добавить в черный список", - "remove_from_blacklist": "Удалить из черного списка", - "share": "Поделиться", - "mini_player": "Мини-плеер", - "slide_to_seek": "Потяните для перемотки вперед или назад", - "shuffle_playlist": "Перемешать плейлист", - "unshuffle_playlist": "Снять перемешивание плейлиста", - "previous_track": "Предыдущий трек", - "next_track": "Следующий трек", - "pause_playback": "Пауза воспроизведения", - "resume_playback": "Возобновить воспроизведение", - "loop_track": "Циклический трек", - "repeat_playlist": "Повторите плейлист", - "queue": "Очередь", - "alternative_track_sources": "Альтернативные источники треков", - "download_track": "Скачать трек", - "tracks_in_queue": "{tracks} треков в очереди", - "clear_all": "Очистить все", - "show_hide_ui_on_hover": "Показать/Скрыть интерфейс при наведении", - "always_on_top": "Всегда сверху", - "exit_mini_player": "Выйти из мини-плеера", - "download_location": "Место загрузки", - "local_library": "Локальная библиотека", - "add_library_location": "Добавить в библиотеку", - "remove_library_location": "Удалить из библиотеки", - "account": "Аккаунт", - "login_with_spotify": "Войдите с помощью своей учетной записи Spotify", - "connect_with_spotify": "Подключитесь к Spotify", - "logout": "Выйти", - "logout_of_this_account": "Выйдите из этого аккаунта", - "language_region": "Язык и регион", - "language": "Язык", - "system_default": "Системное значение по умолчанию", - "market_place_region": "Региональное пространство", - "recommendation_country": "Страна рекомендаций", - "appearance": "Внешний вид", - "layout_mode": "Режим компоновки", - "override_layout_settings": "Изменить настройки режима адаптивной компоновки", - "adaptive": "Адаптивный", - "compact": "Компактный", - "extended": "Расширенный", - "theme": "Тема", - "dark": "Тёмная", - "light": "Светлая", - "system": "Системная", - "accent_color": "Акцентный цвет", - "sync_album_color": "Синхронизировать цвет альбома", - "sync_album_color_description": "Использует основной цвет обложки альбома как цвет акцента", - "playback": "Воспроизведение", - "audio_quality": "Качество звука", - "high": "Высокое", - "low": "Низкое", - "pre_download_play": "Предварительная загрузка и воспроизведение", - "pre_download_play_description": "Вместо потоковой передачи аудио используйте загруженные байты и воспроизводьте их (рекомендуется для пользователей с высокой пропускной способностью)", - "skip_non_music": "Пропускать немузыкальные сегменты (SponsorBlock)", - "blacklist_description": "Черный список треков и артистов", - "wait_for_download_to_finish": "Пожалуйста, дождитесь завершения текущей загрузки", - "desktop": "Компьютер", - "close_behavior": "Поведение при закрытии", - "close": "Закрыть", - "minimize_to_tray": "Свернуть", - "show_tray_icon": "Показать значок на панели задач", - "about": "О нас", - "u_love_spotube": "Мы знаем что вам нравится Spotube", - "check_for_updates": "Проверьте наличие обновлений", - "about_spotube": "О Spotube", - "blacklist": "Чёрный список", - "please_sponsor": "Стать спосором/поддержать", - "spotube_description": "Spotube – это легкий, кросс-платформенный клиент Spotify, предоставляющий бесплатный доступ для всех пользователей", - "version": "Версия", - "build_number": "Номер сборки", - "founder": "Создатель", - "repository": "Репозиторий", - "bug_issues": "Ошибки и проблемы", - "made_with": "Сделано Bangladesh🇧🇩 с ❤️", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Лицензия", - "add_spotify_credentials": "Добавьте ваши учетные данные Spotify, чтобы начать", - "credentials_will_not_be_shared_disclaimer": "Не беспокойся, никакая личная информация не собирается и не передается", - "know_how_to_login": "Не знаете, как это сделать?", - "follow_step_by_step_guide": "Следуйте пошаговому руководству", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "Пожалуйста, заполните все поля", - "submit": "Отправить", - "exit": "Выйти", - "previous": "Предыдущий", - "next": "Следующий", - "done": "Готово", - "step_1": "Шаг 1", - "first_go_to": "Сначала перейдите в", - "login_if_not_logged_in": "и войдите или зарегистрируйтесь, если вы не вошли в систему", - "step_2": "Шаг 2", - "step_2_steps": "1. После входа в систему нажмите F12 или щелкните правой кнопкой мыши > «Проверить», чтобы открыть инструменты разработчика браузера.\n2. Затем перейдите на вкладку \"Application\" (Chrome, Edge, Brave и т.д..) or \"Storage\" (Firefox, Palemoon и т.д..)\n3. Перейдите в раздел \"Cookies\", а затем в подраздел \"https://accounts.spotify.com\"", - "step_3": "Шаг 3", - "step_3_steps": "Скопируйте значение Cookie \"sp_dc\"", - "success_emoji": "Успешно🥳", - "success_message": "Теперь вы успешно вошли в свою учетную запись Spotify. Отличная работа, приятель!", - "step_4": "Шаг 4", - "step_4_steps": "Вставьте скопированное значение \"sp_dc\"", - "something_went_wrong": "Что-то пошло не так", - "piped_instance": "Экземпляр сервера Piped", - "piped_description": "Серверный экземпляр Piped для сопоставления треков", - "piped_warning": "Некоторые из них могут работать неправильно, поэтому используйте на свой страх и риск", - "generate_playlist": "Создать плейлист", - "track_exists": "Трек {track} уже существует", - "replace_downloaded_tracks": "Заменить все ранее скачанные треки", - "skip_download_tracks": "Пропустить загрузку всех ранее скачанных треков", - "do_you_want_to_replace": "Хотите заменить существующий трек??", - "replace": "Заменить", - "skip": "Пропустить", - "select_up_to_count_type": "Выберите до {count} {type}", - "select_genres": "Выберите жанр", - "add_genres": "Добавить жанр", - "country": "Страна", - "number_of_tracks_generate": "Количество треков для создания", - "acousticness": "Акустичность", - "danceability": "Ритмичность", - "energy": "Энергичность", - "instrumentalness": "Инструментальность", - "liveness": "Живость", - "loudness": "Громкость", - "speechiness": "Речевой характер", - "valence": "Значимость", - "popularity": "Популярность", - "key": "Ключ", - "duration": "Продолжительность (с)", - "tempo": "Темп (BPM)", - "mode": "Режим", - "time_signature": "Тактовый размер", - "short": "Короткий", - "medium": "Средний", - "long": "Длинный", - "min": "Минимум", - "max": "Максимум", - "target": "Цель", - "moderate": "Отобрать", - "deselect_all": "Убрать выделение со всех", - "select_all": "Выделить все", - "are_you_sure": "Вы уверены?", - "generating_playlist": "Создание собственного плейлиста...", - "selected_count_tracks": "Выбрано {count} треков", - "download_warning": "При скачивании всех треков пакетом вы фактически занимаетесь пиратством и наносите ущерб творческому обществу музыки. Надеюсь, что вы осознаете это. Всегда старайтесь уважать и поддерживать усилия исполнителей, вложенные в их творчество", - "download_ip_ban_warning": "Кроме того, стоит учитывать, что из-за чрезмерного количества запросов на скачивание ваш IP-адрес может быть заблокирован на YouTube. Блокировка IP означает, что вы не сможете использовать YouTube (даже если вы вошли в свою учетную запись) в течение, как минимум, 2-3 месяцев с того устройства, с которого были сделаны эти запросы. Важно заметить, что Spotube не несет ответственности за такие события", - "by_clicking_accept_terms": "Нажимая 'принять', вы соглашаетесь с следующими условиями:", - "download_agreement_1": "Я осознаю, что я использую музыку незаконно. Это плохо.", - "download_agreement_2": "Я бы поддержал исполнителей, где только смог, и делаю это, так как не имею средств на приобретение их творчества", - "download_agreement_3": "Я полностью осознаю, что мой IP-адрес может быть заблокирован на YouTube, и я не считаю Spotube или его владельцев/соавторов ответственными за какие-либо неприятности, вызванные моими текущими действиями", - "decline": "Отклонить", - "accept": "Принять", - "details": "Детали", - "youtube": "YouTube", - "channel": "Канал", - "likes": "Нравится", - "dislikes": "Не нравится", - "views": "Просмотров", - "streamUrl": "URL-адрес потока", - "stop": "Остановить", - "sort_newest": "Сортировать по самым новым добавленным", - "sort_oldest": "Сортировать по самым старым добавленным", - "sleep_timer": "Таймер сна", - "mins": "{minutes} Минут", - "hours": "{hours} Часы", - "hour": "{hours} Час", - "custom_hours": "Пользовательские часы", - "logs": "Журналы", - "developers": "Разработчики", - "not_logged_in": "Вы не выполнили вход", - "search_mode": "Режим поиска", - "audio_source": "Источник аудио", - "ok": "Ок", - "failed_to_encrypt": "Не удалось зашифровать", - "encryption_failed_warning": "Spotube использует шифрование для безопасного хранения ваших данных. Однако в этом случае произошла ошибка. Поэтому будет использовано небезопасное хранилище.\nЕсли вы используете Linux, убедитесь, что у вас установлен какой-либо инструмент для работы с секретами (gnome-keyring, kde-wallet, keepassxc и т.д.)", - "querying_info": "Запрос информации...", - "piped_api_down": "Piped API не отвечает", - "piped_down_error_instructions": "Экземпляр Piped {pipedInstance} в данный момент недоступен.\n\nВы можете либо изменить экземпляр, либо переключиться на использование официального API YouTube.\n\nНе забудьте перезапустить приложение после внесенных изменений", - "you_are_offline": "Нет доступа к сети", - "connection_restored": "Ваше интернет-соединение восстановлено", - "use_system_title_bar": "Использовать системную панель заголовка", - "crunching_results": "Обработка результатов...", - "search_to_get_results": "Поиск для получения результатов", - "use_amoled_mode": "Режим AMOLED", - "pitch_dark_theme": "Темная тема", - "normalize_audio": "Нормализовать звук", - "change_cover": "Изменить обложку", - "add_cover": "Добавить обложку", - "restore_defaults": "Восстановить настройки по умолчанию", - "download_music_codec": "Загрузить кодек для музыки", - "streaming_music_codec": "Кодек потоковой передачи музыки", - "login_with_lastfm": "Войти с помощью Last.fm", - "connect": "Подключить", - "disconnect_lastfm": "Отключиться от Last.fm", - "disconnect": "Отключить", - "username": "Имя пользователя", - "password": "Пароль", - "login": "Войти", - "login_with_your_lastfm": "Войти в свою учетную запись Last.fm", - "scrobble_to_lastfm": "Скробблинг на Last.fm", - "go_to_album": "Перейти к альбому", - "discord_rich_presence": "Богатое присутствие в Discord", - "browse_all": "Просмотреть все", - "genres": "Жанры", - "explore_genres": "Исследовать жанры", - "friends": "Друзья", - "no_lyrics_available": "Извините, не удается найти текст для этого трека", - "start_a_radio": "Запустить радио", - "how_to_start_radio": "Как вы хотите запустить радио?", - "replace_queue_question": "Хотите заменить текущую очередь или добавить к ней?", - "endless_playback": "Бесконечное воспроизведение", - "delete_playlist": "Удалить плейлист", - "delete_playlist_confirmation": "Вы уверены, что хотите удалить этот плейлист?", - "local_tracks": "Локальные треки", - "local_tab": "Локальное", - "song_link": "Ссылка на песню", - "skip_this_nonsense": "Пропустить этот бред", - "freedom_of_music": "“Свобода музыки”", - "freedom_of_music_palm": "“Свобода музыки в вашей ладони”", - "get_started": "Начнем", - "youtube_source_description": "Рекомендуется и лучше всего работает.", - "piped_source_description": "Чувствуете себя свободно? То же самое, что и YouTube, но намного бесплатно.", - "jiosaavn_source_description": "Лучший для Южно-Азиатского региона.", - "highest_quality": "Наивысшее качество: {quality}", - "select_audio_source": "Выберите аудиоисточник", - "endless_playback_description": "Автоматически добавляйте новые песни\nв конец очереди", - "choose_your_region": "Выберите ваш регион", - "choose_your_region_description": "Это поможет Spotube показать вам правильный контент\nдля вашего местоположения.", - "choose_your_language": "Выберите ваш язык", - "help_project_grow": "Помогите этому проекту расти", - "help_project_grow_description": "Spotube - это проект с открытым исходным кодом. Вы можете помочь этому проекту развиваться, внося вклад в проект, сообщая ошибках или предлагая новые функции.", - "contribute_on_github": "Внести вклад на GitHub", - "donate_on_open_collective": "Пожертвовать на Open Collective", - "browse_anonymously": "Анонимно просматривать", - "enable_connect": "Включить подключение", - "enable_connect_description": "Управление Spotube с других устройств", - "devices": "Устройства", - "select": "Выбрать", - "connect_client_alert": "Вас контролирует {client}", - "this_device": "Это устройство", - "remote": "Дистанционное управление", - "stats": "Статистика", - "update_playlist": "Обновить плейлист", - "and_n_more": "и {count} еще", - "recently_played": "Недавно воспроизведено", - "browse_more": "Посмотреть больше", - "no_title": "Без названия", - "not_playing": "Не воспроизводится", - "epic_failure": "Эпическое фиаско!", - "added_num_tracks_to_queue": "Добавлено {tracks_length} треков в очередь", - "spotube_has_an_update": "В Spotube доступно обновление", - "download_now": "Скачать сейчас", - "nightly_version": "Spotube Nightly {nightlyBuildNum} выпущен", - "release_version": "Spotube v{version} выпущен", - "read_the_latest": "Читать последние ", - "release_notes": "заметки о версии", - "pick_color_scheme": "Выберите цветовую схему", - "save": "Сохранить", - "choose_the_device": "Выберите устройство:", - "multiple_device_connected": "Подключено несколько устройств.\nВыберите устройство, на котором вы хотите выполнить это действие", - "nothing_found": "Ничего не найдено", - "the_box_is_empty": "Коробка пуста", - "top_artists": "Лучшие артисты", - "top_albums": "Лучшие альбомы", - "this_week": "На этой неделе", - "this_month": "В этом месяце", - "last_6_months": "Последние 6 месяцев", - "this_year": "В этом году", - "last_2_years": "Последние 2 года", - "all_time": "Все время", - "powered_by_provider": "При поддержке {providerName}", - "email": "Электронная почта", - "profile_followers": "Подписчики", - "birthday": "День рождения", - "subscription": "Подписка", - "not_born": "Не рожден", - "hacker": "Хакер", - "profile": "Профиль", - "no_name": "Без имени", - "edit": "Редактировать", - "user_profile": "Профиль пользователя", - "count_plays": "{count} воспроизведений", - "streaming_fees_hypothetical": "*Рассчитано на основе выплат Spotify за стрим\nот $0.003 до $0.005. Это гипотетический\nрасчет, чтобы показать пользователю, сколько бы он\nзаплатил артистам, если бы слушал их песни на Spotify.", - "count_mins": "{minutes} мин", - "summary_minutes": "минуты", - "summary_listened_to_music": "Слушанная музыка", - "summary_songs": "песни", - "summary_streamed_overall": "Всего стримов", - "summary_owed_to_artists": "К выплате артистам\nв этом месяце", - "summary_artists": "артиста", - "summary_music_reached_you": "Музыка дошла до вас", - "summary_full_albums": "полные альбомы", - "summary_got_your_love": "Получил вашу любовь", - "summary_playlists": "плейлисты", - "summary_were_on_repeat": "Были на повторе", - "total_money": "Всего {money}", - "minutes_listened": "Минут прослушивания", - "streamed_songs": "Стримленные песни", - "count_streams": "{count} стримов", - "owned_by_you": "Ваша собственность", - "copied_shareurl_to_clipboard": "{shareUrl} скопировано в буфер обмена", - "spotify_hipotetical_calculation": "*Это рассчитано на основе выплат Spotify за стрим\nот $0.003 до $0.005. Это гипотетический расчет,\nчтобы дать пользователю представление о том, сколько бы он\nзаплатил артистам, если бы слушал их песни на Spotify.", - "webview_not_found": "Webview не найден", - "webview_not_found_description": "На вашем устройстве не установлена среда выполнения Webview.\nЕсли он установлен, убедитесь, что он находится в environment PATH\n\nПосле установки перезапустите приложение", - "unsupported_platform": "Платформа не поддерживается", - "invidious_instance": "Экземпляр сервера Invidious", - "invidious_description": "Экземпляр сервера Invidious для сопоставления треков", - "invidious_warning": "Некоторые могут работать не очень хорошо. Используйте на свой страх и риск", - "invidious_source_description": "Похож на Piped, но с более высокой доступностью.", - "cache_music": "Кэшировать музыку", - "open": "Открыть", - "cache_folder": "Папка кэша", - "export": "Экспорт", - "clear_cache": "Очистить кэш", - "clear_cache_confirmation": "Вы хотите очистить кэш?", - "export_cache_files": "Экспортировать кэшированные файлы", - "found_n_files": "Найдено {count} файлов", - "export_cache_confirmation": "Вы хотите экспортировать эти файлы в", - "exported_n_out_of_m_files": "Экспортировано {filesExported} из {files} файлов", - "playlist": "Плейлист", - "no_loop": "Без повтора", - "generate": "Генерировать", - "undo": "Отменить", - "download_all": "Скачать все", - "add_all_to_playlist": "Добавить все в плейлист", - "add_all_to_queue": "Добавить все в очередь", - "play_all_next": "Воспроизвести все следующее", - "pause": "Пауза", - "view_all": "Просмотреть все", - "no_tracks_added_yet": "Похоже, вы ещё не добавили ни одного трека", - "no_tracks": "Похоже, здесь нет треков", - "no_tracks_listened_yet": "Похоже, вы ещё ничего не слушали", - "not_following_artists": "Вы не подписаны на художников", - "no_favorite_albums_yet": "Похоже, вы ещё не добавили ни одного альбома в избранное", - "no_logs_found": "Логи не найдены", - "youtube_engine": "YouTube Движок", - "youtube_engine_not_installed_title": "{engine} не установлен", - "youtube_engine_not_installed_message": "{engine} не установлен в вашей системе.", - "youtube_engine_set_path": "Убедитесь, что он доступен в переменной PATH или\nустановите абсолютный путь к исполнимому файлу {engine} ниже", - "youtube_engine_unix_issue_message": "В macOS/Linux/Unix-подобных ОС, установка пути в .zshrc/.bashrc/.bash_profile и т.д. не будет работать.\nВы должны установить путь в файле конфигурации оболочки", - "download": "Скачать", - "file_not_found": "Файл не найден", - "custom": "Пользовательский", - "add_custom_url": "Добавить пользовательский URL", - "edit_port": "Редактировать порт", - "port_helper_msg": "По умолчанию -1, что означает случайное число. Если у вас настроен брандмауэр, рекомендуется установить это.", - "connect_request": "Разрешить {client} подключение?", - "connection_request_denied": "Подключение отклонено. Пользователь отказал в доступе.", - "hipotetical_calculation": "*Это рассчитано на основе средней выплаты за прослушивание на онлайн-платформах для потоковой передачи музыки в размере от 0,003 до 0,005 долларов США. Это гипотетический расчет, чтобы дать пользователю представление о том, сколько бы они заплатили артистам, если бы слушали их песни на разных музыкальных стриминговых платформах.", - "an_error_occurred": "Произошла ошибка", - "copy_to_clipboard": "Скопировать в буфер обмена", - "view_logs": "Просмотреть журналы", - "retry": "Повторить", - "no_default_metadata_provider_selected": "Вы не выбрали поставщика метаданных по умолчанию", - "manage_metadata_providers": "Управление поставщиками метаданных", - "open_link_in_browser": "Открыть ссылку в браузере?", - "do_you_want_to_open_the_following_link": "Вы хотите открыть следующую ссылку", - "unsafe_url_warning": "Открытие ссылок из ненадежных источников может быть небезопасным. Будьте осторожны!\nВы также можете скопировать ссылку в буфер обмена.", - "copy_link": "Копировать ссылку", - "building_your_timeline": "Создание вашей временной шкалы на основе ваших прослушиваний...", - "official": "Официальный", - "author_name": "Автор: {author}", - "third_party": "Сторонний", - "plugin_requires_authentication": "Плагин требует аутентификации", - "update_available": "Доступно обновление", - "supports_scrobbling": "Поддерживает скробблинг", - "plugin_scrobbling_info": "Этот плагин скробблит вашу музыку для создания вашей истории прослушиваний.", - "default_plugin": "По умолчанию", - "set_default": "Установить по умолчанию", - "support": "Поддержка", - "support_plugin_development": "Поддержать разработку плагина", - "can_access_name_api": "- Может получить доступ к API **{name}**", - "do_you_want_to_install_this_plugin": "Вы хотите установить этот плагин?", - "third_party_plugin_warning": "Этот плагин из стороннего репозитория. Пожалуйста, убедитесь, что вы доверяете источнику перед установкой.", - "author": "Автор", - "this_plugin_can_do_following": "Этот плагин может выполнять следующее", - "install": "Установить", - "install_a_metadata_provider": "Установить поставщика метаданных", - "no_tracks_playing": "В настоящее время не воспроизводится ни один трек", - "synced_lyrics_not_available": "Синхронизированные тексты недоступны для этой песни. Пожалуйста, используйте вкладку", - "plain_lyrics": "Простые тексты", - "tab_instead": "вместо этого.", - "disclaimer": "Отказ от ответственности", - "third_party_plugin_dmca_notice": "Команда Spotube не несет никакой ответственности (в том числе юридической) за какие-либо \"сторонние\" плагины.\nПожалуйста, используйте их на свой страх и риск. О любых ошибках/проблемах сообщайте в репозиторий плагина.\n\nЕсли какой-либо \"сторонний\" плагин нарушает ToS/DMCA какого-либо сервиса/юридического лица, пожалуйста, попросите автора плагина \"стороннего\" или хостинговую платформу, например, GitHub/Codeberg, принять меры. Перечисленные выше (помеченные как \"сторонние\") являются общедоступными/поддерживаемыми сообществом плагинами. Мы не курируем их, поэтому не можем принимать по ним никаких мер.\n\n", - "input_does_not_match_format": "Введенные данные не соответствуют требуемому формату", - "metadata_provider_plugins": "Плагины поставщика метаданных", - "paste_plugin_download_url": "Вставьте URL-адрес для загрузки или URL-адрес репозитория GitHub/Codeberg или прямую ссылку на файл .smplug", - "download_and_install_plugin_from_url": "Загрузить и установить плагин по URL-адресу", - "failed_to_add_plugin_error": "Не удалось добавить плагин: {error}", - "upload_plugin_from_file": "Загрузить плагин из файла", - "installed": "Установлено", - "available_plugins": "Доступные плагины", - "configure_your_own_metadata_plugin": "Настройте свой собственный поставщик метаданных для плейлиста/альбома/артиста/ленты", - "audio_scrobblers": "Аудио скробблеры", - "scrobbling": "Скробблинг", - "download_music_format": "Формат загрузки музыки", - "streaming_music_format": "Формат потоковой музыки", - "download_music_quality": "Качество загрузки", - "streaming_music_quality": "Качество стриминга", - "default_metadata_source": "Источник метаданных по умолчанию", - "set_default_metadata_source": "Задать источник метаданных по умолчанию", - "default_audio_source": "Источник аудио по умолчанию", - "set_default_audio_source": "Задать источник аудио по умолчанию", - "plugins": "Плагины", - "configure_plugins": "Настройте собственные плагины провайдеров метаданных и источников аудио", - "source": "Источник: ", - "uncompressed": "Несжатый", - "dab_music_source_description": "Для аудиофилов. Предоставляет высококачественные/lossless аудиопотоки. Точное совпадение треков по ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_ta.arb b/lib/l10n/app_ta.arb deleted file mode 100644 index 6cea7b1a..00000000 --- a/lib/l10n/app_ta.arb +++ /dev/null @@ -1,492 +0,0 @@ -{ - "guest": "விருந்தினர்", - "browse": "உலாவு", - "search": "தேடுக", - "library": "நூலகம்", - "lyrics": "பாடல் வரிகள்", - "settings": "அமைப்புகள்", - "genre_categories_filter": "வகைகள் அல்லது பாணிகளை வடிகட்டுக...", - "genre": "பாணி", - "personalized": "தனிப்பயனாக்கப்பட்ட", - "featured": "சிறப்பிடம் பெற்ற", - "new_releases": "புதிய வெளியீடுகள்", - "songs": "பாடல்கள்", - "playing_track": "{track} இயங்குகிறது", - "queue_clear_alert": "இது தற்போதைய வரிசையை அழிக்கும். {track_length} பாடல்கள் நீக்கப்படும்\nதொடர விரும்புகிறீர்களா?", - "load_more": "மேலும் ஏற்றுக", - "playlists": "பாடல் பட்டியல்கள்", - "artists": "கலைஞர்கள்", - "albums": "ஆல்பங்கள்", - "tracks": "பாடல்கள்", - "downloads": "பதிவிறக்கங்கள்", - "filter_playlists": "உங்கள் பாடல் பட்டியல்களை வடிகட்டுக...", - "liked_tracks": "விரும்பிய பாடல்கள்", - "liked_tracks_description": "உங்கள் விரும்பிய பாடல்கள் அனைத்தும்", - "playlist": "பாடல் பட்டியல்", - "create_a_playlist": "பாடல் பட்டியலை உருவாக்குக", - "update_playlist": "பாடல் பட்டியலைப் புதுப்பிக்க", - "create": "உருவாக்கு", - "cancel": "ரத்து செய்", - "update": "புதுப்பி", - "playlist_name": "பாடல் பட்டியல் பெயர்", - "name_of_playlist": "பாடல் பட்டியலின் பெயர்", - "description": "விளக்கம்", - "public": "பொது", - "collaborative": "கூட்டு", - "search_local_tracks": "உள்ளூர் பாடல்களைத் தேடுக...", - "play": "இயக்கு", - "delete": "அழி", - "none": "எதுவுமில்லை", - "sort_a_z": "A-Z வரிசைப்படுத்து", - "sort_z_a": "Z-A வரிசைப்படுத்து", - "sort_artist": "கலைஞர் மூலம் வரிசைப்படுத்து", - "sort_album": "ஆல்பம் மூலம் வரிசைப்படுத்து", - "sort_duration": "கால அளவு மூலம் வரிசைப்படுத்து", - "sort_tracks": "பாடல்களை வரிசைப்படுத்து", - "currently_downloading": "தற்போது பதிவிறக்குகிறது ({tracks_length})", - "cancel_all": "அனைத்தையும் ரத்து செய்", - "filter_artist": "கலைஞர்களை வடிகட்டுக...", - "followers": "{followers} பின்தொடர்பவர்கள்", - "add_artist_to_blacklist": "கலைஞரை தடைப்பட்டியலில் சேர்க்க", - "top_tracks": "சிறந்த பாடல்கள்", - "fans_also_like": "ரசிகர்கள் விரும்புவது", - "loading": "ஏற்றுகிறது...", - "artist": "கலைஞர்", - "blacklisted": "தடைப்பட்டியலில் உள்ளது", - "following": "பின்தொடர்கிறது", - "follow": "பின்தொடர்", - "artist_url_copied": "கலைஞர் URL கிளிப்போர்டுக்கு நகலெடுக்கப்பட்டது", - "added_to_queue": "{tracks} பாடல்கள் வரிசையில் சேர்க்கப்பட்டன", - "filter_albums": "ஆல்பங்களை வடிகட்டுக...", - "synced": "ஒத்திசைக்கப்பட்டது", - "plain": "சாதாரண", - "shuffle": "கலக்கு", - "search_tracks": "பாடல்களைத் தேடுக...", - "released": "வெளியிடப்பட்டது", - "error": "பிழை {error}", - "title": "தலைப்பு", - "time": "நேரம்", - "more_actions": "மேலும் செயல்கள்", - "download_count": "பதிவிறக்கு ({count})", - "add_count_to_playlist": "({count}) பாடல் பட்டியலில் சேர்", - "add_count_to_queue": "({count}) வரிசையில் சேர்", - "play_count_next": "({count}) அடுத்து இயக்கு", - "album": "ஆல்பம்", - "copied_to_clipboard": "{data} கிளிப்போர்டுக்கு நகலெடுக்கப்பட்டது", - "add_to_following_playlists": "{track} பின்வரும் பாடல் பட்டியல்களில் சேர்", - "add": "சேர்", - "added_track_to_queue": "{track} வரிசையில் சேர்க்கப்பட்டது", - "add_to_queue": "வரிசையில் சேர்", - "track_will_play_next": "{track} அடுத்து இயக்கப்படும்", - "play_next": "அடுத்து இயக்கு", - "removed_track_from_queue": "{track} வரிசையிலிருந்து நீக்கப்பட்டது", - "remove_from_queue": "வரிசையிலிருந்து நீக்கு", - "remove_from_favorites": "பிடித்தவையிலிருந்து நீக்கு", - "save_as_favorite": "பிடித்தவையாக சேமி", - "add_to_playlist": "பாடல் பட்டியலில் சேர்", - "remove_from_playlist": "பாடல் பட்டியலிலிருந்து நீக்கு", - "add_to_blacklist": "தடைப்பட்டியலில் சேர்", - "remove_from_blacklist": "தடைப்பட்டியலிலிருந்து நீக்கு", - "share": "பகிர்", - "mini_player": "சிறிய இயக்கி", - "slide_to_seek": "முன்னோக்கி அல்லது பின்னோக்கி செல்ல சறுக்கவும்", - "shuffle_playlist": "பாடல் பட்டியலை கலக்கு", - "unshuffle_playlist": "பாடல் பட்டியலை கலக்காதே", - "previous_track": "முந்தைய பாடல்", - "next_track": "அடுத்த பாடல்", - "pause_playback": "இயக்கத்தை நிறுத்து", - "resume_playback": "இயக்கத்தை தொடர்", - "loop_track": "பாடலை சுழற்று", - "no_loop": "சுழற்சி இல்லை", - "repeat_playlist": "பாடல் பட்டியலை மீண்டும் இயக்கு", - "queue": "வரிசை", - "alternative_track_sources": "மாற்று பாடல் மூலங்கள்", - "download_track": "பாடலைப் பதிவிறக்கு", - "tracks_in_queue": "வரிசையில் {tracks} பாடல்கள்", - "clear_all": "அனைத்தையும் அழி", - "show_hide_ui_on_hover": "மேலே வரும்போது UI ஐக் காட்டு/மறை", - "always_on_top": "எப்போதும் மேலே", - "exit_mini_player": "சிறிய இயக்கியிலிருந்து வெளியேறு", - "download_location": "பதிவிறக்க இடம்", - "local_library": "உள்ளூர் நூலகம்", - "add_library_location": "நூலகத்தில் சேர்", - "remove_library_location": "நூலகத்திலிருந்து நீக்கு", - "account": "கணக்கு", - "login_with_spotify": "உங்கள் Spotify கணக்கில் உள்நுழைக", - "connect_with_spotify": "Spotify உடன் இணைக்கவும்", - "logout": "வெளியேறு", - "logout_of_this_account": "இந்த கணக்கிலிருந்து வெளியேறு", - "language_region": "மொழி & பிராந்தியம்", - "language": "மொழி", - "system_default": "கணினி இயல்புநிலை", - "market_place_region": "சந்தை பிராந்தியம்", - "recommendation_country": "பரிந்துரை நாடு", - "appearance": "தோற்றம்", - "layout_mode": "அமைப்பு முறை", - "override_layout_settings": "தளவமைப்பு அமைப்புகளை மாற்றியமை", - "adaptive": "தகவமைப்பு", - "compact": "சுருக்கமான", - "extended": "விரிவான", - "theme": "தீம்", - "dark": "இருள்", - "light": "வெளிர்", - "system": "கணினி வழி", - "accent_color": "அழுத்த நிறம்", - "sync_album_color": "ஆல்பம் நிறத்தை ஒத்திசை", - "sync_album_color_description": "ஆல்பம் படத்தின் முக்கிய நிறத்தை அழுத்த நிறமாகப் பயன்படுத்துகிறது", - "playback": "பின்னணி", - "audio_quality": "ஒலி தரம்", - "high": "உயர்", - "low": "குறைந்த", - "pre_download_play": "முன்பதிவிறக்கம் மற்றும் இயக்கம்", - "pre_download_play_description": "ஒலியை ஸ்ட்ரீம் செய்வதற்குப் பதிலாக, பைட்டுகளைப் பதிவிறக்கி இயக்கவும் (அதிக பேண்ட்விட்த் பயனர்களுக்கு பரிந்துரைக்கப்படுகிறது)", - "skip_non_music": "இசையல்லாத பகுதிகளைத் தவிர் (SponsorBlock)", - "blacklist_description": "தடைசெய்யப்பட்ட பாடல்கள் மற்றும் கலைஞர்கள்", - "wait_for_download_to_finish": "தற்போதைய பதிவிறக்கம் முடியும் வரை காத்திருக்கவும்", - "desktop": "கணினி", - "close_behavior": "மூடும் நடத்தை", - "close": "மூடு", - "minimize_to_tray": "ட்ரேயை குறைக்கவும்", - "show_tray_icon": "ட்ரே ஐகானைக் காட்டு", - "about": "பற்றி", - "u_love_spotube": "நீங்கள் Spotube ஐ நேசிக்கிறீர்கள் என்பது எங்களுக்குத் தெரியும்", - "check_for_updates": "புதுப்பிப்புகளைச் சரிபார்", - "about_spotube": "Spotube பற்றி", - "blacklist": "தடைப்பட்டியல்", - "please_sponsor": "தயவுசெய்து ஆதரவு/நன்கொடை அளியுங்கள்", - "spotube_description": "Spotube, ஒரு லேசான, பல தளங்களில் இயங்கும், அனைவருக்கும் இலவசமான spotify கிளையன்ட்", - "version": "பதிப்பு", - "build_number": "கட்டமைப்பு எண்", - "founder": "நிறுவனர்", - "repository": "களஞ்சியம்", - "bug_issues": "பிழை_சிக்கல்கள்", - "made_with": "வங்காளதேசத்திலிருந்து🇧🇩 ❤️ உருவாக்கப்பட்டது", - "kingkor_roy_tirtho": "கிங்கர் ராய் திர்தோ", - "copyright": "© 2021-{current_year} கிங்கர் ராய் திர்தோ", - "license": "உரிமம்", - "add_spotify_credentials": "தொடங்குவதற்கு உங்கள் spotify சான்றுகளைச் சேர்க்கவும்", - "credentials_will_not_be_shared_disclaimer": "கவலைப்பட வேண்டாம், உங்கள் சான்றுகள் எதுவும் சேகரிக்கப்படாது அல்லது யாருடனும் பகிரப்படாது", - "know_how_to_login": "இதை எப்படி செய்வது என்று தெரியவில்லையா?", - "follow_step_by_step_guide": "படிப்படியான வழிகாட்டியைப் பின்பற்றவும்", - "spotify_cookie": "Spotify {name} நட்புநிரல்", - "cookie_name_cookie": "{name} நட்புநிரல்", - "fill_in_all_fields": "அனைத்து களங்களையும் நிரப்பவும்", - "submit": "சமர்ப்பி", - "exit": "வெளியேறு", - "previous": "முந்தைய", - "next": "அடுத்து", - "done": "முடிந்தது", - "step_1": "முதல் படி", - "first_go_to": "முதலில், செல்லவேண்டியது", - "login_if_not_logged_in": "நீங்கள் உள்நுழையவில்லை என்றால் உள்நுழைக/பதிவுசெய்க", - "step_2": "இரண்டாம் படி", - "step_2_steps": "1. நீங்கள் உள்நுழைந்தவுடன், F12 ஐ அழுத்தவும் அல்லது வலது கிளிக் செய்து > ஆய்வு செய்யவும் உலாவி டெவ்டூல்களைத் திறக்கவும்.\n2. பின்னர் \"பயன்பாடு\" தாவலுக்குச் செல்லவும் (Chrome, Edge, Brave போன்றவை) அல்லது \"சேமிப்பகம்\" தாவல் (Firefox, Palemoon போன்றவை)\n3. \"குக்கிகள்\" பிரிவுக்குச் சென்று பின்னர் \"https://accounts.spotify.com\" பிரிவுக்குச் செல்லவும்", - "step_3": "மூன்றாம் படி", - "step_3_steps": "\"sp_dc\" நட்புநிரலின் மதிப்பை நகலெடுக்கவும்", - "success_emoji": "வெற்றி🥳", - "success_message": "இப்போது நீங்கள் உங்கள் Spotify கணக்கில் வெற்றிகரமாக உள்நுழைந்துள்ளீர்கள். நல்லது, நண்பரே!", - "step_4": "நான்காம் படி", - "step_4_steps": "நகலெடுக்கப்பட்ட \"sp_dc\" மதிப்பை ஒட்டவும்", - "something_went_wrong": "ஏதோ தவறு நடந்துவிட்டது", - "piped_instance": "Piped சேவையகம் நிகழ்வு", - "piped_description": "பாடல் பொருத்தத்திற்குப் பயன்படுத்த வேண்டிய Piped சேவையகம் நிகழ்வு", - "piped_warning": "அவற்றில் சில நன்றாக வேலை செய்யாமல் இருக்கலாம். எனவே உங்கள் சொந்த ஆபத்தில் பயன்படுத்தவும்", - "invidious_instance": "Invidious சேவையக நிகழ்வு", - "invidious_description": "பாடல் பொருத்தத்திற்குப் பயன்படுத்த வேண்டிய Invidious சேவையக நிகழ்வு", - "invidious_warning": "அவற்றில் சில நன்றாக வேலை செய்யாமல் இருக்கலாம். எனவே உங்கள் சொந்த ஆபத்தில் பயன்படுத்தவும்", - "generate": "உருவாக்கு", - "track_exists": "பாடல் {track} ஏற்கனவே உள்ளது", - "replace_downloaded_tracks": "பதிவிறக்கம் செய்யப்பட்ட அனைத்து பாடல்களையும் மாற்றவும்", - "skip_download_tracks": "பதிவிறக்கம் செய்யப்பட்ட அனைத்து பாடல்களையும் தவிர்க்கவும்", - "do_you_want_to_replace": "ஏற்கனவே உள்ள பாடலை மாற்ற விரும்புகிறீர்களா?", - "replace": "மாற்று", - "skip": "தவிர்", - "select_up_to_count_type": "{count} {type} வரை தேர்ந்தெடுக்கவும்", - "select_genres": "வகைகளைத் தேர்ந்தெடுக்கவும்", - "add_genres": "வகைகளைச் சேர்க்கவும்", - "country": "நாடு", - "number_of_tracks_generate": "உருவாக்க வேண்டிய பாடல்களின் எண்ணிக்கை", - "acousticness": "அகவுஸ்டிக்னெஸ்", - "danceability": "நடனத்தன்மை", - "energy": "ஆற்றல்", - "instrumentalness": "கருவித்தன்மை", - "liveness": "உயிர்ப்புத்தன்மை", - "loudness": "ஒலி அளவு", - "speechiness": "பேச்சுத்தன்மை", - "valence": "உணர்வு", - "popularity": "பிரபலம்", - "key": "இசை குறிப்பு", - "duration": "கால அளவு (வினாடிகள்)", - "tempo": "வேகம் (BPM)", - "mode": "முறை", - "time_signature": "நேர கையொப்பம்", - "short": "குறுகிய", - "medium": "நடுத்தர", - "long": "நீண்ட", - "min": "குறைந்தபட்சம்", - "max": "அதிகபட்சம்", - "target": "இலக்கு", - "moderate": "மிதமான", - "deselect_all": "அனைத்தையும் தேர்வுநீக்கு", - "select_all": "அனைத்தையும் தேர்ந்தெடு", - "are_you_sure": "உறுதியாக இருக்கிறீர்களா?", - "generating_playlist": "உங்கள் தனிப்பயன்பாட்டிற்கான பாடல் பட்டியலை உருவாக்குகிறது...", - "selected_count_tracks": "{count} பாடல்கள் தேர்ந்தெடுக்கப்பட்டன", - "download_warning": "நீங்கள் அனைத்து பாடல்களையும் மொத்தமாக பதிவிறக்கினால், நீங்கள் தெளிவாக இசையைத் திருடுகிறீர்கள் மற்றும் இசையின் படைப்பாற்றல் சமூகத்திற்கு சேதம் விளைவிக்கிறீர்கள். நீங்கள் இதை அறிந்திருக்கிறீர்கள் என்று நம்புகிறேன். எப்போதும், கலைஞரின் கடின உழைப்பை மதித்து ஆதரிக்க முயற்சி செய்யுங்கள்", - "download_ip_ban_warning": "மேலும், அதிகப்படியான பதிவிறக்க கோரிக்கைகள் காரணமாக உங்கள் IP YouTube இல் தடைசெய்யப்படலாம். IP தடை என்பது குறைந்தது 2-3 மாதங்களுக்கு அந்த IP சாதனத்திலிருந்து YouTube ஐப் பயன்படுத்த முடியாது (நீங்கள் உள்நுழைந்திருந்தாலும் கூட). இது ஒருபோதும் நடந்தால் Spotube பொறுப்பேற்காது", - "by_clicking_accept_terms": "'ஏற்றுக்கொள்' என்பதைக் கிளிக் செய்வதன் மூலம் பின்வரும் விதிமுறைகளுக்கு நீங்கள் ஒப்புக்கொள்கிறீர்கள்:", - "download_agreement_1": "நான் இசையைத் திருடுகிறேன் என்பது எனக்குத் தெரியும். நான் கெட்டவன்", - "download_agreement_2": "நான் கலைஞரை முடிந்தவரை ஆதரிப்பேன், அவர்களின் கலைக்கு பணம் செலுத்த எனக்கு பணம் இல்லாததால் மட்டுமே இதைச் செய்கிறேன்", - "download_agreement_3": "என் IP YouTube இல் தடைசெய்யப்படலாம் என்பதை நான் முழுமையாக அறிவேன், மேலும் என் தற்போதைய செயலால் ஏற்படும் எந்த விபத்துகளுக்கும் Spotube அல்லது அதன் உரிமையாளர்கள்/பங்களிப்பாளர்களை பொறுப்பாக்க மாட்டேன்", - "decline": "மறு", - "accept": "ஏற்றுக்கொள்", - "details": "விவரங்கள்", - "youtube": "YouTube", - "channel": "சேனல்", - "likes": "விருப்பங்கள்", - "dislikes": "விருப்பமில்லாதவை", - "views": "பார்வைகள்", - "streamUrl": "ஸ்ட்ரீம் URL", - "stop": "நிறுத்து", - "sort_newest": "புதிதாக சேர்க்கப்பட்டவற்றை வரிசைப்படுத்து", - "sort_oldest": "பழமையானவற்றை வரிசைப்படுத்து", - "sleep_timer": "உறக்க நேரம்", - "mins": "{minutes} நிமிடங்கள்", - "hours": "{hours} மணிநேரங்கள்", - "hour": "{hours} மணிநேரம்", - "custom_hours": "தனிப்பயன் மணிநேரங்கள்", - "logs": "பதிவுகள்", - "developers": "உருவாக்குநர்கள்", - "not_logged_in": "நீங்கள் உள்நுழையவில்லை", - "search_mode": "தேடல் முறை", - "audio_source": "ஒலி மூலம்", - "ok": "சரி", - "failed_to_encrypt": "குறியாக்கம் தோல்வியடைந்தது", - "encryption_failed_warning": "Spotube உங்கள் தரவை பாதுகாப்பாக சேமிக்க குறியாக்கத்தைப் பயன்படுத்துகிறது. ஆனால் அவ்வாறு செய்ய முடியவில்லை. எனவே இது பாதுகாப்பற்ற சேமிப்பகத்திற்கு மாறும்\nநீங்கள் லினக்ஸ் பயன்படுத்துகிறீர்கள் என்றால், எந்த ரகசிய சேவையும் (gnome-keyring, kde-wallet, keepassxc போன்றவை) நிறுவப்பட்டுள்ளதா என்பதை உறுதிப்படுத்தவும்", - "querying_info": "தகவலைக் கேட்கிறது...", - "piped_api_down": "Piped API செயலிழந்துள்ளது", - "piped_down_error_instructions": "Piped நிகழ்வு {pipedInstance} தற்போது செயலிழந்துள்ளது\n\nநிகழ்வை மாற்றவும் அல்லது 'API வகை'யை அதிகாரப்பூர்வ YouTube API க்கு மாற்றவும்\n\nமாற்றத்திற்குப் பிறகு பயன்பாட்டை மறுதொடக்கம் செய்வதை உறுதிப்படுத்தவும்", - "you_are_offline": "நீங்கள் தற்போது ஆஃப்லைனில் உள்ளீர்கள்", - "connection_restored": "உங்கள் இணைய இணைப்பு மீட்டெடுக்கப்பட்டது", - "use_system_title_bar": "கணினி தலைப்புப் பட்டியைப் பயன்படுத்தவும்", - "crunching_results": "முடிவுகளை செயலாக்குகிறது...", - "search_to_get_results": "முடிவுகளைப் பெற தேடவும்", - "use_amoled_mode": "கருமை நிற இருண்ட தீம்", - "pitch_dark_theme": "AMOLED முறை", - "normalize_audio": "ஒலியை சீரமை", - "change_cover": "அட்டையை மாற்று", - "add_cover": "அட்டையைச் சேர்", - "restore_defaults": "இயல்புநிலைகளை மீட்டமை", - "download_music_codec": "இசை கோடெக்கை பதிவிறக்கு", - "streaming_music_codec": "இசை கோடெக்கை ஸ்ட்ரீம் செய்", - "login_with_lastfm": "Last.fm உடன் உள்நுழைக", - "connect": "இணை", - "disconnect_lastfm": "Last.fm இலிருந்து துண்டி", - "disconnect": "துண்டி", - "username": "பயனர்பெயர்", - "password": "கடவுச்சொல்", - "login": "உள்நுழைக", - "login_with_your_lastfm": "உங்கள் Last.fm கணக்குடன் உள்நுழைக", - "scrobble_to_lastfm": "Last.fm க்கு ஸ்க்ரோபிள் செய்", - "go_to_album": "ஆல்பத்திற்குச் செல்", - "discord_rich_presence": "Discord செழுமையான தோற்றம்", - "browse_all": "அனைத்தையும் உலாவு", - "genres": "வகைகள்", - "explore_genres": "வகைகளை ஆராயுங்கள்", - "friends": "நண்பர்கள்", - "no_lyrics_available": "மன்னிக்கவும், இந்தப் பாடலுக்கான பாடல் வரிகளைக் கண்டுபிடிக்க முடியவில்லை", - "start_a_radio": "வானொலியைத் தொடங்கு", - "how_to_start_radio": "வானொலியை எவ்வாறு தொடங்க விரும்புகிறீர்கள்?", - "replace_queue_question": "தற்போதைய வரிசையை மாற்ற விரும்புகிறீர்களா அல்லது அதனுடன் சேர்க்க விரும்புகிறீர்களா?", - "endless_playback": "முடிவற்ற இயக்கம்", - "delete_playlist": "பாடல் பட்டியலை நீக்கு", - "delete_playlist_confirmation": "இந்த பாடல் பட்டியலை நீக்க விரும்புகிறீர்களா?", - "local_tracks": "உள்ளூர் பாடல்கள்", - "local_tab": "உள்ளூர்", - "song_link": "பாடல் இணைப்பு", - "skip_this_nonsense": "இந்த அர்த்தமற்றதைத் தவிர்", - "freedom_of_music": "\"இசையின் சுதந்திரம்\"", - "freedom_of_music_palm": "\"உங்கள் கைகளில் இசையின் சுதந்திரம்\"", - "get_started": "தொடங்குவோம்", - "youtube_source_description": "பரிந்துரைக்கப்படுகிறது மற்றும் சிறப்பாக செயல்படுகிறது.", - "piped_source_description": "சுதந்திரமாக உணர்கிறீர்களா? YouTube போலவே ஆனால் மிகவும் சுதந்திரமானது.", - "jiosaavn_source_description": "தெற்காசியப் பிராந்தியத்திற்கு சிறந்தது.", - "invidious_source_description": "Piped ஐப் போன்றது ஆனால் அதிக கிடைக்கும் தன்மையுடன்.", - "highest_quality": "உயர்ந்த தரம்: {quality}", - "select_audio_source": "ஒலி மூலத்தைத் தேர்ந்தெடுக்கவும்", - "endless_playback_description": "வரிசையின் இறுதியில் புதிய பாடல்களை\nதானாகவே சேர்க்கவும்", - "choose_your_region": "உங்கள் பிராந்தியத்தைத் தேர்ந்தெடுக்கவும்", - "choose_your_region_description": "இது உங்கள் இருப்பிடத்திற்கான சரியான உள்ளடக்கத்தை\nSpotube காட்ட உதவும்.", - "choose_your_language": "உங்கள் மொழியைத் தேர்ந்தெடுக்கவும்", - "help_project_grow": "இந்த திட்டம் வளர உதவுங்கள்", - "help_project_grow_description": "Spotube ஒரு திறந்த மூல திட்டம். திட்டத்திற்கு பங்களிப்பு செய்வதன் மூலம், பிழைகளைப் புகாரளிப்பதன் மூலம் அல்லது புதிய அம்சங்களைப் பரிந்துரைப்பதன் மூலம் இந்தத் திட்டம் வளர உதவலாம்.", - "contribute_on_github": "GitHub இல் பங்களியுங்கள்", - "donate_on_open_collective": "Open Collective இல் நன்கொடை அளியுங்கள்", - "browse_anonymously": "அநாமதேயமாக உலாவுக", - "enable_connect": "இணைப்பை இயக்கு", - "enable_connect_description": "மற்ற சாதனங்களிலிருந்து Spotube ஐக் கட்டுப்படுத்தவும்", - "devices": "சாதனங்கள்", - "select": "தேர்ந்தெடு", - "connect_client_alert": "நீங்கள் {client} ஆல் கட்டுப்படுத்தப்படுகிறீர்கள்", - "this_device": "இந்த சாதனம்", - "remote": "தொலைநிலை", - "stats": "புள்ளிவிவரங்கள்", - "and_n_more": "மற்றும் {count} கூடுதலாக", - "recently_played": "சமீபத்தில் இயக்கியவை", - "browse_more": "மேலும் உலாவு", - "no_title": "தலைப்பு இல்லை", - "not_playing": "இயக்கப்படவில்லை", - "epic_failure": "மோசமான தோல்வி!", - "added_num_tracks_to_queue": "{tracks_length} பாடல்கள் வரிசையில் சேர்க்கப்பட்டன", - "spotube_has_an_update": "Spotube க்கு ஒரு புதுப்பிப்பு உள்ளது", - "download_now": "இப்போது பதிவிறக்கு", - "nightly_version": "Spotube Nightly {nightlyBuildNum} வெளியிடப்பட்டுள்ளது", - "release_version": "Spotube v{version} வெளியிடப்பட்டுள்ளது", - "read_the_latest": "சமீபத்திய ", - "release_notes": "வெளியீட்டு குறிப்புகளைப் படிக்கவும்", - "pick_color_scheme": "வண்ணத் திட்டத்தைத் தேர்ந்தெடுக்கவும்", - "save": "சேமி", - "choose_the_device": "சாதனத்தைத் தேர்ந்தெடுக்கவும்:", - "multiple_device_connected": "பல சாதனங்கள் இணைக்கப்பட்டுள்ளன.\nஇந்த செயல் நடைபெற வேண்டிய சாதனத்தைத் தேர்ந்தெடுக்கவும்", - "nothing_found": "எதுவும் கிடைக்கவில்லை", - "the_box_is_empty": "பெட்டி காலியாக உள்ளது", - "top_artists": "சிறந்த கலைஞர்கள்", - "top_albums": "சிறந்த ஆல்பங்கள்", - "this_week": "இந்த வாரம்", - "this_month": "இந்த மாதம்", - "last_6_months": "கடந்த 6 மாதங்கள்", - "this_year": "இந்த ஆண்டு", - "last_2_years": "கடந்த 2 ஆண்டுகள்", - "all_time": "எல்லா நேரமும்", - "powered_by_provider": "{providerName} ஆல் இயக்கப்படுகிறது", - "email": "மின்னஞ்சல்", - "profile_followers": "பின்தொடர்பவர்கள்", - "birthday": "பிறந்த நாள்", - "subscription": "சந்தா", - "not_born": "பிறக்கவில்லை", - "hacker": "ஹேக்கர்", - "profile": "சுயவிவரம்", - "no_name": "பெயர் இல்லை", - "edit": "திருத்து", - "user_profile": "பயனர் சுயவிவரம்", - "count_plays": "{count} முறை இசைக்கப்பட்டது", - "streaming_fees_hypothetical": "ஸ்ட்ரீமிங் கட்டணங்கள் (கற்பனை)", - "minutes_listened": "காலம் கேட்டது", - "streamed_songs": "ஸ்ட்ரீமிங் செய்யப்பட்ட பாடல்கள்", - "count_streams": "{count} ஸ்ட்ரீம்கள்", - "owned_by_you": "உங்களால் கொண்டது", - "copied_shareurl_to_clipboard": "நகலெடுக்கப்பட்டது {shareUrl} கிளிப்போர்டுக்காக", - "spotify_hipotetical_calculation": "*இது Spotify இன் ஒவ்வொரு ஸ்ட்ரீமிற்கும்\n$0.003 முதல் $0.005 வரை அளவீடு அடிப்படையில் கணக்கிடப்படுகிறது. இது ஒரு கற்பனை\nகணக்கீடு ஆகும், பயனர் எந்த அளவிற்கு கலைஞர்களுக்கு\nஅதோர் பாடலை Spotify மென்பொருளில் கேட்டால் எவ்வளவு பணம் செலுத்தினார்கள் என்பதைக் கண்டுபிடிக்க.", - "count_mins": "{minutes} நிமிடங்கள்", - "summary_minutes": "நிமிடங்கள்", - "summary_listened_to_music": "இசை கேட்டது", - "summary_songs": "பாடல்கள்", - "summary_streamed_overall": "மொத்தமாக ஸ்ட்ரீமிங்", - "summary_owed_to_artists": "கலைஞர்களுக்கு\nஇந்த மாதம் சொந்தமானது", - "summary_artists": "கலைஞர்கள்", - "summary_music_reached_you": "இசை உங்களுக்கு வந்தது", - "summary_full_albums": "முழு ஆல்பங்கள்", - "summary_got_your_love": "உங்கள் அன்பை பெற்றுக்கொண்டேன்", - "summary_playlists": "பாடல் பட்டியல்கள்", - "summary_were_on_repeat": "மீண்டும் மீண்டும் இருந்தன", - "total_money": "மொத்தம் {money}", - "webview_not_found": "வெப்வியூ கிடைக்கவில்லை", - "webview_not_found_description": "உங்கள் சாதனத்தில் எந்தவொரு வெப்வியூ இயக்கத்தை நிறுவவில்லை.\nஇது நிறுவப்பட்டிருந்தால், சுற்றுச்சூழல் பாதையில் PATH உள்ளது என்பதை உறுதிபடுத்தவும்\n\nநிறுவித்த பிறகு, செயலியை மறுதொடக்கம் செய்யவும்", - "unsupported_platform": "அதிர்ஷ்டகாத உருப்படியை ஆதரிக்கவில்லை", - "cache_music": "இசையை கேஷ் செய்", - "open": "திறக்கவும்", - "cache_folder": "கேஷ் அடைவு", - "export": "ஏற்றுமதி", - "clear_cache": "கேஷ் அழிக்கவும்", - "clear_cache_confirmation": "கேஷைப் அழிக்க விரும்புகிறீர்களா?", - "export_cache_files": "கேஷில் உள்ள கோப்புகளை ஏற்றுமதி செய்யவும்", - "found_n_files": "{count} கோப்புகள் கிடைத்தன", - "export_cache_confirmation": "இந்த கோப்புகளை ஏற்றுமதி செய்ய விரும்புகிறீர்களா?", - "exported_n_out_of_m_files": "{filesExported} கோப்புகள் ஏற்றுமதி செய்யப்பட்டன, {files} கோப்புகளில்", - "undo": "செயல்தவிர்", - "download_all": "அனைத்தையும் பதிவிறக்குக", - "add_all_to_playlist": "அனைத்தையும் பாடல் பட்டியலில் சேர்க்கவும்", - "add_all_to_queue": "அனைத்தையும் வரிசைப்படுத்து", - "play_all_next": "அடுத்த உள்ள அனைத்தையும் இயக்கு", - "pause": "நிறுத்து", - "view_all": "அனைத்தையும் காண்க", - "no_tracks_added_yet": "உங்கள் பாடல்களை இன்னும் சேர்க்கவில்லை என்றால் தெரியாதே", - "no_tracks": "இங்கு பாடல்கள் எதுவும் இல்லை", - "no_tracks_listened_yet": "இன்னும் எதையும் கேள்வியில்லை", - "not_following_artists": "நீங்கள் எந்த கலைஞரையும் பின்தொடரவில்லை", - "no_favorite_albums_yet": "நீங்கள் இன்னும் எந்த ஆல்பங்களையும் பிடித்தவையாகச் சேர்க்கவில்லை", - "no_logs_found": "பதிவுகள் எதுவும் கிடைக்கவில்லை", - "youtube_engine": "YouTube இயந்திரம்", - "youtube_engine_not_installed_title": "{engine} நிறுவியதில்லை", - "youtube_engine_not_installed_message": "{engine} உங்கள் கணினியில் நிறுவியதில்லை.", - "youtube_engine_set_path": "PATH மாறியில் கிடைக்கிறதா என்பதை உறுதிப்படுத்தவும் அல்லது\n{engine} செயல் செய்யக்கூடிய முறையை கீழே அமைக்கவும்", - "youtube_engine_unix_issue_message": "macOS/Linux/unix போல் OS இல், .zshrc/.bashrc/.bash_profile போன்றவை அமைப்பில் பாதையை PATH அமைப்பது இயலாது.\nநீங்கள்.shell configuration file இல் பாதையை அமைக்க வேண்டும்", - "download": "பதிவிறக்கு", - "file_not_found": "கோப்பு கிடைக்கவில்லை", - "custom": "தனிப்பயன்", - "add_custom_url": "தனிப்பயன் URL ஐச் சேர்க்கவும்", - "edit_port": "போர்டு திருத்தவும்", - "port_helper_msg": "இயல்புநிலை -1 ஆகும், இது சீரற்ற எண்ணை குறிக்கிறது. நீங்கள் தீயணைப்பு அமைக்கப்பட்டிருந்தால், இதை அமைப்பது பரிந்துரைக்கப்படுகிறது.", - "connect_request": "{client} க்கு இணைக்க அனுமதிக்கவா?", - "connection_request_denied": "இணைப்பு மறுக்கப்பட்டது. பயனர் அணுகலை மறுத்தார்.", - "hipotetical_calculation": "*இது சராசரி ஆன்லைன் இசை ஸ்ட்ரீமிங் தளத்தின் ஒரு ஸ்ட்ரீமிற்கான $0.003 முதல் $0.005 வரையிலான கட்டணத்தின் அடிப்படையில் கணக்கிடப்படுகிறது. இது ஒரு கற்பனையான கணக்கீடு ஆகும், இது பயனர்கள் வெவ்வேறு இசை ஸ்ட்ரீமிங் தளங்களில் தங்கள் பாடல்களைக் கேட்டால் கலைஞர்களுக்கு எவ்வளவு பணம் செலுத்தியிருப்பார்கள் என்பது குறித்த நுண்ணறிவை வழங்குகிறது.", - "an_error_occurred": "ஒரு பிழை ஏற்பட்டது", - "copy_to_clipboard": "கிளிப்போர்டுக்கு நகலெடுக்கவும்", - "view_logs": "பதிவுகளைப் பார்க்கவும்", - "retry": "மீண்டும் முயற்சிக்கவும்", - "no_default_metadata_provider_selected": "நீங்கள் எந்த இயல்புநிலை மெட்டாடேட்டா வழங்குநரையும் அமைக்கவில்லை", - "manage_metadata_providers": "மெட்டாடேட்டா வழங்குநர்களை நிர்வகிக்கவும்", - "open_link_in_browser": "இணைப்பை உலாவியில் திறக்கவா?", - "do_you_want_to_open_the_following_link": "பின்வரும் இணைப்பை நீங்கள் திறக்க விரும்புகிறீர்களா", - "unsafe_url_warning": "நம்பத்தகாத மூலங்களிலிருந்து இணைப்புகளைத் திறப்பது பாதுகாப்பற்றதாக இருக்கலாம். எச்சரிக்கையாக இருங்கள்!\nநீங்கள் இணைப்பை உங்கள் கிளிப்போர்டுக்கு நகலெடுக்கலாம்.", - "copy_link": "இணைப்பை நகலெடுக்கவும்", - "building_your_timeline": "உங்கள் கேட்டலின் அடிப்படையில் உங்கள் காலவரிசையை உருவாக்குகிறது...", - "official": "அதிகாரபூர்வமானது", - "author_name": "ஆசிரியர்: {author}", - "third_party": "மூன்றாம் தரப்பு", - "plugin_requires_authentication": "பிளகின் அங்கீகாரத்தைக் கோருகிறது", - "update_available": "புதுப்பிப்பு உள்ளது", - "supports_scrobbling": "ஸ்க்ரோப்ளிங்கை ஆதரிக்கிறது", - "plugin_scrobbling_info": "இந்த பிளகின் உங்கள் கேட்பதின் வரலாற்றை உருவாக்க உங்கள் இசையை ஸ்க்ரோப்ள் செய்கிறது.", - "default_plugin": "இயல்புநிலை", - "set_default": "இயல்புநிலையாக அமைக்கவும்", - "support": "ஆதரவு", - "support_plugin_development": "பிளகின் வளர்ச்சிக்கு ஆதரவு", - "can_access_name_api": "- **{name}** API ஐ அணுக முடியும்", - "do_you_want_to_install_this_plugin": "இந்த பிளகினை நீங்கள் நிறுவ விரும்புகிறீர்களா?", - "third_party_plugin_warning": "இந்த பிளகின் மூன்றாம் தரப்பு களஞ்சியத்திலிருந்து வருகிறது. நிறுவும் முன் மூலத்தை நீங்கள் நம்புகிறீர்கள் என்பதை உறுதிப்படுத்தவும்.", - "author": "ஆசிரியர்", - "this_plugin_can_do_following": "இந்த பிளகின் பின்வருவனவற்றைச் செய்ய முடியும்", - "install": "நிறுவவும்", - "install_a_metadata_provider": "மெட்டாடேட்டா வழங்குநரை நிறுவவும்", - "no_tracks_playing": "தற்போது எந்த பாடலும் இயங்கவில்லை", - "synced_lyrics_not_available": "இந்த பாடலுக்கு ஒத்திசைக்கப்பட்ட வரிகள் கிடைக்கவில்லை. தயவுசெய்து", - "plain_lyrics": "சாதாரண வரிகள்", - "tab_instead": "தாவலை அதற்கு பதிலாக பயன்படுத்தவும்.", - "disclaimer": "துறப்பு", - "third_party_plugin_dmca_notice": "ஸ்பாட்யூப் குழு எந்த \"மூன்றாம் தரப்பு\" பிளகின்களுக்கும் எந்தப் பொறுப்பையும் (சட்டரீதியான உட்பட) ஏற்காது.\nதயவுசெய்து உங்கள் சொந்த ஆபத்தில் அவற்றைப் பயன்படுத்தவும். ஏதேனும் பிழைகள்/சிக்கல்களுக்கு, பிளகின் களஞ்சியத்தில் அவற்றைப் புகாரளிக்கவும்.\n\nஏதேனும் ஒரு \"மூன்றாம் தரப்பு\" பிளகின் ஒரு சேவை/சட்ட நிறுவனத்தின் ToS/DMCA ஐ மீறினால், தயவுசெய்து \"மூன்றாம் தரப்பு\" பிளகின் ஆசிரியரையோ அல்லது ஹோஸ்டிங் தளத்தையோ, எ.கா. GitHub/Codeberg, நடவடிக்கை எடுக்கக் கோரவும். மேலே பட்டியலிடப்பட்ட (\"மூன்றாம் தரப்பு\" என பெயரிடப்பட்ட) அனைத்து பொதுவான/சமூகத்தால் பராமரிக்கப்படும் பிளகின்கள். நாங்கள் அவற்றை க்யூரேட் செய்யவில்லை, எனவே அவற்றின் மீது எந்த நடவடிக்கையும் எடுக்க முடியாது.\n\n", - "input_does_not_match_format": "உள்ளீடு தேவையான வடிவத்துடன் பொருந்தவில்லை", - "metadata_provider_plugins": "மெட்டாடேட்டா வழங்குநர் பிளகின்கள்", - "paste_plugin_download_url": "பதிவிறக்க url அல்லது GitHub/Codeberg repo url அல்லது .smplug கோப்பிற்கான நேரடி இணைப்பை ஒட்டவும்", - "download_and_install_plugin_from_url": "url இலிருந்து பிளகினைப் பதிவிறக்கி நிறுவவும்", - "failed_to_add_plugin_error": "பிளகினைச் சேர்க்கத் தவறிவிட்டது: {error}", - "upload_plugin_from_file": "கோப்பிலிருந்து பிளகினைப் பதிவேற்றவும்", - "installed": "நிறுவப்பட்டது", - "available_plugins": "கிடைக்கக்கூடிய பிளகின்கள்", - "configure_your_own_metadata_plugin": "உங்கள் சொந்த பிளேலிஸ்ட்/ஆல்பம்/கலைஞர்/ஊட்ட மெட்டாடேட்டா வழங்குநரை உள்ளமைக்கவும்", - "audio_scrobblers": "ஆடியோ ஸ்க்ரோப்ளர்கள்", - "scrobbling": "ஸ்க்ரோப்ளிங்", - "download_music_format": "இசை பதிவிறக்க வடிவம்", - "streaming_music_format": "இசை ஸ்ட்ரீமிங் வடிவம்", - "download_music_quality": "பதிவிறக்க தரம்", - "streaming_music_quality": "ஸ்ட்ரீமிங் தரம்", - "default_metadata_source": "இயல்புநிலை மெட்டாடேட்டா மூலம்", - "set_default_metadata_source": "இயல்புநிலை மெட்டாடேட்டா மூலத்தை அமை", - "default_audio_source": "இயல்புநிலை ஆடியோ மூலம்", - "set_default_audio_source": "இயல்புநிலை ஆடியோ மூலத்தை அமை", - "plugins": "செருகுநிரல்கள்", - "configure_plugins": "உங்கள் சொந்த மெட்டாடேட்டா வழங்குநர் மற்றும் ஆடியோ மூல செருகுநிரல்களை அமைக்கவும்", - "source": "மூலம்: ", - "uncompressed": "அழுத்தப்படாத", - "dab_music_source_description": "ஆடியோஃபைல்களுக்காக. உயர்தர/லாஸ்லெஸ் ஆடியோ ஸ்ட்ரீம்களை வழங்குகிறது. ISRC அடிப்படையில் துல்லியமான பாடல் பொருத்தம்." -} \ No newline at end of file diff --git a/lib/l10n/app_th.arb b/lib/l10n/app_th.arb deleted file mode 100644 index 4f2efc0e..00000000 --- a/lib/l10n/app_th.arb +++ /dev/null @@ -1,495 +0,0 @@ -{ - "guest": "ผู้มาเยือน", - "browse": "เรียกดู", - "search": "ค้นหา", - "library": "คลัง", - "lyrics": "เนื้อเพลง", - "settings": "ตั้งค่า", - "genre_categories_filter": "กรองประเภทหรือแนวเพลง...", - "genre": "ประเภท", - "personalized": "ปรับแต่ง", - "featured": "เด่น", - "new_releases": "เพิ่งปล่อยใหม่", - "songs": "เพลง", - "playing_track": "กำลังเล่น {track}", - "queue_clear_alert": "การดำเนินการนี้จะล้างคิวปัจจุบัน {track_length} แทร็ก จะถูกลบออก\nคุณต้องการดำเนินการต่อหรือไม่?", - "load_more": "โหลดเพิ่มเติม", - "playlists": "เพลย์ลิสต์", - "artists": "ศิลปิน", - "albums": "อัลบั้ม", - "tracks": "แทร็ก", - "downloads": "ดาวน์โหลด", - "filter_playlists": "กรองเพลย์ลิสต์...", - "liked_tracks": "เพลงที่ชอบ", - "liked_tracks_description": "เพลงที่คุณชื่นชอบทั้งหมด", - "create_playlist": "สร้างเพลย์ลิสต์", - "create_a_playlist": "สร้างเพลย์ลิสต์", - "update_playlist": "อัพเดทเพลย์ลิสต์", - "create": "สร้าง", - "cancel": "ยกเลิก", - "update": "อัพเดท", - "playlist_name": "ชื่อเพลย์ลิสต์", - "name_of_playlist": "ชื่อของเพลย์ลิสต์", - "description": "คำอธิบาย", - "public": "สาธารณะ", - "collaborative": "ร่วมมือกัน", - "search_local_tracks": "ค้นหาเพลงในเครื่อง...", - "play": "เล่น", - "delete": "ลบ", - "none": "ไม่มี", - "sort_a_z": "เรียงตาม A-Z", - "sort_z_a": "เรียงตาม Z-A", - "sort_artist": "เรียงตามศิลปิน", - "sort_album": "เรียงตามอัลบั้ม", - "sort_duration": "เรียงตามความยาว", - "sort_tracks": "เรียงตามเพลง", - "currently_downloading": "กำลังดาวน์โหลด ({tracks_length})", - "cancel_all": "ยกเลิกทั้งหมด", - "filter_artist": "กรองศิลปิน...", - "followers": "{followers} ผู้ติดตาม", - "add_artist_to_blacklist": "เพิ่มศิลปินในบัญชีดำ", - "top_tracks": "เพลงฮิต", - "fans_also_like": "แฟนๆ ยังชอบ", - "loading": "กำลังโหลด...", - "artist": "ศิลปิน", - "blacklisted": "อยู่ในบัญชีดำ", - "following": "กำลังติดตาม", - "follow": "ติดตาม", - "artist_url_copied": "คัดลอก URL ศิลปินไปยังคลิปบอร์ด", - "added_to_queue": "เพิ่ม {tracks} เพลงลงในคิว", - "filter_albums": "กรองอัลบั้ม...", - "synced": "ซิงค์", - "plain": "เรียบง่าย", - "shuffle": "สุ่ม", - "search_tracks": "ค้นหาเพลง...", - "released": "เผยแพร่", - "error": "ข้อผิดพลาด {error}", - "title": "ชื่อ", - "time": "เวลา", - "more_actions": "เพิ่มเติม", - "download_count": "ดาวน์โหลด ({count})", - "add_count_to_playlist": "เพิ่ม ({count}) ลงในเพลย์ลิสต์", - "add_count_to_queue": "เพิ่ม ({count}) ลงในคิว", - "play_count_next": "เล่น ({count}) ต่อไป", - "album": "อัลบั้ม", - "copied_to_clipboard": "คัดลอก {data} ไปยังคลิปบอร์ด", - "add_to_following_playlists": "เพิ่ม {track} ลงในเพลย์ลิสต์", - "add": "เพิ่ม", - "added_track_to_queue": "เพิ่ม {track} ลงในคิว", - "add_to_queue": "เพิ่มลงในคิว", - "track_will_play_next": "{track} จะเล่นต่อไป", - "play_next": "เล่นต่อไป", - "removed_track_from_queue": "ลบ {track} ออกจากคิว", - "remove_from_queue": "ลบออกจากคิว", - "remove_from_favorites": "ลบออกจากรายการโปรด", - "save_as_favorite": "บันทึกเป็นรายการโปรด", - "add_to_playlist": "เพิ่มลงในเพลย์ลิสต์", - "remove_from_playlist": "ลบออกจากเพลย์ลิสต์", - "add_to_blacklist": "เพิ่มลงในบัญชีดำ", - "remove_from_blacklist": "ลบออกจากบัญชีดำ", - "share": "แชร์", - "mini_player": "มินิเพลเยอร์", - "slide_to_seek": "เลื่อนเพื่อไปข้างหน้าหรือถอยหลัง", - "shuffle_playlist": "สุ่มเพลย์ลิสต์", - "unshuffle_playlist": "ยกเลิกการสุ่มเพลย์ลิสต์", - "previous_track": "แทร็กก่อนหน้า", - "next_track": "แทร็กถัดไป", - "pause_playback": "หยุดการเล่น", - "resume_playback": "เล่นต่อ", - "loop_track": "วนเพลง", - "repeat_playlist": "ซ้ำเพลย์ลิสต์", - "queue": "คิว", - "alternative_track_sources": "แหล่งแทร็กอื่น", - "download_track": "ดาวน์โหลดแทร็ก", - "tracks_in_queue": "{tracks} แทร็กในคิว", - "clear_all": "ล้างทั้งหมด", - "show_hide_ui_on_hover": "แสดง/ซ่อน UI เมื่อโฮเวอร์", - "always_on_top": "อยู่ด้านบนเสมอ", - "exit_mini_player": "ออกจากมินิเพลย์เยอร์", - "download_location": "ตำแหน่งดาวน์โหลด", - "account": "บัญชี", - "login_with_spotify": "เข้าสู่ระบบด้วยบัญชี Spotify", - "connect_with_spotify": "เชื่อมต่อกับ Spotify", - "logout": "ออกจากระบบ", - "logout_of_this_account": "ออกจากระบบบัญชีนี้", - "language_region": "ภาษาและภูมิภาค", - "language": "ภาษา", - "system_default": "ค่าเริ่มต้นของระบบ", - "market_place_region": "ภูมิภาค Marketplace", - "recommendation_country": "ประเทศที่แนะนำ", - "appearance": "ลักษณะที่ปรากฏ", - "layout_mode": "โหมดเค้าโครง", - "override_layout_settings": "แทนที่การตั้งค่าโหมดเค้าโครงแบบตอบสนอง", - "adaptive": "ปรับเปลี่ยน", - "compact": "กระชับ", - "extended": "ขยาย", - "theme": "ธีม", - "dark": "มืด", - "light": "สว่าง", - "system": "ระบบ", - "accent_color": "สีเน้น", - "sync_album_color": "ซิงค์สีอัลบั้ม", - "sync_album_color_description": "ใช้สีเด่นของอาร์ตอัลบั้มเป็นสีเน้น", - "playback": "การเล่น", - "audio_quality": "คุณภาพเสียง", - "high": "สูง", - "low": "ต่ำ", - "pre_download_play": "ดาวน์โหลดล่วงหน้าและเล่น", - "pre_download_play_description": "แทนที่จะสตรีมเสียง ดาวน์โหลดข้อมูลและเล่นแทน (แนะนำสำหรับผู้ใช้แบนด์วิดธ์สูง)", - "skip_non_music": "ข้ามส่วนที่ไม่ใช่เพลง (SponsorBlock)", - "blacklist_description": "แทร็กและศิลปินที่บล็อก", - "wait_for_download_to_finish": "โปรดรอให้การดาวน์โหลดปัจจุบันเสร็จสิ้น", - "desktop": "เดสก์ท็อป", - "close_behavior": "ปิดพฤติกรรม", - "close": "ปิด", - "minimize_to_tray": "ลดขนาดลงถาด", - "show_tray_icon": "แสดงไอคอนถาดระบบ", - "about": "เกี่ยวกับ", - "u_love_spotube": "เรารู้ว่าคุณรัก Spotube", - "check_for_updates": "ตรวจสอบการปรับปรุง", - "about_spotube": "เกี่ยวกับ Spotube", - "blacklist": "แบล็กลิสต์", - "please_sponsor": "กรุณาสนับสนุน/บริจาค", - "spotube_description": "Spotube โปรแกรมเล่น Spotify ฟรีสำหรับทุกคน น้ำหนักเบา รองรับหลายแพลตฟอร์ม", - "version": "รุ่น", - "build_number": "หมายเลขบิลด์", - "founder": "ผู้ก่อตั้ง", - "repository": "ที่เก็บ", - "bug_issues": "ข้อผิดพลาด+ปัญหา", - "made_with": "ทำด้วย❤️ใน บังคลาเทศ🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "ใบอนุญาต", - "add_spotify_credentials": "เพิ่มข้อมูลรับรอง Spotify ของคุณเพื่อเริ่มต้น", - "credentials_will_not_be_shared_disclaimer": "ไม่ต้องกังวล ข้อมูลรับรองใดๆ ของคุณจะไม่ถูกเก็บรวบรวมหรือแชร์กับใคร", - "know_how_to_login": "ไม่รู้จักวิธีดำเนินการนี้ใช่ไหม", - "follow_step_by_step_guide": "ทำตามคู่มือทีละขั้น", - "spotify_cookie": "คุกกี้ Spotify {name}", - "cookie_name_cookie": "คุกกี้ {name}", - "fill_in_all_fields": "กรุณากรอกข้อมูลทุกช่อง", - "submit": "ยื่น", - "exit": "ออก", - "previous": "ย้อนกลับ", - "next": "ถัดไป", - "done": "เสร็จ", - "step_1": "ขั้นที่ 1", - "first_go_to": "ก่อนอื่น ไปที่", - "login_if_not_logged_in": "ยังไม่ได้เข้าสู่ระบบ ให้เข้าสู่ระบบ/ลงทะเบียน", - "step_2": "ขั้นที่ 2", - "step_2_steps": "1. หลังจากเข้าสู่ระบบแล้ว กด F12 หรือ คลิกขวาที่เมาส์ > ตรวจสอบเพื่อเปิด Devtools เบราว์เซอร์\n2. จากนั้นไปที่แท็บ \"แอปพลิเคชัน\" (Chrome, Edge, Brave เป็นต้น) หรือแท็บ \"ที่เก็บข้อมูล\" (Firefox, Palemoon เป็นต้น)\n3. ไปที่ส่วน \"คุกกี้\" แล้วไปที่ subsection \"https: //accounts.spotify.com\"", - "step_3": "ขั้นที่ 3", - "step_3_steps": "คัดลอกค่าคุกกี้ \"sp_dc\"", - "success_emoji": "สำเร็จ", - "success_message": "ตอนนี้คุณเข้าสู่ระบบด้วยบัญชี Spotify ของคุณเรียบร้อยแล้ว ยอดเยี่ยม!", - "step_4": "ขั้นที่ 4", - "step_4_steps": "วางค่า \"sp_dc\" ที่คัดลอกมา", - "something_went_wrong": "มีอะไรผิดพลาด", - "piped_instance": "อินสแตนซ์เซิร์ฟเวอร์แบบ Pipe", - "piped_description": "อินสแตนซ์เซิร์ฟเวอร์แบบ Pipe ที่ใช้สำหรับการจับคู่แทร็ก", - "piped_warning": "บางอย่างอาจใช้งานไม่ได้ผล คุณจึงต้องรับความเสี่ยงเอง", - "generate_playlist": "สร้างเพลย์ลิสต์", - "track_exists": "แทร็ก {track} มีอยู่แล้ว", - "replace_downloaded_tracks": "แทนที่แทร็กที่ดาวน์โหลดทั้งหมด", - "skip_download_tracks": "ข้ามการดาวน์โหลดแทร็กที่ดาวน์โหลดทั้งหมด", - "do_you_want_to_replace": "คุณต้องการแทนที่แทร็กที่มีอยู่หรือไม่", - "replace": "แทนที่", - "skip": "ข้าม", - "select_up_to_count_type": "เลือกสูงสุด {count} {type}", - "select_genres": "เลือกประเภท", - "add_genres": "เพิ่มประเภท", - "country": "ประเทศ", - "number_of_tracks_generate": "จำนวนแทร็กที่จะสร้าง", - "acousticness": "อะคูสติก", - "danceability": "ความสามารถในการเต้น", - "energy": "พลัง", - "instrumentalness": "บรรเลง", - "liveness": "ความสด", - "loudness": "ความดัง", - "speechiness": "การพูด", - "valence": "ความสุข", - "popularity": "ความนิยม", - "key": "คีย์", - "duration": "ระยะเวลา (วินาที)", - "tempo": "ความเร็ว (BPM)", - "mode": "โหมด", - "time_signature": "ลายเซ็นเวลา", - "short": "สั้น", - "medium": "กลาง", - "long": "ยาว", - "min": "ต่ำสุด", - "max": "สูงสุด", - "target": "เป้าหมาย", - "moderate": "ปานกลาง", - "deselect_all": "ยกเลิกการเลือกทั้งหมด", - "select_all": "เลือกทั้งหมด", - "are_you_sure": "คุณแน่ใจไหม?", - "generating_playlist": "กำลังสร้างเพลย์ลิสต์ที่คุณกำหนดเอง...", - "selected_count_tracks": "เลือก {count} แทร็ก", - "download_warning": "ถ้าคุณดาวน์โหลดเพลงทั้งหมดเป็นจำนวนมาก คุณกำลังละเมิดลิขสิทธิ์เพลงและสร้างความเสียหายให้กับสังคมดนตรี สร้างสรรค์ หวังว่าคุณจะรับรู้เรื่องนี้ เสมอ พยายามเคารพและสนับสนุนผลงานหนักของศิลปิน", - "download_ip_ban_warning": "นอกเหนือจากนั้น IP ของคุณอาจถูกบล็อกบน YouTube เนื่องจากคำขอดาวน์โหลดมากเกินกว่าปกติ การบล็อก IP หมายความว่าคุณไม่สามารถใช้ YouTube (แม้ว่าคุณจะล็อกอินอยู่) เป็นเวลาอย่างน้อย 2-3 เดือนจากอุปกรณ์ IP นั้น และ Spotube จะไม่รับผิดชอบใด ๆ หากสิ่งนี้เกิดขึ้น", - "by_clicking_accept_terms": "คลิก 'ยอมรับ' คุณยินยอมตามเงื่อนไขต่อไปนี้:", - "download_agreement_1": "ฉันรู้ว่าฉันกำลังละเมิดลิขสิทธิ์เพลง ฉันเลว", - "download_agreement_2": "ฉันจะสนับสนุนศิลปินทุกที่ที่ฉันทำได้และฉันทำสิ่งนี้เพียงเพราะฉันไม่มีเงินซื้อผลงานศิลปะของพวกเขา", - "download_agreement_3": "ฉันรับทราบอย่างสมบูรณ์ว่า IP ของฉันอาจถูกบล็อกบน YouTube และฉันจะไม่ถือ Spotube หรือเจ้าของ/ผู้มีส่วนร่วมใด ๆ รับผิดชอบต่ออุบัติเหตุใด ๆ ที่เกิดจากการกระทำปัจจุบันของฉัน", - "decline": "ปฏิเสธ", - "accept": "ยอมรับ", - "details": "รายละเอียด", - "youtube": "youtube", - "channel": "ช่อง", - "likes": "ถูกใจ", - "dislikes": "ไม่ชอบ", - "views": "วิว", - "streamUrl": "สตรีม URL", - "stop": "หยุด", - "sort_newest": "เรียงตามการเพิ่มใหม่ล่าสุด", - "sort_oldest": "เรียงตามการเพิ่มเก่าสุด", - "sleep_timer": "ตั้งเวลาปิด", - "mins": "{minutes} นาที", - "hours": "{hours} ชั่วโมง", - "hour": "{hours} ชั่วโมง", - "custom_hours": "ชั่วโมงที่กำหนดเอง", - "logs": "บันทึก", - "developers": "นักพัฒนา", - "not_logged_in": "คุณไม่ได้เข้าสู่ระบบ", - "search_mode": "โหมดการค้นหา", - "audio_source": "แหล่งที่มาของเสียง", - "ok": "ตกลง", - "failed_to_encrypt": "เข้ารหัสล้มเหลว", - "encryption_failed_warning": "Spotube ใช้การเข้ารหัสเพื่อเก็บข้อมูลของคุณอย่างปลอดภัย แต่ไม่สามารถทำได้ ดังนั้นจะเปลี่ยนเป็นการจัดเก็บที่ไม่ปลอดภัย\nหากคุณใช้ Linux โปรดตรวจสอบว่าคุณได้ติดตั้งบริการลับ (gnome-keyring, kde-wallet, keepassxc เป็นต้น)", - "querying_info": "กำลังดึงข้อมูล...", - "piped_api_down": "Piped API ไม่ทำงาน", - "piped_down_error_instructions": "Piped instance {pipedInstance} ไม่ทำงานขณะนี้\n\nเปลี่ยนอินสแตนซ์หรือเปลี่ยน 'ประเภท API' เป็น YouTube API อย่างเป็นทางการ\n\nอย่าลืมรีสตาร์ทแอปหลังจากเปลี่ยน", - "you_are_offline": "คุณออฟไลน์อยู่", - "connection_restored": "การเชื่อมต่ออินเทอร์เน็ตของคุณได้รับการกู้คืน", - "use_system_title_bar": "ใช้แถบชื่อระบบ", - "crunching_results": "กำลังประมวลผล...", - "search_to_get_results": "ค้นหาเพื่อดูผลลัพธ์", - "use_amoled_mode": "ธีมมืดสนิท", - "pitch_dark_theme": "โหมด AMOLED", - "normalize_audio": "ปรับระดับเสียง", - "change_cover": "เปลี่ยนปก", - "add_cover": "เพิ่มปก", - "restore_defaults": "คืนค่าเริ่มต้น", - "download_music_codec": "ดาวน์โหลดโคเดคเพลง", - "streaming_music_codec": "สตรีมมิ่งโคเดคเพลง", - "login_with_lastfm": "เข้าสู่ระบบด้วย Last.fm", - "connect": "เชื่อมต่อ", - "disconnect_lastfm": "ตัดการเชื่อมต่อ Last.fm", - "disconnect": "ตัดการเชื่อมต่อ", - "username": "ชื่อผู้ใช้", - "password": "รหัสผ่าน", - "login": "เข้าสู่ระบบ", - "login_with_your_lastfm": "เข้าสู่ระบบด้วย Last.fm", - "scrobble_to_lastfm": "Scrobble ไปเป็น Last.fm", - "go_to_album": "ไปที่อัลบั้ม", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "เรียกดูทั้งหมด", - "genres": "ประเภท", - "explore_genres": "สำรวจประเภท", - "friends": "เพื่อน", - "no_lyrics_available": "ขออภัย ไม่พบเนื้อเพลงสำหรับเพลงนี้", - "start_a_radio": "เปิดวิทยุ", - "how_to_start_radio": "หากต้องการเปิดวิทยุฟังยังไง?", - "replace_queue_question": "คุณต้องการแทนที่คิวปัจจุบันหรือเพิ่มเข้าไปหรือไม่", - "endless_playback": "เล่นซ้ำ", - "delete_playlist": "ลบเพลย์ลิสต์", - "delete_playlist_confirmation": "คุณแน่ใจที่จะลบเพลย์ลิสต์นี้หรือไม่", - "local_tracks": "เพลงในเครื่อง", - "song_link": "ลิงค์เพลง", - "skip_this_nonsense": "ข้ามสิ่งไร้สาระนี้", - "freedom_of_music": "“เสรีภาพแห่งเสียงเพลง”", - "freedom_of_music_palm": "“เสรีภาพแห่งเสียงเพลง ในมือของคุณ”", - "get_started": "เริ่มต้น", - "youtube_source_description": "แนะนำและใช้งานได้ดีที่สุด", - "piped_source_description": "รู้สึกอิสระ? เหมือน YouTube แต่ฟรีกว่าเยอะ", - "jiosaavn_source_description": "ดีที่สุดสำหรับภูมิภาคเอเชียใต้", - "highest_quality": "คุณภาพสูงสุด: {quality}", - "select_audio_source": "เลือกแหล่งเสียง", - "endless_playback_description": "เพิ่มเพลงใหม่ลงในคิวโดยอัตโนมัติ", - "choose_your_region": "เลือกภูมิภาคของคุณ", - "choose_your_region_description": "สิ่งนี้จะช่วยให้ Spotube แสดงเนื้อหาที่เหมาะสมสำหรับคุณ", - "choose_ your_language": "เลือกภาษาของคุณ", - "help_project_grow": "ช่วยให้โครงการนี้เติบโต", - "help_project_grow_description": "Spotube เป็นโครงการโอเพนซอร์ส คุณสามารถช่วยให้โครงการนี้เติบโตได้โดยการมีส่วนร่วมในโครงการ รายงานข้อบกพร่อง หรือเสนอคุณสมบัติใหม่", - "contribute_on_github": "มีส่วนร่วมบน GitHub", - "donate_on_open_collective": "บริจาคบน Open Collective", - "browse_anonymously": "เรียกดูแบบไม่ระบุตัวตน", - "choose_your_language": "เลือกภาษาของคุณ", - "enable_connect": "เปิดใช้งานการเชื่อมต่อ", - "enable_connect_description": "ควบคุม Spotube จากอุปกรณ์อื่น", - "devices": "อุปกรณ์", - "select": "เลือก", - "connect_client_alert": "คุณกำลังถูกควบคุมโดย {client}", - "this_device": "อุปกรณ์นี้", - "remote": "ระยะไกล", - "local_library": "ห้องสมุดท้องถิ่น", - "add_library_location": "เพิ่มในห้องสมุด", - "remove_library_location": "ลบออกจากห้องสมุด", - "local_tab": "ท้องถิ่น", - "stats": "สถิติ", - "and_n_more": "และ {count} อีก", - "recently_played": "เพลงที่เพิ่งเล่น", - "browse_more": "ดูเพิ่มเติม", - "no_title": "ไม่มีชื่อ", - "not_playing": "ไม่เล่น", - "epic_failure": "ล้มเหลวอย่างยิ่ง!", - "added_num_tracks_to_queue": "เพิ่ม {tracks_length} เพลงในคิว", - "spotube_has_an_update": "Spotube มีการอัปเดต", - "download_now": "ดาวน์โหลดตอนนี้", - "nightly_version": "Spotube Nightly {nightlyBuildNum} ได้รับการปล่อยออกมา", - "release_version": "Spotube v{version} ได้รับการปล่อยออกมา", - "read_the_latest": "อ่านข่าวสารล่าสุด ", - "release_notes": "บันทึกการปล่อย", - "pick_color_scheme": "เลือกธีมสี", - "save": "บันทึก", - "choose_the_device": "เลือกอุปกรณ์:", - "multiple_device_connected": "มีอุปกรณ์เชื่อมต่อหลายเครื่อง\nเลือกอุปกรณ์ที่คุณต้องการให้การดำเนินการนี้เกิดขึ้น", - "nothing_found": "ไม่พบข้อมูล", - "the_box_is_empty": "กล่องว่างเปล่า", - "top_artists": "ศิลปินยอดนิยม", - "top_albums": "อัลบั้มยอดนิยม", - "this_week": "สัปดาห์นี้", - "this_month": "เดือนนี้", - "last_6_months": "6 เดือนที่ผ่านมา", - "this_year": "ปีนี้", - "last_2_years": "2 ปีที่ผ่านมา", - "all_time": "ตลอดกาล", - "powered_by_provider": "ขับเคลื่อนโดย {providerName}", - "email": "อีเมล", - "profile_followers": "ผู้ติดตาม", - "birthday": "วันเกิด", - "subscription": "การสมัครสมาชิก", - "not_born": "ยังไม่เกิด", - "hacker": "แฮ็กเกอร์", - "profile": "โปรไฟล์", - "no_name": "ไม่มีชื่อ", - "edit": "แก้ไข", - "user_profile": "โปรไฟล์ผู้ใช้", - "count_plays": "{count} การเล่น", - "streaming_fees_hypothetical": "*คำนวณจากการจ่ายเงินต่อการสตรีมของ Spotify\nระหว่าง $0.003 ถึง $0.005 นี่เป็นการคำนวณสมมุติ\nเพื่อให้ข้อมูลแก่ผู้ใช้เกี่ยวกับจำนวนเงินที่พวกเขา\nอาจจะจ่ายให้กับศิลปินหากพวกเขาฟังเพลงของพวกเขาใน Spotify", - "count_mins": "{minutes} นาที", - "summary_minutes": "นาที", - "summary_listened_to_music": "ฟังเพลง", - "summary_songs": "เพลง", - "summary_streamed_overall": "สตรีมทั้งหมด", - "summary_owed_to_artists": "ค้างชำระให้ศิลปิน\nในเดือนนี้", - "summary_artists": "ศิลปิน", - "summary_music_reached_you": "เพลงมาถึงคุณ", - "summary_full_albums": "อัลบั้มเต็ม", - "summary_got_your_love": "ได้รับความรักของคุณ", - "summary_playlists": "เพลย์ลิสต์", - "summary_were_on_repeat": "อยู่ในโหมดซ้ำ", - "total_money": "รวม {money}", - "minutes_listened": "เวลาที่ฟัง", - "streamed_songs": "เพลงที่สตรีม", - "count_streams": "{count} สตรีม", - "owned_by_you": "เป็นเจ้าของโดยคุณ", - "copied_shareurl_to_clipboard": "{shareUrl} คัดลอกไปที่คลิปบอร์ดแล้ว", - "spotify_hipotetical_calculation": "*คำนวณตามการจ่ายต่อสตรีมของ Spotify\nซึ่งอยู่ในช่วง $0.003 ถึง $0.005 นี่เป็นการคำนวณสมมุติ\nเพื่อให้ผู้ใช้ทราบว่าพวกเขาจะจ่ายเงินให้ศิลปินเท่าไหร่\nหากพวกเขาฟังเพลงของพวกเขาใน Spotify.", - "webview_not_found": "ไม่พบ Webview", - "webview_not_found_description": "ไม่พบ runtime ของ Webview บนอุปกรณ์ของคุณ\nหากติดตั้งแล้วตรวจสอบให้แน่ใจว่าอยู่ใน environment PATH\n\nหลังจากติดตั้งแล้ว ให้รีสตาร์ทแอป", - "unsupported_platform": "แพลตฟอร์มไม่รองรับ", - "invidious_instance": "อินสแตนซ์เซิร์ฟเวอร์ Invidious", - "invidious_description": "อินสแตนซ์เซิร์ฟเวอร์ Invidious ที่ใช้สำหรับการจับคู่เพลง", - "invidious_warning": "บางอันอาจใช้งานไม่ดี ใช้ด้วยความเสี่ยงของคุณเอง", - "invidious_source_description": "คล้ายกับ Piped แต่มีความพร้อมใช้งานสูงกว่า", - "cache_music": "แคชเพลง", - "open": "เปิด", - "cache_folder": "โฟลเดอร์แคช", - "export": "ส่งออก", - "clear_cache": "ล้างแคช", - "clear_cache_confirmation": "คุณต้องการล้างแคชหรือไม่?", - "export_cache_files": "ส่งออกไฟล์แคช", - "found_n_files": "พบ {count} ไฟล์", - "export_cache_confirmation": "คุณต้องการส่งออกไฟล์เหล่านี้ไปยัง", - "exported_n_out_of_m_files": "ส่งออก {filesExported} จาก {files} ไฟล์", - "playlist": "เพลย์ลิสต์", - "no_loop": "ไม่มีการวนซ้ำ", - "generate": "สร้าง", - "undo": "ย้อนกลับ", - "download_all": "ดาวน์โหลดทั้งหมด", - "add_all_to_playlist": "เพิ่มทั้งหมดในเพลย์ลิสต์", - "add_all_to_queue": "เพิ่มทั้งหมดในคิว", - "play_all_next": "เล่นทั้งหมดถัดไป", - "pause": "หยุดชั่วคราว", - "view_all": "ดูทั้งหมด", - "no_tracks_added_yet": "ดูเหมือนคุณยังไม่ได้เพิ่มเพลงใด ๆ", - "no_tracks": "ดูเหมือนจะไม่มีเพลงที่นี่", - "no_tracks_listened_yet": "ดูเหมือนคุณยังไม่ได้ฟังอะไรเลย", - "not_following_artists": "คุณไม่ได้ติดตามศิลปินใด ๆ", - "no_favorite_albums_yet": "ดูเหมือนคุณยังไม่ได้เพิ่มอัลบัมใด ๆ ในรายการโปรด", - "no_logs_found": "ไม่พบบันทึก", - "youtube_engine": "เครื่องมือ YouTube", - "youtube_engine_not_installed_title": "{engine} ยังไม่ได้ติดตั้ง", - "youtube_engine_not_installed_message": "{engine} ยังไม่ได้ติดตั้งในระบบของคุณ", - "youtube_engine_set_path": "ตรวจสอบให้แน่ใจว่ามันมีอยู่ในตัวแปร PATH หรือ\nตั้งค่าพาธที่แท้จริงของไฟล์ที่สามารถทำงานได้ {engine} ด้านล่าง", - "youtube_engine_unix_issue_message": "ใน macOS/Linux/Unix อย่าง OS การตั้งค่าพาธใน .zshrc/.bashrc/.bash_profile เป็นต้น จะไม่ทำงาน\nคุณต้องตั้งค่าพาธในไฟล์การกำหนดค่า shell", - "download": "ดาวน์โหลด", - "file_not_found": "ไม่พบไฟล์", - "custom": "กำหนดเอง", - "add_custom_url": "เพิ่ม URL แบบกำหนดเอง", - "edit_port": "แก้ไขพอร์ต", - "port_helper_msg": "ค่าเริ่มต้นคือ -1 ซึ่งหมายถึงหมายเลขสุ่ม หากคุณได้กำหนดค่าไฟร์วอลล์แล้ว แนะนำให้ตั้งค่านี้", - "connect_request": "อนุญาตให้ {client} เชื่อมต่อหรือไม่?", - "connection_request_denied": "การเชื่อมต่อล้มเหลว ผู้ใช้ปฏิเสธการเข้าถึง", - "hipotetical_calculation": "*การคำนวณนี้อิงจากค่าเฉลี่ยการจ่ายเงินต่อสตรีมของแพลตฟอร์มสตรีมมิ่งเพลงออนไลน์ที่ $0.003 ถึง $0.005 นี่เป็นการคำนวณสมมติฐานเพื่อให้ผู้ใช้เข้าใจว่าพวกเขาจะต้องจ่ายเงินให้ศิลปินเท่าไหร่หากพวกเขาฟังเพลงบนแพลตฟอร์มสตรีมมิ่งเพลงที่แตกต่างกัน", - "an_error_occurred": "เกิดข้อผิดพลาด", - "copy_to_clipboard": "คัดลอกไปยังคลิปบอร์ด", - "view_logs": "ดูบันทึก", - "retry": "ลองใหม่", - "no_default_metadata_provider_selected": "คุณไม่ได้ตั้งค่าผู้ให้บริการเมตาดาต้าเริ่มต้น", - "manage_metadata_providers": "จัดการผู้ให้บริการเมตาดาต้า", - "open_link_in_browser": "เปิดลิงก์ในเบราว์เซอร์หรือไม่?", - "do_you_want_to_open_the_following_link": "คุณต้องการเปิดลิงก์ต่อไปนี้หรือไม่", - "unsafe_url_warning": "การเปิดลิงก์จากแหล่งที่ไม่น่าเชื่อถืออาจไม่ปลอดภัย โปรดระมัดระวัง!\nคุณยังสามารถคัดลอกลิงก์ไปยังคลิปบอร์ดของคุณได้", - "copy_link": "คัดลอกลิงก์", - "building_your_timeline": "กำลังสร้างไทม์ไลน์ของคุณตามการฟังของคุณ...", - "official": "อย่างเป็นทางการ", - "author_name": "ผู้เขียน: {author}", - "third_party": "บุคคลที่สาม", - "plugin_requires_authentication": "ปลั๊กอินต้องมีการรับรองความถูกต้อง", - "update_available": "มีการอัปเดต", - "supports_scrobbling": "รองรับการ scrobbling", - "plugin_scrobbling_info": "ปลั๊กอินนี้จะ scrobble เพลงของคุณเพื่อสร้างประวัติการฟังของคุณ", - "default_plugin": "ค่าเริ่มต้น", - "set_default": "ตั้งค่าเริ่มต้น", - "support": "สนับสนุน", - "support_plugin_development": "สนับสนุนการพัฒนาปลั๊กอิน", - "can_access_name_api": "- สามารถเข้าถึง API **{name}**", - "do_you_want_to_install_this_plugin": "คุณต้องการติดตั้งปลั๊กอินนี้หรือไม่?", - "third_party_plugin_warning": "ปลั๊กอินนี้มาจากที่เก็บของบุคคลที่สาม โปรดตรวจสอบให้แน่ใจว่าคุณเชื่อถือแหล่งที่มาก่อนทำการติดตั้ง", - "author": "ผู้เขียน", - "this_plugin_can_do_following": "ปลั๊กอินนี้สามารถทำสิ่งต่อไปนี้", - "install": "ติดตั้ง", - "install_a_metadata_provider": "ติดตั้งผู้ให้บริการเมตาดาต้า", - "no_tracks_playing": "ขณะนี้ไม่มีเพลงที่กำลังเล่นอยู่", - "synced_lyrics_not_available": "ไม่มีเนื้อเพลงที่ซิงค์สำหรับเพลงนี้ กรุณาใช้แท็บ", - "plain_lyrics": "เนื้อเพลงธรรมดา", - "tab_instead": "แทน", - "disclaimer": "ข้อสงวนสิทธิ์", - "third_party_plugin_dmca_notice": "ทีม Spotube ไม่รับผิดชอบใดๆ (รวมถึงทางกฎหมาย) สำหรับปลั๊กอิน \"บุคคลที่สาม\" ใดๆ\nโปรดใช้งานด้วยความเสี่ยงของคุณเอง สำหรับข้อบกพร่อง/ปัญหาใดๆ โปรดรายงานไปยังที่เก็บปลั๊กอิน\n\nหากปลั๊กอิน \"บุคคลที่สาม\" ใดๆ ละเมิด ToS/DMCA ของบริการ/นิติบุคคลใดๆ โปรดขอให้ผู้เขียนปลั๊กอิน \"บุคคลที่สาม\" หรือแพลตฟอร์มโฮสติ้ง เช่น GitHub/Codeberg ดำเนินการ ที่ระบุไว้ข้างต้น (ที่ติดป้าย \"บุคคลที่สาม\") เป็นปลั๊กอินสาธารณะ/ที่ดูแลโดยชุมชนทั้งหมด เราไม่ได้จัดการดูแล ดังนั้นเราจึงไม่สามารถดำเนินการใดๆ กับพวกเขาได้\n\n", - "input_does_not_match_format": "อินพุตไม่ตรงกับรูปแบบที่ต้องการ", - "metadata_provider_plugins": "ปลั๊กอินผู้ให้บริการเมตาดาต้า", - "paste_plugin_download_url": "วาง url ดาวน์โหลดหรือ url ที่เก็บ GitHub/Codeberg หรือลิงก์โดยตรงไปยังไฟล์ .smplug", - "download_and_install_plugin_from_url": "ดาวน์โหลดและติดตั้งปลั๊กอินจาก url", - "failed_to_add_plugin_error": "ไม่สามารถเพิ่มปลั๊กอินได้: {error}", - "upload_plugin_from_file": "อัปโหลดปลั๊กอินจากไฟล์", - "installed": "ติดตั้งแล้ว", - "available_plugins": "ปลั๊กอินที่มีอยู่", - "configure_your_own_metadata_plugin": "กำหนดค่าผู้ให้บริการเมตาดาต้าเพลย์ลิสต์/อัลบั้ม/ศิลปิน/ฟีดของคุณเอง", - "audio_scrobblers": "เครื่อง scrobbler เสียง", - "scrobbling": "Scrobbling", - "download_music_format": "รูปแบบการดาวน์โหลดเพลง", - "streaming_music_format": "รูปแบบการสตรีมเพลง", - "download_music_quality": "คุณภาพการดาวน์โหลด", - "streaming_music_quality": "คุณภาพการสตรีม", - "default_metadata_source": "แหล่งเมตาดาต้าพื้นฐาน", - "set_default_metadata_source": "ตั้งค่าแหล่งเมตาดาต้าพื้นฐาน", - "default_audio_source": "แหล่งเสียงพื้นฐาน", - "set_default_audio_source": "ตั้งค่าแหล่งเสียงพื้นฐาน", - "plugins": "ปลั๊กอิน", - "configure_plugins": "กำหนดค่าปลั๊กอินผู้ให้บริการเมตาดาต้าและแหล่งเสียงของคุณเอง", - "source": "แหล่งที่มา: ", - "uncompressed": "ไม่บีบอัด", - "dab_music_source_description": "สำหรับคนรักเสียงเพลง ให้สตรีมเสียงคุณภาพสูง/ไร้การสูญเสียการบีบอัด การจับคู่แทร็กแม่นยำตาม ISRC" -} \ No newline at end of file diff --git a/lib/l10n/app_tl.arb b/lib/l10n/app_tl.arb deleted file mode 100644 index bf1f174c..00000000 --- a/lib/l10n/app_tl.arb +++ /dev/null @@ -1,492 +0,0 @@ -{ - "guest": "Bisita", - "browse": "Mag-browse", - "search": "Maghanap", - "library": "Silid-aklatan", - "lyrics": "Mga Liriko", - "settings": "Mga Setting", - "genre_categories_filter": "I-filter ang mga kategorya o genre...", - "genre": "Genre", - "personalized": "Naka-personalize", - "featured": "Tampok", - "new_releases": "Mga Bagong Paglabas", - "songs": "Mga Kanta", - "playing_track": "Tumutugtog ang {track}", - "queue_clear_alert": "Ito ay magbubura ng kasalukuyang pila. {track_length} na mga track ang tatanggalin\nGusto mo bang magpatuloy?", - "load_more": "Mag-load pa", - "playlists": "Mga Playlist", - "artists": "Mga Artista", - "albums": "Mga Album", - "tracks": "Mga Track", - "downloads": "Mga Download", - "filter_playlists": "I-filter ang iyong mga playlist...", - "liked_tracks": "Mga Nagustuhang Track", - "liked_tracks_description": "Lahat ng mga track na iyong nagustuhan", - "playlist": "Playlist", - "create_a_playlist": "Gumawa ng playlist", - "update_playlist": "I-update ang playlist", - "create": "Lumikha", - "cancel": "Ikansela", - "update": "I-update", - "playlist_name": "Pangalan ng Playlist", - "name_of_playlist": "Pangalan ng playlist", - "description": "Paglalarawan", - "public": "Pampubliko", - "collaborative": "Pakikipagtulungan", - "search_local_tracks": "Maghanap ng mga lokal na track...", - "play": "I-play", - "delete": "Burahin", - "none": "Wala", - "sort_a_z": "Ayusin ayon sa A-Z", - "sort_z_a": "Ayusin ayon sa Z-A", - "sort_artist": "Ayusin ayon sa Artista", - "sort_album": "Ayusin ayon sa Album", - "sort_duration": "Ayusin ayon sa Tagal", - "sort_tracks": "Ayusin ang mga Track", - "currently_downloading": "Kasalukuyang Nagda-download ({tracks_length})", - "cancel_all": "Kanselahin Lahat", - "filter_artist": "I-filter ang mga artista...", - "followers": "{followers} na mga Tagasunod", - "add_artist_to_blacklist": "Idagdag ang artista sa blacklist", - "top_tracks": "Mga Nangungunang Track", - "fans_also_like": "Gusto rin ng mga tagahanga", - "loading": "Naglo-load...", - "artist": "Artista", - "blacklisted": "Naka-blacklist", - "following": "Sinusundan", - "follow": "Sundan", - "artist_url_copied": "Na-copy sa clipboard ang URL ng artista", - "added_to_queue": "Idinagdag ang {tracks} na mga track sa pila", - "filter_albums": "I-filter ang mga album...", - "synced": "Naka-sync", - "plain": "Simpleng", - "shuffle": "I-shuffle", - "search_tracks": "Maghanap ng mga track...", - "released": "Inilabas", - "error": "Error {error}", - "title": "Pamagat", - "time": "Oras", - "more_actions": "Higit pang mga aksyon", - "download_count": "I-download ({count})", - "add_count_to_playlist": "Idagdag ({count}) sa Playlist", - "add_count_to_queue": "Idagdag ({count}) sa Pila", - "play_count_next": "I-play ({count}) kasunod", - "album": "Album", - "copied_to_clipboard": "Na-copy ang {data} sa clipboard", - "add_to_following_playlists": "Idagdag ang {track} sa mga sumusunod na Playlist", - "add": "Idagdag", - "added_track_to_queue": "Idinagdag ang {track} sa pila", - "add_to_queue": "Idagdag sa pila", - "track_will_play_next": "Ang {track} ay tutugtog susunod", - "play_next": "I-play susunod", - "removed_track_from_queue": "Tinanggal ang {track} mula sa pila", - "remove_from_queue": "Alisin mula sa pila", - "remove_from_favorites": "Alisin mula sa mga paborito", - "save_as_favorite": "I-save bilang paborito", - "add_to_playlist": "Idagdag sa playlist", - "remove_from_playlist": "Alisin mula sa playlist", - "add_to_blacklist": "Idagdag sa blacklist", - "remove_from_blacklist": "Alisin mula sa blacklist", - "share": "Ibahagi", - "mini_player": "Mini Player", - "slide_to_seek": "I-slide para mag-seek pasulong o pabalik", - "shuffle_playlist": "I-shuffle ang playlist", - "unshuffle_playlist": "I-unshuffle ang playlist", - "previous_track": "Nakaraang track", - "next_track": "Susunod na track", - "pause_playback": "I-pause ang Playback", - "resume_playback": "Ipagpatuloy ang Playback", - "loop_track": "I-loop ang track", - "no_loop": "Walang loop", - "repeat_playlist": "Ulitin ang playlist", - "queue": "Pila", - "alternative_track_sources": "Alternatibong mga pinagmulan ng track", - "download_track": "I-download ang track", - "tracks_in_queue": "{tracks} na mga track sa pila", - "clear_all": "Burahin lahat", - "show_hide_ui_on_hover": "Ipakita/Itago ang UI sa hover", - "always_on_top": "Palaging nasa ibabaw", - "exit_mini_player": "Lumabas sa Mini player", - "download_location": "Lokasyon ng pag-download", - "local_library": "Lokal na silid-aklatan", - "add_library_location": "Idagdag sa silid-aklatan", - "remove_library_location": "Alisin mula sa silid-aklatan", - "account": "Account", - "login_with_spotify": "Mag-login gamit ang iyong Spotify account", - "connect_with_spotify": "Kumonekta sa Spotify", - "logout": "Mag-logout", - "logout_of_this_account": "Mag-logout sa account na ito", - "language_region": "Wika at Rehiyon", - "language": "Wika", - "system_default": "Default ng Sistema", - "market_place_region": "Rehiyon ng Marketplace", - "recommendation_country": "Bansang Inirerekomenda", - "appearance": "Hitsura", - "layout_mode": "Mode ng Layout", - "override_layout_settings": "I-override ang mga setting ng responsive layout mode", - "adaptive": "Umaangkop", - "compact": "Kompakto", - "extended": "Pinalawig", - "theme": "Tema", - "dark": "Madilim", - "light": "Maliwanag", - "system": "Sistema", - "accent_color": "Kulay ng Accent", - "sync_album_color": "I-sync ang kulay ng album", - "sync_album_color_description": "Ginagamit ang pangunahing kulay ng album art bilang kulay ng accent", - "playback": "Playback", - "audio_quality": "Kalidad ng Audio", - "high": "Mataas", - "low": "Mababa", - "pre_download_play": "Mag-pre-download at i-play", - "pre_download_play_description": "Sa halip na mag-stream ng audio, mag-download ng bytes at i-play sa halip (Inirerekomenda para sa mga gumagamit ng mataas na bandwidth)", - "skip_non_music": "Laktawan ang mga segment na hindi musika (SponsorBlock)", - "blacklist_description": "Mga track at artista na nasa blacklist", - "wait_for_download_to_finish": "Mangyaring maghintay para matapos ang kasalukuyang pag-download", - "desktop": "Desktop", - "close_behavior": "Pag-uugali ng Pagsara", - "close": "Isara", - "minimize_to_tray": "I-minimize sa tray", - "show_tray_icon": "Ipakita ang icon ng System tray", - "about": "Tungkol sa", - "u_love_spotube": "Alam naming gusto mo ang Spotube", - "check_for_updates": "Maghanap ng mga update", - "about_spotube": "Tungkol sa Spotube", - "blacklist": "Blacklist", - "please_sponsor": "Mangyaring Mag-sponsor/Mag-donate", - "spotube_description": "Spotube, isang magaan, cross-platform, libreng-para-sa-lahat na spotify client", - "version": "Bersyon", - "build_number": "Build Number", - "founder": "Nagtatag", - "repository": "Repository", - "bug_issues": "Bug+Mga Isyu", - "made_with": "Ginawa nang may ❤️ sa Bangladesh🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Lisensya", - "add_spotify_credentials": "Idagdag ang iyong mga kredensyal sa spotify para makapagsimula", - "credentials_will_not_be_shared_disclaimer": "Huwag mag-alala, ang alinman sa iyong mga kredensyal ay hindi kokolektahin o ibabahagi sa sinuman", - "know_how_to_login": "Hindi mo alam kung paano gawin ito?", - "follow_step_by_step_guide": "Sundin ang Hakbang-hakbang na gabay", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "Mangyaring punan ang lahat ng field", - "submit": "Isumite", - "exit": "Lumabas", - "previous": "Nakaraan", - "next": "Susunod", - "done": "Tapos na", - "step_1": "Hakbang 1", - "first_go_to": "Una, Pumunta sa", - "login_if_not_logged_in": "at Mag-login/Mag-signup kung hindi ka naka-log in", - "step_2": "Hakbang 2", - "step_2_steps": "1. Kapag naka-log in ka na, pindutin ang F12 o i-right click ang Mouse > Inspect para Buksan ang Browser devtools.\n2. Pagkatapos ay pumunta sa \"Application\" Tab (Chrome, Edge, Brave atbp..) o \"Storage\" Tab (Firefox, Palemoon atbp..)\n3. Pumunta sa \"Cookies\" na seksyon at pagkatapos sa \"https://accounts.spotify.com\" na subseksyon", - "step_3": "Hakbang 3", - "step_3_steps": "Kopyahin ang halaga ng \"sp_dc\" Cookie", - "success_emoji": "Tagumpay🥳", - "success_message": "Ngayon ay matagumpay kang Naka-log in gamit ang iyong Spotify account. Magaling, kaibigan!", - "step_4": "Hakbang 4", - "step_4_steps": "I-paste ang na-kopyang halaga ng \"sp_dc\"", - "something_went_wrong": "May nangyaring mali", - "piped_instance": "Instance ng Piped Server", - "piped_description": "Ang instance ng Piped server na gagamitin para sa pagtutugma ng track", - "piped_warning": "Maaaring hindi gumagana nang mabuti ang ilan sa mga ito. Kaya gamitin sa sarili mong peligro", - "invidious_instance": "Instance ng Invidious Server", - "invidious_description": "Ang instance ng Invidious server na gagamitin para sa pagtutugma ng track", - "invidious_warning": "Maaaring hindi gumagana nang mabuti ang ilan sa mga ito. Kaya gamitin sa sarili mong peligro", - "generate": "Gumawa", - "track_exists": "Ang Track na {track} ay umiiral na", - "replace_downloaded_tracks": "Palitan ang lahat ng na-download na mga track", - "skip_download_tracks": "Laktawan ang pag-download ng lahat ng na-download na mga track", - "do_you_want_to_replace": "Gusto mo bang palitan ang umiiral na track??", - "replace": "Palitan", - "skip": "Laktawan", - "select_up_to_count_type": "Pumili ng hanggang {count} {type}", - "select_genres": "Pumili ng mga Genre", - "add_genres": "Magdagdag ng mga Genre", - "country": "Bansa", - "number_of_tracks_generate": "Bilang ng mga track na gagawin", - "acousticness": "Acoustic-ness", - "danceability": "Kakayahang Sayawin", - "energy": "Enerhiya", - "instrumentalness": "Instrumental-ness", - "liveness": "Liveness", - "loudness": "Lakas", - "speechiness": "Pagsasalita", - "valence": "Valence", - "popularity": "Popularidad", - "key": "Key", - "duration": "Tagal (s)", - "tempo": "Tempo (BPM)", - "mode": "Mode", - "time_signature": "Time Signature", - "short": "Maikli", - "medium": "Katamtaman", - "long": "Mahaba", - "min": "Min", - "max": "Max", - "target": "Target", - "moderate": "Katamtaman", - "deselect_all": "Alisin ang Pagkakapili sa Lahat", - "select_all": "Piliin Lahat", - "are_you_sure": "Sigurado ka ba?", - "generating_playlist": "Gumagawa ng iyong custom na playlist...", - "selected_count_tracks": "Napili ang {count} na mga track", - "download_warning": "Kung nag-download ka ng lahat ng Track sa maramihan, malinaw na nagpa-pirate ka ng Musika at nagsasanhi ng pinsala sa creative society ng Musika. Sana ay alam mo ito. Palaging, subukang igalang at suportahan ang masipag na paggawa ng Artist", - "download_ip_ban_warning": "Sa nga pala, ang iyong IP ay maaaring ma-block sa YouTube dahil sa sobrang mga kahilingan sa pag-download kaysa sa karaniwan. Ang IP block ay nangangahulugang hindi mo magagamit ang YouTube (kahit na naka-log in ka) sa loob ng hindi bababa sa 2-3 buwan mula sa device na may IP na iyon. At hindi pinanghahawakan ng Spotube ang anumang responsibilidad kung mangyayari ito", - "by_clicking_accept_terms": "Sa pamamagitan ng pag-click sa 'tanggapin', sumasang-ayon ka sa mga sumusunod na tuntunin:", - "download_agreement_1": "Alam kong nagpa-pirate ako ng Musika. Masama ako", - "download_agreement_2": "Susuportahan ko ang Artist saan man ako maaari at ginagawa ko lang ito dahil wala akong pera para bumili ng kanilang sining", - "download_agreement_3": "Lubos kong nauunawaan na ang aking IP ay maaaring ma-block sa YouTube at hindi ko pinanghahawakan ang Spotube o ang kanyang mga may-ari/nag-ambag na responsable para sa anumang aksidente na sanhi ng aking kasalukuyang aksyon", - "decline": "Tanggihan", - "accept": "Tanggapin", - "details": "Mga Detalye", - "youtube": "YouTube", - "channel": "Channel", - "likes": "Mga Like", - "dislikes": "Mga Dislike", - "views": "Mga View", - "streamUrl": "Stream URL", - "stop": "Ihinto", - "sort_newest": "Ayusin ayon sa pinakabagong idinagdag", - "sort_oldest": "Ayusin ayon sa pinakalumang idinagdag", - "sleep_timer": "Sleep Timer", - "mins": "{minutes} Minuto", - "hours": "{hours} Oras", - "hour": "{hours} Oras", - "custom_hours": "Custom na Oras", - "logs": "Mga Log", - "developers": "Mga Developer", - "not_logged_in": "Hindi ka naka-log in", - "search_mode": "Mode ng Paghahanap", - "audio_source": "Pinagmulan ng Audio", - "ok": "Ok", - "failed_to_encrypt": "Nabigong i-encrypt", - "encryption_failed_warning": "Gumagamit ng encryption ang Spotube para ligtas na i-store ang iyong data. Ngunit nabigo. Kaya babalik ito sa hindi secure na storage\nKung gumagamit ka ng linux, mangyaring tiyakin na mayroon kang anumang secret-service na naka-install (gnome-keyring, kde-wallet, keepassxc atbp)", - "querying_info": "Kinukuha ang impormasyon...", - "piped_api_down": "Ang Piped API ay hindi gumagana", - "piped_down_error_instructions": "Ang instance ng Piped na {pipedInstance} ay kasalukuyang hindi gumagana\n\nMaaari mong baguhin ang instance o baguhin ang 'Uri ng API' sa opisyal na YouTube API\n\nSiguraduhing i-restart ang app pagkatapos ng pagbabago", - "you_are_offline": "Kasalukuyan kang offline", - "connection_restored": "Naibalik na ang iyong koneksyon sa internet", - "use_system_title_bar": "Gamitin ang title bar ng system", - "crunching_results": "Pinaproseso ang mga resulta...", - "search_to_get_results": "Maghanap para makakuha ng mga resulta", - "use_amoled_mode": "Matingkad na itim na madilim na tema", - "pitch_dark_theme": "AMOLED Mode", - "normalize_audio": "I-normalize ang audio", - "change_cover": "Baguhin ang cover", - "add_cover": "Magdagdag ng cover", - "restore_defaults": "Ibalik ang mga default", - "download_music_codec": "Codec para sa pag-download ng musika", - "streaming_music_codec": "Codec para sa pag-stream ng musika", - "login_with_lastfm": "Mag-login gamit ang Last.fm", - "connect": "Kumonekta", - "disconnect_lastfm": "Idiskonekta ang Last.fm", - "disconnect": "Idiskonekta", - "username": "Username", - "password": "Password", - "login": "Mag-login", - "login_with_your_lastfm": "Mag-login gamit ang iyong Last.fm account", - "scrobble_to_lastfm": "I-scrobble sa Last.fm", - "go_to_album": "Pumunta sa Album", - "discord_rich_presence": "Discord Rich Presence", - "browse_all": "I-browse Lahat", - "genres": "Mga Genre", - "explore_genres": "Tuklasin ang mga Genre", - "friends": "Mga Kaibigan", - "no_lyrics_available": "Paumanhin, hindi mahanap ang lyrics para sa track na ito", - "start_a_radio": "Magsimula ng Radio", - "how_to_start_radio": "Paano mo gustong simulan ang radio?", - "replace_queue_question": "Gusto mo bang palitan ang kasalukuyang pila o idagdag dito?", - "endless_playback": "Walang Hanggang Playback", - "delete_playlist": "Burahin ang Playlist", - "delete_playlist_confirmation": "Sigurado ka bang gusto mong burahin ang playlist na ito?", - "local_tracks": "Mga Lokal na Track", - "local_tab": "Lokal", - "song_link": "Link ng Kanta", - "skip_this_nonsense": "Laktawan ang kalokohan na ito", - "freedom_of_music": "\"Kalayaan ng Musika\"", - "freedom_of_music_palm": "\"Kalayaan ng Musika sa iyong palad\"", - "get_started": "Magsimula na tayo", - "youtube_source_description": "Inirerekomenda at pinakamahusay na gumagana.", - "piped_source_description": "Gusto ng kalayaan? Kapareho ng YouTube ngunit mas malaya.", - "jiosaavn_source_description": "Pinakamahusay para sa rehiyon ng South Asia.", - "invidious_source_description": "Katulad ng Piped ngunit may mas mataas na availability.", - "highest_quality": "Pinakamataas na Kalidad: {quality}", - "select_audio_source": "Pumili ng Pinagmulan ng Audio", - "endless_playback_description": "Awtomatikong magdagdag ng mga bagong kanta\nsa dulo ng pila", - "choose_your_region": "Piliin ang iyong rehiyon", - "choose_your_region_description": "Ito ay tutulong sa Spotube na ipakita sa iyo ang tamang content\npara sa iyong lokasyon.", - "choose_your_language": "Piliin ang iyong wika", - "help_project_grow": "Tulungan ang proyektong ito na lumago", - "help_project_grow_description": "Ang Spotube ay isang open-source na proyekto. Maaari mong tulungan ang proyektong ito na lumago sa pamamagitan ng pag-contribute sa proyekto, pag-ulat ng mga bug, o pagmungkahi ng mga bagong feature.", - "contribute_on_github": "Mag-contribute sa GitHub", - "donate_on_open_collective": "Mag-donate sa Open Collective", - "browse_anonymously": "Mag-browse nang Anonymous", - "enable_connect": "I-enable ang Connect", - "enable_connect_description": "Kontrolin ang Spotube mula sa ibang mga device", - "devices": "Mga Device", - "select": "Pumili", - "connect_client_alert": "Ikaw ay kontrolado ng {client}", - "this_device": "Ang Device na ito", - "remote": "Remote", - "stats": "Mga Stat", - "and_n_more": "at {count} pa", - "recently_played": "Kamakailan Lang na Ni-play", - "browse_more": "Mag-browse pa", - "no_title": "Walang Pamagat", - "not_playing": "Hindi tumutugtog", - "epic_failure": "Epic na pagkabigo!", - "added_num_tracks_to_queue": "Nagdagdag ng {tracks_length} na mga track sa pila", - "spotube_has_an_update": "Ang Spotube ay may update", - "download_now": "I-download Ngayon", - "nightly_version": "Ang Spotube Nightly {nightlyBuildNum} ay inilabas na", - "release_version": "Ang Spotube v{version} ay inilabas na", - "read_the_latest": "Basahin ang pinakabagong ", - "release_notes": "release notes", - "pick_color_scheme": "Pumili ng color scheme", - "save": "I-save", - "choose_the_device": "Piliin ang device:", - "multiple_device_connected": "Mayroong maraming device na nakakonekta.\nPiliin ang device kung saan mo gustong maganap ang aksyon na ito", - "nothing_found": "Walang nahanap", - "the_box_is_empty": "Ang kahon ay walang laman", - "top_artists": "Nangungunang mga Artista", - "top_albums": "Nangungunang mga Album", - "this_week": "Ngayong linggo", - "this_month": "Ngayong buwan", - "last_6_months": "Nakaraang 6 na buwan", - "this_year": "Ngayong taon", - "last_2_years": "Nakaraang 2 taon", - "all_time": "Lahat ng panahon", - "powered_by_provider": "Pinapagana ng {providerName}", - "email": "Email", - "profile_followers": "Mga Tagasunod", - "birthday": "Kaarawan", - "subscription": "Subscription", - "not_born": "Hindi pa ipinanganak", - "hacker": "Hacker", - "profile": "Profile", - "no_name": "Walang Pangalan", - "edit": "I-edit", - "user_profile": "Profile ng User", - "count_plays": "{count} na mga play", - "streaming_fees_hypothetical": "Mga bayarin sa streaming (hypothetical)", - "minutes_listened": "Mga minutong pinapakinggan", - "streamed_songs": "Mga na-stream na kanta", - "count_streams": "{count} na mga stream", - "owned_by_you": "Pag-aari mo", - "copied_shareurl_to_clipboard": "Na-kopya ang {shareUrl} sa clipboard", - "spotify_hipotetical_calculation": "*Ito ay kinalkula batay sa bawat stream\nna bayad ng Spotify na $0.003 hanggang $0.005. Ito ay isang hypothetical\nna pagkalkula para bigyan ang user ng ideya kung magkano\nang kanilang ibabayad sa mga artista kung sila ay nakikinig\nng kanilang kanta sa Spotify.", - "count_mins": "{minutes} minuto", - "summary_minutes": "minuto", - "summary_listened_to_music": "Nakinig sa musika", - "summary_songs": "mga kanta", - "summary_streamed_overall": "Na-stream sa kabuuan", - "summary_owed_to_artists": "Utang sa mga artista\nngayong buwan", - "summary_artists": "artista", - "summary_music_reached_you": "Umabot sa iyo ang musika", - "summary_full_albums": "buong album", - "summary_got_your_love": "Nakuha ang iyong pagmamahal", - "summary_playlists": "mga playlist", - "summary_were_on_repeat": "Pinu-playlst muli", - "total_money": "Kabuuang {money}", - "webview_not_found": "Hindi nahanap ang Webview", - "webview_not_found_description": "Walang webview runtime na naka-install sa iyong device.\nKung naka-install ito, siguraduhing nasa Environment PATH\n\nPagkatapos mag-install, i-restart ang app", - "unsupported_platform": "Hindi suportadong platform", - "cache_music": "I-cache ang musika", - "open": "Buksan", - "cache_folder": "Folder ng cache", - "export": "I-export", - "clear_cache": "Burahin ang cache", - "clear_cache_confirmation": "Gusto mo bang burahin ang cache?", - "export_cache_files": "I-export ang mga Naka-cache na File", - "found_n_files": "Nahanap ang {count} na mga file", - "export_cache_confirmation": "Gusto mo bang i-export ang mga file na ito sa", - "exported_n_out_of_m_files": "Na-export ang {filesExported} mula sa {files} na mga file", - "undo": "I-undo", - "download_all": "I-download lahat", - "add_all_to_playlist": "Idagdag lahat sa playlist", - "add_all_to_queue": "Idagdag lahat sa pila", - "play_all_next": "I-play lahat susunod", - "pause": "Pause", - "view_all": "Tingnan lahat", - "no_tracks_added_yet": "Mukhang wala ka pang idinaragdag na mga track", - "no_tracks": "Mukhang walang mga track dito", - "no_tracks_listened_yet": "Mukhang wala ka pang pinakikinggan", - "not_following_artists": "Hindi ka sumusunod sa anumang mga artista", - "no_favorite_albums_yet": "Mukhang wala ka pang idinagdag na anumang mga album sa iyong mga paborito", - "no_logs_found": "Walang nahanap na mga log", - "youtube_engine": "YouTube Engine", - "youtube_engine_not_installed_title": "Hindi naka-install ang {engine}", - "youtube_engine_not_installed_message": "Hindi naka-install ang {engine} sa iyong sistema.", - "youtube_engine_set_path": "Siguraduhing available ito sa PATH variable o\ni-set ang absolute path sa {engine} executable sa ibaba", - "youtube_engine_unix_issue_message": "Sa macOS/Linux/unix tulad ng OS, ang pag-set ng path sa .zshrc/.bashrc/.bash_profile atbp. ay hindi gagana.\nKailangan mong i-set ang path sa configuration file ng shell", - "download": "I-download", - "file_not_found": "Hindi nahanap ang file", - "custom": "Custom", - "add_custom_url": "Magdagdag ng custom URL", - "edit_port": "I-edit ang port", - "port_helper_msg": "Ang default ay -1 na nagpapahiwatig ng random na numero. Kung na-configure mo ang firewall, inirerekomenda na itakda ito.", - "connect_request": "Payagan ang {client} na kumonekta?", - "connection_request_denied": "Tanggihan ang koneksyon. Tinanggihan ng gumagamit ang pag-access.", - "hipotetical_calculation": "*Ito ay kinakalkula batay sa average na payout ng online music streaming platform na $0.003 hanggang $0.005 kada stream. Ito ay isang hypothetical na kalkulasyon upang bigyan ang user ng insight kung magkano ang babayaran nila sa mga artist kung sakaling makinig sila ng kanilang kanta sa iba't ibang music streaming platform.", - "an_error_occurred": "May naganap na error", - "copy_to_clipboard": "Kopyahin sa clipboard", - "view_logs": "Tingnan ang mga log", - "retry": "Subukang muli", - "no_default_metadata_provider_selected": "Wala kang nakatakdang default na metadata provider", - "manage_metadata_providers": "Pamahalaan ang mga metadata provider", - "open_link_in_browser": "Buksan ang Link sa Browser?", - "do_you_want_to_open_the_following_link": "Gusto mo bang buksan ang sumusunod na link", - "unsafe_url_warning": "Maaaring hindi ligtas ang pagbukas ng mga link mula sa hindi pinagkakatiwalaang pinagmulan. Mag-ingat!\nMaaari mo ring kopyahin ang link sa iyong clipboard.", - "copy_link": "Kopyahin ang Link", - "building_your_timeline": "Binubuo ang iyong timeline batay sa iyong mga pinakinggan...", - "official": "Opisyal", - "author_name": "May-akda: {author}", - "third_party": "Third-party", - "plugin_requires_authentication": "Nangangailangan ng authentication ang plugin", - "update_available": "May available na update", - "supports_scrobbling": "Sinusuportahan ang scrobbling", - "plugin_scrobbling_info": "Sinis-scrobble ng plugin na ito ang iyong musika upang mabuo ang iyong kasaysayan ng pakikinig.", - "default_plugin": "Default", - "set_default": "Itakda bilang default", - "support": "Suporta", - "support_plugin_development": "Suportahan ang pagbuo ng plugin", - "can_access_name_api": "- Maaaring i-access ang **{name}** API", - "do_you_want_to_install_this_plugin": "Gusto mo bang i-install ang plugin na ito?", - "third_party_plugin_warning": "Ang plugin na ito ay mula sa third-party na repository. Mangyaring tiyakin na pinagkakatiwalaan mo ang pinagmulan bago mag-install.", - "author": "May-akda", - "this_plugin_can_do_following": "Maaaring gawin ng plugin na ito ang sumusunod", - "install": "I-install", - "install_a_metadata_provider": "Mag-install ng Metadata Provider", - "no_tracks_playing": "Walang Track na kasalukuyang tumutugtog", - "synced_lyrics_not_available": "Hindi available ang mga naka-sync na lyrics para sa kantang ito. Mangyaring gamitin ang", - "plain_lyrics": "Simpleng Lyrics", - "tab_instead": "na tab sa halip.", - "disclaimer": "Disclaimer", - "third_party_plugin_dmca_notice": "Ang Spotube team ay walang hawak na anumang responsibilidad (kabilang ang legal) para sa anumang \"Third-party\" plugins.\nMangyaring gamitin ang mga ito sa iyong sariling peligro. Para sa anumang mga bug/isyu, mangyaring iulat ang mga ito sa repository ng plugin.\n\nKung ang anumang \"Third-party\" plugin ay lumalabag sa ToS/DMCA ng anumang serbisyo/legal na entity, mangyaring hilingin sa \"Third-party\" plugin author o sa hosting platform e.g. GitHub/Codeberg na gumawa ng aksyon. Ang nakalista sa itaas (\"Third-party\" na may label) ay lahat ng pampubliko/komunidad na pinananatiling mga plugin. Hindi namin sila kinukurusado, kaya hindi kami makakagawa ng anumang aksyon sa kanila.\n\n", - "input_does_not_match_format": "Ang input ay hindi tumutugma sa kinakailangang format", - "metadata_provider_plugins": "Mga Plugin ng Metadata Provider", - "paste_plugin_download_url": "I-paste ang download url o GitHub/Codeberg repo url o direktang link sa .smplug file", - "download_and_install_plugin_from_url": "I-download at i-install ang plugin mula sa url", - "failed_to_add_plugin_error": "Nabigo ang pagdagdag ng plugin: {error}", - "upload_plugin_from_file": "I-upload ang plugin mula sa file", - "installed": "Naka-install", - "available_plugins": "Mga available na plugin", - "configure_your_own_metadata_plugin": "I-configure ang iyong sariling playlist/album/artist/feed metadata provider", - "audio_scrobblers": "Mga Audio Scrobbler", - "scrobbling": "Scrobbling", - "download_music_format": "I-download na format ng musika", - "streaming_music_format": "Format ng streaming ng musika", - "download_music_quality": "Kalidad ng i-download na musika", - "streaming_music_quality": "Kalidad ng streaming ng musika", - "default_metadata_source": "Default na pinagmulan ng metadata", - "set_default_metadata_source": "Itakda ang default na pinagmulan ng metadata", - "default_audio_source": "Default na pinagmulan ng audio", - "set_default_audio_source": "Itakda ang default na pinagmulan ng audio", - "plugins": "Mga plugin", - "configure_plugins": "I-configure ang sarili mong metadata provider at mga audio source plugin", - "source": "Pinagmulan: ", - "uncompressed": "Hindi naka-compress", - "dab_music_source_description": "Para sa mga audiophile. Nagbibigay ng de-kalidad/walang loss na audio streams. Tumpak na pagtutugma ng track batay sa ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_tr.arb b/lib/l10n/app_tr.arb deleted file mode 100644 index 72734d3b..00000000 --- a/lib/l10n/app_tr.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Misafir", - "browse": "Göz at", - "search": "Ara", - "library": "Kütüphane", - "lyrics": "Şarkı sözleri", - "settings": "Ayarlar", - "genre_categories_filter": "Kategorileri veya türleri filtreleyin...", - "genre": "Tür", - "personalized": "Kişiselleştirilmiş", - "featured": "Öne çıkanlar", - "new_releases": "Yeni çıkanlar", - "songs": "Şarkılar", - "playing_track": "{track} oynatılıyor", - "queue_clear_alert": "Bu, mevcut kuyruğu temizleyecektir. {track_length} parça kaldırılacak\nDevam etmek istiyor musunuz?", - "load_more": "Daha fazlasını yükle", - "playlists": "Oynatma listeleri", - "artists": "Sanatçılar", - "albums": "Albümler", - "tracks": "Parçalar", - "downloads": "İndirilenler", - "filter_playlists": "Oynatma listelerinizi filtreleyin...", - "liked_tracks": "Beğenilen parçalar", - "liked_tracks_description": "Beğendiğiniz tüm parçalar", - "create_playlist": "Oynatma listesi oluştur", - "create_a_playlist": "Bir oynatma listesi oluştur", - "update_playlist": "Oynatma listesini güncelle", - "create": "Oluştur", - "cancel": "İptal", - "update": "Güncelle", - "playlist_name": "Oynatma listesi adı", - "name_of_playlist": "Oynatma listesinin adı", - "description": "Açıklama", - "public": "Halka açık", - "collaborative": "İşbirliği", - "search_local_tracks": "Yerel parçaları ara...", - "play": "Oynat", - "delete": "Sil", - "none": "Yok", - "sort_a_z": "A - Z'ye göre sırala", - "sort_z_a": "Z - A'ya göre sırala", - "sort_artist": "Sanatçıya göre sırala", - "sort_album": "Albüme göre sırala", - "sort_duration": "Süreye göre sırala", - "sort_tracks": "Parçaları sırala", - "currently_downloading": "Şu anda indirilenler ({tracks_length})", - "cancel_all": "Tümünü iptal et", - "filter_artist": "Sanatçıları filtreleyin...", - "followers": "{followers} Takipçiler", - "add_artist_to_blacklist": "Sanatçıyı kara listeye ekle", - "top_tracks": "En iyi parçalar", - "fans_also_like": "Hayranlar ayrıca şunları da beğendi", - "loading": "Yükleniyor...", - "artist": "Sanatçı", - "blacklisted": "Kara listeye alındı", - "following": "Takip ediliyor", - "follow": "Takip et", - "artist_url_copied": "Sanatçı bağlantısı panoya kopyalandı", - "added_to_queue": "Kuyruğa {tracks} parçası eklendi", - "filter_albums": "Albümleri filtreleyin...", - "synced": "Senkronize edildi", - "plain": "Sade", - "shuffle": "Karıştır", - "search_tracks": "Parça ara...", - "released": "Yayınlandı", - "error": "Hata {error}", - "title": "Başlık", - "time": "Zaman", - "more_actions": "Daha fazla eylem", - "download_count": "İndir ({count})", - "add_count_to_playlist": "Oynatma Listesine ekle ({count})", - "add_count_to_queue": "Kuyruğa ekle ({count})", - "play_count_next": "Sonrakini oynat ({count})", - "album": "Albüm", - "copied_to_clipboard": "{data} panoya kopyalandı", - "add_to_following_playlists": "{track} parçasını aşağıdaki oynatma listelerine ekle", - "add": "Ekle", - "added_track_to_queue": "{track} kuyruğa eklendi", - "add_to_queue": "Kuyruğa ekle", - "track_will_play_next": "{track} bir sonraki çalacak", - "play_next": "Sonrakini oynat", - "removed_track_from_queue": "{track} kuyruktan kaldırıldı", - "remove_from_queue": "Kuyruktan kaldır", - "remove_from_favorites": "Favorilerden kaldır", - "save_as_favorite": "Favori olarak kaydet", - "add_to_playlist": "Oynatma listesine ekle", - "remove_from_playlist": "Oynatma listesinden kaldır", - "add_to_blacklist": "Kara listeye ekle", - "remove_from_blacklist": "Kara listeden kaldır", - "share": "Paylaş", - "mini_player": "Mini oynatıcı", - "slide_to_seek": "İleri veya geri arama yapmak için kaydırın", - "shuffle_playlist": "Oynatma listesini karıştır", - "unshuffle_playlist": "Oynatma listesinin karışıklığını kaldır", - "previous_track": "Önceki parça", - "next_track": "Sonraki parça", - "pause_playback": "Oynatmayı duraklat", - "resume_playback": "Oynatmayı sürdür", - "loop_track": "Döngü parçası", - "repeat_playlist": "Oynatma listesini tekrarla", - "queue": "Kuyruk", - "alternative_track_sources": "Alternatif parça kaynakları", - "download_track": "Parçayı indir", - "tracks_in_queue": "{tracks} parça kuyrukta", - "clear_all": "Tümünü temizle", - "show_hide_ui_on_hover": "Fareyle üzerine gelindiğinde kullanıcı arayüzünü göster/gizle", - "always_on_top": "Her zaman üstte", - "exit_mini_player": "Mini oynatıcıdan çık", - "download_location": "İndirme konumu", - "account": "Hesap", - "login_with_spotify": "Spotify hesabı ile giriş yap", - "connect_with_spotify": "Spotify ile bağlan", - "logout": "Çıkış yap", - "logout_of_this_account": "Hesaptan çıkış yap", - "language_region": "Dil ve bölge", - "language": "Tercih edilen dil", - "system_default": "Sistem varsayılanı", - "market_place_region": "Tercih edilen bölge", - "recommendation_country": "Tavsiye edilen ülke", - "appearance": "Görünüm", - "layout_mode": "Düzen modu", - "override_layout_settings": "Duyarlı düzen modu ayarlarını geçersiz kıl", - "adaptive": "Uyarlanabilir", - "compact": "Sıkıştırılmış", - "extended": "Genişletilmiş", - "theme": "Tema", - "dark": "Koyu", - "light": "Açık", - "system": "Sistem", - "accent_color": "Vurgu rengi", - "sync_album_color": "Albüm rengini senkronize et", - "sync_album_color_description": "Vurgu rengi olarak albüm resminin baskın rengini kullanır", - "playback": "Oynatma", - "audio_quality": "Ses kalitesi", - "high": "Yüksek", - "low": "Düşük", - "pre_download_play": "Önceden indir ve oynat", - "pre_download_play_description": "Ses akışı yerine baytları indir ve oynat (Daha yüksek bant genişliğine sahip kullanıcılar için önerilir)", - "skip_non_music": "Müzik olmayan bölümleri atlat (SponsorBlock)", - "blacklist_description": "Kara listeye alınan parçalar ve sanatçılar", - "wait_for_download_to_finish": "Lütfen mevcut indirme işleminin tamamlanmasını bekleyin", - "desktop": "Masaüstü", - "close_behavior": "Kapatma davranışı", - "close": "Kapat", - "minimize_to_tray": "Tepsiye küçült", - "show_tray_icon": "Sistem tepsisi simgesini göster", - "about": "Hakkında", - "u_love_spotube": "Spotube'u sevdiğinizi biliyoruz", - "check_for_updates": "Güncellemeleri kontrol et", - "about_spotube": "Spotube hakkında", - "blacklist": "Kara liste", - "please_sponsor": "Sponsor Ol/Bağış Yap", - "spotube_description": "Spotube, hafif, platformlar arası uyumlu ve herkes için ücretsiz bir Spotify istemcisidir.", - "version": "Sürüm", - "build_number": "Derleme numarası", - "founder": "Geliştirici", - "repository": "Depo", - "bug_issues": "Hata + Sorunlar", - "made_with": "❤️ ile Bangladeş'te yapıldı", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Lisans", - "add_spotify_credentials": "Başlamak için spotify kimlik bilgilerinizi ekleyin", - "credentials_will_not_be_shared_disclaimer": "Endişelenmeyin, kimlik bilgilerinizden hiçbiri toplanmayacak veya kimseyle paylaşılmayacak", - "know_how_to_login": "Bunu nasıl yapacağınızı bilmiyor musunuz?", - "follow_step_by_step_guide": "Adım adım kılavuzu takip edin", - "spotify_cookie": "Spotify {name} çerezi", - "cookie_name_cookie": "{name} çerezi", - "fill_in_all_fields": "Lütfen tüm alanları doldurun", - "submit": "Başvur", - "exit": "Çık", - "previous": "Önceki", - "next": "Sonraki", - "done": "Bitti", - "step_1": "1. Adım", - "first_go_to": "İlk olarak şuraya gidin:", - "login_if_not_logged_in": "ve oturum açmadıysanız Oturum açın/Kaydolun", - "step_2": "2. Adım", - "step_2_steps": "1. Oturum açtıktan sonra, tarayıcı geliştirme araçlarını açmak için F12'ye veya fareye sağ tıklayın > İncele'ye basın.\n2. Daha sonra \"Uygulama\" sekmesine (Chrome, Edge, Brave vb..) veya \"Depolama\" sekmesine (Firefox, Palemoon vb..) gidin\n3. \"Çerezler\" bölümüne, ardından \"https://accounts.spotify.com\" alt bölümüne gidin", - "step_3": "3. Adım", - "step_3_steps": "\"sp_dc\" Çerezinin değerini kopyalayın", - "success_emoji": "Başarılı🥳", - "success_message": "Artık Spotify hesabınızla başarıyla giriş yaptınız. Tebrik ederim!", - "step_4": "4. Adım", - "step_4_steps": "Kopyalanan \"sp_dc\" değerini yapıştırın", - "something_went_wrong": "Bir hata oluştu", - "piped_instance": "Piped sunucu örneği", - "piped_description": "Parça eşleştirme için kullanılacak Piped sunucu örneği", - "piped_warning": "Bazıları iyi çalışmayabilir. Yani riski size ait olmak üzere kullanın", - "generate_playlist": "Oynatma listesi oluştur", - "track_exists": "{track} parçası zaten var", - "replace_downloaded_tracks": "İndirilen tüm parçaları değiştir", - "skip_download_tracks": "İndirilen tüm parçaları indirmeyi atla", - "do_you_want_to_replace": "Mevcut parçayı değiştirmek istiyor musunuz?", - "replace": "Değiştir", - "skip": "Atla", - "select_up_to_count_type": "En fazla {count} {type} seçin", - "select_genres": "Türleri seç", - "add_genres": "Tür ekle", - "country": "Ülke", - "number_of_tracks_generate": "Oluşturulacak parça sayısı", - "acousticness": "Akustiklik", - "danceability": "Dans Edilebilirlik", - "energy": "Enerji", - "instrumentalness": "Araçsallık", - "liveness": "Canlılık", - "loudness": "Ses yüksekliği", - "speechiness": "Konuşkanlık", - "valence": "Değerlik", - "popularity": "Popülerlik", - "key": "Anahtar", - "duration": "Süre (sn)", - "tempo": "Tempo (BPM)", - "mode": "Mod", - "time_signature": "Zaman imzası", - "short": "Kısa", - "medium": "Orta", - "long": "Uzun", - "min": "Min", - "max": "Maks", - "target": "Hedef", - "moderate": "Orta", - "deselect_all": "Tüm seçimleri kaldır", - "select_all": "Tümünü seç", - "are_you_sure": "Emin misiniz?", - "generating_playlist": "Özel oynatma listeniz oluşturuluyor...", - "selected_count_tracks": "{count} parça seçildi", - "download_warning": "Tüm şarkıları toplu olarak indiriyorsanız, açıkça müzik korsanlığı yapıyorsunuz ve müzik dünyasının yaratıcı topluluğuna zarar veriyorsunuz demektir. Umuyorum bunun farkındasınızdır. Her zaman, sanatçıların emeğine saygı göstermeyi ve desteklemeyi deneyin.", - "download_ip_ban_warning": "Ayrıca, normalden fazla indirme istekleri nedeniyle YouTube'da IP'niz engellenebilir. IP engeli, en az 2-3 ay boyunca YouTube'u (hatta oturum açmış olsanız bile) o IP cihazından kullanamayacağınız anlamına gelir. Ve eğer böyle bir durum yaşanırsa, Spotube bundan hiçbir sorumluluk kabul etmez.", - "by_clicking_accept_terms": "\"Kabul et\" e tıklayarak aşağıdaki şartları kabul etmiş olursunuz:", - "download_agreement_1": "Müzik korsanlığı yaptığımı biliyorum. Ben fakir biriyim.", - "download_agreement_2": "Sanatçıyı elimden geldiğince destekleyeceğim ve bunu sadece sanatını satın alacak param olmadığı için yapıyorum", - "download_agreement_3": "YouTube'da IP'min engellenebileceğinin tamamen farkındayım ve mevcut eylemlerimden kaynaklanan herhangi bir kaza için Spotube'u veya sahiplerini/katkıda bulunanları sorumlu tutmuyorum.", - "decline": "Reddet", - "accept": "Kabul et", - "details": "Detaylar", - "youtube": "YouTube", - "channel": "Kanal", - "likes": "Beğenenler", - "dislikes": "Beğenmeyenler", - "views": "İzlenmeler", - "streamUrl": "Akış bağlantısı", - "stop": "Durdur", - "sort_newest": "En yeni eklenene göre sırala.", - "sort_oldest": "En eski eklenene göre sırala", - "sleep_timer": "Uyku Zamanlayıcısı", - "mins": "{minutes} Dakika", - "hours": "{hours} Saatler", - "hour": "{hours} Saat", - "custom_hours": "Özel Saatler", - "logs": "Günlükler", - "developers": "Geliştiriciler", - "not_logged_in": "Giriş yapmadınız", - "search_mode": "Arama modu", - "audio_source": "Ses kaynağı", - "ok": "Tamam", - "failed_to_encrypt": "Şifreleme başarısız oldu", - "encryption_failed_warning": "Spotube, verilerinizi güvenli bir şekilde depolamak için şifreleme kullanır. Ancak bunu başaramadı. Bu nedenle, güvensiz depolamaya geri dönecektir\nLinux kullanıyorsanız, lütfen gnome-keyring, kde-wallet, keepassxc vb. herhangi bir gizli servisin yüklü olduğundan emin olun.", - "querying_info": "Bilgi sorgulanıyor...", - "piped_api_down": "Piped API kapalı", - "piped_down_error_instructions": "Piped örneği {pipedInstance} şu anda kapalı\n\nÖrneği değiştirin veya 'API türünü' resmi YouTube API'si olarak değiştirin\n\nDeğişiklikten sonra uygulamayı yeniden başlattığınızdan emin olun", - "you_are_offline": "Şu anda çevrimdışısınız", - "connection_restored": "İnternet bağlantınız geri yüklendi", - "use_system_title_bar": "Sistem başlık çubuğunu kullan", - "crunching_results": "Sonuçlar...", - "search_to_get_results": "Sonuç almak için arayın", - "use_amoled_mode": "AMOLED modu kullan", - "pitch_dark_theme": "Zifiri karanlık koyu tema", - "normalize_audio": "Sesi normalleştir", - "change_cover": "Kapağı değiştir", - "add_cover": "Kapak ekle", - "restore_defaults": "Varsayılanları geri yükle", - "download_music_codec": "Müzik codec bileşenini indir", - "streaming_music_codec": "Müzik codec'i akışı", - "login_with_lastfm": "Last.fm ile giriş yap", - "connect": "Bağlan", - "disconnect_lastfm": "Last.fm bağlantısını kes", - "disconnect": "Bağlantıyı kes", - "username": "Kullanıcı adı", - "password": "Şifre", - "login": "Giriş yap", - "login_with_your_lastfm": "Last.fm hesabınızla giriş yapın", - "scrobble_to_lastfm": "Last.fm için Scrobble", - "go_to_album": "Albüme git", - "discord_rich_presence": "Discord zengin varlığı", - "browse_all": "Tümüne göz at", - "genres": "Müzik türleri", - "explore_genres": "Türleri keşfet", - "friends": "Arkadaşlar", - "no_lyrics_available": "Üzgünüz, bu parçanın sözleri bulunamıyor", - "start_a_radio": "Radyo başlat", - "how_to_start_radio": "Radyoyu nasıl başlatmak istersiniz?", - "replace_queue_question": "Mevcut kuyruğu değiştirmek mi yoksa eklemek mi istersiniz?", - "endless_playback": "Sonsuz olarak oynat", - "delete_playlist": "Oynatma listesini sil", - "delete_playlist_confirmation": "Bu oynatma listesini silmek istediğinizden emin misiniz?", - "local_tracks": "Yerel parçalar", - "song_link": "Şarkı bağlantısı", - "skip_this_nonsense": "Bu saçmalığı atla", - "freedom_of_music": "“Müzik özgürlüğü”", - "freedom_of_music_palm": "“Müzik özgürlüğü avucunuzun içinde”", - "get_started": "Haydi başlayalım", - "youtube_source_description": "Tavsiye edilir ve en iyi şekilde çalışır.", - "piped_source_description": "Özgür hissediyor musunuz? YouTube ile aynı, ama çok daha özgür.", - "jiosaavn_source_description": "Güney Asya bölgesi için en iyisi.", - "highest_quality": "En yüksek kalite: {quality}", - "select_audio_source": "Ses kaynağını seçin", - "endless_playback_description": "Yeni şarkıları otomatik olarak\nkuyruğun sonuna ekle", - "choose_your_region": "Bölgenizi seçin", - "choose_your_region_description": "Bu, Spotube'un konumunuza uygun içerikleri göstermesine yardımcı olacaktır.", - "choose_your_language": "Dilinizi seçin", - "help_project_grow": "Bu projenin büyümesine yardımcı olun", - "help_project_grow_description": "Spotube açık kaynaklı bir projedir. Projeye katkıda bulunarak, hataları bildirerek veya yeni özellikler önererek bu projenin büyümesine yardımcı olabilirsiniz.", - "contribute_on_github": "GitHub'da katkıda bulun", - "donate_on_open_collective": "Open Collective'de bağış yap", - "browse_anonymously": "Anonim olarak giriş yap", - "enable_connect": "Bağlanmayı etkinleştir", - "enable_connect_description": "Spotube'u diğer cihazlardan kontrol edin", - "devices": "Cihazlar", - "select": "Seç", - "connect_client_alert": "{client} tarafından kontrol ediliyorsun.", - "this_device": "Bu cihaz", - "remote": "Yönet", - "local_library": "Yerel kütüphane", - "add_library_location": "Kütüphaneye ekle", - "remove_library_location": "Kütüphaneden çıkar", - "local_tab": "Yerel", - "stats": "İstatistikler", - "and_n_more": "ve {count} daha", - "recently_played": "Son Çalınanlar", - "browse_more": "Daha Fazla Göz At", - "no_title": "Başlık Yok", - "not_playing": "Çalmıyor", - "epic_failure": "Efsanevi başarısızlık!", - "added_num_tracks_to_queue": "{tracks_length} şarkı sıraya eklendi", - "spotube_has_an_update": "Spotube bir güncelleme aldı", - "download_now": "Şimdi İndir", - "nightly_version": "Spotube Nightly {nightlyBuildNum} yayımlandı", - "release_version": "Spotube v{version} yayımlandı", - "read_the_latest": "Son haberleri oku", - "release_notes": "sürüm notları", - "pick_color_scheme": "Renk şeması seç", - "save": "Kaydet", - "choose_the_device": "Cihazı seçin:", - "multiple_device_connected": "Birden fazla cihaz bağlı.\nBu işlemi gerçekleştirmek istediğiniz cihazı seçin", - "nothing_found": "Hiçbir şey bulunamadı", - "the_box_is_empty": "Kutu boş", - "top_artists": "En İyi Sanatçılar", - "top_albums": "En İyi Albümler", - "this_week": "Bu hafta", - "this_month": "Bu ay", - "last_6_months": "Son 6 ay", - "this_year": "Bu yıl", - "last_2_years": "Son 2 yıl", - "all_time": "Tüm zamanlar", - "powered_by_provider": "{providerName} tarafından desteklenmektedir", - "email": "E-posta", - "profile_followers": "Takipçiler", - "birthday": "Doğum Günü", - "subscription": "Abonelik", - "not_born": "Henüz doğmadı", - "hacker": "Hacker", - "profile": "Profil", - "no_name": "İsim Yok", - "edit": "Düzenle", - "user_profile": "Kullanıcı Profili", - "count_plays": "{count} çalma", - "streaming_fees_hypothetical": "*Spotify'ın akış başına ödeme miktarına\n$0.003 ile $0.005 arasında hesaplanmıştır. Bu, kullanıcıya\nSpotify'da şarkılarını dinlerse sanatçılara ne kadar ödeme\nyapmış olabileceğini göstermek için hipotetik bir hesaplamadır.", - "count_mins": "{minutes} dk", - "summary_minutes": "dakika", - "summary_listened_to_music": "Dinlenen müzik", - "summary_songs": "şarkılar", - "summary_streamed_overall": "Genel olarak akış", - "summary_owed_to_artists": "Sanatçılara borç\nbu ay", - "summary_artists": "sanatçının", - "summary_music_reached_you": "Müzik sana ulaştı", - "summary_full_albums": "tam albümler", - "summary_got_your_love": "Sevgini aldı", - "summary_playlists": "çalma listeleri", - "summary_were_on_repeat": "Tekrarda vardı", - "total_money": "Toplam {money}", - "minutes_listened": "Dinlenilen Dakikalar", - "streamed_songs": "Yayınlanan Şarkılar", - "count_streams": "{count} yayın", - "owned_by_you": "Sahip olduğunuz", - "copied_shareurl_to_clipboard": "{shareUrl} panoya kopyalandı", - "spotify_hipotetical_calculation": "*Bu, Spotify'ın her yayın başına ödemenin\n$0.003 ile $0.005 arasında olduğu varsayımıyla hesaplanmıştır. Bu\nhipotetik bir hesaplamadır, kullanıcıya şarkılarını Spotify'da dinlediklerinde\nsanatçılara ne kadar ödeme yapacaklarını gösterir.", - "webview_not_found": "Webview bulunamadı", - "webview_not_found_description": "Cihazınızda herhangi bir Webview çalışma zamanı yüklü değil.\nEğer kuruluysa, ortam YOLUNDA olduğundan emin olun\n\nKurulumdan sonra uygulamayı yeniden başlatın", - "unsupported_platform": "Desteklenmeyen platform", - "invidious_instance": "Invidious Sunucu Örneği", - "invidious_description": "Parça eşleştirmesi için kullanılacak Invidious sunucu örneği", - "invidious_warning": "Bazıları iyi çalışmayabilir. Kendi riskinizde kullanın", - "invidious_source_description": "Piped'a benzer, ancak daha yüksek kullanılabilirliğe sahip.", - "cache_music": "Müziği önbellekle", - "open": "Aç", - "cache_folder": "Önbellek klasörü", - "export": "Dışa aktar", - "clear_cache": "Önbelleği temizle", - "clear_cache_confirmation": "Önbelleği temizlemek istiyor musunuz?", - "export_cache_files": "Önbelleğe Alınmış Dosyaları Dışa Aktar", - "found_n_files": "{count} dosya bulundu", - "export_cache_confirmation": "Bu dosyaları dışa aktarmak istiyor musunuz", - "exported_n_out_of_m_files": "{filesExported} / {files} dosya dışa aktarıldı", - "playlist": "Çalma Listesi", - "no_loop": "Dönüş Yok", - "generate": "Oluştur", - "undo": "Geri Al", - "download_all": "Tümünü İndir", - "add_all_to_playlist": "Hepsini çalma listesine ekle", - "add_all_to_queue": "Hepsini kuyruğa ekle", - "play_all_next": "Hepsini bir sonraki çal", - "pause": "Duraklat", - "view_all": "Tümünü Gör", - "no_tracks_added_yet": "Henüz hiçbir şarkı eklemediniz gibi görünüyor", - "no_tracks": "Burada hiç şarkı yok gibi görünüyor", - "no_tracks_listened_yet": "Henüz hiçbir şey dinlemediniz gibi görünüyor", - "not_following_artists": "Hiçbir sanatçıyı takip etmiyorsunuz", - "no_favorite_albums_yet": "Henüz favorilerinize herhangi bir albüm eklemediniz gibi görünüyor", - "no_logs_found": "Log bulunamadı", - "youtube_engine": "YouTube Motoru", - "youtube_engine_not_installed_title": "{engine} Yüklü değil", - "youtube_engine_not_installed_message": "{engine} sisteminizde yüklü değil.", - "youtube_engine_set_path": "PATH değişkeninde kullanılabilir olduğundan emin olun veya\n{engine} çalıştırılabilir dosyasının mutlak yolunu aşağıda ayarlayın", - "youtube_engine_unix_issue_message": "macOS/Linux/Unix benzeri işletim sistemlerinde, .zshrc/.bashrc/.bash_profile gibi dosyalarda yol ayarlamak işe yaramaz.\nYolunuzu kabuk yapılandırma dosyasına ayarlamanız gerekir", - "download": "İndir", - "file_not_found": "Dosya bulunamadı", - "custom": "Özel", - "add_custom_url": "Özel URL ekle", - "edit_port": "Portu düzenle", - "port_helper_msg": "Varsayılan -1'dir, bu da rastgele bir sayıyı gösterir. Bir güvenlik duvarınız varsa, bunu ayarlamanız önerilir.", - "connect_request": "{client} bağlantısına izin verilsin mi?", - "connection_request_denied": "Bağlantı reddedildi. Kullanıcı erişimi reddetti.", - "hipotetical_calculation": "*Bu, çevrimiçi müzik akışı platformlarının ortalama akış başına $0,003 ile $0,005 arasındaki ödemesine göre hesaplanmıştır. Bu, kullanıcının farklı müzik akışı platformlarında şarkılarını dinleselerdi sanatçılara ne kadar ödeme yapacaklarına dair fikir vermek için yapılan varsayımsal bir hesaplamadır.", - "an_error_occurred": "Bir hata oluştu", - "copy_to_clipboard": "Panoya kopyala", - "view_logs": "Günlükleri görüntüle", - "retry": "Tekrar dene", - "no_default_metadata_provider_selected": "Varsayılan bir meta veri sağlayıcısı ayarlanmadı", - "manage_metadata_providers": "Meta veri sağlayıcılarını yönet", - "open_link_in_browser": "Bağlantıyı Tarayıcıda Aç?", - "do_you_want_to_open_the_following_link": "Aşağıdaki bağlantıyı açmak istiyor musunuz", - "unsafe_url_warning": "Güvenilmeyen kaynaklardan bağlantı açmak güvensiz olabilir. Dikkatli olun!\nBağlantıyı panonuza da kopyalayabilirsiniz.", - "copy_link": "Bağlantıyı Kopyala", - "building_your_timeline": "Dinlemelerinize göre zaman çizelgeniz oluşturuluyor...", - "official": "Resmi", - "author_name": "Yazar: {author}", - "third_party": "Üçüncü taraf", - "plugin_requires_authentication": "Eklenti kimlik doğrulama gerektirir", - "update_available": "Güncelleme mevcut", - "supports_scrobbling": "Scrobbling'i destekler", - "plugin_scrobbling_info": "Bu eklenti, dinleme geçmişinizi oluşturmak için müziğinizi scrobble eder.", - "default_plugin": "Varsayılan", - "set_default": "Varsayılan olarak ayarla", - "support": "Destek", - "support_plugin_development": "Eklenti geliştirmeyi destekle", - "can_access_name_api": "- **{name}** API'ye erişebilir", - "do_you_want_to_install_this_plugin": "Bu eklentiyi yüklemek istiyor musunuz?", - "third_party_plugin_warning": "Bu eklenti üçüncü taraf bir depodan gelmektedir. Lütfen yüklemeden önce kaynağa güvendiğinizden emin olun.", - "author": "Yazar", - "this_plugin_can_do_following": "Bu eklenti aşağıdakileri yapabilir", - "install": "Yükle", - "install_a_metadata_provider": "Bir Meta Veri Sağlayıcısı Yükle", - "no_tracks_playing": "Şu anda çalınan bir Parça yok", - "synced_lyrics_not_available": "Bu şarkı için senkronize şarkı sözleri mevcut değil. Lütfen", - "plain_lyrics": "Düz Şarkı Sözleri", - "tab_instead": "sekmesini kullanın.", - "disclaimer": "Sorumluluk Reddi", - "third_party_plugin_dmca_notice": "Spotube ekibi, herhangi bir \"Üçüncü taraf\" eklentisi için herhangi bir sorumluluk (yasal olanlar dahil) kabul etmez.\nLütfen bunları kendi riskinizde kullanın. Herhangi bir hata/sorun için lütfen bunları eklenti deposuna bildirin.\n\nHerhangi bir \"Üçüncü taraf\" eklentisi bir hizmetin/yasal varlığın ToS/DMCA'sını ihlal ediyorsa, lütfen \"Üçüncü taraf\" eklenti yazarından veya barındırma platformundan, örneğin GitHub/Codeberg'den harekete geçmesini isteyin. Yukarıda listelenen (\"Üçüncü taraf\" olarak etiketlenen) eklentilerin tümü genel/topluluk tarafından sürdürülen eklentilerdir. Biz bunları küratörlüğünü yapmıyoruz, bu yüzden onlar üzerinde herhangi bir işlem yapamayız.\n\n", - "input_does_not_match_format": "Girdi, gerekli biçimle eşleşmiyor", - "metadata_provider_plugins": "Meta Veri Sağlayıcısı Eklentileri", - "paste_plugin_download_url": "İndirme url'sini veya GitHub/Codeberg repo url'sini veya .smplug dosyasına doğrudan bağlantıyı yapıştırın", - "download_and_install_plugin_from_url": "url'den eklentiyi indir ve yükle", - "failed_to_add_plugin_error": "Eklenti eklenemedi: {error}", - "upload_plugin_from_file": "Dosyadan eklenti yükle", - "installed": "Yüklü", - "available_plugins": "Mevcut eklentiler", - "configure_your_own_metadata_plugin": "Kendi çalma listenizi/albümünüzü/sanatçınızı/akış meta veri sağlayıcınızı yapılandırın", - "audio_scrobblers": "Ses Scrobbler'lar", - "scrobbling": "Scrobbling", - "download_music_format": "Müzik indirme formatı", - "streaming_music_format": "Müzik akış formatı", - "download_music_quality": "İndirilen müzik kalitesi", - "streaming_music_quality": "Yayınlanan müzik kalitesi", - "default_metadata_source": "Varsayılan meta veri kaynağı", - "set_default_metadata_source": "Varsayılan meta veri kaynağını ayarla", - "default_audio_source": "Varsayılan ses kaynağı", - "set_default_audio_source": "Varsayılan ses kaynağını ayarla", - "plugins": "Eklentiler", - "configure_plugins": "Kendi meta veri sağlayıcı ve ses kaynağı eklentilerinizi yapılandırın", - "source": "Kaynak: ", - "uncompressed": "Sıkıştırılmamış", - "dab_music_source_description": "Audiophile'ler için. Yüksek kaliteli/kayıpsız ses akışları sağlar. Doğru ISRC tabanlı parça eşleştirme." -} \ No newline at end of file diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb deleted file mode 100644 index bdb723ad..00000000 --- a/lib/l10n/app_uk.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Гість", - "browse": "Огляд", - "search": "Пошук", - "library": "Медіатека", - "lyrics": "Тексти пісень", - "settings": "Налаштування", - "genre_categories_filter": "Фільтрувати категорії або жанри...", - "genre": "Жанр", - "personalized": "Персоналізовані", - "featured": "Рекомендовані", - "new_releases": "Нові релізи", - "songs": "Пісні", - "playing_track": "Відтворюється {track}", - "queue_clear_alert": "Це очистить поточну чергу. Буде видалено {track_length} треків\nПродовжити?", - "load_more": "Завантажити більше", - "playlists": "Плейлисти", - "artists": "Виконавці", - "albums": "Альбоми", - "tracks": "Треки", - "downloads": "Завантаження", - "filter_playlists": "Фільтрувати плейлисти...", - "liked_tracks": "Сподобалися треки", - "liked_tracks_description": "Усі ваші сподобалися треки", - "create_playlist": "Створити плейлист", - "create_a_playlist": "Створити плейлист", - "update_playlist": "Оновити плейлист", - "create": "Створити", - "cancel": "Скасувати", - "update": "Оновити", - "playlist_name": "Назва плейлиста", - "name_of_playlist": "Назва плейлиста", - "description": "Опис", - "public": "Публічний", - "collaborative": "Спільний", - "search_local_tracks": "Пошук локальних треків...", - "play": "Відтворити", - "delete": "Видалити", - "none": "Немає", - "sort_a_z": "Сортувати за алфавітом A-Я", - "sort_z_a": "Сортувати за алфавітом Я-А", - "sort_artist": "Сортувати за виконавцем", - "sort_album": "Сортувати за альбомом", - "sort_tracks": "Сортувати треки", - "currently_downloading": "Завантажується ({tracks_length})", - "cancel_all": "Скасувати все", - "filter_artist": "Фільтрувати виконавців...", - "followers": "{followers} підписників", - "add_artist_to_blacklist": "Додати виконавця до чорного списку", - "top_tracks": "Топ треки", - "fans_also_like": "Шанувальникам також подобається", - "loading": "Завантаження...", - "artist": "Виконавець", - "blacklisted": "У чорному списку", - "following": "Стежу", - "follow": "Стежити", - "artist_url_copied": "URL виконавця скопійовано до буфера обміну", - "added_to_queue": "Додано {tracks} треків до черги", - "filter_albums": "Фільтрувати альбоми...", - "synced": "Синхронізовано", - "plain": "Звичайний", - "shuffle": "Випадковий порядок", - "search_tracks": "Пошук треків...", - "released": "Випущено", - "error": "Помилка {error}", - "title": "Назва", - "time": "Час", - "more_actions": "Більше дій", - "download_count": "Завантажено ({count})", - "add_count_to_playlist": "Додати ({count}) до плейлиста", - "add_count_to_queue": "Додати ({count}) до черги", - "play_count_next": "Відтворити ({count}) наступними", - "album": "Альбом", - "copied_to_clipboard": "Скопійовано {data} до буфера обміну", - "add_to_following_playlists": "Додати {track} до наступних плейлистів", - "add": "Додати", - "added_track_to_queue": "Додано {track} до черги", - "add_to_queue": "Додати до черги", - "track_will_play_next": "{track} буде відтворено наступним", - "play_next": "Відтворити наступним", - "removed_track_from_queue": "Видалено {track} з черги", - "remove_from_queue": "Видалити з черги", - "remove_from_favorites": "Видалити з обраних", - "save_as_favorite": "Зберегти як обране", - "add_to_playlist": "Додати до плейлиста", - "remove_from_playlist": "Видалити з плейлиста", - "add_to_blacklist": "Додати до чорного списку", - "remove_from_blacklist": "Видалити з чорного списку", - "share": "Поділитися", - "mini_player": "Міні-плеєр", - "slide_to_seek": "Проведіть пальцем, щоб перемотати вперед або назад", - "shuffle_playlist": "Випадковий порядок відтворення плейлиста", - "unshuffle_playlist": "Відключити випадковий порядок відтворення плейлиста", - "previous_track": "Попередній трек", - "next_track": "Наступний трек", - "pause_playback": "Призупинити відтворення", - "resume_playback": "Відновити відтворення", - "loop_track": "Повторювати трек", - "repeat_playlist": "Повторювати плейлист", - "queue": "Черга", - "alternative_track_sources": "Альтернативні джерела треків", - "download_track": "Завантажити трек", - "tracks_in_queue": "{tracks} треків у черзі", - "clear_all": "Очистити все", - "show_hide_ui_on_hover": "Показувати/приховувати інтерфейс при наведенні курсору", - "always_on_top": "Завжди зверху", - "exit_mini_player": "Вийти з міні-плеєра", - "download_location": "Шлях завантаження", - "account": "Обліковий запис", - "login_with_spotify": "Увійти за допомогою облікового запису Spotify", - "connect_with_spotify": "Підключитися до Spotify", - "logout": "Вийти", - "logout_of_this_account": "Вийти з цього облікового запису", - "language_region": "Мова та регіон", - "language": "Мова", - "system_default": "Системна мова", - "market_place_region": "Регіон маркетплейсу", - "recommendation_country": "Країна рекомендацій", - "appearance": "Зовнішній вигляд", - "layout_mode": "Режим макета", - "override_layout_settings": "Перезаписати налаштування адаптивного режиму макета", - "adaptive": "Адаптивний", - "compact": "Компактний", - "extended": "Розширений", - "theme": "Тема", - "dark": "Темна", - "light": "Світла", - "system": "Системна", - "accent_color": "Колір акценту", - "sync_album_color": "Синхронізувати колір альбому", - "sync_album_color_description": "Використовує домінуючий колір обкладинки альбому як колір акценту", - "playback": "Відтворення", - "audio_quality": "Якість аудіо", - "high": "Висока", - "low": "Низька", - "pre_download_play": "Попереднє завантаження та відтворення", - "pre_download_play_description": "Замість потокового відтворення аудіо завантажте байти та відтворіть їх (рекомендовано для користувачів з високою пропускною здатністю)", - "skip_non_music": "Пропустити не музичні сегменти", - "blacklist_description": "Треки та виконавці в чорному списку", - "wait_for_download_to_finish": "Зачекайте, поки завершиться поточна загрузка", - "desktop": "Робочий стіл", - "close_behavior": "Поведінка при закритті", - "close": "Закрити", - "minimize_to_tray": "Згорнути в трей", - "show_tray_icon": "Показувати значок у системному треї", - "about": "Про", - "u_love_spotube": "Ми знаємо, що ви любите Spotube", - "check_for_updates": "Перевірити наявність оновлень", - "about_spotube": "Про Spotube", - "blacklist": "Чорний список", - "please_sponsor": "Будь ласка, станьте спонсором/зробіть пожертву", - "spotube_description": "Spotube, легкий, кросплатформовий, безкоштовний клієнт Spotify", - "version": "Версія", - "build_number": "Номер збірки", - "founder": "Засновник", - "repository": "Репозиторій", - "bug_issues": "Помилки та проблеми", - "made_with": "Зроблено з ❤️ в Бангладеш 🇧🇩", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Ліцензія", - "add_spotify_credentials": "Додайте свої облікові дані Spotify, щоб почати", - "credentials_will_not_be_shared_disclaimer": "Не хвилюйтеся, жодні ваші облікові дані не будуть зібрані або передані кому-небудь", - "know_how_to_login": "Не знаєте, як це зробити?", - "follow_step_by_step_guide": "Дотримуйтесь покрокової інструкції", - "spotify_cookie": "Кукі-файл Spotify {name}", - "cookie_name_cookie": "Кукі-файл {name}", - "fill_in_all_fields": "Будь ласка, заповніть усі поля", - "submit": "Надіслати", - "exit": "Вийти", - "previous": "Попередній", - "next": "Наступний", - "done": "Готово", - "step_1": "Крок 1", - "first_go_to": "Спочатку перейдіть на", - "login_if_not_logged_in": "та Увійдіть/Зареєструйтесь, якщо ви не ввійшли", - "step_2": "Крок 2", - "step_2_steps": "1. Після входу натисніть F12 або клацніть правою кнопкою миші > Інспектувати, щоб відкрити інструменти розробки браузера.\n2. Потім перейдіть на вкладку 'Програма' (Chrome, Edge, Brave тощо) або вкладку 'Сховище' (Firefox, Palemoon тощо).\n3. Перейдіть до розділу 'Кукі-файли', а потім до підрозділу 'https://accounts.spotify.com'", - "step_3": "Крок 3", - "success_emoji": "Успіх🥳", - "success_message": "Тепер ви успішно ввійшли у свій обліковий запис Spotify. Гарна робота, друже!", - "step_4": "Крок 4", - "something_went_wrong": "Щось пішло не так", - "piped_instance": "Примірник сервера Piped", - "piped_description": "Примірник сервера Piped, який використовуватиметься для зіставлення треків", - "piped_warning": "Деякі з них можуть працювати неправильно. Тому використовуйте на свій страх і ризик", - "generate_playlist": "Створити плейлист", - "track_exists": "Трек {track} вже існує", - "replace_downloaded_tracks": "Замінити всі завантажені треки", - "skip_download_tracks": "Пропустити завантаження всіх завантажених треків", - "do_you_want_to_replace": "Ви хочете замінити існуючий трек?", - "replace": "Замінити", - "skip": "Пропустити", - "select_up_to_count_type": "Виберіть до {count} {type}", - "select_genres": "Виберіть жанри", - "add_genres": "Додати жанри", - "country": "Країна", - "number_of_tracks_generate": "Кількість треків для створення", - "acousticness": "Акустичність", - "danceability": "Танцювальність", - "energy": "Енергія", - "instrumentalness": "Інструментальність", - "liveness": "Живість", - "loudness": "Гучність", - "speechiness": "Розмовність", - "valence": "Валентність", - "popularity": "Популярність", - "key": "Тональність", - "duration": "Тривалість (с)", - "tempo": "Темп (BPM)", - "mode": "Режим", - "time_signature": "Розмір", - "short": "Короткий", - "medium": "Середній", - "long": "Довгий", - "min": "Мін", - "max": "Макс", - "target": "Цільовий", - "moderate": "Помірний", - "deselect_all": "Зняти вибір з усіх", - "select_all": "Вибрати всі", - "are_you_sure": "Ви впевнені?", - "generating_playlist": "Створення вашого персонального плейлиста...", - "selected_count_tracks": "Вибрано {count} треків", - "download_warning": "Якщо ви завантажуєте всі треки масово, ви явно піратствуєте і завдаєте шкоди музичному творчому співтовариству. Сподіваюся, ви усвідомлюєте це. Завжди намагайтеся поважати і підтримувати важку працю артиста", - "download_ip_ban_warning": "До речі, ваш IP може бути заблокований на YouTube через надмірну кількість запитів на завантаження, ніж зазвичай. Блокування IP-адреси означає, що ви не зможете користуватися YouTube (навіть якщо ви увійшли в систему) протягом щонайменше 2-3 місяців з цього пристрою. І Spotube не несе жодної відповідальності, якщо це станеться", - "by_clicking_accept_terms": "Натискаючи 'прийняти', ви погоджуєтеся з наступними умовами:", - "download_agreement_1": "Я знаю, що краду музику. Я поганий.", - "download_agreement_2": "Я підтримаю автора, де тільки зможу, і роблю це лише тому, що не маю грошей, щоб купити його роботи.", - "download_agreement_3": "Я повністю усвідомлюю, що мій IP може бути заблокований на YouTube, і я не покладаю на Spotube або його власників/контрибуторів відповідальність за будь-які нещасні випадки, спричинені моїми діями.", - "decline": "Відхилити", - "accept": "Прийняти", - "details": "Деталі", - "youtube": "YouTube", - "channel": "Канал", - "likes": "Подобається", - "dislikes": "Не подобається", - "views": "Переглядів", - "streamUrl": "Посилання на стрімінг", - "stop": "Зупинити", - "sort_newest": "Сортувати за датою додавання (новіші першими)", - "sort_oldest": "Сортувати за датою додавання (старіші першими)", - "sleep_timer": "Таймер сну", - "mins": "{minutes} хвилин", - "hours": "{hours} годин", - "hour": "{hours} година", - "custom_hours": "Кількість годин на замовлення", - "logs": "Логи", - "developers": "Розробники", - "not_logged_in": "Ви не ввійшли в обліковий запис", - "search_mode": "Режим пошуку", - "audio_source": "Джерело аудіо", - "ok": "Гаразд", - "failed_to_encrypt": "Не вдалося зашифрувати", - "encryption_failed_warning": "Spotube використовує шифрування для безпечного зберігання ваших даних. Але не вдалося цього зробити. Тому він перейде до небезпечного зберігання\nЯкщо ви використовуєте Linux, переконайтеся, що у вас встановлено будь-який секретний сервіс (gnome-keyring, kde-wallet, keepassxc тощо)", - "querying_info": "Запит інформації...", - "piped_api_down": "API Piped не працює", - "piped_down_error_instructions": "Поточний екземпляр Piped {pipedInstance} не працює\n\nЗмініть екземпляр або змініть 'Тип API' на офіційний YouTube API\n\nОбов'язково перезапустіть програму після зміни", - "you_are_offline": "Ви зараз не в мережі", - "connection_restored": "Ваше інтернет-з'єднання відновлено", - "use_system_title_bar": "Використовувати системний заголовок", - "crunching_results": "Опрацювання результатів...", - "search_to_get_results": "Почніть пошук, щоб отримати результати", - "use_amoled_mode": "Режим AMOLED", - "pitch_dark_theme": "Темна тема", - "normalize_audio": "Нормалізувати звук", - "change_cover": "Змінити обкладинку", - "add_cover": "Додати обкладинку", - "restore_defaults": "Відновити налаштування за замовчуванням", - "download_music_codec": "Завантажити кодек для музики", - "streaming_music_codec": "Кодек потокової передачі музики", - "login_with_lastfm": "Увійти з Last.fm", - "connect": "Підключити", - "disconnect_lastfm": "Відключитися від Last.fm", - "disconnect": "Відключити", - "username": "Ім'я користувача", - "password": "Пароль", - "login": "Увійти", - "login_with_your_lastfm": "Увійти в свій обліковий запис Last.fm", - "scrobble_to_lastfm": "Скробблінг на Last.fm", - "go_to_album": "Перейти до альбому", - "discord_rich_presence": "Багата присутність у Discord", - "browse_all": "Переглянути все", - "genres": "Жанри", - "explore_genres": "Досліджувати жанри", - "step_3_steps": "Скопіюйте значення cookie \"sp_dc\"", - "step_4_steps": "Вставте скопійоване значення \"sp_dc\"", - "friends": "Друзі", - "no_lyrics_available": "Вибачте, не вдалося знайти текст для цього треку", - "sort_duration": "Сортувати за тривалістю", - "start_a_radio": "Запустити радіо", - "how_to_start_radio": "Як ви хочете запустити радіо?", - "replace_queue_question": "Ви хочете замінити поточну чергу чи додати до неї?", - "endless_playback": "Безкінечне відтворення", - "delete_playlist": "Видалити плейлист", - "delete_playlist_confirmation": "Ви впевнені, що хочете видалити цей плейлист?", - "local_tracks": "Місцеві треки", - "song_link": "Посилання на пісню", - "skip_this_nonsense": "Пропустити цей бред", - "freedom_of_music": "“Свобода музики”", - "freedom_of_music_palm": "“Свобода музики у вашій долоні”", - "get_started": "Давайте почнемо", - "youtube_source_description": "Рекомендовано та працює краще за все.", - "piped_source_description": "Чи почуваєте себе вільно? Те саме, що і на YouTube, але набагато безкоштовно.", - "jiosaavn_source_description": "Найкраще для регіону Південної Азії.", - "highest_quality": "Найвища якість: {quality}", - "select_audio_source": "Виберіть джерело аудіо", - "endless_playback_description": "Автоматично додавати нові пісні\nв кінець черги", - "choose_your_region": "Виберіть ваш регіон", - "choose_your_region_description": "Це допоможе Spotube показати вам правильний контент\nдля вашого місцезнаходження.", - "choose_your_language": "Виберіть свою мову", - "help_project_grow": "Допоможіть цьому проекту рости", - "help_project_grow_description": "Spotube - це проект з відкритим кодом. Ви можете допомогти цьому проекту зростати, вносячи свій внесок у проект, повідомляючи про помилки або пропонуючи нові функції.", - "contribute_on_github": "Долучайтесь на GitHub", - "donate_on_open_collective": "Пожертвуйте на Open Collective", - "browse_anonymously": "Анонімно переглядати", - "enable_connect": "Увімкнути підключення", - "enable_connect_description": "Керуйте Spotube з інших пристроїв", - "devices": "Пристрої", - "select": "Вибрати", - "connect_client_alert": "Вас керує {client}", - "this_device": "Цей пристрій", - "remote": "Віддалений", - "local_library": "Місцева бібліотека", - "add_library_location": "Додати до бібліотеки", - "remove_library_location": "Видалити з бібліотеки", - "local_tab": "Місцевий", - "stats": "Статистика", - "and_n_more": "і {count} більше", - "recently_played": "Нещодавно Відтворене", - "browse_more": "Переглянути Більше", - "no_title": "Без Назви", - "not_playing": "Не Відтворюється", - "epic_failure": "Епічний провал!", - "added_num_tracks_to_queue": "Додано {tracks_length} треків до черги", - "spotube_has_an_update": "Spotube має оновлення", - "download_now": "Завантажити Зараз", - "nightly_version": "Spotube Nightly {nightlyBuildNum} було випущено", - "release_version": "Spotube v{version} було випущено", - "read_the_latest": "Читати останні новини", - "release_notes": "ноти про випуск", - "pick_color_scheme": "Оберіть кольорову схему", - "save": "Зберегти", - "choose_the_device": "Виберіть пристрій:", - "multiple_device_connected": "Підключено кілька пристроїв.\nВиберіть пристрій, на якому ви хочете виконати цю дію", - "nothing_found": "Нічого не знайдено", - "the_box_is_empty": "Коробка порожня", - "top_artists": "Топ Артисти", - "top_albums": "Топ Альбоми", - "this_week": "Цього тижня", - "this_month": "Цього місяця", - "last_6_months": "Останні 6 місяців", - "this_year": "Цього року", - "last_2_years": "Останні 2 роки", - "all_time": "Усі часи", - "powered_by_provider": "Забезпечено {providerName}", - "email": "Електронна пошта", - "profile_followers": "Підписники", - "birthday": "День народження", - "subscription": "Підписка", - "not_born": "Ще не народжений", - "hacker": "Хакер", - "profile": "Профіль", - "no_name": "Без імені", - "edit": "Редагувати", - "user_profile": "Профіль користувача", - "count_plays": "{count} відтворень", - "streaming_fees_hypothetical": "*Розраховано на основі виплат Spotify за стримінг\nвід $0.003 до $0.005. Це гіпотетичний\nрозрахунок, щоб дати уявлення користувачу про те, скільки б він\nзаплатив артистам, якби слухав їхні пісні на Spotify.", - "count_mins": "{minutes} хв", - "summary_minutes": "хвилини", - "summary_listened_to_music": "Прослухана музика", - "summary_songs": "пісні", - "summary_streamed_overall": "Загалом стримів", - "summary_owed_to_artists": "Заборгованість артистам\nцього місяця", - "summary_artists": "артистів", - "summary_music_reached_you": "Музика досягла вас", - "summary_full_albums": "повні альбоми", - "summary_got_your_love": "Отримав вашу любов", - "summary_playlists": "плейлисти", - "summary_were_on_repeat": "Були на повторі", - "total_money": "Загалом {money}", - "minutes_listened": "Хвилини прослуховування", - "streamed_songs": "Стримлені пісні", - "count_streams": "{count} стримів", - "owned_by_you": "Ваша власність", - "copied_shareurl_to_clipboard": "{shareUrl} скопійовано в буфер обміну", - "spotify_hipotetical_calculation": "*Це розраховано на основі виплат Spotify за стрім\nвід $0.003 до $0.005. Це гіпотетичний розрахунок,\nщоб дати користувачеві уявлення про те, скільки б він заплатив\nартистам, якби слухав їхні пісні на Spotify.", - "webview_not_found": "Webview не знайдено", - "webview_not_found_description": "На вашому пристрої не встановлено виконуване середовище Webview.\nЯкщо воно встановлено, переконайтеся, що воно знаходиться в environment PATH\n\nПісля встановлення перезапустіть програму", - "unsupported_platform": "Непідтримувана платформа", - "invidious_instance": "Екземпляр сервера Invidious", - "invidious_description": "Екземпляр сервера Invidious для зіставлення треків", - "invidious_warning": "Деякі можуть працювати не дуже добре. Використовуйте на власний ризик", - "invidious_source_description": "Подібний до Piped, але з вищою доступністю.", - "cache_music": "Кешувати музику", - "open": "Відкрити", - "cache_folder": "Тека кешу", - "export": "Експорт", - "clear_cache": "Очистити кеш", - "clear_cache_confirmation": "Ви хочете очистити кеш?", - "export_cache_files": "Експортувати кешовані файли", - "found_n_files": "Знайдено {count} файлів", - "export_cache_confirmation": "Ви хочете експортувати ці файли до", - "exported_n_out_of_m_files": "Експортовано {filesExported} з {files} файлів", - "playlist": "Плейлист", - "no_loop": "Без повтору", - "generate": "Генерувати", - "undo": "Скасувати", - "download_all": "Завантажити все", - "add_all_to_playlist": "Додати все до плейлиста", - "add_all_to_queue": "Додати все в чергу", - "play_all_next": "Відтворити все наступне", - "pause": "Пауза", - "view_all": "Переглянути все", - "no_tracks_added_yet": "Здається, ви ще не додали жодної пісні", - "no_tracks": "Здається, тут немає пісень", - "no_tracks_listened_yet": "Здається, ви ще нічого не слухали", - "not_following_artists": "Ви не підписані на жодного артиста", - "no_favorite_albums_yet": "Здається, ви ще не додали жодного альбому в улюблені", - "no_logs_found": "Жодних журналів не знайдено", - "youtube_engine": "YouTube Двигун", - "youtube_engine_not_installed_title": "{engine} не встановлено", - "youtube_engine_not_installed_message": "{engine} не встановлено на вашій системі.", - "youtube_engine_set_path": "Переконайтесь, що він доступний у змінній PATH або\nвстановіть абсолютний шлях до виконуваного файлу {engine} нижче", - "youtube_engine_unix_issue_message": "У macOS/Linux/Unix-подібних ОС, встановлення шляху в .zshrc/.bashrc/.bash_profile тощо не працює.\nВам потрібно налаштувати шлях у файлі конфігурації оболонки", - "download": "Завантажити", - "file_not_found": "Файл не знайдено", - "custom": "Користувацький", - "add_custom_url": "Додати користувацький URL", - "edit_port": "Редагувати порт", - "port_helper_msg": "За замовчуванням -1, що означає випадкове число. Якщо у вас налаштований брандмауер, рекомендується це налаштувати.", - "connect_request": "Дозволити {client} підключення?", - "connection_request_denied": "Підключення відхилено. Користувач відмовив у доступі.", - "hipotetical_calculation": "*Це розраховано на основі середньої виплати за стрім онлайн-платформ для потокового відтворення музики, що становить від $0,003 до $0,005. Це гіпотетичний розрахунок, щоб дати користувачеві уявлення про те, скільки б вони заплатили артистам, якщо б слухали їхні пісні на різних музичних стрімінгових платформах.", - "an_error_occurred": "Сталася помилка", - "copy_to_clipboard": "Копіювати в буфер обміну", - "view_logs": "Переглянути логи", - "retry": "Повторити", - "no_default_metadata_provider_selected": "Ви не встановили провайдера метаданих за замовчуванням", - "manage_metadata_providers": "Керувати провайдерами метаданих", - "open_link_in_browser": "Відкрити посилання в браузері?", - "do_you_want_to_open_the_following_link": "Ви хочете відкрити наступне посилання", - "unsafe_url_warning": "Відкриття посилань з ненадійних джерел може бути небезпечним. Будьте обережні!\nВи також можете скопіювати посилання в буфер обміну.", - "copy_link": "Копіювати посилання", - "building_your_timeline": "Створення вашої часової шкали на основі ваших прослуховувань...", - "official": "Офіційний", - "author_name": "Автор: {author}", - "third_party": "Сторонній", - "plugin_requires_authentication": "Плагін вимагає автентифікації", - "update_available": "Доступне оновлення", - "supports_scrobbling": "Підтримує скроблінг", - "plugin_scrobbling_info": "Цей плагін скроббить вашу музику, щоб створити вашу історію прослуховувань.", - "default_plugin": "За замовчуванням", - "set_default": "Встановити за замовчуванням", - "support": "Підтримка", - "support_plugin_development": "Підтримати розробку плагіна", - "can_access_name_api": "- Може отримати доступ до **{name}** API", - "do_you_want_to_install_this_plugin": "Ви хочете встановити цей плагін?", - "third_party_plugin_warning": "Цей плагін із стороннього репозиторію. Будь ласка, переконайтеся, що ви довіряєте джерелу перед встановленням.", - "author": "Автор", - "this_plugin_can_do_following": "Цей плагін може робити наступне", - "install": "Встановити", - "install_a_metadata_provider": "Встановити провайдера метаданих", - "no_tracks_playing": "Наразі не відтворюється жоден трек", - "synced_lyrics_not_available": "Синхронізовані тексти недоступні для цієї пісні. Будь ласка, використовуйте вкладку", - "plain_lyrics": "Звичайні тексти", - "tab_instead": "замість цього.", - "disclaimer": "Відмова від відповідальності", - "third_party_plugin_dmca_notice": "Команда Spotube не несе жодної відповідальності (включно з юридичною) за будь-які плагіни \"третіх сторін\".\nБудь ласка, використовуйте їх на свій страх і ризик. Про будь-які помилки/проблеми повідомляйте в репозиторій плагіна.\n\nЯкщо якийсь плагін \"третьої сторони\" порушує ToS/DMCA будь-якої служби/юридичної особи, будь ласка, попросіть автора плагіна \"третьої сторони\" або хостингову платформу, наприклад, GitHub/Codeberg, вжити заходів. Усі перераховані вище (позначені як \"треті сторони\") є плагінами, які підтримуються публічно/спільнотою. Ми не куруємо їх, тому не можемо вжити жодних заходів щодо них.\n\n", - "input_does_not_match_format": "Введені дані не відповідають необхідному формату", - "metadata_provider_plugins": "Плагіни провайдера метаданих", - "paste_plugin_download_url": "Вставте URL-адресу для завантаження або URL-адресу репозиторію GitHub/Codeberg або пряме посилання на файл .smplug", - "download_and_install_plugin_from_url": "Завантажити та встановити плагін з URL-адреси", - "failed_to_add_plugin_error": "Не вдалося додати плагін: {error}", - "upload_plugin_from_file": "Завантажити плагін з файлу", - "installed": "Встановлено", - "available_plugins": "Доступні плагіни", - "configure_your_own_metadata_plugin": "Налаштуйте свій власний провайдер метаданих для плейлиста/альбому/виконавця/стрічки", - "audio_scrobblers": "Аудіо скробблери", - "scrobbling": "Скроблінг", - "download_music_format": "Формат завантаження музики", - "streaming_music_format": "Формат потокової музики", - "download_music_quality": "Якість завантаженої музики", - "streaming_music_quality": "Якість потокової музики", - "default_metadata_source": "Джерело метаданих за замовчуванням", - "set_default_metadata_source": "Встановити джерело метаданих за замовчуванням", - "default_audio_source": "Джерело аудіо за замовчуванням", - "set_default_audio_source": "Встановити джерело аудіо за замовчуванням", - "plugins": "Плагіни", - "configure_plugins": "Налаштуйте власні плагіни метаданих і аудіоджерела", - "source": "Джерело: ", - "uncompressed": "Без стиснення", - "dab_music_source_description": "Для аудіофілів. Забезпечує високоякісні/без втрат аудіопотоки. Точна відповідність треків на основі ISRC." -} \ No newline at end of file diff --git a/lib/l10n/app_vi.arb b/lib/l10n/app_vi.arb deleted file mode 100644 index 5733963e..00000000 --- a/lib/l10n/app_vi.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "Khách", - "browse": "Khám phá", - "search": "Tìm kiếm", - "library": "Thư viên", - "lyrics": "Lời bài hát", - "settings": "Cài đặt", - "genre_categories_filter": "Lọc theo thể loại nhạc...", - "genre": "Thể loại nhạc", - "personalized": "Cá nhân hóa", - "featured": "Nổi bật", - "new_releases": "Bản phát hành mới", - "songs": "Bài hát", - "playing_track": "Đang phát {track}", - "queue_clear_alert": "Điều này sẽ xóa hàng đợi hiện tại. {track_length} bài hát sẽ bị xóa\nBạn có muốn tiếp tục không?", - "load_more": "Tải thêm", - "playlists": "Danh sách phát", - "artists": "Nghệ sĩ", - "albums": "Album", - "tracks": "Bài hát", - "downloads": "Tải về", - "filter_playlists": "Lọc danh sách phát...", - "liked_tracks": "Bài hát được thích", - "liked_tracks_description": "Tất cả bài hát bạn đã thích", - "create_playlist": "Tạo danh sách phát", - "create_a_playlist": "Tạo danh sách phát", - "update_playlist": "Cập nhật danh sách phát", - "create": "Tạo", - "cancel": "Hủy", - "update": "Cập nhật", - "playlist_name": "Tên danh sách phát", - "name_of_playlist": "Tên của danh sách phát", - "description": "Mô tả", - "public": "Công khai", - "collaborative": "Hợp tác", - "search_local_tracks": "Tìm kiếm bài hát trong máy...", - "play": "Phát", - "delete": "Xóa", - "none": "Không có", - "sort_a_z": "Sắp xếp theo A-Z", - "sort_z_a": "Sắp xếp theo Z-A", - "sort_artist": "Sắp xếp theo Nghệ sĩ", - "sort_album": "Sắp xếp theo Album", - "sort_tracks": "Sắp xếp các bài hát", - "currently_downloading": "Đang tải về ({tracks_length} bài hát)", - "cancel_all": "Hủy tất cả", - "filter_artist": "Lọc nghệ sĩ...", - "followers": "{followers} Người theo dõi", - "add_artist_to_blacklist": "Thêm nghệ sĩ vào blacklist", - "top_tracks": "Bài hát nổi bật", - "fans_also_like": "Người hâm mộ cũng thích", - "loading": "Đang tải...", - "artist": "Nghệ sĩ", - "blacklisted": "Đã đưa vào blacklist", - "following": "Đang theo dõi", - "follow": "Theo dõi", - "artist_url_copied": "Đã sao chép URL nghệ sĩ", - "added_to_queue": "Đã thêm {tracks} bài hát vào hàng đợi", - "filter_albums": "Lọc album...", - "synced": "Đồng bộ", - "plain": "Bình thường", - "shuffle": "Trộn", - "search_tracks": "Tìm kiếm bài hát...", - "released": "Phát hành", - "error": "Lỗi {error}", - "title": "Đề mục", - "time": "Thời gian", - "more_actions": "Thao tác khác", - "download_count": "Tải xuống ({count})", - "add_count_to_playlist": "Thêm ({count}) vào danh sách phát", - "add_count_to_queue": "Thêm ({count}) vào hàng đợi", - "play_count_next": "Phát ({count}) tiếp theo", - "album": "Album", - "copied_to_clipboard": "Đã sao chép {data} vào clipboard", - "add_to_following_playlists": "Thêm {track} vào danh sách phát đang theo dõi", - "add": "Thêm", - "added_track_to_queue": "Đã thêm {track} vào hàng đợi", - "add_to_queue": "Thêm vào hàng đợi", - "track_will_play_next": "{track} sẽ được phát tiếp theo", - "play_next": "Phát tiếp theo", - "removed_track_from_queue": "Đã xóa {track} khỏi hàng đợi", - "remove_from_queue": "Xóa khỏi hàng đợi", - "remove_from_favorites": "Xóa khỏi bài hát yêu thích", - "save_as_favorite": "Thêm vào bài hát yêu thích", - "add_to_playlist": "Thêm vào danh sách phát", - "remove_from_playlist": "Xóa khỏi danh sách phát", - "add_to_blacklist": "Thêm vào blacklist", - "remove_from_blacklist": "Xóa khỏi blacklist", - "share": "Chia sẻ", - "mini_player": "Trình phát thu nhỏ", - "slide_to_seek": "Trượt để tìm kiếm tiến hoặc lùi", - "shuffle_playlist": "Xáo trộn bài hát", - "unshuffle_playlist": "Hủy xáo trộn bài hát", - "previous_track": "Bài hát trước", - "next_track": "Bài hát tiếp theo", - "pause_playback": "Tạm dừng phát", - "resume_playback": "Tiếp tục phát", - "loop_track": "Lặp lại bài hát", - "repeat_playlist": "Lặp lại danh sách phát", - "queue": "Hàng đợi", - "alternative_track_sources": "Đổi nguồn bài hát", - "download_track": "Tải xuống", - "tracks_in_queue": "{tracks} bài hát trong hàng đợi", - "clear_all": "Xóa tất cả", - "show_hide_ui_on_hover": "Hiển thị/Ẩn giao diện người dùng khi di chuột qua", - "always_on_top": "Luôn ở trên cùng", - "exit_mini_player": "Thoát khỏi trình phát thu nhỏ", - "download_location": "Vị trí tải xuống", - "account": "Tài khoản", - "login_with_spotify": "Đăng nhập bằng tài khoản Spotify của bạn", - "connect_with_spotify": "Liên kết với Spotify", - "logout": "Đăng xuất", - "logout_of_this_account": "Đăng xuất khỏi tài khoản này", - "language_region": "Ngôn ngữ và Khu vực", - "language": "Ngôn ngữ", - "system_default": "Mặc định hệ thống", - "market_place_region": "Khu vực Marketplace", - "recommendation_country": "Quốc gia gợi ý", - "appearance": "Giao diện", - "layout_mode": "Chế độ layout", - "override_layout_settings": "Ghi đè cài đặt layout", - "adaptive": "Tương thích", - "compact": "Nhỏ gọn", - "extended": "Mở rộng", - "theme": "Chủ đề", - "dark": "Tối", - "light": "Sáng", - "system": "Hệ thống", - "accent_color": "Màu nhấn", - "sync_album_color": "Đồng bộ màu album", - "sync_album_color_description": "Sử dụng màu chủ đạo của hình ảnh album làm màu nhấn", - "playback": "Phát", - "audio_quality": "Chất lượng âm thanh", - "high": "Cao", - "low": "Thấp", - "pre_download_play": "Tải xuống và phát", - "pre_download_play_description": "Thay vì stream âm thanh, tải xuống trước và phát (Khuyến nghị cho người dùng có băng thông cao)", - "skip_non_music": "Bỏ qua các đoạn không phải nhạc (SponsorBlock)", - "blacklist_description": "Các bài hát và nghệ sĩ trong blacklist", - "wait_for_download_to_finish": "Vui lòng đợi quá trình tải xuống hiện tại hoàn thành", - "desktop": "Máy tính", - "close_behavior": "Thao tác đóng", - "close": "Đóng", - "minimize_to_tray": "Thu nhỏ vào khay hệ thống", - "show_tray_icon": "Hiển thị biểu tượng trên khay hệ thống", - "about": "Về chúng tôi", - "u_love_spotube": "Chúng tôi biết bạn yêu Spotube", - "check_for_updates": "Kiểm tra cập nhật", - "about_spotube": "Về Spotube", - "blacklist": "blacklist", - "please_sponsor": "Vui lòng tài trợ/ủng hộ", - "spotube_description": "Spotube, một ứng dụng Spotify nhẹ, đa nền tảng và miễn phí", - "version": "Phiên bản", - "build_number": "Số phiên bản", - "founder": "Người sáng lập", - "repository": "Mã nguồn", - "bug_issues": "Báo cáo lỗi", - "made_with": "Được làm bằng ❤️ ở Băng-la-đét", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "Giấy phép", - "add_spotify_credentials": "Điền thông tin đăng nhập Spotify của bạn", - "credentials_will_not_be_shared_disclaimer": "Đừng lo, thông tin đăng nhập của bạn sẽ không được thu thập hoặc chia sẻ với bất kỳ ai", - "know_how_to_login": "Không biết cách lấy thông tin đăng nhập?", - "follow_step_by_step_guide": "Các bước lấy thông tin đăng nhập", - "spotify_cookie": "Cookie Spotify {name}", - "cookie_name_cookie": "Cookie {name}", - "fill_in_all_fields": "Vui lòng điền đầy đủ thông tin", - "submit": "Gửi", - "exit": "Thoát", - "previous": "Trước", - "next": "Tiếp", - "done": "Hoàn tất", - "step_1": "Bước 1", - "first_go_to": "Đầu tiên, truy cập", - "login_if_not_logged_in": "và Đăng nhập/Đăng ký nếu chưa có tài khoản", - "step_2": "Bước 2", - "step_2_steps": "1. Sau khi đăng nhập, nhấn F12 hoặc Chuột phải > Mở devtools của trình duyệt.\n2. Sau đó, chuyển đến Tab \"Ứng dụng/Application\" (Chrome, Edge, Brave, v.v.) hoặc Tab \"Lưu trữ/Storage\" (Firefox, Palemoon, v.v.)\n3. Chuyển đến phần \"Cookie\" sau đó phần con \"https://accounts.spotify.com\"", - "step_3": "Bước 3", - "step_3_steps": "Sao chép giá trị của Cookie \"sp_dc\" và \"sp_key\" (hoặc sp_gaid)", - "success_emoji": "Thành công🥳", - "success_message": "Bây giờ bạn đã đăng nhập thành công bằng tài khoản Spotify của mình. Làm tốt lắm!", - "step_4": "Bước 4", - "step_4_steps": "Dán giá trị đã sao chép của Cookie \"sp_dc\" và \"sp_key\" (hoặc sp_gaid) vào các trường tương ứng", - "something_went_wrong": "Đã xảy ra lỗi", - "piped_instance": "Phiên bản Server Piped", - "piped_description": "Phiên bản Piped để sử dụng cho Track matching", - "piped_warning": "Một số phiên bản Piped có thể không hoạt động tốt", - "generate_playlist": "Tạo danh sách phát", - "track_exists": "Bài hát {track} đã tồn tại", - "replace_downloaded_tracks": "Thay thế tất cả các bài hát đã tải", - "skip_download_tracks": "Bỏ qua tải xuống tất cả các bài hát đã tải", - "do_you_want_to_replace": "Bạn có muốn thay thế bài hát hiện có không?", - "replace": "Thay thế", - "skip": "Bỏ qua", - "select_up_to_count_type": "Chọn tối đa {count} {type}", - "select_genres": "Chọn Thể loại", - "add_genres": "Thêm Thể loại", - "country": "Quốc gia", - "number_of_tracks_generate": "Số lượng bài hát để tạo", - "acousticness": "Độ âm thanh", - "danceability": "Khả năng nhảy", - "energy": "Năng lượng", - "instrumentalness": "Độ nhạc cụ", - "liveness": "Sống động", - "loudness": "Độ ồn", - "speechiness": "Độ nói", - "valence": "Tính tích cực", - "popularity": "Độ phổ biến", - "key": "Tông", - "duration": "Thời lượng (giây)", - "tempo": "Nhịp độ (BPM)", - "mode": "Chế độ", - "time_signature": "Chữ ký thời gian", - "short": "Ngắn", - "medium": "Trung bình", - "long": "Dài", - "min": "Tối thiểu", - "max": "Tối đa", - "target": "Mục tiêu", - "moderate": "Trung bình", - "deselect_all": "Bỏ chọn tất cả", - "select_all": "Chọn tất cả", - "are_you_sure": "Bạn có chắc chắn?", - "generating_playlist": "Đang tạo danh sách phát tùy chỉnh của bạn...", - "selected_count_tracks": "Đã chọn {count} bài hát", - "download_warning": "Tải xuống tất cả các bài hát một lần, sẽ vi phạm bản quyền âm nhạc và gây thiệt hại cho xã hội sáng tạo âm nhạc. Hy vọng bạn nhận thức được điều này. Hãy luôn tôn trọng và ủng hộ công sức của nghệ sĩ", - "download_ip_ban_warning": "Địa chỉ IP của bạn có thể bị chặn trên YouTube do yêu cầu tải xuống quá mức so với bình thường. Chặn IP có nghĩa là bạn không thể sử dụng YouTube (ngay cả khi bạn đã đăng nhập) ít nhất 2-3 tháng từ thiết bị IP đó. Và Spotube không chịu trách nhiệm nếu điều này xảy ra", - "by_clicking_accept_terms": "Bằng cách nhấp vào 'Chấp nhận', bạn đồng ý với các điều khoản sau:", - "download_agreement_1": "Tôi biết mình đang vi phạm bản quyền âm nhạc. Đó là không tốt.", - "download_agreement_2": "Tôi sẽ ủng hộ nghệ sĩ bất cứ nơi nào tôi có thể và tôi chỉ làm điều này vì tôi không có tiền để mua tác phẩm của họ", - "download_agreement_3": "Tôi hoàn toàn nhận thức được rằng địa chỉ IP của tôi có thể bị chặn trên YouTube và tôi không đổ lỗi cho Spotube hoặc chủ sở hữu/người đóng góp của nó về bất kỳ tai nạn nào do hành động này của tôi", - "decline": "Từ chối", - "accept": "Chấp nhận", - "details": "Chi tiết", - "youtube": "YouTube", - "channel": "Kênh", - "likes": "Thích", - "dislikes": "Không thích", - "views": "Lượt xem", - "streamUrl": "URL phát trực tiếp", - "stop": "Dừng", - "sort_newest": "Sắp xếp theo mới nhất", - "sort_oldest": "Sắp xếp theo cũ nhất", - "sleep_timer": "Hẹn giờ tắt", - "mins": "{minutes} Phút", - "hours": "{hours} Giờ", - "hour": "{hours} Giờ", - "custom_hours": "Giờ Tùy chỉnh", - "logs": "Nhật ký", - "developers": "Nhà phát triển", - "not_logged_in": "Bạn chưa đăng nhập", - "search_mode": "Chế độ tìm kiếm", - "audio_source": "Nguồn âm thanh", - "ok": "Ok", - "failed_to_encrypt": "Mã hóa không thành công", - "encryption_failed_warning": "Spotube không thành công trong việc mã hóa nhằm lưu trữ dữ liêu an toàn. vậy nên sẽ chuyển về lưu trữ không an toàn\nNếu bạn đang sử dụng Linux, đảm bảo rằng bạn có sử dụng dịch vụ bảo mật (gnome-keyring, kde-wallet, keepassxc, v.v.)", - "querying_info": "Đang truy vấn thông tin...", - "piped_api_down": "API Piped đang gặp sự cố", - "piped_down_error_instructions": "Phiên bản Piped {pipedInstance} hiện đang gặp sự cố\n\nThay đổi phiên bản hoặc thay đổi 'Loại API' thành API YouTube official\n\nKhởi động lai ứng dụng sau khi thay đổi.", - "you_are_offline": "Bạn đang ngoại tuyến", - "connection_restored": "Kết nối internet của bạn đã được khôi phục", - "use_system_title_bar": "Sử dụng thanh tiêu đề hệ thống", - "crunching_results": "Đang tìm kiếm...", - "search_to_get_results": "Chưa tìm kiếm", - "use_amoled_mode": "Chủ đề tối hoàn toàn", - "pitch_dark_theme": "Chế độ AMOLED", - "normalize_audio": "Bình thường hóa âm thanh", - "change_cover": "Thay đổi ảnh bìa", - "add_cover": "Thêm ảnh bìa", - "restore_defaults": "Khôi phục mặc định", - "download_music_codec": "Định dạng tải xuống", - "streaming_music_codec": "Định dạng nghe", - "login_with_lastfm": "Đăng nhập bằng tài khoản Last.fm", - "connect": "Liên kết", - "disconnect_lastfm": "Dừng liên kết Last.fm", - "disconnect": "Ngắt kết nối", - "username": "Tên người dùng", - "password": "Mật khẩu", - "login": "Đăng nhập", - "login_with_your_lastfm": "Đăng nhập bằng tài khoản Last.fm của bạn", - "scrobble_to_lastfm": "Scrobble đến Last.fm", - "go_to_album": "Đi đến Album", - "discord_rich_presence": "Hiển thị trạng thái Discord", - "browse_all": "Duyệt tất cả", - "genres": "Thể loại", - "explore_genres": "Khám phá Thể loại", - "sort_duration": "Sắp xếp theo Thời lượng", - "start_a_radio": "Bắt đầu Một Đài phát thanh", - "how_to_start_radio": "Bạn muốn bắt đầu đài phát thanh như thế nào?", - "replace_queue_question": "Bạn muốn thay thế hàng đợi hiện tại hay thêm vào?", - "endless_playback": "Phát không giới hạn", - "delete_playlist": "Xóa Danh sách phát", - "delete_playlist_confirmation": "Bạn có chắc chắn muốn xóa danh sách phát này không?", - "local_tracks": "Bài hát Địa phương", - "song_link": "Liên kết Bài hát", - "skip_this_nonsense": "Bỏ qua bớt rối này", - "freedom_of_music": "“Sự Tự do của Âm nhạc”", - "freedom_of_music_palm": "“Sự Tự do của Âm nhạc trong lòng bàn tay của bạn”", - "get_started": "Bắt đầu thôi", - "youtube_source_description": "Được đề xuất và hoạt động tốt nhất.", - "piped_source_description": "Cảm thấy tự do? Giống như YouTube nhưng miễn phí hơn rất nhiều.", - "jiosaavn_source_description": "Tốt nhất cho khu vực Nam Á.", - "highest_quality": "Chất lượng Tốt nhất: {quality}", - "select_audio_source": "Chọn Nguồn Âm thanh", - "endless_playback_description": "Tự động thêm các bài hát mới\nvào cuối hàng đợi", - "choose_your_region": "Chọn khu vực của bạn", - "choose_your_region_description": "Điều này sẽ giúp Spotube hiển thị nội dung phù hợp cho vị trí của bạn.", - "choose_your_language": "Chọn ngôn ngữ của bạn", - "help_project_grow": "Hãy giúp dự án này phát triển", - "help_project_grow_description": "Spotube là một dự án mã nguồn mở. Bạn có thể giúp dự án này phát triển bằng cách đóng góp vào dự án, báo cáo lỗi hoặc đề xuất tính năng mới.", - "contribute_on_github": "Đóng góp trên GitHub", - "donate_on_open_collective": "Quyên góp trên Open Collective", - "browse_anonymously": "Duyệt Anonymously", - "friends": "Bạn bè", - "no_lyrics_available": "Xin lỗi, không tìm thấy lời cho bài hát này", - "enable_connect": "Kích hoạt kết nối", - "enable_connect_description": "Điều khiển Spotube từ các thiết bị khác", - "devices": "Thiết bị", - "select": "Chọn", - "connect_client_alert": "Bạn đang được điều khiển bởi {client}", - "this_device": "Thiết bị này", - "remote": "Từ xa", - "local_library": "Thư viện địa phương", - "add_library_location": "Thêm vào thư viện", - "remove_library_location": "Xóa khỏi thư viện", - "local_tab": "Địa phương", - "stats": "Thống kê", - "and_n_more": "và {count} cái khác", - "recently_played": "Gần đây đã phát", - "browse_more": "Xem thêm", - "no_title": "Không có tiêu đề", - "not_playing": "Không phát", - "epic_failure": "Thất bại hoàn toàn!", - "added_num_tracks_to_queue": "Đã thêm {tracks_length} bài hát vào danh sách phát", - "spotube_has_an_update": "Spotube có bản cập nhật", - "download_now": "Tải về ngay", - "nightly_version": "Spotube Nightly {nightlyBuildNum} đã được phát hành", - "release_version": "Spotube v{version} đã được phát hành", - "read_the_latest": "Đọc tin mới nhất", - "release_notes": "ghi chú phát hành", - "pick_color_scheme": "Chọn chủ đề màu sắc", - "save": "Lưu", - "choose_the_device": "Chọn thiết bị:", - "multiple_device_connected": "Có nhiều thiết bị kết nối.\nChọn thiết bị mà bạn muốn thực hiện hành động này", - "nothing_found": "Không tìm thấy gì", - "the_box_is_empty": "Hộp trống", - "top_artists": "Những Nghệ Sĩ Hàng Đầu", - "top_albums": "Những Album Hàng Đầu", - "this_week": "Tuần này", - "this_month": "Tháng này", - "last_6_months": "6 tháng qua", - "this_year": "Năm nay", - "last_2_years": "2 năm qua", - "all_time": "Mọi thời đại", - "powered_by_provider": "Cung cấp bởi {providerName}", - "email": "Email", - "profile_followers": "Người theo dõi", - "birthday": "Ngày sinh", - "subscription": "Gói cước", - "not_born": "Chưa sinh", - "hacker": "Tin tặc", - "profile": "Hồ sơ", - "no_name": "Không có tên", - "edit": "Chỉnh sửa", - "user_profile": "Hồ sơ người dùng", - "count_plays": "{count} lần phát", - "streaming_fees_hypothetical": "*Tính toán dựa trên thanh toán của Spotify cho mỗi lần phát\ntừ $0.003 đến $0.005. Đây là một tính toán giả định để\ngive người dùng cái nhìn về số tiền họ sẽ chi trả cho các nghệ sĩ nếu họ nghe\nbài hát của họ trên Spotify.", - "count_mins": "{minutes} phút", - "summary_minutes": "phút", - "summary_listened_to_music": "Đã nghe nhạc", - "summary_songs": "bài hát", - "summary_streamed_overall": "Stream tổng cộng", - "summary_owed_to_artists": "Nợ nghệ sĩ\ntrong tháng này", - "summary_artists": "nghệ sĩ", - "summary_music_reached_you": "Âm nhạc đã đến với bạn", - "summary_full_albums": "album đầy đủ", - "summary_got_your_love": "Nhận được tình yêu của bạn", - "summary_playlists": "danh sách phát", - "summary_were_on_repeat": "Đã được phát lại", - "total_money": "Tổng cộng {money}", - "minutes_listened": "Thời gian nghe", - "streamed_songs": "Bài hát đã phát", - "count_streams": "{count} lượt phát", - "owned_by_you": "Thuộc sở hữu của bạn", - "copied_shareurl_to_clipboard": "{shareUrl} đã sao chép vào bảng tạm", - "spotify_hipotetical_calculation": "*Được tính toán dựa trên khoản thanh toán của Spotify cho mỗi lượt phát\ntừ $0.003 đến $0.005. Đây là một tính toán giả định để\ncung cấp cho người dùng cái nhìn về số tiền họ sẽ phải trả\ncho các nghệ sĩ nếu họ nghe bài hát của họ trên Spotify.", - "webview_not_found": "Không tìm thấy Webview", - "webview_not_found_description": "Không có runtime Webview nào được cài đặt trên thiết bị của bạn.\nNếu đã cài đặt, hãy đảm bảo rằng nó nằm trong environment PATH\n\nSau khi cài đặt, hãy khởi động lại ứng dụng", - "unsupported_platform": "Nền tảng không được hỗ trợ", - "invidious_instance": "Phiên bản máy chủ Invidious", - "invidious_description": "Phiên bản máy chủ Invidious để sử dụng để so khớp bản nhạc", - "invidious_warning": "Một số có thể sẽ không hoạt động tốt. Vì vậy hãy sử dụng với rủi ro của riêng bạn", - "invidious_source_description": "Tương tự như Piped nhưng có tính khả dụng cao hơn.", - "cache_music": "Lưu nhạc vào bộ nhớ đệm", - "open": "Mở", - "cache_folder": "Thư mục bộ nhớ đệm", - "export": "Xuất", - "clear_cache": "Xóa bộ nhớ đệm", - "clear_cache_confirmation": "Bạn có muốn xóa bộ nhớ đệm không?", - "export_cache_files": "Xuất các tệp được lưu trong bộ nhớ đệm", - "found_n_files": "Tìm thấy {count} tệp", - "export_cache_confirmation": "Bạn có muốn xuất các tệp này đến", - "exported_n_out_of_m_files": "Đã xuất {filesExported} trên {files} tệp", - "playlist": "Danh sách phát", - "no_loop": "Không lặp lại", - "generate": "Tạo", - "undo": "Hoàn tác", - "download_all": "Tải xuống tất cả", - "add_all_to_playlist": "Thêm tất cả vào danh sách phát", - "add_all_to_queue": "Thêm tất cả vào danh sách chờ", - "play_all_next": "Chơi tất cả tiếp theo", - "pause": "Tạm dừng", - "view_all": "Xem tất cả", - "no_tracks_added_yet": "Có vẻ bạn chưa thêm bất kỳ bài hát nào", - "no_tracks": "Có vẻ không có bài hát nào ở đây", - "no_tracks_listened_yet": "Có vẻ bạn chưa nghe gì cả", - "not_following_artists": "Bạn không đang theo dõi bất kỳ nghệ sĩ nào", - "no_favorite_albums_yet": "Có vẻ bạn chưa thêm album nào vào danh sách yêu thích", - "no_logs_found": "Không tìm thấy nhật ký", - "youtube_engine": "Công cụ YouTube", - "youtube_engine_not_installed_title": "{engine} chưa được cài đặt", - "youtube_engine_not_installed_message": "{engine} chưa được cài đặt trong hệ thống của bạn.", - "youtube_engine_set_path": "Đảm bảo nó có sẵn trong biến PATH hoặc\nđặt đường dẫn tuyệt đối đến tệp thực thi {engine} dưới đây", - "youtube_engine_unix_issue_message": "Trên macOS/Linux/Unix, việc thiết lập đường dẫn trong .zshrc/.bashrc/.bash_profile v.v. sẽ không hoạt động.\nBạn cần thiết lập đường dẫn trong tệp cấu hình shell", - "download": "Tải xuống", - "file_not_found": "Không tìm thấy tệp", - "custom": "Tùy chỉnh", - "add_custom_url": "Thêm URL tùy chỉnh", - "edit_port": "Chỉnh sửa cổng", - "port_helper_msg": "Mặc định là -1, có nghĩa là số ngẫu nhiên. Nếu bạn đã cấu hình tường lửa, nên đặt điều này.", - "connect_request": "Cho phép {client} kết nối?", - "connection_request_denied": "Kết nối bị từ chối. Người dùng đã từ chối quyền truy cập.", - "hipotetical_calculation": "*Điều này được tính toán dựa trên khoản thanh toán trung bình mỗi luồng của nền tảng phát nhạc trực tuyến là $0,003 đến $0,005. Đây là một phép tính giả định để cung cấp cho người dùng cái nhìn sâu sắc về số tiền họ đã trả cho các nghệ sĩ nếu họ nghe bài hát của họ trên các nền tảng phát nhạc trực tuyến khác nhau.", - "an_error_occurred": "Đã xảy ra lỗi", - "copy_to_clipboard": "Sao chép vào khay nhớ tạm", - "view_logs": "Xem nhật ký", - "retry": "Thử lại", - "no_default_metadata_provider_selected": "Bạn chưa đặt nhà cung cấp siêu dữ liệu mặc định nào", - "manage_metadata_providers": "Quản lý nhà cung cấp siêu dữ liệu", - "open_link_in_browser": "Mở liên kết trong Trình duyệt?", - "do_you_want_to_open_the_following_link": "Bạn có muốn mở liên kết sau không", - "unsafe_url_warning": "Việc mở các liên kết từ các nguồn không đáng tin cậy có thể không an toàn. Hãy thận trọng!\nBạn cũng có thể sao chép liên kết vào khay nhớ tạm của mình.", - "copy_link": "Sao chép liên kết", - "building_your_timeline": "Đang xây dựng dòng thời gian của bạn dựa trên những gì bạn đã nghe...", - "official": "Chính thức", - "author_name": "Tác giả: {author}", - "third_party": "Bên thứ ba", - "plugin_requires_authentication": "Plugin yêu cầu xác thực", - "update_available": "Có bản cập nhật", - "supports_scrobbling": "Hỗ trợ scrobbling", - "plugin_scrobbling_info": "Plugin này scrobble nhạc của bạn để tạo lịch sử nghe của bạn.", - "default_plugin": "Mặc định", - "set_default": "Đặt làm mặc định", - "support": "Hỗ trợ", - "support_plugin_development": "Hỗ trợ phát triển plugin", - "can_access_name_api": "- Có thể truy cập API **{name}**", - "do_you_want_to_install_this_plugin": "Bạn có muốn cài đặt plugin này không?", - "third_party_plugin_warning": "Plugin này đến từ một kho lưu trữ của bên thứ ba. Vui lòng đảm bảo rằng bạn tin tưởng nguồn trước khi cài đặt.", - "author": "Tác giả", - "this_plugin_can_do_following": "Plugin này có thể làm những việc sau", - "install": "Cài đặt", - "install_a_metadata_provider": "Cài đặt một Nhà cung cấp siêu dữ liệu", - "no_tracks_playing": "Hiện không có bản nhạc nào đang phát", - "synced_lyrics_not_available": "Lời bài hát được đồng bộ hóa không có sẵn cho bài hát này. Vui lòng sử dụng", - "plain_lyrics": "Lời bài hát thuần túy", - "tab_instead": "thay thế.", - "disclaimer": "Miễn trừ trách nhiệm", - "third_party_plugin_dmca_notice": "Nhóm Spotube không chịu bất kỳ trách nhiệm nào (bao gồm cả pháp lý) đối với bất kỳ plugin \"Bên thứ ba\" nào.\nVui lòng sử dụng chúng với rủi ro của riêng bạn. Đối với bất kỳ lỗi/vấn đề nào, vui lòng báo cáo chúng cho kho lưu trữ plugin.\n\nNếu bất kỳ plugin \"Bên thứ ba\" nào vi phạm ToS/DMCA của bất kỳ dịch vụ/thực thể pháp lý nào, vui lòng yêu cầu tác giả plugin \"Bên thứ ba\" hoặc nền tảng lưu trữ, ví dụ: GitHub/Codeberg, thực hiện hành động. Tất cả các plugin được liệt kê ở trên (được gắn nhãn \"Bên thứ ba\") đều là các plugin công cộng/do cộng đồng duy trì. Chúng tôi không quản lý chúng, vì vậy chúng tôi không thể thực hiện bất kỳ hành động nào đối với chúng.\n\n", - "input_does_not_match_format": "Đầu vào không khớp với định dạng yêu cầu", - "metadata_provider_plugins": "Plugin Nhà cung cấp siêu dữ liệu", - "paste_plugin_download_url": "Dán url tải xuống hoặc url kho lưu trữ GitHub/Codeberg hoặc liên kết trực tiếp đến tệp .smplug", - "download_and_install_plugin_from_url": "Tải xuống và cài đặt plugin từ url", - "failed_to_add_plugin_error": "Không thể thêm plugin: {error}", - "upload_plugin_from_file": "Tải lên plugin từ tệp", - "installed": "Đã cài đặt", - "available_plugins": "Các plugin có sẵn", - "configure_your_own_metadata_plugin": "Cấu hình nhà cung cấp siêu dữ liệu danh sách phát/album/nghệ sĩ/nguồn cấp dữ liệu của riêng bạn", - "audio_scrobblers": "Bộ scrobbler âm thanh", - "scrobbling": "Scrobbling", - "download_music_format": "Định dạng nhạc tải về", - "streaming_music_format": "Định dạng nhạc phát trực tuyến", - "download_music_quality": "Chất lượng nhạc tải về", - "streaming_music_quality": "Chất lượng nhạc phát trực tuyến", - "default_metadata_source": "Nguồn siêu dữ liệu mặc định", - "set_default_metadata_source": "Đặt nguồn siêu dữ liệu mặc định", - "default_audio_source": "Nguồn âm thanh mặc định", - "set_default_audio_source": "Đặt nguồn âm thanh mặc định", - "plugins": "Tiện ích bổ sung", - "configure_plugins": "Cấu hình nhà cung cấp siêu dữ liệu và tiện ích nguồn âm thanh riêng", - "source": "Nguồn: ", - "uncompressed": "Không nén", - "dab_music_source_description": "Dành cho người yêu âm nhạc chất lượng cao. Cung cấp luồng âm thanh chất lượng cao/không nén. Phù hợp bài hát dựa trên ISRC chính xác." -} \ No newline at end of file diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb deleted file mode 100644 index 44f7d38c..00000000 --- a/lib/l10n/app_zh.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "访客", - "browse": "浏览", - "search": "搜索", - "library": "音乐库", - "lyrics": "歌词", - "settings": "设置", - "genre_categories_filter": "筛选类别...", - "genre": "探索歌单", - "personalized": "为你打造", - "featured": "推荐", - "new_releases": "新歌热播", - "songs": "歌曲", - "playing_track": "播放 {track}", - "queue_clear_alert": "这将清空当前的播放队列。{track_length} 首歌曲将被移除\n你确定要继续吗?", - "load_more": "加载更多", - "playlists": "歌单", - "artists": "艺人", - "albums": "专辑", - "tracks": "歌曲", - "downloads": "下载", - "filter_playlists": "筛选歌单...", - "liked_tracks": "已点赞的歌曲", - "liked_tracks_description": "你点赞过的所有歌曲", - "create_playlist": "创建歌单", - "create_a_playlist": "创建一个歌单", - "create": "创建", - "cancel": "取消", - "playlist_name": "歌单名称", - "name_of_playlist": "歌单的名称", - "description": "描述", - "public": "公开", - "collaborative": "共享协作", - "search_local_tracks": "搜索本地歌曲...", - "play": "播放", - "delete": "删除", - "none": "无", - "sort_a_z": "按字母正序", - "sort_z_a": "按字母倒序", - "sort_artist": "按艺人", - "sort_album": "按专辑", - "sort_tracks": "排序方式", - "currently_downloading": "正在下载 ({tracks_length})", - "cancel_all": "取消全部", - "filter_artist": "筛选艺人...", - "followers": "{followers} 名关注者", - "add_artist_to_blacklist": "屏蔽该艺人", - "top_tracks": "热门歌曲", - "fans_also_like": "粉丝也喜欢", - "loading": "加载中...", - "artist": "艺人", - "blacklisted": "已屏蔽", - "following": "关注中", - "follow": "关注", - "artist_url_copied": "艺人的分享链接已复制至剪贴板", - "added_to_queue": "已添加 {tracks} 首歌曲到播放队列", - "filter_albums": "筛选专辑...", - "synced": "同步", - "plain": "无同步", - "shuffle": "随机播放", - "search_tracks": "搜索歌曲...", - "released": "发行时间", - "error": "错误 {error}", - "title": "标题", - "time": "时长", - "more_actions": "更多操作", - "download_count": "下载 ({count}) 首歌曲", - "add_count_to_playlist": "添加 ({count}) 首歌曲到歌单中", - "add_count_to_queue": "添加 ({count}) 首歌曲到播放队列中", - "play_count_next": "接下来播放 ({count}) 首歌曲", - "album": "专辑", - "copied_to_clipboard": "已将 {data} 复制至剪贴板", - "add_to_following_playlists": "添加 {track} 到以下播放列表", - "add": "添加", - "added_track_to_queue": "添加 {track} 到播放队列", - "add_to_queue": "添加到播放队列", - "track_will_play_next": "{track} 将在下一首播放", - "play_next": "下一首播放", - "removed_track_from_queue": "将 {track} 从播放队列中移除", - "remove_from_queue": "从播放队列移除", - "remove_from_favorites": "取消点赞", - "save_as_favorite": "点赞", - "add_to_playlist": "添加到歌单", - "remove_from_playlist": "从歌单中移除", - "add_to_blacklist": "添加到屏蔽列表", - "remove_from_blacklist": "从屏蔽列表中移除", - "share": "分享", - "mini_player": "小窗模式", - "slide_to_seek": "滑动以前进或后退", - "shuffle_playlist": "随机播放歌单", - "unshuffle_playlist": "取消随机播放歌单", - "previous_track": "上一首歌曲", - "next_track": "下一首歌曲", - "pause_playback": "暂停播放", - "resume_playback": "恢复播放", - "loop_track": "单曲循环", - "repeat_playlist": "歌单循环", - "queue": "播放队列", - "alternative_track_sources": "其它音源", - "download_track": "下载歌曲", - "tracks_in_queue": "{tracks} 首歌曲在播放队列中", - "clear_all": "清除全部", - "show_hide_ui_on_hover": "悬停时显示/隐藏控制栏", - "always_on_top": "置顶", - "exit_mini_player": "退出小窗模式", - "download_location": "下载路径", - "account": "账户", - "login_with_spotify": "使用 Spotify 登录", - "connect_with_spotify": "与 Spotify 账户连接", - "logout": "退出", - "logout_of_this_account": "退出该账户", - "language_region": "语言和地区", - "language": "语言", - "system_default": "系统默认", - "market_place_region": "市场地区", - "recommendation_country": "选择国家与地区以获取对应推荐", - "appearance": "外观", - "layout_mode": "布局类型", - "override_layout_settings": "将覆盖响应式布局设置", - "adaptive": "自适应", - "compact": "紧凑", - "extended": "宽广", - "theme": "主题", - "dark": "深色", - "light": "浅色", - "system": "系统", - "accent_color": "主色调", - "sync_album_color": "匹配封面颜色", - "sync_album_color_description": "选取专辑封面主题色作为主色调", - "playback": "播放", - "audio_quality": "音质", - "high": "高", - "low": "低", - "pre_download_play": "先下后播", - "pre_download_play_description": "先下载歌曲后再播放而非流式播放(推荐带宽较高用户使用)", - "skip_non_music": "跳过非音乐片段(屏蔽赞助商)", - "blacklist_description": "已屏蔽的歌曲与艺人", - "wait_for_download_to_finish": "请等待当前下载任务完成", - "desktop": "桌面端设置", - "close_behavior": "点击关闭按钮行为", - "close": "关闭", - "minimize_to_tray": "最小化到托盘", - "show_tray_icon": "显示托盘图标", - "about": "关于", - "u_love_spotube": "我们明白你喜欢 Spotube", - "check_for_updates": "检查更新", - "about_spotube": "关于 Spotube", - "blacklist": "屏蔽列表", - "please_sponsor": "请赞助/捐赠", - "spotube_description": "Spotube,一个轻量、跨平台且完全免费的 Spotify 客户端。", - "version": "版本", - "build_number": "构建代码", - "founder": "发起人", - "repository": "源码", - "bug_issues": "缺陷和问题报告", - "made_with": "于孟加拉🇧🇩用 ❤️ 发电", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "许可证", - "add_spotify_credentials": "添加你的 Spotify 登录信息以开始使用", - "credentials_will_not_be_shared_disclaimer": "不用担心,软件不会收集或分享任何个人数据给第三方", - "know_how_to_login": "不知道该怎么做?", - "follow_step_by_step_guide": "请按照以下指南进行", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "请填写所有栏目", - "submit": "提交", - "exit": "退出", - "previous": "上一步", - "next": "下一步", - "done": "完成", - "step_1": "步骤 1", - "first_go_to": "首先,前往", - "login_if_not_logged_in": "如果尚未登录,请登录或者注册一个账户", - "step_2": "步骤 2", - "step_2_steps": "1. 一旦你已经完成登录, 按 F12 键或者鼠标右击网页空白区域 > 选择“检查”以打开浏览器开发者工具(DevTools)\n2. 然后选择 \"应用(Application)\" 标签页(Chrome, Edge, Brave 等基于 Chromium 的浏览器) 或 \"存储(Storage)\" 标签页 (Firefox, Palemoon 等基于 Firefox 的浏览器))\n3. 选择 \"Cookies\" 栏目然后选择 \"https://accounts.spotify.com\" 子栏目", - "step_3": "步骤 3", - "success_emoji": "成功🥳", - "success_message": "你已经成功使用 Spotify 登录。干得漂亮!", - "step_4": "步骤 4", - "something_went_wrong": "某些地方出现了问题", - "piped_instance": "Piped 服务器实例", - "piped_description": "Piped 服务器实例用于匹配歌曲", - "piped_warning": "它们中的一部分可能并不能正常工作。使用时请自行承担风险", - "generate_playlist": "生成歌单", - "track_exists": "歌曲 {track} 已存在", - "replace_downloaded_tracks": "替换已下载的歌曲", - "skip_download_tracks": "下载时跳过已下载的歌曲", - "do_you_want_to_replace": "你确定要替换已下载的歌曲吗??", - "replace": "替换", - "skip": "跳过", - "select_up_to_count_type": "选择多达 {count} 种的类型 {type}", - "select_genres": "选择曲风", - "add_genres": "添加曲风", - "country": "国家和地区", - "number_of_tracks_generate": "生成歌曲的数目", - "acousticness": "原声程度", - "danceability": "律动感", - "energy": "冲击感", - "instrumentalness": "歌唱部分占比", - "liveness": "现场感", - "loudness": "响度", - "speechiness": "朗诵比例", - "valence": "心理感受", - "popularity": "流行度", - "key": "曲调", - "duration": "歌曲时长 (s)", - "tempo": "分钟节拍数 (BPM)", - "mode": "旋律重复度", - "time_signature": "音符时值", - "short": "短", - "medium": "中", - "long": "长", - "min": "最低", - "max": "最高", - "target": "目标", - "moderate": "中", - "deselect_all": "取消全选", - "select_all": "全选", - "are_you_sure": "你确定吗?", - "generating_playlist": "正在生成你的自定义歌单...", - "selected_count_tracks": "已选择 {count} 首歌曲", - "download_warning": "如果你大量下载这些歌曲,你显然在侵犯音乐的版权并对音乐创作社区造成了伤害。我希望你能意识到这一点。永远要尊重并支持艺术家们的辛勤工作", - "download_ip_ban_warning": "小心,如果出现超出正常的下载请求那你的 IP 可能会被 YouTube 封禁,这意味着你的设备将在长达 2-3 个月的时间内无法使用该 IP 访问 YouTube(即使你没登录)。Spotube 对此不承担任何责任", - "by_clicking_accept_terms": "点击 '同意' 代表着你同意以下的条款", - "download_agreement_1": "我明白侵犯音乐版权是一件不好的事情", - "download_agreement_2": "我将尽可能支持艺术家的工作。我现在之所以做不到是因为缺乏资金来购买正版", - "download_agreement_3": "我完全了解我的 IP 存在被 YouTube的风险。我同意 Spotube 的所有者与贡献者们无须对我目前的行为所导致的任何后果负责", - "decline": "拒绝", - "accept": "同意", - "details": "详情", - "youtube": "YouTube", - "channel": "频道", - "likes": "赞", - "dislikes": "踩", - "views": "浏览次数", - "streamUrl": "播放流 URL", - "stop": "停止", - "sort_newest": "按添加日期正序", - "sort_oldest": "按添加日期倒序", - "sleep_timer": "睡眠定时器", - "mins": "{minutes} 分", - "hours": "{hours} 时", - "hour": "{hours} 时", - "custom_hours": "自定义时间", - "logs": "日志", - "developers": "开发者", - "not_logged_in": "你尚未登录", - "search_mode": "搜索模式", - "audio_source": "音频源", - "ok": "确定", - "failed_to_encrypt": "加密失败", - "encryption_failed_warning": "Spotube使用加密来安全地存储您的数据。但是失败了。因此,它将回退到不安全的存储\n如果您使用Linux,请确保已安装gnome-keyring、kde-wallet和keepassxc等秘密服务", - "querying_info": "正在查询信息...", - "piped_api_down": "Piped API不可用", - "piped_down_error_instructions": "当前Piped实例{pipedInstance}不可用\n\n请更改实例或将'API类型'更改为官方YouTube API\n\n更改后请确保重新启动应用程序", - "you_are_offline": "您当前处于离线状态", - "connection_restored": "您的互联网连接已恢复", - "use_system_title_bar": "使用系统标题栏", - "update_playlist": "更新播放列表", - "update": "更新", - "crunching_results": "处理结果中...", - "search_to_get_results": "搜索以获取结果", - "use_amoled_mode": "使用 AMOLED 模式", - "pitch_dark_theme": "深色主题", - "normalize_audio": "标准化音频", - "change_cover": "更改封面", - "add_cover": "添加封面", - "restore_defaults": "恢复默认值", - "download_music_codec": "下载音乐编解码器", - "streaming_music_codec": "流媒体音乐编解码器", - "login_with_lastfm": "使用 Last.fm 登录", - "connect": "连接", - "disconnect_lastfm": "断开 Last.fm 连接", - "disconnect": "断开连接", - "username": "用户名", - "password": "密码", - "login": "登录", - "login_with_your_lastfm": "使用您的 Last.fm 帐户登录", - "scrobble_to_lastfm": "在 Last.fm 上记录播放", - "go_to_album": "前往专辑", - "discord_rich_presence": "Discord 丰富展现", - "browse_all": "浏览全部", - "genres": "音乐类型", - "explore_genres": "探索音乐类型", - "step_3_steps": "复制\"sp_dc\" Cookie的值", - "step_4_steps": "粘贴复制的\"sp_dc\"值", - "friends": "朋友", - "no_lyrics_available": "抱歉,无法找到此曲的歌词", - "sort_duration": "按时长排序", - "start_a_radio": "开始收听电台", - "how_to_start_radio": "您想如何开始收听电台?", - "replace_queue_question": "您想要替换当前队列还是追加到队列?", - "endless_playback": "无尽播放", - "delete_playlist": "删除播放列表", - "delete_playlist_confirmation": "您确定要删除此播放列表吗?", - "local_tracks": "本地音轨", - "song_link": "歌曲链接", - "skip_this_nonsense": "跳过此无聊内容", - "freedom_of_music": "“音乐的自由”", - "freedom_of_music_palm": "“音乐的自由掌握在您手中”", - "get_started": "让我们开始吧", - "youtube_source_description": "推荐并且效果最佳。", - "piped_source_description": "感觉自由?与YouTube一样但更自由。", - "jiosaavn_source_description": "最适合南亚地区。", - "highest_quality": "最高音质:{quality}", - "select_audio_source": "选择音频源", - "endless_playback_description": "自动将新歌曲添加到队列的末尾", - "choose_your_region": "选择您的地区", - "choose_your_region_description": "这将帮助Spotube为您的位置显示正确的内容。", - "choose_your_language": "选择您的语言", - "help_project_grow": "帮助这个项目成长", - "help_project_grow_description": "Spotube是一个开源项目。您可以通过为项目做出贡献、报告错误或建议新功能来帮助该项目成长。", - "contribute_on_github": "在GitHub上做出贡献", - "donate_on_open_collective": "在Open Collective上捐款", - "browse_anonymously": "匿名浏览", - "enable_connect": "启用连接", - "enable_connect_description": "从其他设备控制Spotube", - "devices": "设备", - "select": "选择", - "connect_client_alert": "您正在被 {client} 控制", - "this_device": "此设备", - "remote": "远程", - "local_library": "本地图书馆", - "add_library_location": "添加到图书馆", - "remove_library_location": "从图书馆中删除", - "local_tab": "本地", - "stats": "统计", - "and_n_more": "和 {count} 更多", - "recently_played": "最近播放", - "browse_more": "浏览更多", - "no_title": "没有标题", - "not_playing": "未播放", - "epic_failure": "史诗级失败!", - "added_num_tracks_to_queue": "已将 {tracks_length} 首曲目添加到队列", - "spotube_has_an_update": "Spotube 有更新", - "download_now": "立即下载", - "nightly_version": "Spotube Nightly {nightlyBuildNum} 已发布", - "release_version": "Spotube v{version} 已发布", - "read_the_latest": "阅读最新", - "release_notes": "版本说明", - "pick_color_scheme": "选择配色方案", - "save": "保存", - "choose_the_device": "选择设备:", - "multiple_device_connected": "已连接多个设备。\n选择您希望执行此操作的设备", - "nothing_found": "未找到任何内容", - "the_box_is_empty": "箱子为空", - "top_artists": "热门艺术家", - "top_albums": "热门专辑", - "this_week": "本周", - "this_month": "本月", - "last_6_months": "过去6个月", - "this_year": "今年", - "last_2_years": "过去2年", - "all_time": "所有时间", - "powered_by_provider": "由 {providerName} 提供支持", - "email": "电子邮件", - "profile_followers": "关注者", - "birthday": "生日", - "subscription": "订阅", - "not_born": "尚未出生", - "hacker": "黑客", - "profile": "个人资料", - "no_name": "无名", - "edit": "编辑", - "user_profile": "用户资料", - "count_plays": "{count} 次播放", - "streaming_fees_hypothetical": "*基于 Spotify 每次播放的支付金额\n从 $0.003 到 $0.005 计算。这是一个假设性的\n计算,旨在让用户了解如果他们在 Spotify 上收听\n这些歌曲,可能会付给艺术家的金额。", - "count_mins": "{minutes} 分钟", - "summary_minutes": "分钟", - "summary_listened_to_music": "听音乐", - "summary_songs": "歌曲", - "summary_streamed_overall": "总体流媒体", - "summary_owed_to_artists": "本月欠艺术家的", - "summary_artists": "艺术家的", - "summary_music_reached_you": "音乐触及了你", - "summary_full_albums": "完整专辑", - "summary_got_your_love": "获得了你的爱", - "summary_playlists": "播放列表", - "summary_were_on_repeat": "已重复播放", - "total_money": "总计 {money}", - "minutes_listened": "听的分钟数", - "streamed_songs": "已流媒体歌曲", - "count_streams": "{count} 次流媒体", - "owned_by_you": "由您拥有", - "copied_shareurl_to_clipboard": "{shareUrl} 已复制到剪贴板", - "spotify_hipotetical_calculation": "*根据 Spotify 每次流媒体的支付金额\n$0.003 到 $0.005 进行计算。这是一个假设性的\n计算,用于给用户了解他们如果在 Spotify 上\n收听歌曲会支付给艺术家的金额。", - "webview_not_found": "未找到 Webview", - "webview_not_found_description": "您的设备中未安装 Webview 运行时。\n如果已安装,请确保它在 environment PATH 中\n\n安装后,重新启动应用程序", - "unsupported_platform": "不支持的平台", - "invidious_instance": "Invidious服务器实例", - "invidious_description": "用于音轨匹配的Invidious服务器实例", - "invidious_warning": "有些可能无法正常工作。请自行承担风险", - "invidious_source_description": "类似于Piped,但可用性更高。", - "cache_music": "缓存音乐", - "open": "打开", - "cache_folder": "缓存文件夹", - "export": "导出", - "clear_cache": "清除缓存", - "clear_cache_confirmation": "您要清除缓存吗?", - "export_cache_files": "导出缓存文件", - "found_n_files": "找到 {count} 个文件", - "export_cache_confirmation": "您要导出这些文件到", - "exported_n_out_of_m_files": "导出了 {filesExported} / {files} 个文件", - "playlist": "播放列表", - "no_loop": "无循环", - "generate": "生成", - "undo": "撤销", - "download_all": "下载全部", - "add_all_to_playlist": "将全部添加到播放列表", - "add_all_to_queue": "将全部添加到队列", - "play_all_next": "播放全部下一首", - "pause": "暂停", - "view_all": "查看所有", - "no_tracks_added_yet": "看起来你还没有添加任何曲目", - "no_tracks": "看起来这里没有任何曲目", - "no_tracks_listened_yet": "看起来你还没有听任何东西", - "not_following_artists": "你没有关注任何艺术家", - "no_favorite_albums_yet": "看起来你还没有将任何专辑添加到收藏夹", - "no_logs_found": "未找到日志", - "youtube_engine": "YouTube 引擎", - "youtube_engine_not_installed_title": "{engine} 未安装", - "youtube_engine_not_installed_message": "{engine} 未在您的系统中安装。", - "youtube_engine_set_path": "确保它可用在 PATH 变量中,或\n设置 {engine} 可执行文件的绝对路径", - "youtube_engine_unix_issue_message": "在 macOS/Linux/Unix 类操作系统中,在 .zshrc/.bashrc/.bash_profile 等文件中设置路径无效。\n您需要在 shell 配置文件中设置路径", - "download": "下载", - "file_not_found": "文件未找到", - "custom": "自定义", - "add_custom_url": "添加自定义 URL", - "edit_port": "编辑端口", - "port_helper_msg": "默认值为-1,表示随机数。如果您已配置防火墙,建议设置此项。", - "connect_request": "允许 {client} 连接吗?", - "connection_request_denied": "连接被拒绝。用户拒绝访问。", - "hipotetical_calculation": "*这是根据在线音乐流媒体平台每流平均支付0.003美元至0.005美元计算得出的。这是一个假设性的计算,旨在让用户了解如果他们在不同的音乐流媒体平台上收听歌曲,他们将需要向艺人支付多少费用。", - "an_error_occurred": "发生错误", - "copy_to_clipboard": "复制到剪贴板", - "view_logs": "查看日志", - "retry": "重试", - "no_default_metadata_provider_selected": "您未设置默认元数据提供者", - "manage_metadata_providers": "管理元数据提供者", - "open_link_in_browser": "在浏览器中打开链接?", - "do_you_want_to_open_the_following_link": "您想打开以下链接吗", - "unsafe_url_warning": "从不受信任的来源打开链接可能不安全。请谨慎!\n您也可以将链接复制到剪贴板。", - "copy_link": "复制链接", - "building_your_timeline": "正在根据您的收听记录构建您的时间线...", - "official": "官方", - "author_name": "作者:{author}", - "third_party": "第三方", - "plugin_requires_authentication": "插件需要身份验证", - "update_available": "有可用更新", - "supports_scrobbling": "支持 Scrobbling", - "plugin_scrobbling_info": "此插件会 scrobble 您的音乐以生成您的收听历史记录。", - "default_plugin": "默认", - "set_default": "设为默认", - "support": "支持", - "support_plugin_development": "支持插件开发", - "can_access_name_api": "- 可以访问 **{name}** API", - "do_you_want_to_install_this_plugin": "您想安装此插件吗?", - "third_party_plugin_warning": "此插件来自第三方存储库。请在安装前确保您信任此来源。", - "author": "作者", - "this_plugin_can_do_following": "此插件可以执行以下操作", - "install": "安装", - "install_a_metadata_provider": "安装元数据提供者", - "no_tracks_playing": "当前没有播放任何曲目", - "synced_lyrics_not_available": "此歌曲的同步歌词不可用。请使用", - "plain_lyrics": "纯歌词", - "tab_instead": "选项卡。", - "disclaimer": "免责声明", - "third_party_plugin_dmca_notice": "Spotube 团队对任何“第三方”插件不承担任何责任(包括法律责任)。\n请自行承担风险使用。对于任何错误/问题,请向插件存储库报告。\n\n如果任何“第三方”插件违反了任何服务/法律实体的服务条款/DMCA,请要求该“第三方”插件作者或托管平台(例如 GitHub/Codeberg)采取行动。上面列出的(标记为“第三方”)都是公共/社区维护的插件。我们不对此类插件进行管理,因此无法对其采取任何行动。\n\n", - "input_does_not_match_format": "输入与所需格式不匹配", - "metadata_provider_plugins": "元数据提供者插件", - "paste_plugin_download_url": "粘贴下载 URL、GitHub/Codeberg 存储库 URL 或 .smplug 文件的直接链接", - "download_and_install_plugin_from_url": "从 URL 下载并安装插件", - "failed_to_add_plugin_error": "添加插件失败:{error}", - "upload_plugin_from_file": "从文件上传插件", - "installed": "已安装", - "available_plugins": "可用插件", - "configure_your_own_metadata_plugin": "配置您自己的播放列表/专辑/艺人/订阅元数据提供者", - "audio_scrobblers": "音频 Scrobblers", - "scrobbling": "Scrobbling", - "download_music_format": "下载音乐格式", - "streaming_music_format": "流媒体音乐格式", - "download_music_quality": "下载音乐质量", - "streaming_music_quality": "流媒体音乐质量", - "default_metadata_source": "默认元数据源", - "set_default_metadata_source": "设置默认元数据源", - "default_audio_source": "默认音频源", - "set_default_audio_source": "设置默认音频源", - "plugins": "插件", - "configure_plugins": "配置您自己的元数据提供者和音频源插件", - "source": "来源:", - "uncompressed": "无损", - "dab_music_source_description": "适合发烧友。提供高质量/无损音频流。基于 ISRC 的精确曲目匹配。" -} \ No newline at end of file diff --git a/lib/l10n/app_zh_TW.arb b/lib/l10n/app_zh_TW.arb deleted file mode 100644 index 934006d5..00000000 --- a/lib/l10n/app_zh_TW.arb +++ /dev/null @@ -1,494 +0,0 @@ -{ - "guest": "訪客", - "browse": "瀏覽", - "search": "搜尋", - "library": "音樂庫", - "lyrics": "歌詞", - "settings": "設定", - "genre_categories_filter": "過濾分類...", - "genre": "探索歌單", - "personalized": "為你打造", - "featured": "推薦", - "new_releases": "新歌熱播", - "songs": "歌曲", - "playing_track": "播放 {track}", - "queue_clear_alert": "這將清空目前的播放清單。{track_length} 首歌曲將被移除\n你確定要繼續嗎?", - "load_more": "載入更多", - "playlists": "歌單", - "artists": "藝人", - "albums": "專輯", - "tracks": "歌曲", - "downloads": "下載", - "filter_playlists": "過濾歌單...", - "liked_tracks": "已按讚的歌曲", - "liked_tracks_description": "你按過讚的所有歌曲", - "create_playlist": "建立歌單", - "create_a_playlist": "建立一個歌單", - "create": "建立", - "cancel": "取消", - "playlist_name": "歌單名稱", - "name_of_playlist": "歌單的名稱", - "description": "說明", - "public": "公開", - "collaborative": "共享協作", - "search_local_tracks": "搜尋本地歌曲...", - "play": "播放", - "delete": "刪除", - "none": "無", - "sort_a_z": "依字母順序", - "sort_z_a": "依字母倒序", - "sort_artist": "按藝人", - "sort_album": "按專輯", - "sort_tracks": "排序方式", - "currently_downloading": "正在下載 ({tracks_length})", - "cancel_all": "取消全部", - "filter_artist": "過濾藝人...", - "followers": "{followers} 名追蹤者", - "add_artist_to_blacklist": "封鎖該藝人", - "top_tracks": "熱門歌曲", - "fans_also_like": "粉絲也喜歡", - "loading": "載入中...", - "artist": "藝人", - "blacklisted": "已封鎖", - "following": "關注中", - "follow": "關注", - "artist_url_copied": "此名藝人的分享連結已複製至剪貼簿", - "added_to_queue": "已新增 {tracks} 首歌曲到播放清單", - "filter_albums": "過濾專輯...", - "synced": "同步", - "plain": "未同步", - "shuffle": "隨機播放", - "search_tracks": "搜尋歌曲...", - "released": "發表時間", - "error": "發生錯誤: {error}", - "title": "標題", - "time": "時長", - "more_actions": "更多動作", - "download_count": "下載 ({count}) 首歌曲", - "add_count_to_playlist": "將 ({count}) 首歌曲新增到歌單中", - "add_count_to_queue": "新增 ({count}) 首歌曲到播放清單", - "play_count_next": "接下來將播放 ({count}) 首歌曲", - "album": "專輯", - "copied_to_clipboard": "已將 {data} 複製至剪貼簿", - "add_to_following_playlists": "新增 {track} 到以下播放清單", - "add": "新增", - "added_track_to_queue": "新增 {track} 到播放清單", - "add_to_queue": "新增至播放清單", - "track_will_play_next": "{track} 將在下一首播放", - "play_next": "下一首播放", - "removed_track_from_queue": "將 {track} 從播放清單移除", - "remove_from_queue": "從播放清單移除", - "remove_from_favorites": "取消按讚", - "save_as_favorite": "按讚", - "add_to_playlist": "新增到歌單", - "remove_from_playlist": "從歌單移除", - "add_to_blacklist": "新增到已封鎖清單", - "remove_from_blacklist": "從已封鎖清單移除", - "share": "分享", - "mini_player": "小窗模式", - "slide_to_seek": "滑動以前進或後退", - "shuffle_playlist": "隨機播放歌單", - "unshuffle_playlist": "取消隨機播放歌單", - "previous_track": "上一首歌曲", - "next_track": "下一首歌", - "pause_playback": "暫停播放", - "resume_playback": "恢復播放", - "loop_track": "單曲循環", - "repeat_playlist": "歌單循環", - "queue": "播放清單", - "alternative_track_sources": "其它音源", - "download_track": "下載歌曲", - "tracks_in_queue": "{tracks} 首歌曲在播放清單中", - "clear_all": "清除全部", - "show_hide_ui_on_hover": "游標暫留時顯示 / 隱藏控制列", - "always_on_top": "置頂", - "exit_mini_player": "退出小窗模式", - "download_location": "下載路徑", - "account": "帳戶", - "login_with_spotify": "使用 Spotify 登入", - "connect_with_spotify": "與 Spotify 帳號連結", - "logout": "退出", - "logout_of_this_account": "退出該帳戶", - "language_region": "語言與地區", - "language": "語言", - "system_default": "系統預設", - "market_place_region": "市集地區", - "recommendation_country": "請選擇國家與地區以取得對應的音樂推薦", - "appearance": "外觀", - "layout_mode": "佈局類型", - "override_layout_settings": "將覆寫響應式佈局設定", - "adaptive": "響應式", - "compact": "緊湊", - "extended": "寬闊", - "theme": "主題", - "dark": "深色", - "light": "淺色", - "system": "依循系統", - "accent_color": "主色調", - "sync_album_color": "符合封面顏色", - "sync_album_color_description": "選取專輯封面主題色為主色調", - "playback": "播放", - "audio_quality": "音質", - "high": "高", - "low": "低", - "pre_download_play": "下載後播放", - "pre_download_play_description": "先下載歌曲後再播放而非串流播放(建議頻寬較高使用者使用)", - "skip_non_music": "跳過非音樂片段(跳過贊助商廣告)", - "blacklist_description": "已封鎖的歌曲與藝人", - "wait_for_download_to_finish": "請等待目前下載工作完成", - "desktop": "桌面版設定", - "close_behavior": "點選關閉按鈕行為", - "close": "關閉", - "minimize_to_tray": "最小化到工作列", - "show_tray_icon": "顯示工作列圖示", - "about": "關於", - "u_love_spotube": "我們明白你喜歡 Spotube", - "check_for_updates": "檢查更新", - "about_spotube": "關於 Spotube", - "blacklist": "黑名單", - "please_sponsor": "請考慮贊助或捐款", - "spotube_description": "Spotube,一款輕量、跨平台且完全免費的 Spotify 用戶端。", - "version": "版本", - "build_number": "建置編號", - "founder": "發起人", - "repository": "專案儲存庫", - "bug_issues": "缺陷與問題報告", - "made_with": "於孟加拉🇧🇩用 ❤️ 發電", - "kingkor_roy_tirtho": "Kingkor Roy Tirtho", - "copyright": "© 2021-{current_year} Kingkor Roy Tirtho", - "license": "授權", - "add_spotify_credentials": "新增你的 Spotify 登入資訊以開始使用", - "credentials_will_not_be_shared_disclaimer": "您大可放心,軟體不會收集或分享任何個人資料給第三方", - "know_how_to_login": "不知道該怎麼辦?", - "follow_step_by_step_guide": "請依照以下說明進行", - "spotify_cookie": "Spotify {name} Cookie", - "cookie_name_cookie": "{name} Cookie", - "fill_in_all_fields": "請填入所有欄位", - "submit": "提交", - "exit": "退出", - "previous": "上一步", - "next": "下一步", - "done": "完成", - "step_1": "步驟 1", - "first_go_to": "首先,前往", - "login_if_not_logged_in": "如果尚未登入,請登入或註冊帳戶", - "step_2": "步驟 2", - "step_2_steps": "1. 一旦你已經完成登入, 按 F12 鍵或滑鼠右鍵點選網頁空白區域 > 選擇「檢查」以開啟瀏覽器開發者工具(DevTools)\n2. 選擇 \"應用程式(Application)\" 分頁(Chrome, Edge, Brave 等基於 Chromium 記憶體或基於 Choxage, nox Firefox 的瀏覽器))\n3. 選擇 \"Cookies\" 欄位然後選擇 \"https://accounts.spotify.com\" 子選單", - "step_3": "步驟 3", - "success_emoji": "成功🥳", - "success_message": "你已經成功使用 Spotify 登入。幹得漂亮!", - "step_4": "步驟 4", - "something_went_wrong": "某些地方出現了問題", - "piped_instance": "Piped 伺服器實例", - "piped_description": "Piped 伺服器實例用於匹配歌曲", - "piped_warning": "它們之中的一部分可能無法正常運作。使用時請自行承擔風險", - "generate_playlist": "產生歌單", - "track_exists": "曲目 {track} 已存在", - "replace_downloaded_tracks": "替換已下載的歌曲", - "skip_download_tracks": "下載時跳過已下載的歌曲", - "do_you_want_to_replace": "你確定要取代已下載的歌曲嗎??", - "replace": "取代", - "skip": "跳過", - "select_up_to_count_type": "選擇最多 {count} 種的類型 {type}", - "select_genres": "選擇曲風", - "add_genres": "新增曲風", - "country": "國家和地區", - "number_of_tracks_generate": "產生歌曲的數目", - "acousticness": "原聲程度", - "danceability": "律動感", - "energy": "衝擊感", - "instrumentalness": "歌唱部分佔比", - "liveness": "現場感", - "loudness": "響度", - "speechiness": "朗誦比例", - "valence": "心理感受", - "popularity": "流行度", - "key": "曲調", - "duration": "歌曲長度 (s)", - "tempo": "每分鐘拍數 (BPM)", - "mode": "旋律重複度", - "time_signature": "音符時值", - "short": "短", - "medium": "中", - "long": "長", - "min": "最低", - "max": "最高", - "target": "目標", - "moderate": "中", - "deselect_all": "取消全選", - "select_all": "全選", - "are_you_sure": "你確定嗎?", - "generating_playlist": "正在產生你的自訂歌單...", - "selected_count_tracks": "已選取 {count} 首歌曲", - "download_warning": "如果你大量下載這些歌曲,你顯然在侵犯音樂的版權並對音樂創作社區造成了傷害。我希望你能意識到這一點。永遠要尊重並支持藝術家們的辛勤工作", - "download_ip_ban_warning": "小心,如果出現超出正常的下載請求,那你的 IP 可能會被 YouTube 封鎖,這意味著你的裝置將在長達 2-3 個月的時間內無法使用該 IP 訪問 YouTube(即使你沒登入)。Spotube 不會因而承擔任何責任", - "by_clicking_accept_terms": "點擊 '同意' 代表你同意以下的條款", - "download_agreement_1": "我明白侵害音樂版權是一件不好的事", - "download_agreement_2": "我將盡可能支持藝術家的工作。我現在之所以做不到是因為缺乏資金來購買正版", - "download_agreement_3": "我完全了解我的 IP 存在被 YouTube 封鎖的風險。並且我明白 Spotube 的擁有者與貢獻者們無須對我目前的行為所導致的任何後果負責", - "decline": "拒絕", - "accept": "同意", - "details": "詳細資訊", - "youtube": "YouTube", - "channel": "頻道", - "likes": "讚", - "dislikes": "倒讚", - "views": "瀏覽次數", - "streamUrl": "播放串流 URL", - "stop": "停止", - "sort_newest": "依新增日期順序", - "sort_oldest": "依新增日期倒序", - "sleep_timer": "睡眠計時器", - "mins": "{minutes} 分", - "hours": "{hours} 時", - "hour": "{hours} 時", - "custom_hours": "自訂時長", - "logs": "記錄檔(Log)", - "developers": "開發者", - "not_logged_in": "你尚未登入", - "search_mode": "搜尋模式", - "audio_source": "音訊來源", - "ok": "確定", - "failed_to_encrypt": "加密失敗", - "encryption_failed_warning": "Spotube使用加密來安全地儲存您的資料。但是失敗了。因此,它將回退到不安全的儲存空間\n如果您使用Linux,請確保已安裝gnome-keyring、kde-wallet和keepassxc等加密服務", - "querying_info": "正在查詢資訊...", - "piped_api_down": "Piped API 無法使用", - "piped_down_error_instructions": "當前Piped實例 {pipedInstance} 不可用\n\n請更改實例或將'API類型'更改為官方YouTube API\n\n更改後請確保重新啟動應用程式", - "you_are_offline": "您目前處於離線狀態", - "connection_restored": "您的網路連線已恢復", - "use_system_title_bar": "使用作業系統的預設視窗標題列", - "update_playlist": "更新播放清單", - "update": "更新", - "crunching_results": "處理結果中...", - "search_to_get_results": "搜尋以取得結果", - "use_amoled_mode": "使用 AMOLED 模式", - "pitch_dark_theme": "漆黑主題", - "normalize_audio": "標準化音訊", - "change_cover": "更改封面", - "add_cover": "新增封面", - "restore_defaults": "恢復預設值", - "download_music_codec": "下載音樂編解碼器", - "streaming_music_codec": "串流音樂編解碼器", - "login_with_lastfm": "使用 Last.fm 登入", - "connect": "連線", - "disconnect_lastfm": "切斷 Last.fm 連線", - "disconnect": "斷開連線", - "username": "帳號", - "password": "密碼", - "login": "登入", - "login_with_your_lastfm": "使用您的 Last.fm 帳號登入", - "scrobble_to_lastfm": "在 Last.fm 上記錄你的播放", - "go_to_album": "前往專輯", - "discord_rich_presence": "Discord Rick Presence(Discord 狀態)", - "browse_all": "瀏覽全部", - "genres": "音樂類型", - "explore_genres": "探索音樂類型", - "step_3_steps": "複製\"sp_dc\" Cookie的值", - "step_4_steps": "貼上複製的\"sp_dc\"值", - "friends": "好友", - "no_lyrics_available": "抱歉,無法找到這首歌的歌詞", - "sort_duration": "依長度排序", - "start_a_radio": "開始收聽電台", - "how_to_start_radio": "您想如何開始收聽電台?", - "replace_queue_question": "您想要取代目前清單還是追加到清單?", - "endless_playback": "無限播放", - "delete_playlist": "刪除播放清單", - "delete_playlist_confirmation": "您確定要刪除此播放清單嗎?", - "local_tracks": "本地音訊", - "song_link": "歌曲連結", - "skip_this_nonsense": "跳過這個無聊內容", - "freedom_of_music": "“音樂的自由”", - "freedom_of_music_palm": "「音樂的自由掌握在您手中」", - "get_started": "我們開始吧", - "youtube_source_description": "建議且效果最佳。", - "piped_source_description": "感覺自由?與 YouTube 一樣,但更自由。", - "jiosaavn_source_description": "最適合南亞地區。", - "highest_quality": "最高音質:{quality}", - "select_audio_source": "選擇音訊來源", - "endless_playback_description": "自動將新歌曲加入清單的結尾", - "choose_your_region": "選擇您的所在地區", - "choose_your_region_description": "這能幫助 Spotube 為您的所在位置顯示正確的內容。", - "choose_your_language": "選擇您的語言", - "help_project_grow": "幫助這個專案成長", - "help_project_grow_description": "Spotube是一個開源專案。您可以透過為專案做出貢獻、回報錯誤或建議新功能來幫助專案成長。", - "contribute_on_github": "在GitHub上做出貢獻", - "donate_on_open_collective": "在Open Collective上捐款", - "browse_anonymously": "匿名瀏覽", - "enable_connect": "啟用連線", - "enable_connect_description": "從其他裝置控制Spotube", - "devices": "裝置", - "select": "選擇", - "connect_client_alert": "您正在被 {client} 控制", - "this_device": "此裝置", - "remote": "遠端", - "local_library": "本地媒體庫", - "add_library_location": "新增至媒體庫", - "remove_library_location": "從媒體庫移除", - "local_tab": "本地", - "stats": "統計", - "and_n_more": "還有 {count} 個", - "recently_played": "最近播放", - "browse_more": "瀏覽更多", - "no_title": "無標題", - "not_playing": "未播放", - "epic_failure": "史詩級的失敗!", - "added_num_tracks_to_queue": "已將 {tracks_length} 首曲目新增至清單", - "spotube_has_an_update": "Spotube 有更新版本", - "download_now": "立即下載", - "nightly_version": "Spotube Nightly {nightlyBuildNum} 已發佈", - "release_version": "Spotube v{version} 已發布", - "read_the_latest": "閱讀最新", - "release_notes": "版本說明", - "pick_color_scheme": "選擇配色方案", - "save": "儲存", - "choose_the_device": "選擇裝置:", - "multiple_device_connected": "已連接多個裝置。\n選擇您希望執行此操作的裝置", - "nothing_found": "未找到任何內容", - "the_box_is_empty": "箱子為空", - "top_artists": "熱門藝人", - "top_albums": "熱門專輯", - "this_week": "本週", - "this_month": "本月", - "last_6_months": "過去6個月", - "this_year": "今年", - "last_2_years": "過去2年", - "all_time": "所有時間", - "powered_by_provider": "由 {providerName} 提供支援", - "email": "電子郵件", - "profile_followers": "追蹤者", - "birthday": "生日", - "subscription": "訂閱", - "not_born": "尚未建立", - "hacker": "駭客", - "profile": "個人資訊", - "no_name": "沒有名字", - "edit": "編輯", - "user_profile": "使用者資料", - "count_plays": "{count} 次播放", - "streaming_fees_hypothetical": "*基於 Spotify 每次播放的支付金額\n從 $0.003 到 $0.005 計算。這是一個假設性的\n計算,旨在讓用戶了解如果他們在 Spotify 上收聽\n這些歌曲,可能會付給作者的金額。", - "count_mins": "{minutes} 分鐘", - "summary_minutes": "分鐘", - "summary_listened_to_music": "聽音樂", - "summary_songs": "歌曲", - "summary_streamed_overall": "整體串流媒體", - "summary_owed_to_artists": "本月欠藝術家的", - "summary_artists": "藝術家的", - "summary_music_reached_you": "音樂接觸到你", - "summary_full_albums": "完整專輯", - "summary_got_your_love": "獲得了你的愛心", - "summary_playlists": "播放清單", - "summary_were_on_repeat": "已經重複播放", - "total_money": "總計 {money}", - "minutes_listened": "聽的分鐘數", - "streamed_songs": "已串流歌曲", - "count_streams": "{count} 次串流", - "owned_by_you": "由您所有", - "copied_shareurl_to_clipboard": "{shareUrl} 已複製到剪貼簿", - "spotify_hipotetical_calculation": "*根據 Spotify 每次串流媒體的支付金額\n$0.003 到 $0.005 進行計算。這是一個假設性的\n計算,用於給用戶了解他們如果在 Spotify 上\n收聽歌曲會支付給藝術家的金額。", - "webview_not_found": "未找到 Webview 框架", - "webview_not_found_description": "您的裝置中未安裝 Webview Runtime。\n如果已安裝,請確保它的位置在系統環境變數(PATH)中\n\n安裝後,重新啟動應用程式", - "unsupported_platform": "不支援的平台", - "invidious_instance": "Invidious 伺服器實例", - "invidious_description": "用於音軌匹配的 Invidious 伺服器實例", - "invidious_warning": "有些可能無法正常運作。請自行承擔風險", - "invidious_source_description": "類似 Piped,但可用性更高。", - "cache_music": "快取音樂", - "open": "開啟", - "cache_folder": "快取資料夾", - "export": "導出", - "clear_cache": "清除快取", - "clear_cache_confirmation": "您要清除快取嗎?", - "export_cache_files": "匯出快取檔案", - "found_n_files": "找到 {count} 個檔案", - "export_cache_confirmation": "您要匯出這些檔案到", - "exported_n_out_of_m_files": "匯出了 {filesExported} / {files} 個檔案", - "playlist": "播放清單", - "no_loop": "無循環", - "generate": "生成", - "undo": "取消", - "download_all": "下載全部", - "add_all_to_playlist": "全部加入到播放清單", - "add_all_to_queue": "全部加入清單", - "play_all_next": "播放全部下一首", - "pause": "暫停", - "view_all": "檢視全部", - "no_tracks_added_yet": "看起來你還沒有加入任何歌曲", - "no_tracks": "看起來這裡沒有任何歌曲", - "no_tracks_listened_yet": "看起來你還沒聽任何歌曲", - "not_following_artists": "你沒有關注任何藝術家", - "no_favorite_albums_yet": "看起來你還沒有將任何專輯加入到收藏夾", - "no_logs_found": "未找到日誌", - "youtube_engine": "YouTube 引擎", - "youtube_engine_not_installed_title": "{engine} 未安裝", - "youtube_engine_not_installed_message": "{engine} 未在您的系統中安裝。", - "youtube_engine_set_path": "確保它可用在 PATH 變數中,或\n設定 {engine} 執行檔的絕對路徑", - "youtube_engine_unix_issue_message": "在類 Unix 作業系統(如 macOS/Linux/Unix)中,請在 .zshrc/.bashrc/.bash_profile 等檔案中設定路徑無效。\n您需要在 shell 設定檔中設定路徑", - "download": "下載", - "file_not_found": "找不到檔案", - "custom": "自訂", - "add_custom_url": "新增自訂 URL", - "edit_port": "編輯端口", - "port_helper_msg": "預設值為 -1,表示隨機數。如果您已配置防火牆,建議設定此項目。", - "connect_request": "允許 {client} 連線嗎?", - "connection_request_denied": "連線被拒絕。請求被使用者拒絕。", - "hipotetical_calculation": "*此為根據線上音樂串流平台平均每次播放 $0.003 至 $0.005 的收益所計算的假設值。此為一個假設性計算,旨在讓使用者了解若他們在不同的音樂串流平台上收聽同一首歌曲,他們將會支付給藝人多少費用。", - "an_error_occurred": "發生錯誤", - "copy_to_clipboard": "複製到剪貼簿", - "view_logs": "檢視日誌", - "retry": "重試", - "no_default_metadata_provider_selected": "您沒有設定預設的中繼資料供應商", - "manage_metadata_providers": "管理中繼資料供應商", - "open_link_in_browser": "要在瀏覽器中開啟連結嗎?", - "do_you_want_to_open_the_following_link": "您想開啟以下連結嗎", - "unsafe_url_warning": "從不受信任的來源開啟連結可能不安全。請務必小心!\n您也可以將連結複製到剪貼簿。", - "copy_link": "複製連結", - "building_your_timeline": "正在根據您的收聽記錄建立您的時間軸...", - "official": "官方", - "author_name": "作者:{author}", - "third_party": "第三方", - "plugin_requires_authentication": "此外掛程式需要驗證", - "update_available": "有可用的更新", - "supports_scrobbling": "支援 Scrobbling", - "plugin_scrobbling_info": "此外掛程式會 Scrobble 您的音樂以產生您的收聽記錄。", - "default_plugin": "預設", - "set_default": "設為預設", - "support": "支援", - "support_plugin_development": "支援外掛程式開發", - "can_access_name_api": "- 可以存取 **{name}** API", - "do_you_want_to_install_this_plugin": "您想安裝此外掛程式嗎?", - "third_party_plugin_warning": "此外掛程式來自第三方儲存庫。請在安裝前確認您信任該來源。", - "author": "作者", - "this_plugin_can_do_following": "此外掛程式可以執行以下操作", - "install": "安裝", - "install_a_metadata_provider": "安裝中繼資料供應商", - "no_tracks_playing": "目前沒有正在播放的曲目", - "synced_lyrics_not_available": "此歌曲沒有同步歌詞。請改用", - "plain_lyrics": "純歌詞", - "tab_instead": "分頁。", - "disclaimer": "免責聲明", - "third_party_plugin_dmca_notice": "Spotube 團隊對任何「第三方」外掛程式不負任何責任(包括法律責任)。\n請自行承擔使用風險。如有任何錯誤/問題,請向該外掛程式的儲存庫回報。\n\n若有任何「第三方」外掛程式違反任何服務/法律實體的服務條款/DMCA,請向「第三方」外掛程式作者或託管平台(如 GitHub/Codeberg)要求採取行動。以上列出的(標記為「第三方」)外掛程式均為公開/社群維護的外掛程式。我們沒有對其進行審核,因此無法對其採取任何行動。\n\n", - "input_does_not_match_format": "輸入不符合所需格式", - "metadata_provider_plugins": "中繼資料供應商外掛程式", - "paste_plugin_download_url": "貼上下載網址、GitHub/Codeberg 儲存庫網址或 .smplug 檔案的直接連結", - "download_and_install_plugin_from_url": "從網址下載並安裝外掛程式", - "failed_to_add_plugin_error": "新增外掛程式失敗:{error}", - "upload_plugin_from_file": "從檔案上傳外掛程式", - "installed": "已安裝", - "available_plugins": "可用的外掛程式", - "configure_your_own_metadata_plugin": "設定您自己的播放清單/專輯/藝人/動態中繼資料供應商", - "audio_scrobblers": "音訊 Scrobblers", - "scrobbling": "Scrobbling", - "download_music_format": "下載音樂格式", - "streaming_music_format": "串流音樂格式", - "download_music_quality": "下載音樂品質", - "streaming_music_quality": "串流音樂品質", - "default_metadata_source": "預設中繼資料來源", - "set_default_metadata_source": "設定預設中繼資料來源", - "default_audio_source": "預設音訊來源", - "set_default_audio_source": "設定預設音訊來源", - "plugins": "外掛程式", - "configure_plugins": "配置您自己的中繼資料提供者和音訊來源外掛程式", - "source": "來源:", - "uncompressed": "未壓縮", - "dab_music_source_description": "適合音響發燒友。提供高品質/無損音訊串流。精確的 ISRC 曲目比對。" -} \ No newline at end of file diff --git a/lib/l10n/generated/app_localizations.dart b/lib/l10n/generated/app_localizations.dart deleted file mode 100644 index e9d7913d..00000000 --- a/lib/l10n/generated/app_localizations.dart +++ /dev/null @@ -1,3109 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:intl/intl.dart' as intl; - -import 'app_localizations_ar.dart'; -import 'app_localizations_bn.dart'; -import 'app_localizations_ca.dart'; -import 'app_localizations_cs.dart'; -import 'app_localizations_de.dart'; -import 'app_localizations_en.dart'; -import 'app_localizations_es.dart'; -import 'app_localizations_eu.dart'; -import 'app_localizations_fa.dart'; -import 'app_localizations_fi.dart'; -import 'app_localizations_fr.dart'; -import 'app_localizations_hi.dart'; -import 'app_localizations_id.dart'; -import 'app_localizations_it.dart'; -import 'app_localizations_ja.dart'; -import 'app_localizations_ka.dart'; -import 'app_localizations_ko.dart'; -import 'app_localizations_ne.dart'; -import 'app_localizations_nl.dart'; -import 'app_localizations_pl.dart'; -import 'app_localizations_pt.dart'; -import 'app_localizations_ru.dart'; -import 'app_localizations_ta.dart'; -import 'app_localizations_th.dart'; -import 'app_localizations_tl.dart'; -import 'app_localizations_tr.dart'; -import 'app_localizations_uk.dart'; -import 'app_localizations_vi.dart'; -import 'app_localizations_zh.dart'; - -// ignore_for_file: type=lint - -/// Callers can lookup localized strings with an instance of AppLocalizations -/// returned by `AppLocalizations.of(context)`. -/// -/// Applications need to include `AppLocalizations.delegate()` in their app's -/// `localizationDelegates` list, and the locales they support in the app's -/// `supportedLocales` list. For example: -/// -/// ```dart -/// import 'generated/app_localizations.dart'; -/// -/// return MaterialApp( -/// localizationsDelegates: AppLocalizations.localizationsDelegates, -/// supportedLocales: AppLocalizations.supportedLocales, -/// home: MyApplicationHome(), -/// ); -/// ``` -/// -/// ## Update pubspec.yaml -/// -/// Please make sure to update your pubspec.yaml to include the following -/// packages: -/// -/// ```yaml -/// dependencies: -/// # Internationalization support. -/// flutter_localizations: -/// sdk: flutter -/// intl: any # Use the pinned version from flutter_localizations -/// -/// # Rest of dependencies -/// ``` -/// -/// ## iOS Applications -/// -/// iOS applications define key application metadata, including supported -/// locales, in an Info.plist file that is built into the application bundle. -/// To configure the locales supported by your app, you’ll need to edit this -/// file. -/// -/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. -/// Then, in the Project Navigator, open the Info.plist file under the Runner -/// project’s Runner folder. -/// -/// Next, select the Information Property List item, select Add Item from the -/// Editor menu, then select Localizations from the pop-up menu. -/// -/// Select and expand the newly-created Localizations item then, for each -/// locale your application supports, add a new item and select the locale -/// you wish to add from the pop-up menu in the Value field. This list should -/// be consistent with the languages listed in the AppLocalizations.supportedLocales -/// property. -abstract class AppLocalizations { - AppLocalizations(String locale) - : localeName = intl.Intl.canonicalizedLocale(locale.toString()); - - final String localeName; - - static AppLocalizations? of(BuildContext context) { - return Localizations.of(context, AppLocalizations); - } - - static const LocalizationsDelegate delegate = - _AppLocalizationsDelegate(); - - /// A list of this localizations delegate along with the default localizations - /// delegates. - /// - /// Returns a list of localizations delegates containing this delegate along with - /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, - /// and GlobalWidgetsLocalizations.delegate. - /// - /// Additional delegates can be added by appending to this list in - /// MaterialApp. This list does not have to be used at all if a custom list - /// of delegates is preferred or required. - static const List> localizationsDelegates = - >[ - delegate, - GlobalMaterialLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ]; - - /// A list of this localizations delegate's supported locales. - static const List supportedLocales = [ - Locale('ar'), - Locale('bn'), - Locale('ca'), - Locale('cs'), - Locale('de'), - Locale('en'), - Locale('es'), - Locale('eu'), - Locale('fa'), - Locale('fi'), - Locale('fr'), - Locale('hi'), - Locale('id'), - Locale('it'), - Locale('ja'), - Locale('ka'), - Locale('ko'), - Locale('ne'), - Locale('nl'), - Locale('pl'), - Locale('pt'), - Locale('ru'), - Locale('ta'), - Locale('th'), - Locale('tl'), - Locale('tr'), - Locale('uk'), - Locale('vi'), - Locale('zh'), - Locale('zh', 'TW') - ]; - - /// No description provided for @guest. - /// - /// In en, this message translates to: - /// **'Guest'** - String get guest; - - /// No description provided for @browse. - /// - /// In en, this message translates to: - /// **'Browse'** - String get browse; - - /// No description provided for @search. - /// - /// In en, this message translates to: - /// **'Search'** - String get search; - - /// No description provided for @library. - /// - /// In en, this message translates to: - /// **'Library'** - String get library; - - /// No description provided for @lyrics. - /// - /// In en, this message translates to: - /// **'Lyrics'** - String get lyrics; - - /// No description provided for @settings. - /// - /// In en, this message translates to: - /// **'Settings'** - String get settings; - - /// No description provided for @genre_categories_filter. - /// - /// In en, this message translates to: - /// **'Filter categories or genres...'** - String get genre_categories_filter; - - /// No description provided for @genre. - /// - /// In en, this message translates to: - /// **'Genre'** - String get genre; - - /// No description provided for @personalized. - /// - /// In en, this message translates to: - /// **'Personalized'** - String get personalized; - - /// No description provided for @featured. - /// - /// In en, this message translates to: - /// **'Featured'** - String get featured; - - /// No description provided for @new_releases. - /// - /// In en, this message translates to: - /// **'New Releases'** - String get new_releases; - - /// No description provided for @songs. - /// - /// In en, this message translates to: - /// **'Songs'** - String get songs; - - /// No description provided for @playing_track. - /// - /// In en, this message translates to: - /// **'Playing {track}'** - String playing_track(Object track); - - /// No description provided for @queue_clear_alert. - /// - /// In en, this message translates to: - /// **'This will clear the current queue. {track_length} tracks will be removed\nDo you want to continue?'** - String queue_clear_alert(Object track_length); - - /// No description provided for @load_more. - /// - /// In en, this message translates to: - /// **'Load more'** - String get load_more; - - /// No description provided for @playlists. - /// - /// In en, this message translates to: - /// **'Playlists'** - String get playlists; - - /// No description provided for @artists. - /// - /// In en, this message translates to: - /// **'Artists'** - String get artists; - - /// No description provided for @albums. - /// - /// In en, this message translates to: - /// **'Albums'** - String get albums; - - /// No description provided for @tracks. - /// - /// In en, this message translates to: - /// **'Tracks'** - String get tracks; - - /// No description provided for @downloads. - /// - /// In en, this message translates to: - /// **'Downloads'** - String get downloads; - - /// No description provided for @filter_playlists. - /// - /// In en, this message translates to: - /// **'Filter your playlists...'** - String get filter_playlists; - - /// No description provided for @liked_tracks. - /// - /// In en, this message translates to: - /// **'Liked Tracks'** - String get liked_tracks; - - /// No description provided for @liked_tracks_description. - /// - /// In en, this message translates to: - /// **'All your liked tracks'** - String get liked_tracks_description; - - /// No description provided for @playlist. - /// - /// In en, this message translates to: - /// **'Playlist'** - String get playlist; - - /// No description provided for @create_a_playlist. - /// - /// In en, this message translates to: - /// **'Create a playlist'** - String get create_a_playlist; - - /// No description provided for @update_playlist. - /// - /// In en, this message translates to: - /// **'Update playlist'** - String get update_playlist; - - /// No description provided for @create. - /// - /// In en, this message translates to: - /// **'Create'** - String get create; - - /// No description provided for @cancel. - /// - /// In en, this message translates to: - /// **'Cancel'** - String get cancel; - - /// No description provided for @update. - /// - /// In en, this message translates to: - /// **'Update'** - String get update; - - /// No description provided for @playlist_name. - /// - /// In en, this message translates to: - /// **'Playlist Name'** - String get playlist_name; - - /// No description provided for @name_of_playlist. - /// - /// In en, this message translates to: - /// **'Name of the playlist'** - String get name_of_playlist; - - /// No description provided for @description. - /// - /// In en, this message translates to: - /// **'Description'** - String get description; - - /// No description provided for @public. - /// - /// In en, this message translates to: - /// **'Public'** - String get public; - - /// No description provided for @collaborative. - /// - /// In en, this message translates to: - /// **'Collaborative'** - String get collaborative; - - /// No description provided for @search_local_tracks. - /// - /// In en, this message translates to: - /// **'Search local tracks...'** - String get search_local_tracks; - - /// No description provided for @play. - /// - /// In en, this message translates to: - /// **'Play'** - String get play; - - /// No description provided for @delete. - /// - /// In en, this message translates to: - /// **'Delete'** - String get delete; - - /// No description provided for @none. - /// - /// In en, this message translates to: - /// **'None'** - String get none; - - /// No description provided for @sort_a_z. - /// - /// In en, this message translates to: - /// **'Sort by A-Z'** - String get sort_a_z; - - /// No description provided for @sort_z_a. - /// - /// In en, this message translates to: - /// **'Sort by Z-A'** - String get sort_z_a; - - /// No description provided for @sort_artist. - /// - /// In en, this message translates to: - /// **'Sort by Artist'** - String get sort_artist; - - /// No description provided for @sort_album. - /// - /// In en, this message translates to: - /// **'Sort by Album'** - String get sort_album; - - /// No description provided for @sort_duration. - /// - /// In en, this message translates to: - /// **'Sort by Duration'** - String get sort_duration; - - /// No description provided for @sort_tracks. - /// - /// In en, this message translates to: - /// **'Sort Tracks'** - String get sort_tracks; - - /// No description provided for @currently_downloading. - /// - /// In en, this message translates to: - /// **'Currently Downloading ({tracks_length})'** - String currently_downloading(Object tracks_length); - - /// No description provided for @cancel_all. - /// - /// In en, this message translates to: - /// **'Cancel All'** - String get cancel_all; - - /// No description provided for @filter_artist. - /// - /// In en, this message translates to: - /// **'Filter artists...'** - String get filter_artist; - - /// No description provided for @followers. - /// - /// In en, this message translates to: - /// **'{followers} Followers'** - String followers(Object followers); - - /// No description provided for @add_artist_to_blacklist. - /// - /// In en, this message translates to: - /// **'Add artist to blacklist'** - String get add_artist_to_blacklist; - - /// No description provided for @top_tracks. - /// - /// In en, this message translates to: - /// **'Top Tracks'** - String get top_tracks; - - /// No description provided for @fans_also_like. - /// - /// In en, this message translates to: - /// **'Fans also like'** - String get fans_also_like; - - /// No description provided for @loading. - /// - /// In en, this message translates to: - /// **'Loading...'** - String get loading; - - /// No description provided for @artist. - /// - /// In en, this message translates to: - /// **'Artist'** - String get artist; - - /// No description provided for @blacklisted. - /// - /// In en, this message translates to: - /// **'Blacklisted'** - String get blacklisted; - - /// No description provided for @following. - /// - /// In en, this message translates to: - /// **'Following'** - String get following; - - /// No description provided for @follow. - /// - /// In en, this message translates to: - /// **'Follow'** - String get follow; - - /// No description provided for @artist_url_copied. - /// - /// In en, this message translates to: - /// **'Artist URL copied to clipboard'** - String get artist_url_copied; - - /// No description provided for @added_to_queue. - /// - /// In en, this message translates to: - /// **'Added {tracks} tracks to queue'** - String added_to_queue(Object tracks); - - /// No description provided for @filter_albums. - /// - /// In en, this message translates to: - /// **'Filter albums...'** - String get filter_albums; - - /// No description provided for @synced. - /// - /// In en, this message translates to: - /// **'Synced'** - String get synced; - - /// No description provided for @plain. - /// - /// In en, this message translates to: - /// **'Plain'** - String get plain; - - /// No description provided for @shuffle. - /// - /// In en, this message translates to: - /// **'Shuffle'** - String get shuffle; - - /// No description provided for @search_tracks. - /// - /// In en, this message translates to: - /// **'Search tracks...'** - String get search_tracks; - - /// No description provided for @released. - /// - /// In en, this message translates to: - /// **'Released'** - String get released; - - /// No description provided for @error. - /// - /// In en, this message translates to: - /// **'Error {error}'** - String error(Object error); - - /// No description provided for @title. - /// - /// In en, this message translates to: - /// **'Title'** - String get title; - - /// No description provided for @time. - /// - /// In en, this message translates to: - /// **'Time'** - String get time; - - /// No description provided for @more_actions. - /// - /// In en, this message translates to: - /// **'More actions'** - String get more_actions; - - /// No description provided for @download_count. - /// - /// In en, this message translates to: - /// **'Download ({count})'** - String download_count(Object count); - - /// No description provided for @add_count_to_playlist. - /// - /// In en, this message translates to: - /// **'Add ({count}) to Playlist'** - String add_count_to_playlist(Object count); - - /// No description provided for @add_count_to_queue. - /// - /// In en, this message translates to: - /// **'Add ({count}) to Queue'** - String add_count_to_queue(Object count); - - /// No description provided for @play_count_next. - /// - /// In en, this message translates to: - /// **'Play ({count}) next'** - String play_count_next(Object count); - - /// No description provided for @album. - /// - /// In en, this message translates to: - /// **'Album'** - String get album; - - /// No description provided for @copied_to_clipboard. - /// - /// In en, this message translates to: - /// **'Copied {data} to clipboard'** - String copied_to_clipboard(Object data); - - /// No description provided for @add_to_following_playlists. - /// - /// In en, this message translates to: - /// **'Add {track} to following Playlists'** - String add_to_following_playlists(Object track); - - /// No description provided for @add. - /// - /// In en, this message translates to: - /// **'Add'** - String get add; - - /// No description provided for @added_track_to_queue. - /// - /// In en, this message translates to: - /// **'Added {track} to queue'** - String added_track_to_queue(Object track); - - /// No description provided for @add_to_queue. - /// - /// In en, this message translates to: - /// **'Add to queue'** - String get add_to_queue; - - /// No description provided for @track_will_play_next. - /// - /// In en, this message translates to: - /// **'{track} will play next'** - String track_will_play_next(Object track); - - /// No description provided for @play_next. - /// - /// In en, this message translates to: - /// **'Play next'** - String get play_next; - - /// No description provided for @removed_track_from_queue. - /// - /// In en, this message translates to: - /// **'Removed {track} from queue'** - String removed_track_from_queue(Object track); - - /// No description provided for @remove_from_queue. - /// - /// In en, this message translates to: - /// **'Remove from queue'** - String get remove_from_queue; - - /// No description provided for @remove_from_favorites. - /// - /// In en, this message translates to: - /// **'Remove from favorites'** - String get remove_from_favorites; - - /// No description provided for @save_as_favorite. - /// - /// In en, this message translates to: - /// **'Save as favorite'** - String get save_as_favorite; - - /// No description provided for @add_to_playlist. - /// - /// In en, this message translates to: - /// **'Add to playlist'** - String get add_to_playlist; - - /// No description provided for @remove_from_playlist. - /// - /// In en, this message translates to: - /// **'Remove from playlist'** - String get remove_from_playlist; - - /// No description provided for @add_to_blacklist. - /// - /// In en, this message translates to: - /// **'Add to blacklist'** - String get add_to_blacklist; - - /// No description provided for @remove_from_blacklist. - /// - /// In en, this message translates to: - /// **'Remove from blacklist'** - String get remove_from_blacklist; - - /// No description provided for @share. - /// - /// In en, this message translates to: - /// **'Share'** - String get share; - - /// No description provided for @mini_player. - /// - /// In en, this message translates to: - /// **'Mini Player'** - String get mini_player; - - /// No description provided for @slide_to_seek. - /// - /// In en, this message translates to: - /// **'Slide to seek forward or backward'** - String get slide_to_seek; - - /// No description provided for @shuffle_playlist. - /// - /// In en, this message translates to: - /// **'Shuffle playlist'** - String get shuffle_playlist; - - /// No description provided for @unshuffle_playlist. - /// - /// In en, this message translates to: - /// **'Unshuffle playlist'** - String get unshuffle_playlist; - - /// No description provided for @previous_track. - /// - /// In en, this message translates to: - /// **'Previous track'** - String get previous_track; - - /// No description provided for @next_track. - /// - /// In en, this message translates to: - /// **'Next track'** - String get next_track; - - /// No description provided for @pause_playback. - /// - /// In en, this message translates to: - /// **'Pause Playback'** - String get pause_playback; - - /// No description provided for @resume_playback. - /// - /// In en, this message translates to: - /// **'Resume Playback'** - String get resume_playback; - - /// No description provided for @loop_track. - /// - /// In en, this message translates to: - /// **'Loop track'** - String get loop_track; - - /// No description provided for @no_loop. - /// - /// In en, this message translates to: - /// **'No loop'** - String get no_loop; - - /// No description provided for @repeat_playlist. - /// - /// In en, this message translates to: - /// **'Repeat playlist'** - String get repeat_playlist; - - /// No description provided for @queue. - /// - /// In en, this message translates to: - /// **'Queue'** - String get queue; - - /// No description provided for @alternative_track_sources. - /// - /// In en, this message translates to: - /// **'Alternative track sources'** - String get alternative_track_sources; - - /// No description provided for @download_track. - /// - /// In en, this message translates to: - /// **'Download track'** - String get download_track; - - /// No description provided for @tracks_in_queue. - /// - /// In en, this message translates to: - /// **'{tracks} tracks in queue'** - String tracks_in_queue(Object tracks); - - /// No description provided for @clear_all. - /// - /// In en, this message translates to: - /// **'Clear all'** - String get clear_all; - - /// No description provided for @show_hide_ui_on_hover. - /// - /// In en, this message translates to: - /// **'Show/Hide UI on hover'** - String get show_hide_ui_on_hover; - - /// No description provided for @always_on_top. - /// - /// In en, this message translates to: - /// **'Always on top'** - String get always_on_top; - - /// No description provided for @exit_mini_player. - /// - /// In en, this message translates to: - /// **'Exit Mini player'** - String get exit_mini_player; - - /// No description provided for @download_location. - /// - /// In en, this message translates to: - /// **'Download location'** - String get download_location; - - /// No description provided for @local_library. - /// - /// In en, this message translates to: - /// **'Local library'** - String get local_library; - - /// No description provided for @add_library_location. - /// - /// In en, this message translates to: - /// **'Add to library'** - String get add_library_location; - - /// No description provided for @remove_library_location. - /// - /// In en, this message translates to: - /// **'Remove from library'** - String get remove_library_location; - - /// No description provided for @account. - /// - /// In en, this message translates to: - /// **'Account'** - String get account; - - /// No description provided for @logout. - /// - /// In en, this message translates to: - /// **'Logout'** - String get logout; - - /// No description provided for @logout_of_this_account. - /// - /// In en, this message translates to: - /// **'Logout of this account'** - String get logout_of_this_account; - - /// No description provided for @language_region. - /// - /// In en, this message translates to: - /// **'Language & Region'** - String get language_region; - - /// No description provided for @language. - /// - /// In en, this message translates to: - /// **'Language'** - String get language; - - /// No description provided for @system_default. - /// - /// In en, this message translates to: - /// **'System Default'** - String get system_default; - - /// No description provided for @market_place_region. - /// - /// In en, this message translates to: - /// **'Marketplace Region'** - String get market_place_region; - - /// No description provided for @recommendation_country. - /// - /// In en, this message translates to: - /// **'Recommendation Country'** - String get recommendation_country; - - /// No description provided for @appearance. - /// - /// In en, this message translates to: - /// **'Appearance'** - String get appearance; - - /// No description provided for @layout_mode. - /// - /// In en, this message translates to: - /// **'Layout Mode'** - String get layout_mode; - - /// No description provided for @override_layout_settings. - /// - /// In en, this message translates to: - /// **'Override responsive layout mode settings'** - String get override_layout_settings; - - /// No description provided for @adaptive. - /// - /// In en, this message translates to: - /// **'Adaptive'** - String get adaptive; - - /// No description provided for @compact. - /// - /// In en, this message translates to: - /// **'Compact'** - String get compact; - - /// No description provided for @extended. - /// - /// In en, this message translates to: - /// **'Extended'** - String get extended; - - /// No description provided for @theme. - /// - /// In en, this message translates to: - /// **'Theme'** - String get theme; - - /// No description provided for @dark. - /// - /// In en, this message translates to: - /// **'Dark'** - String get dark; - - /// No description provided for @light. - /// - /// In en, this message translates to: - /// **'Light'** - String get light; - - /// No description provided for @system. - /// - /// In en, this message translates to: - /// **'System'** - String get system; - - /// No description provided for @accent_color. - /// - /// In en, this message translates to: - /// **'Accent Color'** - String get accent_color; - - /// No description provided for @sync_album_color. - /// - /// In en, this message translates to: - /// **'Sync album color'** - String get sync_album_color; - - /// No description provided for @sync_album_color_description. - /// - /// In en, this message translates to: - /// **'Uses the dominant color of the album art as the accent color'** - String get sync_album_color_description; - - /// No description provided for @playback. - /// - /// In en, this message translates to: - /// **'Playback'** - String get playback; - - /// No description provided for @audio_quality. - /// - /// In en, this message translates to: - /// **'Audio Quality'** - String get audio_quality; - - /// No description provided for @high. - /// - /// In en, this message translates to: - /// **'High'** - String get high; - - /// No description provided for @low. - /// - /// In en, this message translates to: - /// **'Low'** - String get low; - - /// No description provided for @pre_download_play. - /// - /// In en, this message translates to: - /// **'Pre-download and play'** - String get pre_download_play; - - /// No description provided for @pre_download_play_description. - /// - /// In en, this message translates to: - /// **'Instead of streaming audio, download bytes and play instead (Recommended for higher bandwidth users)'** - String get pre_download_play_description; - - /// No description provided for @skip_non_music. - /// - /// In en, this message translates to: - /// **'Skip non-music segments (SponsorBlock)'** - String get skip_non_music; - - /// No description provided for @blacklist_description. - /// - /// In en, this message translates to: - /// **'Blacklisted tracks and artists'** - String get blacklist_description; - - /// No description provided for @wait_for_download_to_finish. - /// - /// In en, this message translates to: - /// **'Please wait for the current download to finish'** - String get wait_for_download_to_finish; - - /// No description provided for @desktop. - /// - /// In en, this message translates to: - /// **'Desktop'** - String get desktop; - - /// No description provided for @close_behavior. - /// - /// In en, this message translates to: - /// **'Close Behavior'** - String get close_behavior; - - /// No description provided for @close. - /// - /// In en, this message translates to: - /// **'Close'** - String get close; - - /// No description provided for @minimize_to_tray. - /// - /// In en, this message translates to: - /// **'Minimize to tray'** - String get minimize_to_tray; - - /// No description provided for @show_tray_icon. - /// - /// In en, this message translates to: - /// **'Show System tray icon'** - String get show_tray_icon; - - /// No description provided for @about. - /// - /// In en, this message translates to: - /// **'About'** - String get about; - - /// No description provided for @u_love_spotube. - /// - /// In en, this message translates to: - /// **'We know you love Spotube'** - String get u_love_spotube; - - /// No description provided for @check_for_updates. - /// - /// In en, this message translates to: - /// **'Check for updates'** - String get check_for_updates; - - /// No description provided for @about_spotube. - /// - /// In en, this message translates to: - /// **'About Spotube'** - String get about_spotube; - - /// No description provided for @blacklist. - /// - /// In en, this message translates to: - /// **'Blacklist'** - String get blacklist; - - /// No description provided for @please_sponsor. - /// - /// In en, this message translates to: - /// **'Please Sponsor/Donate'** - String get please_sponsor; - - /// No description provided for @spotube_description. - /// - /// In en, this message translates to: - /// **'Open source extensible music streaming platform and app, based on BYOMM (Bring your own music metadata) concept'** - String get spotube_description; - - /// No description provided for @version. - /// - /// In en, this message translates to: - /// **'Version'** - String get version; - - /// No description provided for @build_number. - /// - /// In en, this message translates to: - /// **'Build Number'** - String get build_number; - - /// No description provided for @founder. - /// - /// In en, this message translates to: - /// **'Founder'** - String get founder; - - /// No description provided for @repository. - /// - /// In en, this message translates to: - /// **'Repository'** - String get repository; - - /// No description provided for @bug_issues. - /// - /// In en, this message translates to: - /// **'Bug+Issues'** - String get bug_issues; - - /// No description provided for @made_with. - /// - /// In en, this message translates to: - /// **'Made with ❤️ in Bangladesh🇧🇩'** - String get made_with; - - /// No description provided for @kingkor_roy_tirtho. - /// - /// In en, this message translates to: - /// **'Kingkor Roy Tirtho'** - String get kingkor_roy_tirtho; - - /// No description provided for @copyright. - /// - /// In en, this message translates to: - /// **'© 2021-{current_year} Kingkor Roy Tirtho'** - String copyright(Object current_year); - - /// No description provided for @license. - /// - /// In en, this message translates to: - /// **'License'** - String get license; - - /// No description provided for @credentials_will_not_be_shared_disclaimer. - /// - /// In en, this message translates to: - /// **'Don\'t worry, any of your credentials won\'t be collected or shared with anyone'** - String get credentials_will_not_be_shared_disclaimer; - - /// No description provided for @know_how_to_login. - /// - /// In en, this message translates to: - /// **'Don\'t know how to do this?'** - String get know_how_to_login; - - /// No description provided for @follow_step_by_step_guide. - /// - /// In en, this message translates to: - /// **'Follow along the Step by Step guide'** - String get follow_step_by_step_guide; - - /// No description provided for @cookie_name_cookie. - /// - /// In en, this message translates to: - /// **'{name} Cookie'** - String cookie_name_cookie(Object name); - - /// No description provided for @fill_in_all_fields. - /// - /// In en, this message translates to: - /// **'Please fill in all the fields'** - String get fill_in_all_fields; - - /// No description provided for @submit. - /// - /// In en, this message translates to: - /// **'Submit'** - String get submit; - - /// No description provided for @exit. - /// - /// In en, this message translates to: - /// **'Exit'** - String get exit; - - /// No description provided for @previous. - /// - /// In en, this message translates to: - /// **'Previous'** - String get previous; - - /// No description provided for @next. - /// - /// In en, this message translates to: - /// **'Next'** - String get next; - - /// No description provided for @done. - /// - /// In en, this message translates to: - /// **'Done'** - String get done; - - /// No description provided for @step_1. - /// - /// In en, this message translates to: - /// **'Step 1'** - String get step_1; - - /// No description provided for @first_go_to. - /// - /// In en, this message translates to: - /// **'First, Go to'** - String get first_go_to; - - /// No description provided for @something_went_wrong. - /// - /// In en, this message translates to: - /// **'Something went wrong'** - String get something_went_wrong; - - /// No description provided for @piped_instance. - /// - /// In en, this message translates to: - /// **'Piped Server Instance'** - String get piped_instance; - - /// No description provided for @piped_description. - /// - /// In en, this message translates to: - /// **'The Piped server instance to use for track matching'** - String get piped_description; - - /// No description provided for @piped_warning. - /// - /// In en, this message translates to: - /// **'Some of them might not work well. So use at your own risk'** - String get piped_warning; - - /// No description provided for @invidious_instance. - /// - /// In en, this message translates to: - /// **'Invidious Server Instance'** - String get invidious_instance; - - /// No description provided for @invidious_description. - /// - /// In en, this message translates to: - /// **'The Invidious server instance to use for track matching'** - String get invidious_description; - - /// No description provided for @invidious_warning. - /// - /// In en, this message translates to: - /// **'Some of them might not work well. So use at your own risk'** - String get invidious_warning; - - /// No description provided for @generate. - /// - /// In en, this message translates to: - /// **'Generate'** - String get generate; - - /// No description provided for @track_exists. - /// - /// In en, this message translates to: - /// **'Track {track} already exists'** - String track_exists(Object track); - - /// No description provided for @replace_downloaded_tracks. - /// - /// In en, this message translates to: - /// **'Replace all downloaded tracks'** - String get replace_downloaded_tracks; - - /// No description provided for @skip_download_tracks. - /// - /// In en, this message translates to: - /// **'Skip downloading all downloaded tracks'** - String get skip_download_tracks; - - /// No description provided for @do_you_want_to_replace. - /// - /// In en, this message translates to: - /// **'Do you want to replace the existing track??'** - String get do_you_want_to_replace; - - /// No description provided for @replace. - /// - /// In en, this message translates to: - /// **'Replace'** - String get replace; - - /// No description provided for @skip. - /// - /// In en, this message translates to: - /// **'Skip'** - String get skip; - - /// No description provided for @select_up_to_count_type. - /// - /// In en, this message translates to: - /// **'Select up to {count} {type}'** - String select_up_to_count_type(Object count, Object type); - - /// No description provided for @select_genres. - /// - /// In en, this message translates to: - /// **'Select Genres'** - String get select_genres; - - /// No description provided for @add_genres. - /// - /// In en, this message translates to: - /// **'Add Genres'** - String get add_genres; - - /// No description provided for @country. - /// - /// In en, this message translates to: - /// **'Country'** - String get country; - - /// No description provided for @number_of_tracks_generate. - /// - /// In en, this message translates to: - /// **'Number of tracks to generate'** - String get number_of_tracks_generate; - - /// No description provided for @acousticness. - /// - /// In en, this message translates to: - /// **'Acousticness'** - String get acousticness; - - /// No description provided for @danceability. - /// - /// In en, this message translates to: - /// **'Danceability'** - String get danceability; - - /// No description provided for @energy. - /// - /// In en, this message translates to: - /// **'Energy'** - String get energy; - - /// No description provided for @instrumentalness. - /// - /// In en, this message translates to: - /// **'Instrumentalness'** - String get instrumentalness; - - /// No description provided for @liveness. - /// - /// In en, this message translates to: - /// **'Liveness'** - String get liveness; - - /// No description provided for @loudness. - /// - /// In en, this message translates to: - /// **'Loudness'** - String get loudness; - - /// No description provided for @speechiness. - /// - /// In en, this message translates to: - /// **'Speechiness'** - String get speechiness; - - /// No description provided for @valence. - /// - /// In en, this message translates to: - /// **'Valence'** - String get valence; - - /// No description provided for @popularity. - /// - /// In en, this message translates to: - /// **'Popularity'** - String get popularity; - - /// No description provided for @key. - /// - /// In en, this message translates to: - /// **'Key'** - String get key; - - /// No description provided for @duration. - /// - /// In en, this message translates to: - /// **'Duration (s)'** - String get duration; - - /// No description provided for @tempo. - /// - /// In en, this message translates to: - /// **'Tempo (BPM)'** - String get tempo; - - /// No description provided for @mode. - /// - /// In en, this message translates to: - /// **'Mode'** - String get mode; - - /// No description provided for @time_signature. - /// - /// In en, this message translates to: - /// **'Time Signature'** - String get time_signature; - - /// No description provided for @short. - /// - /// In en, this message translates to: - /// **'Short'** - String get short; - - /// No description provided for @medium. - /// - /// In en, this message translates to: - /// **'Medium'** - String get medium; - - /// No description provided for @long. - /// - /// In en, this message translates to: - /// **'Long'** - String get long; - - /// No description provided for @min. - /// - /// In en, this message translates to: - /// **'Min'** - String get min; - - /// No description provided for @max. - /// - /// In en, this message translates to: - /// **'Max'** - String get max; - - /// No description provided for @target. - /// - /// In en, this message translates to: - /// **'Target'** - String get target; - - /// No description provided for @moderate. - /// - /// In en, this message translates to: - /// **'Moderate'** - String get moderate; - - /// No description provided for @deselect_all. - /// - /// In en, this message translates to: - /// **'Deselect All'** - String get deselect_all; - - /// No description provided for @select_all. - /// - /// In en, this message translates to: - /// **'Select All'** - String get select_all; - - /// No description provided for @are_you_sure. - /// - /// In en, this message translates to: - /// **'Are you sure?'** - String get are_you_sure; - - /// No description provided for @generating_playlist. - /// - /// In en, this message translates to: - /// **'Generating your custom playlist...'** - String get generating_playlist; - - /// No description provided for @selected_count_tracks. - /// - /// In en, this message translates to: - /// **'Selected {count} tracks'** - String selected_count_tracks(Object count); - - /// No description provided for @download_warning. - /// - /// In en, this message translates to: - /// **'If you download all Tracks at bulk you\'re clearly pirating Music & causing damage to the creative society of Music. I hope you are aware of this. Always, try respecting & supporting Artist\'s hard work'** - String get download_warning; - - /// No description provided for @download_ip_ban_warning. - /// - /// In en, this message translates to: - /// **'BTW, your IP can get blocked on YouTube due excessive download requests than usual. IP block means you can\'t use YouTube (even if you\'re logged in) for at least 2-3 months from that IP device. And Spotube doesn\'t hold any responsibility if this ever happens'** - String get download_ip_ban_warning; - - /// No description provided for @by_clicking_accept_terms. - /// - /// In en, this message translates to: - /// **'By clicking \'accept\' you agree to following terms:'** - String get by_clicking_accept_terms; - - /// No description provided for @download_agreement_1. - /// - /// In en, this message translates to: - /// **'I know I\'m pirating Music. I\'m bad'** - String get download_agreement_1; - - /// No description provided for @download_agreement_2. - /// - /// In en, this message translates to: - /// **'I\'ll support the Artist wherever I can and I\'m only doing this because I don\'t have money to buy their art'** - String get download_agreement_2; - - /// No description provided for @download_agreement_3. - /// - /// In en, this message translates to: - /// **'I\'m completely aware that my IP can get blocked on YouTube & I don\'t hold Spotube or his owners/contributors responsible for any accidents caused by my current action'** - String get download_agreement_3; - - /// No description provided for @decline. - /// - /// In en, this message translates to: - /// **'Decline'** - String get decline; - - /// No description provided for @accept. - /// - /// In en, this message translates to: - /// **'Accept'** - String get accept; - - /// No description provided for @details. - /// - /// In en, this message translates to: - /// **'Details'** - String get details; - - /// No description provided for @youtube. - /// - /// In en, this message translates to: - /// **'YouTube'** - String get youtube; - - /// No description provided for @channel. - /// - /// In en, this message translates to: - /// **'Channel'** - String get channel; - - /// No description provided for @likes. - /// - /// In en, this message translates to: - /// **'Likes'** - String get likes; - - /// No description provided for @dislikes. - /// - /// In en, this message translates to: - /// **'Dislikes'** - String get dislikes; - - /// No description provided for @views. - /// - /// In en, this message translates to: - /// **'Views'** - String get views; - - /// No description provided for @streamUrl. - /// - /// In en, this message translates to: - /// **'Stream URL'** - String get streamUrl; - - /// No description provided for @stop. - /// - /// In en, this message translates to: - /// **'Stop'** - String get stop; - - /// No description provided for @sort_newest. - /// - /// In en, this message translates to: - /// **'Sort by newest added'** - String get sort_newest; - - /// No description provided for @sort_oldest. - /// - /// In en, this message translates to: - /// **'Sort by oldest added'** - String get sort_oldest; - - /// No description provided for @sleep_timer. - /// - /// In en, this message translates to: - /// **'Sleep Timer'** - String get sleep_timer; - - /// No description provided for @mins. - /// - /// In en, this message translates to: - /// **'{minutes} Minutes'** - String mins(Object minutes); - - /// No description provided for @hours. - /// - /// In en, this message translates to: - /// **'{hours} Hours'** - String hours(Object hours); - - /// No description provided for @hour. - /// - /// In en, this message translates to: - /// **'{hours} Hour'** - String hour(Object hours); - - /// No description provided for @custom_hours. - /// - /// In en, this message translates to: - /// **'Custom Hours'** - String get custom_hours; - - /// No description provided for @logs. - /// - /// In en, this message translates to: - /// **'Logs'** - String get logs; - - /// No description provided for @developers. - /// - /// In en, this message translates to: - /// **'Developers'** - String get developers; - - /// No description provided for @not_logged_in. - /// - /// In en, this message translates to: - /// **'You\'re not logged in'** - String get not_logged_in; - - /// No description provided for @search_mode. - /// - /// In en, this message translates to: - /// **'Search Mode'** - String get search_mode; - - /// No description provided for @audio_source. - /// - /// In en, this message translates to: - /// **'Audio Source'** - String get audio_source; - - /// No description provided for @ok. - /// - /// In en, this message translates to: - /// **'Ok'** - String get ok; - - /// No description provided for @failed_to_encrypt. - /// - /// In en, this message translates to: - /// **'Failed to encrypt'** - String get failed_to_encrypt; - - /// No description provided for @encryption_failed_warning. - /// - /// In en, this message translates to: - /// **'Spotube uses encryption to securely store your data. But failed to do so. So it\'ll fallback to insecure storage\nIf you\'re using linux, please make sure you\'ve any secret-service (gnome-keyring, kde-wallet, keepassxc etc) installed'** - String get encryption_failed_warning; - - /// No description provided for @querying_info. - /// - /// In en, this message translates to: - /// **'Querying info...'** - String get querying_info; - - /// No description provided for @piped_api_down. - /// - /// In en, this message translates to: - /// **'Piped API is down'** - String get piped_api_down; - - /// No description provided for @piped_down_error_instructions. - /// - /// In en, this message translates to: - /// **'The Piped instance {pipedInstance} is currently down\n\nEither change the instance or change the \'API type\' to official YouTube API\n\nMake sure to restart the app after change'** - String piped_down_error_instructions(Object pipedInstance); - - /// No description provided for @you_are_offline. - /// - /// In en, this message translates to: - /// **'You are currently offline'** - String get you_are_offline; - - /// No description provided for @connection_restored. - /// - /// In en, this message translates to: - /// **'Your internet connection was restored'** - String get connection_restored; - - /// No description provided for @use_system_title_bar. - /// - /// In en, this message translates to: - /// **'Use system title bar'** - String get use_system_title_bar; - - /// No description provided for @crunching_results. - /// - /// In en, this message translates to: - /// **'Crunching results...'** - String get crunching_results; - - /// No description provided for @search_to_get_results. - /// - /// In en, this message translates to: - /// **'Search to get results'** - String get search_to_get_results; - - /// No description provided for @use_amoled_mode. - /// - /// In en, this message translates to: - /// **'Pitch black dark theme'** - String get use_amoled_mode; - - /// No description provided for @pitch_dark_theme. - /// - /// In en, this message translates to: - /// **'AMOLED Mode'** - String get pitch_dark_theme; - - /// No description provided for @normalize_audio. - /// - /// In en, this message translates to: - /// **'Normalize audio'** - String get normalize_audio; - - /// No description provided for @change_cover. - /// - /// In en, this message translates to: - /// **'Change cover'** - String get change_cover; - - /// No description provided for @add_cover. - /// - /// In en, this message translates to: - /// **'Add cover'** - String get add_cover; - - /// No description provided for @restore_defaults. - /// - /// In en, this message translates to: - /// **'Restore defaults'** - String get restore_defaults; - - /// No description provided for @download_music_format. - /// - /// In en, this message translates to: - /// **'Download music format'** - String get download_music_format; - - /// No description provided for @streaming_music_format. - /// - /// In en, this message translates to: - /// **'Streaming music format'** - String get streaming_music_format; - - /// No description provided for @download_music_quality. - /// - /// In en, this message translates to: - /// **'Download music quality'** - String get download_music_quality; - - /// No description provided for @streaming_music_quality. - /// - /// In en, this message translates to: - /// **'Streaming music quality'** - String get streaming_music_quality; - - /// No description provided for @login_with_lastfm. - /// - /// In en, this message translates to: - /// **'Login with Last.fm'** - String get login_with_lastfm; - - /// No description provided for @connect. - /// - /// In en, this message translates to: - /// **'Connect'** - String get connect; - - /// No description provided for @disconnect_lastfm. - /// - /// In en, this message translates to: - /// **'Disconnect Last.fm'** - String get disconnect_lastfm; - - /// No description provided for @disconnect. - /// - /// In en, this message translates to: - /// **'Disconnect'** - String get disconnect; - - /// No description provided for @username. - /// - /// In en, this message translates to: - /// **'Username'** - String get username; - - /// No description provided for @password. - /// - /// In en, this message translates to: - /// **'Password'** - String get password; - - /// No description provided for @login. - /// - /// In en, this message translates to: - /// **'Login'** - String get login; - - /// No description provided for @login_with_your_lastfm. - /// - /// In en, this message translates to: - /// **'Login with your Last.fm account'** - String get login_with_your_lastfm; - - /// No description provided for @scrobble_to_lastfm. - /// - /// In en, this message translates to: - /// **'Scrobble to Last.fm'** - String get scrobble_to_lastfm; - - /// No description provided for @go_to_album. - /// - /// In en, this message translates to: - /// **'Go to Album'** - String get go_to_album; - - /// No description provided for @discord_rich_presence. - /// - /// In en, this message translates to: - /// **'Discord Rich Presence'** - String get discord_rich_presence; - - /// No description provided for @browse_all. - /// - /// In en, this message translates to: - /// **'Browse All'** - String get browse_all; - - /// No description provided for @genres. - /// - /// In en, this message translates to: - /// **'Genres'** - String get genres; - - /// No description provided for @explore_genres. - /// - /// In en, this message translates to: - /// **'Explore Genres'** - String get explore_genres; - - /// No description provided for @friends. - /// - /// In en, this message translates to: - /// **'Friends'** - String get friends; - - /// No description provided for @no_lyrics_available. - /// - /// In en, this message translates to: - /// **'Sorry, unable find lyrics for this track'** - String get no_lyrics_available; - - /// No description provided for @start_a_radio. - /// - /// In en, this message translates to: - /// **'Start a Radio'** - String get start_a_radio; - - /// No description provided for @how_to_start_radio. - /// - /// In en, this message translates to: - /// **'How do you want to start the radio?'** - String get how_to_start_radio; - - /// No description provided for @replace_queue_question. - /// - /// In en, this message translates to: - /// **'Do you want to replace the current queue or append to it?'** - String get replace_queue_question; - - /// No description provided for @endless_playback. - /// - /// In en, this message translates to: - /// **'Endless Playback'** - String get endless_playback; - - /// No description provided for @delete_playlist. - /// - /// In en, this message translates to: - /// **'Delete Playlist'** - String get delete_playlist; - - /// No description provided for @delete_playlist_confirmation. - /// - /// In en, this message translates to: - /// **'Are you sure you want to delete this playlist?'** - String get delete_playlist_confirmation; - - /// No description provided for @local_tracks. - /// - /// In en, this message translates to: - /// **'Local Tracks'** - String get local_tracks; - - /// No description provided for @local_tab. - /// - /// In en, this message translates to: - /// **'Local'** - String get local_tab; - - /// No description provided for @song_link. - /// - /// In en, this message translates to: - /// **'Song Link'** - String get song_link; - - /// No description provided for @skip_this_nonsense. - /// - /// In en, this message translates to: - /// **'Skip this nonsense'** - String get skip_this_nonsense; - - /// No description provided for @freedom_of_music. - /// - /// In en, this message translates to: - /// **'“Freedom of Music”'** - String get freedom_of_music; - - /// No description provided for @freedom_of_music_palm. - /// - /// In en, this message translates to: - /// **'“Freedom of Music in the palm of your hand”'** - String get freedom_of_music_palm; - - /// No description provided for @get_started. - /// - /// In en, this message translates to: - /// **'Let\'s get started'** - String get get_started; - - /// No description provided for @youtube_source_description. - /// - /// In en, this message translates to: - /// **'Recommended and works best.'** - String get youtube_source_description; - - /// No description provided for @piped_source_description. - /// - /// In en, this message translates to: - /// **'Feeling free? Same as YouTube but a lot free.'** - String get piped_source_description; - - /// No description provided for @jiosaavn_source_description. - /// - /// In en, this message translates to: - /// **'Best for South Asian region.'** - String get jiosaavn_source_description; - - /// No description provided for @invidious_source_description. - /// - /// In en, this message translates to: - /// **'Similar to Piped but with higher availability.'** - String get invidious_source_description; - - /// No description provided for @highest_quality. - /// - /// In en, this message translates to: - /// **'Highest Quality: {quality}'** - String highest_quality(Object quality); - - /// No description provided for @select_audio_source. - /// - /// In en, this message translates to: - /// **'Select Audio Source'** - String get select_audio_source; - - /// No description provided for @endless_playback_description. - /// - /// In en, this message translates to: - /// **'Automatically append new songs\nto the end of the queue'** - String get endless_playback_description; - - /// No description provided for @choose_your_region. - /// - /// In en, this message translates to: - /// **'Choose your region'** - String get choose_your_region; - - /// No description provided for @choose_your_region_description. - /// - /// In en, this message translates to: - /// **'This will help Spotube show you the right content\nfor your location.'** - String get choose_your_region_description; - - /// No description provided for @choose_your_language. - /// - /// In en, this message translates to: - /// **'Choose your language'** - String get choose_your_language; - - /// No description provided for @help_project_grow. - /// - /// In en, this message translates to: - /// **'Help this project grow'** - String get help_project_grow; - - /// No description provided for @help_project_grow_description. - /// - /// In en, this message translates to: - /// **'Spotube is an open-source project. You can help this project grow by contributing to the project, reporting bugs, or suggesting new features.'** - String get help_project_grow_description; - - /// No description provided for @contribute_on_github. - /// - /// In en, this message translates to: - /// **'Contribute on GitHub'** - String get contribute_on_github; - - /// No description provided for @donate_on_open_collective. - /// - /// In en, this message translates to: - /// **'Donate on Open Collective'** - String get donate_on_open_collective; - - /// No description provided for @browse_anonymously. - /// - /// In en, this message translates to: - /// **'Browse Anonymously'** - String get browse_anonymously; - - /// No description provided for @enable_connect. - /// - /// In en, this message translates to: - /// **'Enable Connect'** - String get enable_connect; - - /// No description provided for @enable_connect_description. - /// - /// In en, this message translates to: - /// **'Control Spotube from other devices'** - String get enable_connect_description; - - /// No description provided for @devices. - /// - /// In en, this message translates to: - /// **'Devices'** - String get devices; - - /// No description provided for @select. - /// - /// In en, this message translates to: - /// **'Select'** - String get select; - - /// No description provided for @connect_client_alert. - /// - /// In en, this message translates to: - /// **'You\'re being controlled by {client}'** - String connect_client_alert(Object client); - - /// No description provided for @this_device. - /// - /// In en, this message translates to: - /// **'This Device'** - String get this_device; - - /// No description provided for @remote. - /// - /// In en, this message translates to: - /// **'Remote'** - String get remote; - - /// No description provided for @stats. - /// - /// In en, this message translates to: - /// **'Stats'** - String get stats; - - /// No description provided for @and_n_more. - /// - /// In en, this message translates to: - /// **'and {count} more'** - String and_n_more(Object count); - - /// No description provided for @recently_played. - /// - /// In en, this message translates to: - /// **'Recently Played'** - String get recently_played; - - /// No description provided for @browse_more. - /// - /// In en, this message translates to: - /// **'Browse More'** - String get browse_more; - - /// No description provided for @no_title. - /// - /// In en, this message translates to: - /// **'No Title'** - String get no_title; - - /// No description provided for @not_playing. - /// - /// In en, this message translates to: - /// **'Not playing'** - String get not_playing; - - /// No description provided for @epic_failure. - /// - /// In en, this message translates to: - /// **'Epic failure!'** - String get epic_failure; - - /// No description provided for @added_num_tracks_to_queue. - /// - /// In en, this message translates to: - /// **'Added {tracks_length} tracks to queue'** - String added_num_tracks_to_queue(Object tracks_length); - - /// No description provided for @spotube_has_an_update. - /// - /// In en, this message translates to: - /// **'Spotube has an update'** - String get spotube_has_an_update; - - /// No description provided for @download_now. - /// - /// In en, this message translates to: - /// **'Download Now'** - String get download_now; - - /// No description provided for @nightly_version. - /// - /// In en, this message translates to: - /// **'Spotube Nightly {nightlyBuildNum} has been released'** - String nightly_version(Object nightlyBuildNum); - - /// No description provided for @release_version. - /// - /// In en, this message translates to: - /// **'Spotube v{version} has been released'** - String release_version(Object version); - - /// No description provided for @read_the_latest. - /// - /// In en, this message translates to: - /// **'Read the latest '** - String get read_the_latest; - - /// No description provided for @release_notes. - /// - /// In en, this message translates to: - /// **'release notes'** - String get release_notes; - - /// No description provided for @pick_color_scheme. - /// - /// In en, this message translates to: - /// **'Pick color scheme'** - String get pick_color_scheme; - - /// No description provided for @save. - /// - /// In en, this message translates to: - /// **'Save'** - String get save; - - /// No description provided for @choose_the_device. - /// - /// In en, this message translates to: - /// **'Choose the device:'** - String get choose_the_device; - - /// No description provided for @multiple_device_connected. - /// - /// In en, this message translates to: - /// **'There are multiple device connected.\nChoose the device you want this action to take place'** - String get multiple_device_connected; - - /// No description provided for @nothing_found. - /// - /// In en, this message translates to: - /// **'Nothing found'** - String get nothing_found; - - /// No description provided for @the_box_is_empty. - /// - /// In en, this message translates to: - /// **'The box is empty'** - String get the_box_is_empty; - - /// No description provided for @top_artists. - /// - /// In en, this message translates to: - /// **'Top Artists'** - String get top_artists; - - /// No description provided for @top_albums. - /// - /// In en, this message translates to: - /// **'Top Albums'** - String get top_albums; - - /// No description provided for @this_week. - /// - /// In en, this message translates to: - /// **'This week'** - String get this_week; - - /// No description provided for @this_month. - /// - /// In en, this message translates to: - /// **'This month'** - String get this_month; - - /// No description provided for @last_6_months. - /// - /// In en, this message translates to: - /// **'Last 6 months'** - String get last_6_months; - - /// No description provided for @this_year. - /// - /// In en, this message translates to: - /// **'This year'** - String get this_year; - - /// No description provided for @last_2_years. - /// - /// In en, this message translates to: - /// **'Last 2 years'** - String get last_2_years; - - /// No description provided for @all_time. - /// - /// In en, this message translates to: - /// **'All time'** - String get all_time; - - /// No description provided for @powered_by_provider. - /// - /// In en, this message translates to: - /// **'Powered by {providerName}'** - String powered_by_provider(Object providerName); - - /// No description provided for @email. - /// - /// In en, this message translates to: - /// **'Email'** - String get email; - - /// No description provided for @profile_followers. - /// - /// In en, this message translates to: - /// **'Followers'** - String get profile_followers; - - /// No description provided for @birthday. - /// - /// In en, this message translates to: - /// **'Birthday'** - String get birthday; - - /// No description provided for @subscription. - /// - /// In en, this message translates to: - /// **'Subscription'** - String get subscription; - - /// No description provided for @not_born. - /// - /// In en, this message translates to: - /// **'Not born'** - String get not_born; - - /// No description provided for @hacker. - /// - /// In en, this message translates to: - /// **'Hacker'** - String get hacker; - - /// No description provided for @profile. - /// - /// In en, this message translates to: - /// **'Profile'** - String get profile; - - /// No description provided for @no_name. - /// - /// In en, this message translates to: - /// **'No Name'** - String get no_name; - - /// No description provided for @edit. - /// - /// In en, this message translates to: - /// **'Edit'** - String get edit; - - /// No description provided for @user_profile. - /// - /// In en, this message translates to: - /// **'User Profile'** - String get user_profile; - - /// No description provided for @count_plays. - /// - /// In en, this message translates to: - /// **'{count} plays'** - String count_plays(Object count); - - /// No description provided for @streaming_fees_hypothetical. - /// - /// In en, this message translates to: - /// **'Streaming fees (hypothetical)'** - String get streaming_fees_hypothetical; - - /// No description provided for @minutes_listened. - /// - /// In en, this message translates to: - /// **'Minutes listened'** - String get minutes_listened; - - /// No description provided for @streamed_songs. - /// - /// In en, this message translates to: - /// **'Streamed songs'** - String get streamed_songs; - - /// No description provided for @count_streams. - /// - /// In en, this message translates to: - /// **'{count} streams'** - String count_streams(Object count); - - /// No description provided for @owned_by_you. - /// - /// In en, this message translates to: - /// **'Owned by you'** - String get owned_by_you; - - /// No description provided for @copied_shareurl_to_clipboard. - /// - /// In en, this message translates to: - /// **'Copied {shareUrl} to clipboard'** - String copied_shareurl_to_clipboard(Object shareUrl); - - /// No description provided for @hipotetical_calculation. - /// - /// In en, this message translates to: - /// **'*This is calculated based on average online music streaming platform\'s per stream\npayout of \$0.003 to \$0.005. This is a hypothetical\ncalculation to give user insight about how much they\nwould have paid to the artists if they were to listen\ntheir song in different music streaming platform.'** - String get hipotetical_calculation; - - /// No description provided for @count_mins. - /// - /// In en, this message translates to: - /// **'{minutes} mins'** - String count_mins(Object minutes); - - /// No description provided for @summary_minutes. - /// - /// In en, this message translates to: - /// **'minutes'** - String get summary_minutes; - - /// No description provided for @summary_listened_to_music. - /// - /// In en, this message translates to: - /// **'Listened to music'** - String get summary_listened_to_music; - - /// No description provided for @summary_songs. - /// - /// In en, this message translates to: - /// **'songs'** - String get summary_songs; - - /// No description provided for @summary_streamed_overall. - /// - /// In en, this message translates to: - /// **'Streamed overall'** - String get summary_streamed_overall; - - /// No description provided for @summary_owed_to_artists. - /// - /// In en, this message translates to: - /// **'Owed to artists\nthis month'** - String get summary_owed_to_artists; - - /// No description provided for @summary_artists. - /// - /// In en, this message translates to: - /// **'artist\'s'** - String get summary_artists; - - /// No description provided for @summary_music_reached_you. - /// - /// In en, this message translates to: - /// **'Music reached you'** - String get summary_music_reached_you; - - /// No description provided for @summary_full_albums. - /// - /// In en, this message translates to: - /// **'full albums'** - String get summary_full_albums; - - /// No description provided for @summary_got_your_love. - /// - /// In en, this message translates to: - /// **'Got your love'** - String get summary_got_your_love; - - /// No description provided for @summary_playlists. - /// - /// In en, this message translates to: - /// **'playlists'** - String get summary_playlists; - - /// No description provided for @summary_were_on_repeat. - /// - /// In en, this message translates to: - /// **'Were on repeat'** - String get summary_were_on_repeat; - - /// No description provided for @total_money. - /// - /// In en, this message translates to: - /// **'Total {money}'** - String total_money(Object money); - - /// No description provided for @webview_not_found. - /// - /// In en, this message translates to: - /// **'Webview not found'** - String get webview_not_found; - - /// No description provided for @webview_not_found_description. - /// - /// In en, this message translates to: - /// **'No webview runtime is installed in your device.\nIf it\'s installed make sure it\'s in the Environment PATH\n\nAfter installing, restart the app'** - String get webview_not_found_description; - - /// No description provided for @unsupported_platform. - /// - /// In en, this message translates to: - /// **'Unsupported platform'** - String get unsupported_platform; - - /// No description provided for @cache_music. - /// - /// In en, this message translates to: - /// **'Cache music'** - String get cache_music; - - /// No description provided for @open. - /// - /// In en, this message translates to: - /// **'Open'** - String get open; - - /// No description provided for @cache_folder. - /// - /// In en, this message translates to: - /// **'Cache folder'** - String get cache_folder; - - /// No description provided for @export. - /// - /// In en, this message translates to: - /// **'Export'** - String get export; - - /// No description provided for @clear_cache. - /// - /// In en, this message translates to: - /// **'Clear cache'** - String get clear_cache; - - /// No description provided for @clear_cache_confirmation. - /// - /// In en, this message translates to: - /// **'Do you want to clear the cache?'** - String get clear_cache_confirmation; - - /// No description provided for @export_cache_files. - /// - /// In en, this message translates to: - /// **'Export Cached Files'** - String get export_cache_files; - - /// No description provided for @found_n_files. - /// - /// In en, this message translates to: - /// **'Found {count} files'** - String found_n_files(Object count); - - /// No description provided for @export_cache_confirmation. - /// - /// In en, this message translates to: - /// **'Do you want to export these files to'** - String get export_cache_confirmation; - - /// No description provided for @exported_n_out_of_m_files. - /// - /// In en, this message translates to: - /// **'Exported {filesExported} out of {files} files'** - String exported_n_out_of_m_files(Object files, Object filesExported); - - /// No description provided for @undo. - /// - /// In en, this message translates to: - /// **'Undo'** - String get undo; - - /// No description provided for @download_all. - /// - /// In en, this message translates to: - /// **'Download all'** - String get download_all; - - /// No description provided for @add_all_to_playlist. - /// - /// In en, this message translates to: - /// **'Add all to playlist'** - String get add_all_to_playlist; - - /// No description provided for @add_all_to_queue. - /// - /// In en, this message translates to: - /// **'Add all to queue'** - String get add_all_to_queue; - - /// No description provided for @play_all_next. - /// - /// In en, this message translates to: - /// **'Play all next'** - String get play_all_next; - - /// No description provided for @pause. - /// - /// In en, this message translates to: - /// **'Pause'** - String get pause; - - /// No description provided for @view_all. - /// - /// In en, this message translates to: - /// **'View all'** - String get view_all; - - /// No description provided for @no_tracks_added_yet. - /// - /// In en, this message translates to: - /// **'Looks like you haven\'t added any tracks yet'** - String get no_tracks_added_yet; - - /// No description provided for @no_tracks. - /// - /// In en, this message translates to: - /// **'Looks like there are no tracks here'** - String get no_tracks; - - /// No description provided for @no_tracks_listened_yet. - /// - /// In en, this message translates to: - /// **'Looks like you haven\'t listened to anything yet'** - String get no_tracks_listened_yet; - - /// No description provided for @not_following_artists. - /// - /// In en, this message translates to: - /// **'You\'re not following any artists'** - String get not_following_artists; - - /// No description provided for @no_favorite_albums_yet. - /// - /// In en, this message translates to: - /// **'Looks like you haven\'t added any albums to your favorites yet'** - String get no_favorite_albums_yet; - - /// No description provided for @no_logs_found. - /// - /// In en, this message translates to: - /// **'No logs found'** - String get no_logs_found; - - /// No description provided for @youtube_engine. - /// - /// In en, this message translates to: - /// **'YouTube Engine'** - String get youtube_engine; - - /// No description provided for @youtube_engine_not_installed_title. - /// - /// In en, this message translates to: - /// **'{engine} is not installed'** - String youtube_engine_not_installed_title(Object engine); - - /// No description provided for @youtube_engine_not_installed_message. - /// - /// In en, this message translates to: - /// **'{engine} is not installed in your system.'** - String youtube_engine_not_installed_message(Object engine); - - /// No description provided for @youtube_engine_set_path. - /// - /// In en, this message translates to: - /// **'Make sure it\'s available in the PATH variable or\nset the absolute path to the {engine} executable below'** - String youtube_engine_set_path(Object engine); - - /// No description provided for @youtube_engine_unix_issue_message. - /// - /// In en, this message translates to: - /// **'In macOS/Linux/unix like OS\'s, setting path on .zshrc/.bashrc/.bash_profile etc. won\'t work.\nYou need to set the path in the shell configuration file'** - String get youtube_engine_unix_issue_message; - - /// No description provided for @download. - /// - /// In en, this message translates to: - /// **'Download'** - String get download; - - /// No description provided for @file_not_found. - /// - /// In en, this message translates to: - /// **'File not found'** - String get file_not_found; - - /// No description provided for @custom. - /// - /// In en, this message translates to: - /// **'Custom'** - String get custom; - - /// No description provided for @add_custom_url. - /// - /// In en, this message translates to: - /// **'Add custom URL'** - String get add_custom_url; - - /// No description provided for @edit_port. - /// - /// In en, this message translates to: - /// **'Edit port'** - String get edit_port; - - /// No description provided for @port_helper_msg. - /// - /// In en, this message translates to: - /// **'Default is -1 which indicates random number. If you\'ve firewall configured, setting this is recommended.'** - String get port_helper_msg; - - /// No description provided for @connect_request. - /// - /// In en, this message translates to: - /// **'Allow {client} to connect?'** - String connect_request(Object client); - - /// No description provided for @connection_request_denied. - /// - /// In en, this message translates to: - /// **'Connection denied. User denied access.'** - String get connection_request_denied; - - /// No description provided for @an_error_occurred. - /// - /// In en, this message translates to: - /// **'An error occurred'** - String get an_error_occurred; - - /// No description provided for @copy_to_clipboard. - /// - /// In en, this message translates to: - /// **'Copy to clipboard'** - String get copy_to_clipboard; - - /// No description provided for @view_logs. - /// - /// In en, this message translates to: - /// **'View logs'** - String get view_logs; - - /// No description provided for @retry. - /// - /// In en, this message translates to: - /// **'Retry'** - String get retry; - - /// No description provided for @no_default_metadata_provider_selected. - /// - /// In en, this message translates to: - /// **'You\'ve no default metadata provider set'** - String get no_default_metadata_provider_selected; - - /// No description provided for @manage_metadata_providers. - /// - /// In en, this message translates to: - /// **'Manage metadata providers'** - String get manage_metadata_providers; - - /// No description provided for @open_link_in_browser. - /// - /// In en, this message translates to: - /// **'Open Link in Browser?'** - String get open_link_in_browser; - - /// No description provided for @do_you_want_to_open_the_following_link. - /// - /// In en, this message translates to: - /// **'Do you want to open the following link'** - String get do_you_want_to_open_the_following_link; - - /// No description provided for @unsafe_url_warning. - /// - /// In en, this message translates to: - /// **'It can be unsafe to open links from untrusted sources. Be cautious!\nYou can also copy the link to your clipboard.'** - String get unsafe_url_warning; - - /// No description provided for @copy_link. - /// - /// In en, this message translates to: - /// **'Copy Link'** - String get copy_link; - - /// No description provided for @building_your_timeline. - /// - /// In en, this message translates to: - /// **'Building your timeline based on your listenings...'** - String get building_your_timeline; - - /// No description provided for @official. - /// - /// In en, this message translates to: - /// **'Official'** - String get official; - - /// No description provided for @author_name. - /// - /// In en, this message translates to: - /// **'Author: {author}'** - String author_name(Object author); - - /// No description provided for @third_party. - /// - /// In en, this message translates to: - /// **'Third-party'** - String get third_party; - - /// No description provided for @plugin_requires_authentication. - /// - /// In en, this message translates to: - /// **'Plugin requires authentication'** - String get plugin_requires_authentication; - - /// No description provided for @update_available. - /// - /// In en, this message translates to: - /// **'Update available'** - String get update_available; - - /// No description provided for @supports_scrobbling. - /// - /// In en, this message translates to: - /// **'Supports scrobbling'** - String get supports_scrobbling; - - /// No description provided for @plugin_scrobbling_info. - /// - /// In en, this message translates to: - /// **'This plugin scrobbles your music to generate your listening history.'** - String get plugin_scrobbling_info; - - /// No description provided for @default_metadata_source. - /// - /// In en, this message translates to: - /// **'Default metadata source'** - String get default_metadata_source; - - /// No description provided for @set_default_metadata_source. - /// - /// In en, this message translates to: - /// **'Set default metadata source'** - String get set_default_metadata_source; - - /// No description provided for @default_audio_source. - /// - /// In en, this message translates to: - /// **'Default audio source'** - String get default_audio_source; - - /// No description provided for @set_default_audio_source. - /// - /// In en, this message translates to: - /// **'Set default audio source'** - String get set_default_audio_source; - - /// No description provided for @set_default. - /// - /// In en, this message translates to: - /// **'Set default'** - String get set_default; - - /// No description provided for @support. - /// - /// In en, this message translates to: - /// **'Support'** - String get support; - - /// No description provided for @support_plugin_development. - /// - /// In en, this message translates to: - /// **'Support plugin development'** - String get support_plugin_development; - - /// No description provided for @can_access_name_api. - /// - /// In en, this message translates to: - /// **'- Can access **{name}** API'** - String can_access_name_api(Object name); - - /// No description provided for @do_you_want_to_install_this_plugin. - /// - /// In en, this message translates to: - /// **'Do you want to install this plugin?'** - String get do_you_want_to_install_this_plugin; - - /// No description provided for @third_party_plugin_warning. - /// - /// In en, this message translates to: - /// **'This plugin is from a third-party repository. Please ensure you trust the source before installing.'** - String get third_party_plugin_warning; - - /// No description provided for @author. - /// - /// In en, this message translates to: - /// **'Author'** - String get author; - - /// No description provided for @this_plugin_can_do_following. - /// - /// In en, this message translates to: - /// **'This plugin can do following'** - String get this_plugin_can_do_following; - - /// No description provided for @install. - /// - /// In en, this message translates to: - /// **'Install'** - String get install; - - /// No description provided for @install_a_metadata_provider. - /// - /// In en, this message translates to: - /// **'Install a Metadata Provider'** - String get install_a_metadata_provider; - - /// No description provided for @no_tracks_playing. - /// - /// In en, this message translates to: - /// **'No Track being played currently'** - String get no_tracks_playing; - - /// No description provided for @synced_lyrics_not_available. - /// - /// In en, this message translates to: - /// **'Synced lyrics are not available for this song. Please use the'** - String get synced_lyrics_not_available; - - /// No description provided for @plain_lyrics. - /// - /// In en, this message translates to: - /// **'Plain Lyrics'** - String get plain_lyrics; - - /// No description provided for @tab_instead. - /// - /// In en, this message translates to: - /// **'tab instead.'** - String get tab_instead; - - /// No description provided for @disclaimer. - /// - /// In en, this message translates to: - /// **'Disclaimer'** - String get disclaimer; - - /// No description provided for @third_party_plugin_dmca_notice. - /// - /// In en, this message translates to: - /// **'The Spotube team does not hold any responsibility (including legal) for any \"Third-party\" plugins.\nPlease use them at your own risk. For any bugs/issues, please report them to the plugin repository.\n\nIf any \"Third-party\" plugin is breaking ToS/DMCA of any service/legal entity, please ask the \"Third-party\" plugin author or the hosting platform .e.g GitHub/Codeberg to take action. Above listed (\"Third-party\" labelled) are all public/community maintained plugins. We\'re not curating them, so we cannot take any action on them.\n\n'** - String get third_party_plugin_dmca_notice; - - /// No description provided for @input_does_not_match_format. - /// - /// In en, this message translates to: - /// **'Input doesn\'t match the required format'** - String get input_does_not_match_format; - - /// No description provided for @plugins. - /// - /// In en, this message translates to: - /// **'Plugins'** - String get plugins; - - /// No description provided for @paste_plugin_download_url. - /// - /// In en, this message translates to: - /// **'Paste download url or GitHub/Codeberg repo url or direct link to .smplug file'** - String get paste_plugin_download_url; - - /// No description provided for @download_and_install_plugin_from_url. - /// - /// In en, this message translates to: - /// **'Download and install plugin from url'** - String get download_and_install_plugin_from_url; - - /// No description provided for @failed_to_add_plugin_error. - /// - /// In en, this message translates to: - /// **'Failed to add plugin: {error}'** - String failed_to_add_plugin_error(Object error); - - /// No description provided for @upload_plugin_from_file. - /// - /// In en, this message translates to: - /// **'Upload plugin from file'** - String get upload_plugin_from_file; - - /// No description provided for @installed. - /// - /// In en, this message translates to: - /// **'Installed'** - String get installed; - - /// No description provided for @available_plugins. - /// - /// In en, this message translates to: - /// **'Available plugins'** - String get available_plugins; - - /// No description provided for @configure_plugins. - /// - /// In en, this message translates to: - /// **'Configure your own metadata provider and audio source plugins'** - String get configure_plugins; - - /// No description provided for @audio_scrobblers. - /// - /// In en, this message translates to: - /// **'Audio Scrobblers'** - String get audio_scrobblers; - - /// No description provided for @scrobbling. - /// - /// In en, this message translates to: - /// **'Scrobbling'** - String get scrobbling; - - /// No description provided for @source. - /// - /// In en, this message translates to: - /// **'Source: '** - String get source; - - /// No description provided for @uncompressed. - /// - /// In en, this message translates to: - /// **'Uncompressed'** - String get uncompressed; - - /// No description provided for @dab_music_source_description. - /// - /// In en, this message translates to: - /// **'For audiophiles. Provides high-quality/lossless audio streams. Accurate ISRC based track matching.'** - String get dab_music_source_description; -} - -class _AppLocalizationsDelegate - extends LocalizationsDelegate { - const _AppLocalizationsDelegate(); - - @override - Future load(Locale locale) { - return SynchronousFuture(lookupAppLocalizations(locale)); - } - - @override - bool isSupported(Locale locale) => [ - 'ar', - 'bn', - 'ca', - 'cs', - 'de', - 'en', - 'es', - 'eu', - 'fa', - 'fi', - 'fr', - 'hi', - 'id', - 'it', - 'ja', - 'ka', - 'ko', - 'ne', - 'nl', - 'pl', - 'pt', - 'ru', - 'ta', - 'th', - 'tl', - 'tr', - 'uk', - 'vi', - 'zh' - ].contains(locale.languageCode); - - @override - bool shouldReload(_AppLocalizationsDelegate old) => false; -} - -AppLocalizations lookupAppLocalizations(Locale locale) { - // Lookup logic when language+country codes are specified. - switch (locale.languageCode) { - case 'zh': - { - switch (locale.countryCode) { - case 'TW': - return AppLocalizationsZhTw(); - } - break; - } - } - - // Lookup logic when only language code is specified. - switch (locale.languageCode) { - case 'ar': - return AppLocalizationsAr(); - case 'bn': - return AppLocalizationsBn(); - case 'ca': - return AppLocalizationsCa(); - case 'cs': - return AppLocalizationsCs(); - case 'de': - return AppLocalizationsDe(); - case 'en': - return AppLocalizationsEn(); - case 'es': - return AppLocalizationsEs(); - case 'eu': - return AppLocalizationsEu(); - case 'fa': - return AppLocalizationsFa(); - case 'fi': - return AppLocalizationsFi(); - case 'fr': - return AppLocalizationsFr(); - case 'hi': - return AppLocalizationsHi(); - case 'id': - return AppLocalizationsId(); - case 'it': - return AppLocalizationsIt(); - case 'ja': - return AppLocalizationsJa(); - case 'ka': - return AppLocalizationsKa(); - case 'ko': - return AppLocalizationsKo(); - case 'ne': - return AppLocalizationsNe(); - case 'nl': - return AppLocalizationsNl(); - case 'pl': - return AppLocalizationsPl(); - case 'pt': - return AppLocalizationsPt(); - case 'ru': - return AppLocalizationsRu(); - case 'ta': - return AppLocalizationsTa(); - case 'th': - return AppLocalizationsTh(); - case 'tl': - return AppLocalizationsTl(); - case 'tr': - return AppLocalizationsTr(); - case 'uk': - return AppLocalizationsUk(); - case 'vi': - return AppLocalizationsVi(); - case 'zh': - return AppLocalizationsZh(); - } - - throw FlutterError( - 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' - 'an issue with the localizations generation tool. Please file an issue ' - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' - 'that was used.'); -} diff --git a/lib/l10n/generated/app_localizations_ar.dart b/lib/l10n/generated/app_localizations_ar.dart deleted file mode 100644 index 8fd50ffa..00000000 --- a/lib/l10n/generated/app_localizations_ar.dart +++ /dev/null @@ -1,1566 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Arabic (`ar`). -class AppLocalizationsAr extends AppLocalizations { - AppLocalizationsAr([String locale = 'ar']) : super(locale); - - @override - String get guest => 'ضيف'; - - @override - String get browse => 'تصفح'; - - @override - String get search => 'بحث'; - - @override - String get library => 'مكتبة'; - - @override - String get lyrics => 'كلمات'; - - @override - String get settings => 'إعدادات'; - - @override - String get genre_categories_filter => 'تصفية الفئات أو الأنواع...'; - - @override - String get genre => 'النوع'; - - @override - String get personalized => 'شخصية'; - - @override - String get featured => 'متميز'; - - @override - String get new_releases => 'الإصدارات الجديدة'; - - @override - String get songs => 'أغاني'; - - @override - String playing_track(Object track) { - return 'تشغيل $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'سيؤدي هذا إلى مسح قائمة الانتظار الحالية. $track_length ستتم إزالة المقطوعات\nهل تريد الإستمرار؟'; - } - - @override - String get load_more => 'تحميل المزيد'; - - @override - String get playlists => 'قوائم التشغيل'; - - @override - String get artists => 'فنانون'; - - @override - String get albums => 'ألبومات'; - - @override - String get tracks => 'مقطوعات'; - - @override - String get downloads => 'تنزيلات'; - - @override - String get filter_playlists => 'تصفية قوائم التشغيل الخاصة بك...'; - - @override - String get liked_tracks => 'المقطوعات التي أعجبتك'; - - @override - String get liked_tracks_description => 'جميع المقطوعات التي أعجبتك'; - - @override - String get playlist => 'قائمة التشغيل'; - - @override - String get create_a_playlist => 'إنشاء قائمة تشغيل'; - - @override - String get update_playlist => 'تحديث قائمة التشغيل'; - - @override - String get create => 'إنشاء'; - - @override - String get cancel => 'إلغاء'; - - @override - String get update => 'تحديث'; - - @override - String get playlist_name => 'اسم قائمة التشغيل'; - - @override - String get name_of_playlist => 'اسم قائمة التشغيل'; - - @override - String get description => 'وصف'; - - @override - String get public => 'عام'; - - @override - String get collaborative => 'تعاوني'; - - @override - String get search_local_tracks => 'بحث عن مقطوعات محلية'; - - @override - String get play => 'تشغيل'; - - @override - String get delete => 'حذف'; - - @override - String get none => 'لا شيء'; - - @override - String get sort_a_z => 'الترتيب من A-Z'; - - @override - String get sort_z_a => 'الترتيب من Z-A'; - - @override - String get sort_artist => 'الترتيب حسب الفنان'; - - @override - String get sort_album => 'فرز حسب الألبوم'; - - @override - String get sort_duration => 'ترتيب حسب المدة'; - - @override - String get sort_tracks => 'ترتيب المقطوعات'; - - @override - String currently_downloading(Object tracks_length) { - return 'يتم التنزيل ($tracks_length)'; - } - - @override - String get cancel_all => 'إلغاء الكل'; - - @override - String get filter_artist => 'تصفية الفنانين...'; - - @override - String followers(Object followers) { - return '$followers متابعون'; - } - - @override - String get add_artist_to_blacklist => 'إضافة فنان إلى القائمة السوداء'; - - @override - String get top_tracks => 'أهم المقطوعات الصوتية'; - - @override - String get fans_also_like => 'المعجبون يحبون أيضاً'; - - @override - String get loading => 'جارٍ التحميل'; - - @override - String get artist => 'فنان'; - - @override - String get blacklisted => 'في القائمة السوداء'; - - @override - String get following => 'يتابع'; - - @override - String get follow => 'تابع'; - - @override - String get artist_url_copied => 'تم نسخ عنوان URL للفنان إلى الحافظة'; - - @override - String added_to_queue(Object tracks) { - return 'تم إضافة المقطوعات إلى قائمة الإنتظار $tracks'; - } - - @override - String get filter_albums => 'تصفية الألبومات...'; - - @override - String get synced => 'تم المزامنة'; - - @override - String get plain => 'سهل'; - - @override - String get shuffle => 'خلط'; - - @override - String get search_tracks => 'يحث عن مقطوعات'; - - @override - String get released => 'تم الإصدار'; - - @override - String error(Object error) { - return 'خطأ $error'; - } - - @override - String get title => 'عنوان'; - - @override - String get time => 'وقت'; - - @override - String get more_actions => 'المزيد من الإجراءات'; - - @override - String download_count(Object count) { - return 'تنزيل ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'إضافة ($count) إلى قائمة التشغيل'; - } - - @override - String add_count_to_queue(Object count) { - return 'إضافة ($count) إلى قائمة الإنتظار'; - } - - @override - String play_count_next(Object count) { - return 'تشغيل ($count) التالي'; - } - - @override - String get album => 'ألبوم'; - - @override - String copied_to_clipboard(Object data) { - return 'تم النسخ $data إلى الحافظة'; - } - - @override - String add_to_following_playlists(Object track) { - return 'إضافة $track إلى قوائم التشغيل التالية'; - } - - @override - String get add => 'إضافة'; - - @override - String added_track_to_queue(Object track) { - return 'تم الإضافة $track إلى قائمة الإنتظار'; - } - - @override - String get add_to_queue => 'إضافة إلى قائمة التشغيل'; - - @override - String track_will_play_next(Object track) { - return '$track سيتم تشغيل التالي'; - } - - @override - String get play_next => 'تشغيل التالي'; - - @override - String removed_track_from_queue(Object track) { - return 'تم الإزالة $track من قائمة الإنتظار'; - } - - @override - String get remove_from_queue => 'إزالة من قائمة الإنتظار'; - - @override - String get remove_from_favorites => 'إزالة من المفضلة'; - - @override - String get save_as_favorite => 'حفظ كمفضل'; - - @override - String get add_to_playlist => 'إضافة إلى قائمة التشغيل'; - - @override - String get remove_from_playlist => 'إزالة من قائمة التشغيل'; - - @override - String get add_to_blacklist => 'إضافة إلى القائمة السوداء'; - - @override - String get remove_from_blacklist => 'إزالة من القائمة السوداء'; - - @override - String get share => 'مشاكرة'; - - @override - String get mini_player => 'مشغل مصغر'; - - @override - String get slide_to_seek => 'قم بالتمرير للبحث للأمام أو للخلف'; - - @override - String get shuffle_playlist => 'قائمة تشغيل عشوائية'; - - @override - String get unshuffle_playlist => 'إلغاء ترتيب قائمة التشغيل'; - - @override - String get previous_track => 'المقطوعة السابقة'; - - @override - String get next_track => 'مقطوعة جديدة'; - - @override - String get pause_playback => 'إيقاف التشغيل مؤقتًا'; - - @override - String get resume_playback => 'استئناف التشغيل'; - - @override - String get loop_track => 'تشغيل المقطوعة بشكل لا نهائي'; - - @override - String get no_loop => 'بدون تكرار'; - - @override - String get repeat_playlist => 'تكرار قائمة التشغيل'; - - @override - String get queue => 'قائمة الإنتظار'; - - @override - String get alternative_track_sources => 'مصادر مقطوعات بديلة'; - - @override - String get download_track => 'تنزيل المقطوعة'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks المقطوعات في قائمة الإنتظار'; - } - - @override - String get clear_all => 'مسح الكل'; - - @override - String get show_hide_ui_on_hover => 'إظهار/إخفاء واجهة المستخدم عند التمرير'; - - @override - String get always_on_top => 'دائما في القمة'; - - @override - String get exit_mini_player => 'خروج من المشغل المصغر'; - - @override - String get download_location => 'تنزيل الموقع'; - - @override - String get local_library => 'المكتبة المحلية'; - - @override - String get add_library_location => 'أضف إلى المكتبة'; - - @override - String get remove_library_location => 'إزالة من المكتبة'; - - @override - String get account => 'حساب'; - - @override - String get logout => 'تسجيل الخروج'; - - @override - String get logout_of_this_account => 'تسجيل الخروج من هذا الحساب'; - - @override - String get language_region => 'اللغة والمنطقة'; - - @override - String get language => 'لغة'; - - @override - String get system_default => 'لغة النظام الإفتراضية'; - - @override - String get market_place_region => 'منطقة السوق'; - - @override - String get recommendation_country => 'بلد التوصية'; - - @override - String get appearance => 'مظهر'; - - @override - String get layout_mode => 'وضع التخطيط'; - - @override - String get override_layout_settings => - 'تجاوز إعدادات وضع التخطيط سريع الاستجابة'; - - @override - String get adaptive => 'متكيف'; - - @override - String get compact => 'مدمج'; - - @override - String get extended => 'ممتد'; - - @override - String get theme => 'مظهر'; - - @override - String get dark => 'داكن'; - - @override - String get light => 'ساطعt'; - - @override - String get system => 'حسب النظام'; - - @override - String get accent_color => 'لون تمييز'; - - @override - String get sync_album_color => 'مزامنة لون الألبوم'; - - @override - String get sync_album_color_description => - 'يستخدم اللون السائد لصورة الألبوم باعتباره لون التمييز'; - - @override - String get playback => 'التشغيل'; - - @override - String get audio_quality => 'جودة الصوت'; - - @override - String get high => 'مرتفعة'; - - @override - String get low => 'منخفضة'; - - @override - String get pre_download_play => 'التحميل المسبق والتشغيل'; - - @override - String get pre_download_play_description => - 'بدلاً من دفق الصوت، قم بتنزيل وحدات البايت وتشغيلها بدلاً من ذلك (موصى به لمستخدمي Bandwidth)'; - - @override - String get skip_non_music => 'تخطي المقاطع غير الموسيقية (SponsorBlock)'; - - @override - String get blacklist_description => - 'المقطوعات والفنانون المدرجون في القائمة السوداء'; - - @override - String get wait_for_download_to_finish => - 'يرجى الانتظار حتى انتهاء التنزيل الحالي'; - - @override - String get desktop => 'سطح المكتب'; - - @override - String get close_behavior => 'إغلاق التصرف'; - - @override - String get close => 'إغلاق'; - - @override - String get minimize_to_tray => 'تصغير إلى الدرج'; - - @override - String get show_tray_icon => 'إظهار أيقونات درج النظام'; - - @override - String get about => 'حول'; - - @override - String get u_love_spotube => 'نحن نعلم أنك تحب Spotube'; - - @override - String get check_for_updates => 'تحقق من وجود تحديثات'; - - @override - String get about_spotube => 'حول Spotube'; - - @override - String get blacklist => 'قائمة سوداء'; - - @override - String get please_sponsor => 'يرجى دعم/التبرع'; - - @override - String get spotube_description => - 'Spotube، عميل Spotify خفيف الوزن ومتعدد المنصات ومجاني للجميع'; - - @override - String get version => 'إصدار'; - - @override - String get build_number => 'رقم البنية'; - - @override - String get founder => 'الموئسس'; - - @override - String get repository => 'المستودع'; - - @override - String get bug_issues => 'أخطاء+مشاكل'; - - @override - String get made_with => 'صُنع باستخدام ❤️ في بنغلاديش🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'الترخيص'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'لا تقلق، لن يتم جمع أي من بيانات الخاصة بك أو مشاركتها مع أي شخص'; - - @override - String get know_how_to_login => 'لا تعرف كيف تفعل هذا؟'; - - @override - String get follow_step_by_step_guide => 'اتبع الدليل خطوة بخطوة'; - - @override - String cookie_name_cookie(Object name) { - return '$name كوكيز'; - } - - @override - String get fill_in_all_fields => 'يرجى تعبئة جميع الحقول'; - - @override - String get submit => 'إرسال'; - - @override - String get exit => 'خروج'; - - @override - String get previous => 'السابق'; - - @override - String get next => 'التالي'; - - @override - String get done => 'تم'; - - @override - String get step_1 => 'الخطوة 1'; - - @override - String get first_go_to => 'أولا، اذهب إلى'; - - @override - String get something_went_wrong => 'هناك خطأ ما'; - - @override - String get piped_instance => 'مثيل خادم Piped'; - - @override - String get piped_description => - 'مثيل خادم Piped الذي سيتم استخدامه لمطابقة المقطوعة'; - - @override - String get piped_warning => - 'البعض منهم قد لا يعمل بشكل جيد. لذلك استخدمه على مسؤوليتك'; - - @override - String get invidious_instance => 'مثيل خادم Invidious'; - - @override - String get invidious_description => - 'مثيل خادم Invidious المستخدم لمطابقة المسارات'; - - @override - String get invidious_warning => - 'قد لا تعمل بعض الخوادم بشكل جيد. استخدمها على مسؤوليتك الخاصة'; - - @override - String get generate => 'إنشاء'; - - @override - String track_exists(Object track) { - return 'المقطوعة $track بالفعل موجودة'; - } - - @override - String get replace_downloaded_tracks => - 'استبدل جميع المقطوعات التي تم تنزيلها'; - - @override - String get skip_download_tracks => - 'تخطي تنزيل كافة المقطوعات التي تم تنزيلها'; - - @override - String get do_you_want_to_replace => 'هل تريد استبدال المقطوعة الحالية؟'; - - @override - String get replace => 'إستبدال'; - - @override - String get skip => 'تخطي'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'إختر ما يصل إلى $count $type'; - } - - @override - String get select_genres => 'حدد الأنواع'; - - @override - String get add_genres => 'أضف الأنواع'; - - @override - String get country => 'دولة'; - - @override - String get number_of_tracks_generate => - 'عدد المسارات المقطوعات المراد توليدها'; - - @override - String get acousticness => 'صوتية'; - - @override - String get danceability => 'قدرة على الرقص'; - - @override - String get energy => 'طاقة'; - - @override - String get instrumentalness => 'نفعية'; - - @override - String get liveness => 'حيوية'; - - @override - String get loudness => 'بريق'; - - @override - String get speechiness => 'كلام'; - - @override - String get valence => 'تكافؤ'; - - @override - String get popularity => 'شعبية'; - - @override - String get key => 'مفتاح'; - - @override - String get duration => 'مدة (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'توقيع الوقت'; - - @override - String get short => 'قصير'; - - @override - String get medium => 'متوسط'; - - @override - String get long => 'طويل'; - - @override - String get min => 'أدنى'; - - @override - String get max => 'أقصى'; - - @override - String get target => 'هدف'; - - @override - String get moderate => 'معتدل'; - - @override - String get deselect_all => 'الغاء تحديد الكل'; - - @override - String get select_all => 'اختر الكل'; - - @override - String get are_you_sure => 'هل أنت متأكد؟'; - - @override - String get generating_playlist => 'جارٍ إنشاء قائمة التشغيل المخصصة...'; - - @override - String selected_count_tracks(Object count) { - return 'مقطوعات $count مختارة'; - } - - @override - String get download_warning => - 'إذا قمت بتنزيل جميع المقاطع الصوتية بكميات كبيرة، فمن الواضح أنك تقوم بقرصنة الموسيقى وتسبب الضرر للمجتمع الإبداعي للموسيقى. أتمنى أن تكون على علم بهذا. حاول دائمًا احترام ودعم العمل الجاد للفنان'; - - @override - String get download_ip_ban_warning => - 'بالمناسبة، يمكن أن يتم حظر عنوان IP الخاص بك على YouTube بسبب طلبات التنزيل الزائدة عن المعتاد. يعني حظر IP أنه لا يمكنك استخدام YouTube (حتى إذا قمت بتسجيل الدخول) لمدة تتراوح بين شهرين إلى ثلاثة أشهر على الأقل من جهاز IP هذا. ولا يتحمل Spotube أي مسؤولية إذا حدث هذا على الإطلاق'; - - @override - String get by_clicking_accept_terms => - 'بالنقر على \"قبول\"، فإنك توافق على الشروط التالية:'; - - @override - String get download_agreement_1 => 'أعلم أنني أقوم بقرصنة الموسيقى. انا سيئ'; - - @override - String get download_agreement_2 => - 'سأدعم الفنان أينما أستطيع، وأنا أفعل هذا فقط لأنني لا أملك المال لشراء أعمالهم الفنية'; - - @override - String get download_agreement_3 => - 'أدرك تمامًا أنه يمكن حظر عنوان IP الخاص بي على YouTube ولا أحمل Spotube أو مالكيه/مساهميه المسؤولية عن أي حوادث ناجمة عن الإجراء الحالي الخاص بي'; - - @override - String get decline => 'رفض'; - - @override - String get accept => 'قبول'; - - @override - String get details => 'تفاصيل'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'قناة'; - - @override - String get likes => 'إعجابات'; - - @override - String get dislikes => 'عدم الإعجابات'; - - @override - String get views => 'مشاهدات'; - - @override - String get streamUrl => 'عنوان URL البث'; - - @override - String get stop => 'إيقاف'; - - @override - String get sort_newest => 'الترتيب حسب الأقدم'; - - @override - String get sort_oldest => 'الترتيب حسب الأقدم'; - - @override - String get sleep_timer => 'مؤقت النوم'; - - @override - String mins(Object minutes) { - return '$minutes دقائق'; - } - - @override - String hours(Object hours) { - return '$hours ساعات'; - } - - @override - String hour(Object hours) { - return '$hours ساعة'; - } - - @override - String get custom_hours => 'ساعات مخصصة'; - - @override - String get logs => 'سجلات'; - - @override - String get developers => 'المطورون'; - - @override - String get not_logged_in => 'لم تقم بتسجيل الدخول'; - - @override - String get search_mode => 'وضع البحث'; - - @override - String get audio_source => 'مصدر الصوت'; - - @override - String get ok => 'حسسناً'; - - @override - String get failed_to_encrypt => 'فشل في التشفير'; - - @override - String get encryption_failed_warning => - 'يستخدم Spotube التشفير لتخزين بياناتك بشكل آمن. لكنها فشلت في القيام بذلك. لذلك سيعود الأمر إلى التخزين غير الآمن\nإذا كنت تستخدم Linux، فيرجى التأكد من تثبيت أي خدمة سرية (gnome-keyring، kde-wallet، keepassxc، إلخ)'; - - @override - String get querying_info => 'جارٍ الاستعلام عن معلومات...'; - - @override - String get piped_api_down => 'Piped API معطلة'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'المثيل الموجه $pipedInstance معطل حاليًا\n\nيمكنك إما تغيير المثيل أو تغيير \'نوع API\' إلى YouTube API الرسمي\n\nتأكد من إعادة تشغيل التطبيق بعد التغيير'; - } - - @override - String get you_are_offline => 'أنت غير متصل حالياً'; - - @override - String get connection_restored => 'تمت استعادة اتصالك بالإنترنت'; - - @override - String get use_system_title_bar => 'استخدم شريط عنوان النظام'; - - @override - String get crunching_results => 'تدمير النتائج'; - - @override - String get search_to_get_results => 'إبحث للحصول على النتائج'; - - @override - String get use_amoled_mode => 'استخدم وضع AMOLED'; - - @override - String get pitch_dark_theme => 'موضوع دارت الأسود الفحمي'; - - @override - String get normalize_audio => 'تطبيع الصوت'; - - @override - String get change_cover => 'تغيير الغلاف'; - - @override - String get add_cover => 'إضافة غلاف'; - - @override - String get restore_defaults => 'استعادة الإعدادات الافتراضية'; - - @override - String get download_music_format => 'تنسيق تنزيل الموسيقى'; - - @override - String get streaming_music_format => 'تنسيق بث الموسيقى'; - - @override - String get download_music_quality => 'جودة تنزيل الموسيقى'; - - @override - String get streaming_music_quality => 'جودة بث الموسيقى'; - - @override - String get login_with_lastfm => 'تسجيل الدخول باستخدام Last.fm'; - - @override - String get connect => 'اتصال'; - - @override - String get disconnect_lastfm => 'قطع الاتصال بـ Last.fm'; - - @override - String get disconnect => 'قطع الاتصال'; - - @override - String get username => 'اسم المستخدم'; - - @override - String get password => 'كلمة المرور'; - - @override - String get login => 'تسجيل الدخول'; - - @override - String get login_with_your_lastfm => - 'تسجيل الدخول باستخدام حساب Last.fm الخاص بك'; - - @override - String get scrobble_to_lastfm => 'تسجيل الاستماع على Last.fm'; - - @override - String get go_to_album => 'الانتقال إلى الألبوم'; - - @override - String get discord_rich_presence => 'وجود ديسكورد الغني'; - - @override - String get browse_all => 'تصفح الكل'; - - @override - String get genres => 'الأنواع الموسيقية'; - - @override - String get explore_genres => 'استكشاف الأنواع'; - - @override - String get friends => 'أصدقاء'; - - @override - String get no_lyrics_available => - 'عذرًا، تعذر العثور على كلمات الأغنية لهذه العنصر'; - - @override - String get start_a_radio => 'بدء راديو'; - - @override - String get how_to_start_radio => 'كيف تريد بدء الراديو؟'; - - @override - String get replace_queue_question => - 'هل تريد استبدال قائمة التشغيل الحالية أم إضافة إليها؟'; - - @override - String get endless_playback => 'تشغيل بلا نهاية'; - - @override - String get delete_playlist => 'حذف قائمة التشغيل'; - - @override - String get delete_playlist_confirmation => - 'هل أنت متأكد أنك تريد حذف هذه قائمة التشغيل؟'; - - @override - String get local_tracks => 'المسارات المحلية'; - - @override - String get local_tab => 'محلي'; - - @override - String get song_link => 'رابط الأغنية'; - - @override - String get skip_this_nonsense => 'تخطي هذه الهراء'; - - @override - String get freedom_of_music => '“حرية الموسيقى”'; - - @override - String get freedom_of_music_palm => '“حرية الموسيقى في متناول يدك”'; - - @override - String get get_started => 'لنبدأ'; - - @override - String get youtube_source_description => 'موصى به ويعمل بشكل أفضل.'; - - @override - String get piped_source_description => - 'تشعر بالحرية؟ نفس يوتيوب ولكن أكثر حرية.'; - - @override - String get jiosaavn_source_description => 'الأفضل لمنطقة جنوب آسيا.'; - - @override - String get invidious_source_description => 'مشابه لـ Piped ولكن بتوافر أعلى'; - - @override - String highest_quality(Object quality) { - return 'أعلى جودة: $quality'; - } - - @override - String get select_audio_source => 'اختر مصدر الصوت'; - - @override - String get endless_playback_description => - 'إلحاق الأغاني الجديدة تلقائيًا\nإلى نهاية قائمة التشغيل'; - - @override - String get choose_your_region => 'اختر منطقتك'; - - @override - String get choose_your_region_description => - 'سيساعدك هذا في عرض المحتوى المناسب\nلموقعك.'; - - @override - String get choose_your_language => 'اختر لغتك'; - - @override - String get help_project_grow => 'ساعد في نمو هذا المشروع'; - - @override - String get help_project_grow_description => - 'Spotube هو مشروع مفتوح المصدر. يمكنك مساعدة هذا المشروع في النمو عن طريق المساهمة في المشروع، أو الإبلاغ عن الأخطاء، أو اقتراح ميزات جديدة.'; - - @override - String get contribute_on_github => 'المساهمة على GitHub'; - - @override - String get donate_on_open_collective => 'التبرع على Open Collective'; - - @override - String get browse_anonymously => 'تصفح بشكل مجهول'; - - @override - String get enable_connect => 'تمكين الاتصال'; - - @override - String get enable_connect_description => - 'التحكم في Spotube من الأجهزة الأخرى'; - - @override - String get devices => 'الأجهزة'; - - @override - String get select => 'اختر'; - - @override - String connect_client_alert(Object client) { - return 'أنت تتم التحكم بواسطة $client'; - } - - @override - String get this_device => 'هذا الجهاز'; - - @override - String get remote => 'بعيد'; - - @override - String get stats => 'إحصائيات'; - - @override - String and_n_more(Object count) { - return 'و $count أكثر'; - } - - @override - String get recently_played => 'تم تشغيله مؤخرًا'; - - @override - String get browse_more => 'تصفح المزيد'; - - @override - String get no_title => 'بدون عنوان'; - - @override - String get not_playing => 'غير مشغل'; - - @override - String get epic_failure => 'فشل كبير!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'تمت إضافة $tracks_length مسارات إلى قائمة الانتظار'; - } - - @override - String get spotube_has_an_update => 'يوجد تحديث لسبوتيوب'; - - @override - String get download_now => 'تحميل الآن'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'تم إصدار سبوتيوب الليلي $nightlyBuildNum'; - } - - @override - String release_version(Object version) { - return 'تم إصدار سبوتيوب v$version'; - } - - @override - String get read_the_latest => 'اقرأ الأحدث'; - - @override - String get release_notes => 'ملاحظات الإصدار'; - - @override - String get pick_color_scheme => 'اختر نظام الألوان'; - - @override - String get save => 'حفظ'; - - @override - String get choose_the_device => 'اختر الجهاز:'; - - @override - String get multiple_device_connected => - 'تم توصيل أجهزة متعددة.\nاختر الجهاز الذي تريد إجراء هذه العملية عليه'; - - @override - String get nothing_found => 'لم يتم العثور على شيء'; - - @override - String get the_box_is_empty => 'الصندوق فارغ'; - - @override - String get top_artists => 'أفضل الفنانين'; - - @override - String get top_albums => 'أفضل الألبومات'; - - @override - String get this_week => 'هذا الأسبوع'; - - @override - String get this_month => 'هذا الشهر'; - - @override - String get last_6_months => 'آخر 6 أشهر'; - - @override - String get this_year => 'هذا العام'; - - @override - String get last_2_years => 'آخر سنتين'; - - @override - String get all_time => 'كل الوقت'; - - @override - String powered_by_provider(Object providerName) { - return 'مدعوم من $providerName'; - } - - @override - String get email => 'البريد الإلكتروني'; - - @override - String get profile_followers => 'المتابعين'; - - @override - String get birthday => 'عيد الميلاد'; - - @override - String get subscription => 'اشتراك'; - - @override - String get not_born => 'لم يولد'; - - @override - String get hacker => 'هاكر'; - - @override - String get profile => 'الملف الشخصي'; - - @override - String get no_name => 'بدون اسم'; - - @override - String get edit => 'تعديل'; - - @override - String get user_profile => 'ملف المستخدم'; - - @override - String count_plays(Object count) { - return '$count تشغيلات'; - } - - @override - String get streaming_fees_hypothetical => 'رسوم البث (افتراضية)'; - - @override - String get minutes_listened => 'الدقائق المستمعة'; - - @override - String get streamed_songs => 'الأغاني المذاعة'; - - @override - String count_streams(Object count) { - return '$count بث'; - } - - @override - String get owned_by_you => 'مملوك لك'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'تم نسخ $shareUrl إلى الحافظة'; - } - - @override - String get hipotetical_calculation => - '*تمّ الحساب بمعدّل دفعة تتراوح بين 0.003–0.005 دولار أمريكي لكل تشغيل على منصات الموسيقى عبر الإنترنت. هذا حساب افتراضي لتوضيح للمستخدم مقدار ما كان سيدفعه للفنانين لو استمع إلى أغنيتهم على منصات مختلفة.'; - - @override - String count_mins(Object minutes) { - return '$minutes دقيقة'; - } - - @override - String get summary_minutes => 'الدقائق'; - - @override - String get summary_listened_to_music => 'استمعت إلى الموسيقى'; - - @override - String get summary_songs => 'أغاني'; - - @override - String get summary_streamed_overall => 'بث بشكل عام'; - - @override - String get summary_owed_to_artists => 'مدين للفنانين\nهذا الشهر'; - - @override - String get summary_artists => 'الفنانين'; - - @override - String get summary_music_reached_you => 'وصلت إليك الموسيقى'; - - @override - String get summary_full_albums => 'ألبومات كاملة'; - - @override - String get summary_got_your_love => 'حصلت على حبك'; - - @override - String get summary_playlists => 'قوائم التشغيل'; - - @override - String get summary_were_on_repeat => 'كانت على التكرار'; - - @override - String total_money(Object money) { - return 'المجموع $money'; - } - - @override - String get webview_not_found => 'لم يتم العثور على Webview'; - - @override - String get webview_not_found_description => - 'لم يتم تثبيت بيئة تشغيل Webview على جهازك.\nإذا كانت مثبتة، تأكد من وجودها في environment PATH\n\nبعد التثبيت، أعد تشغيل التطبيق'; - - @override - String get unsupported_platform => 'المنصة غير مدعومة'; - - @override - String get cache_music => 'تخزين الموسيقى مؤقتًا'; - - @override - String get open => 'فتح'; - - @override - String get cache_folder => 'مجلد التخزين المؤقت'; - - @override - String get export => 'تصدير'; - - @override - String get clear_cache => 'مسح التخزين المؤقت'; - - @override - String get clear_cache_confirmation => 'هل تريد مسح التخزين المؤقت؟'; - - @override - String get export_cache_files => 'تصدير الملفات المخزنة مؤقتًا'; - - @override - String found_n_files(Object count) { - return 'تم العثور على $count ملف'; - } - - @override - String get export_cache_confirmation => 'هل تريد تصدير هذه الملفات إلى'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'تم تصدير $filesExported من أصل $files ملفات'; - } - - @override - String get undo => 'تراجع'; - - @override - String get download_all => 'تنزيل الكل'; - - @override - String get add_all_to_playlist => 'إضافة الكل إلى قائمة التشغيل'; - - @override - String get add_all_to_queue => 'إضافة الكل إلى القائمة'; - - @override - String get play_all_next => 'تشغيل الكل بعد ذلك'; - - @override - String get pause => 'إيقاف مؤقت'; - - @override - String get view_all => 'عرض الكل'; - - @override - String get no_tracks_added_yet => 'يبدو أنك لم تضف أي مسارات بعد'; - - @override - String get no_tracks => 'يبدو أنه لا يوجد أي مسارات هنا'; - - @override - String get no_tracks_listened_yet => 'يبدو أنك لم تستمع إلى أي شيء بعد'; - - @override - String get not_following_artists => 'أنت لا تتابع أي فنانين'; - - @override - String get no_favorite_albums_yet => - 'يبدو أنك لم تضف أي ألبومات إلى المفضلة بعد'; - - @override - String get no_logs_found => 'لم يتم العثور على سجلات'; - - @override - String get youtube_engine => 'محرك يوتيوب'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine غير مثبت'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine غير مثبت في نظامك.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'تأكد من أنه متاح في متغير PATH أو\nحدد المسار الكامل للملف القابل للتنفيذ $engine أدناه'; - } - - @override - String get youtube_engine_unix_issue_message => - 'في أنظمة macOS/Linux/Unix مثل الأنظمة، لن يعمل تعيين المسار في .zshrc/.bashrc/.bash_profile وما إلى ذلك.\nيجب تعيين المسار في ملف تكوين الصدفة'; - - @override - String get download => 'تنزيل'; - - @override - String get file_not_found => 'الملف غير موجود'; - - @override - String get custom => 'مخصص'; - - @override - String get add_custom_url => 'إضافة URL مخصص'; - - @override - String get edit_port => 'تعديل المنفذ'; - - @override - String get port_helper_msg => - 'القيمة الافتراضية هي -1 والتي تشير إلى رقم عشوائي. إذا كان لديك جدار ناري مُعد، يُوصى بتعيين هذا.'; - - @override - String connect_request(Object client) { - return 'السماح لـ $client بالاتصال؟'; - } - - @override - String get connection_request_denied => - 'تم رفض الاتصال. المستخدم رفض الوصول.'; - - @override - String get an_error_occurred => 'حدث خطأ'; - - @override - String get copy_to_clipboard => 'نسخ إلى الحافظة'; - - @override - String get view_logs => 'عرض السجلات'; - - @override - String get retry => 'إعادة المحاولة'; - - @override - String get no_default_metadata_provider_selected => - 'لم تقُم بتعيين مزود بيانات افتراضي'; - - @override - String get manage_metadata_providers => 'إدارة مزوّدي البيانات'; - - @override - String get open_link_in_browser => 'فتح الرابط في المتصفح؟'; - - @override - String get do_you_want_to_open_the_following_link => - 'هل ترغب في فتح الرابط التالي؟'; - - @override - String get unsafe_url_warning => - 'قد يكون فتح الروابط من مصادر غير موثوقة غير آمن. تحرّ الحذر!\nيمكنك أيضًا نسخ الرابط إلى الحافظة.'; - - @override - String get copy_link => 'نسخ الرابط'; - - @override - String get building_your_timeline => - 'جاري بناء المخطط الزمني استنادًا إلى استماعاتك...'; - - @override - String get official => 'رسمي'; - - @override - String author_name(Object author) { - return 'المؤلّف: $author'; - } - - @override - String get third_party => 'طرف ثالث'; - - @override - String get plugin_requires_authentication => 'تتطلّب الإضافة تسجيل الدخول'; - - @override - String get update_available => 'تحديث متوفر'; - - @override - String get supports_scrobbling => 'يدعم التتبع (scrobbling)'; - - @override - String get plugin_scrobbling_info => - 'تقوم هذه الإضافة بتتبع مقاطعك الموسيقية لإنشاء سجل الاستماع الخاص بك.'; - - @override - String get default_metadata_source => 'مصدر البيانات الوصفية الافتراضي'; - - @override - String get set_default_metadata_source => - 'تعيين مصدر البيانات الوصفية الافتراضي'; - - @override - String get default_audio_source => 'مصدر الصوت الافتراضي'; - - @override - String get set_default_audio_source => 'تعيين مصدر الصوت الافتراضي'; - - @override - String get set_default => 'تعيين كافتراضي'; - - @override - String get support => 'الدعم'; - - @override - String get support_plugin_development => 'دعم تطوير الإضافات'; - - @override - String can_access_name_api(Object name) { - return '- يمكن الوصول إلى واجهة برمجة التطبيقات **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'هل ترغب في تثبيت هذه الإضافة؟'; - - @override - String get third_party_plugin_warning => - 'هذه الإضافة من مستودع طرف ثالث. تأكد من موثوقية المصدر قبل التثبيت.'; - - @override - String get author => 'المؤلف'; - - @override - String get this_plugin_can_do_following => 'يمكن لهذه الإضافة القيام بما يلي'; - - @override - String get install => 'تثبيت'; - - @override - String get install_a_metadata_provider => 'تثبيت مزوّد بيانات'; - - @override - String get no_tracks_playing => 'لا توجد مقاطع تعمل حاليًا'; - - @override - String get synced_lyrics_not_available => - 'الكلمات المتزامنة غير متوفرة لهذه الأغنية. يُرجى استخدام'; - - @override - String get plain_lyrics => 'الكلمات العادية'; - - @override - String get tab_instead => 'بدلاً من ذلك، استخدم التبويب.'; - - @override - String get disclaimer => 'إخلاء المسؤولية'; - - @override - String get third_party_plugin_dmca_notice => - 'لا تتحمّل فريق Spotube أي مسؤولية (بما في ذلك القانونية) عن أي من الإضافات “لطرف ثالث”.\nاستخدمها على مسؤوليتك الخاصّة. لأيّة أخطاء/مشكلات، يُرجى الإبلاغ عنها في مستودع الإضافة.\n\nإذا كانت أي إضافة “لطرف ثالث” تنتهك شروط الخدمة أو قانون DMCA الخاص بأي خدمة أو كيان قانوني، فيُرجى طلب اتخاذ إجراء من مؤلف الإضافة أو منصة الاستضافة مثل GitHub/Codeberg. الإضافات المدرجة كـ “لطرف ثالث” هي مفعّلة ومُدارة من المجتمع، وليس لدينا صلاحية إدارتها أو التدخل فيها.\n\n'; - - @override - String get input_does_not_match_format => - 'المدخل لا يتوافق مع التنسيق المطلوب'; - - @override - String get plugins => 'الإضافات'; - - @override - String get paste_plugin_download_url => - 'الصق رابط التنزيل أو GitHub/Codeberg أو رابط مباشر لملف .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'تنزيل وتثبيت الإضافة من رابط'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'فشل في إضافة الإضافة: $error'; - } - - @override - String get upload_plugin_from_file => 'رفع الإضافة من ملف'; - - @override - String get installed => 'تم التثبيت'; - - @override - String get available_plugins => 'الإضافات المتوفّرة'; - - @override - String get configure_plugins => - 'قم بتكوين مزود البيانات الوصفية ومكونات مصدر الصوت الخاصة بك'; - - @override - String get audio_scrobblers => 'أجهزة تتبع الصوت'; - - @override - String get scrobbling => 'التتبع'; - - @override - String get source => 'المصدر: '; - - @override - String get uncompressed => 'غير مضغوط'; - - @override - String get dab_music_source_description => - 'لمحبي الصوتيات. يوفر تدفقات صوتية عالية الجودة/بدون فقدان. مطابقة دقيقة للمسارات بناءً على ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_bn.dart b/lib/l10n/generated/app_localizations_bn.dart deleted file mode 100644 index 7dc1e07f..00000000 --- a/lib/l10n/generated/app_localizations_bn.dart +++ /dev/null @@ -1,1566 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Bengali Bangla (`bn`). -class AppLocalizationsBn extends AppLocalizations { - AppLocalizationsBn([String locale = 'bn']) : super(locale); - - @override - String get guest => 'অতিথি'; - - @override - String get browse => 'ব্রাউজ করুন'; - - @override - String get search => 'অনুসন্ধান করুন'; - - @override - String get library => 'লাইব্রেরী'; - - @override - String get lyrics => 'গানের কথা'; - - @override - String get settings => 'সেটিংস'; - - @override - String get genre_categories_filter => 'গানের ধরণ বা শ্রেণি খুঁজুন'; - - @override - String get genre => 'গানের ধরণ'; - - @override - String get personalized => 'আপনার জন্য'; - - @override - String get featured => 'বৈশিষ্ট্যযুক্ত'; - - @override - String get new_releases => 'সাম্প্রতিক মুক্তি প্রাপ্ত'; - - @override - String get songs => 'গান'; - - @override - String playing_track(Object track) { - return '$track চালানো হচ্ছে'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'এটি বর্তমান প্লেলিষ্ট সাফ করে দিবে। $track_lengthটি গান বাদ দেওয়া হবে\nআপনি কি চালিয়ে যেতে চান?'; - } - - @override - String get load_more => 'আরো লোড করুন'; - - @override - String get playlists => 'প্লেলিস্ট'; - - @override - String get artists => 'শিল্পী'; - - @override - String get albums => 'অ্যালবাম'; - - @override - String get tracks => 'গানের ট্র্যাক'; - - @override - String get downloads => 'ডাউনলোড'; - - @override - String get filter_playlists => 'প্লেলিস্ট অনুসন্ধান করুন...'; - - @override - String get liked_tracks => 'পছন্দের গান'; - - @override - String get liked_tracks_description => 'আপনার পছন্দের গান সমূহ'; - - @override - String get playlist => 'প্লেলিস্ট'; - - @override - String get create_a_playlist => 'একটি প্লেলিস্ট তৈরি করুন'; - - @override - String get update_playlist => 'প্লেলিস্ট আপডেট করুন'; - - @override - String get create => 'তৈরি করুন'; - - @override - String get cancel => 'বাতিল করুন'; - - @override - String get update => 'আপডেট'; - - @override - String get playlist_name => 'প্লেলিস্টের নাম'; - - @override - String get name_of_playlist => 'প্লেলিস্টের নাম'; - - @override - String get description => 'বিবরণ'; - - @override - String get public => 'পাবলিক'; - - @override - String get collaborative => 'সহযোগিতামূলক'; - - @override - String get search_local_tracks => 'ডাউনলোডকৃত গান অনুসন্ধান করুন...'; - - @override - String get play => 'চালান'; - - @override - String get delete => 'মুছে ফেলুন'; - - @override - String get none => 'কোনটিই না'; - - @override - String get sort_a_z => 'A-Z ক্রমে সাজান'; - - @override - String get sort_z_a => 'Z-A ক্রমে সাজান'; - - @override - String get sort_artist => 'শিল্পীর ক্রমে সাজান'; - - @override - String get sort_album => 'অ্যালবামের ক্রমে সাজান'; - - @override - String get sort_duration => 'দৈর্ঘ্য অনুযায়ী বাছাই করুন'; - - @override - String get sort_tracks => 'গানের ক্রম'; - - @override - String currently_downloading(Object tracks_length) { - return 'ডাউনলোড করা হচ্ছে ($tracks_length)'; - } - - @override - String get cancel_all => 'সব বাতিল করুন'; - - @override - String get filter_artist => 'শিল্পীর অনুসন্ধান করুন...'; - - @override - String followers(Object followers) { - return '$followers অনুসরণকারী'; - } - - @override - String get add_artist_to_blacklist => 'শিল্পীকে ব্ল্যাকলিস্টে যোগ করুন'; - - @override - String get top_tracks => 'শীর্ষ গানের ট্র্যাক'; - - @override - String get fans_also_like => 'অনুসরণকারীদের পছন্দ'; - - @override - String get loading => 'লোড হচ্ছে...'; - - @override - String get artist => 'শিল্পী'; - - @override - String get blacklisted => 'ব্ল্যাকলিস্টে আছে'; - - @override - String get following => 'অনুসরণ করছেন'; - - @override - String get follow => 'অনুসরণ করুন'; - - @override - String get artist_url_copied => 'শিল্পীর URL কপি করা হয়েছে'; - - @override - String added_to_queue(Object tracks) { - return '$tracksটি গানের ট্র্যাক কিউতে যোগ করা হয়েছে'; - } - - @override - String get filter_albums => 'অ্যালবাম অনুসন্ধান করুন...'; - - @override - String get synced => 'সময় সুসংগত'; - - @override - String get plain => 'অসুসংগত'; - - @override - String get shuffle => 'অদলবদল'; - - @override - String get search_tracks => 'গান অনুসন্ধান করুন...'; - - @override - String get released => 'প্রকাশিত হয়েছে'; - - @override - String error(Object error) { - return 'ত্রুটি $error'; - } - - @override - String get title => 'শিরোনাম'; - - @override - String get time => 'সময়'; - - @override - String get more_actions => 'আরও অপশন'; - - @override - String download_count(Object count) { - return 'ডাউনলোড ($countটি)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'প্লেলিস্টে যোগ করুন ($countটি)'; - } - - @override - String add_count_to_queue(Object count) { - return 'কিউতে যোগ করুন ($countটি)'; - } - - @override - String play_count_next(Object count) { - return 'পরবর্তীতে চালান ($countটি)'; - } - - @override - String get album => 'অ্যালবাম'; - - @override - String copied_to_clipboard(Object data) { - return '$data ক্লিপবোর্ডে কপি করা হয়েছে'; - } - - @override - String add_to_following_playlists(Object track) { - return 'নিম্নলিখিত প্লেলিস্টে $track যোগ করুন'; - } - - @override - String get add => 'যোগ করুন'; - - @override - String added_track_to_queue(Object track) { - return 'কিউতে $track যোগ করা হয়েছে'; - } - - @override - String get add_to_queue => 'কিউতে যোগ করুন'; - - @override - String track_will_play_next(Object track) { - return '$track পরবর্তীতে চালানো হবে'; - } - - @override - String get play_next => 'পরবর্তীতে চালান'; - - @override - String removed_track_from_queue(Object track) { - return 'কিউ থেকে $track সরিয়ে নেওয়া হয়েছে'; - } - - @override - String get remove_from_queue => 'কিউ থেকে সরান'; - - @override - String get remove_from_favorites => 'পছন্দের তালিকা থেকে অপসারণ করুন'; - - @override - String get save_as_favorite => 'পছন্দের তালিকায় সংরক্ষণ করুন'; - - @override - String get add_to_playlist => 'প্লেলিস্টে যোগ করুন'; - - @override - String get remove_from_playlist => 'প্লেলিস্ট থেকে সরান'; - - @override - String get add_to_blacklist => 'ব্ল্যাকলিস্টে যোগ করুন'; - - @override - String get remove_from_blacklist => 'ব্ল্যাকলিস্ট থেকে সরান'; - - @override - String get share => 'শেয়ার করুন'; - - @override - String get mini_player => 'মিনি প্লেয়ার'; - - @override - String get slide_to_seek => 'গান সামনে বা পিছনে নিতে স্লাইড করুন'; - - @override - String get shuffle_playlist => 'প্লেলিস্ট এলোমেলো করুন'; - - @override - String get unshuffle_playlist => 'প্লেলিস্ট আগের মতো করুন'; - - @override - String get previous_track => 'আগের গানের ট্র্যাক'; - - @override - String get next_track => 'পরের গানের ট্র্যাক'; - - @override - String get pause_playback => 'গান বন্ধ করুন'; - - @override - String get resume_playback => 'গান চালু করুন'; - - @override - String get loop_track => 'গান শেষে পুনরায় চালান'; - - @override - String get no_loop => 'কোনো লুপ নেই'; - - @override - String get repeat_playlist => 'প্লেলিস্ট শেষে পুনরায় চালান'; - - @override - String get queue => 'গানের কিউ'; - - @override - String get alternative_track_sources => 'বিকল্প গানের উৎস'; - - @override - String get download_track => 'গান ডাউনলোড করুন'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracksটি গান কিউতে রয়েছে'; - } - - @override - String get clear_all => 'সব মুছে ফেলুন'; - - @override - String get show_hide_ui_on_hover => 'হভার করলে UI দেখান/লুকান'; - - @override - String get always_on_top => 'সর্বদা উপরে'; - - @override - String get exit_mini_player => 'মিনি প্লেয়ার থেকে বের হয়ে যান'; - - @override - String get download_location => 'ডাউনলোড স্থান'; - - @override - String get local_library => 'স্থানীয় লাইব্রেরি'; - - @override - String get add_library_location => 'লাইব্রেরিতে যোগ করুন'; - - @override - String get remove_library_location => 'লাইব্রেরি থেকে সরান'; - - @override - String get account => 'অ্যাকাউন্ট'; - - @override - String get logout => 'লগআউট করুন'; - - @override - String get logout_of_this_account => 'অ্যাকাউন্ট থেকে লগআউট করুন'; - - @override - String get language_region => 'ভাষা ও অঞ্চল'; - - @override - String get language => 'ভাষা'; - - @override - String get system_default => 'সিস্টেম ডিফল্ট'; - - @override - String get market_place_region => 'মার্কেটপ্লেস অঞ্চল'; - - @override - String get recommendation_country => 'দেশভিত্তিক সঙ্গীত পরামর্শের জন্য দেশ'; - - @override - String get appearance => 'রুপ'; - - @override - String get layout_mode => 'UI বিন্যাস রূপ'; - - @override - String get override_layout_settings => - 'প্রতিক্রিয়াশীল UI বিন্যাস রূপের সেটিংস পরিবর্তন করুন'; - - @override - String get adaptive => 'অভিযোজিত'; - - @override - String get compact => 'আঁটসাঁট UI'; - - @override - String get extended => 'বিস্তৃত UI'; - - @override - String get theme => 'থিম'; - - @override - String get dark => 'অন্ধকার'; - - @override - String get light => 'উজ্জল'; - - @override - String get system => 'সিস্টেম থিম'; - - @override - String get accent_color => 'প্রভাবশালী রং'; - - @override - String get sync_album_color => 'অ্যালবাম সুসংগত UI এর রং'; - - @override - String get sync_album_color_description => - 'অ্যালবাম কভারের প্রভাবশালী রঙ UI অ্যাকসেন্ট রঙ হিসাবে ব্যবহার করে'; - - @override - String get playback => 'সংগীতের প্লেব্যাক'; - - @override - String get audio_quality => 'শব্দের গুণমান'; - - @override - String get high => 'উচ্চ'; - - @override - String get low => 'নিম্ন'; - - @override - String get pre_download_play => 'আগে গান ডাউনলোড করে পরে চালান '; - - @override - String get pre_download_play_description => - 'গান স্ট্রিম করার পরিবর্তে, ডাউনলোড করুন এবং প্লে করুন (উচ্চ ব্যান্ডউইথ ব্যবহারকারীদের জন্য প্রস্তাবিত)'; - - @override - String get skip_non_music => - 'গানের নন-মিউজিক সেগমেন্ট এড়িয়ে যান (SponsorBlock)'; - - @override - String get blacklist_description => - 'কালো তালিকাভুক্ত গানের ট্র্যাক এবং শিল্পী'; - - @override - String get wait_for_download_to_finish => - 'ডাউনলোড শেষ হওয়ার জন্য অপেক্ষা করুন'; - - @override - String get desktop => 'ডেস্কটপ'; - - @override - String get close_behavior => 'বন্ধ করার প্রক্রিয়া'; - - @override - String get close => 'বন্ধ করুন'; - - @override - String get minimize_to_tray => 'সিস্টেম ট্রেতে রাখুন'; - - @override - String get show_tray_icon => 'সিস্টেম ট্রে আইকন দেখান'; - - @override - String get about => 'বিস্তারিত'; - - @override - String get u_love_spotube => 'আমরা জানি আপনি Spotube কে ভালবাসেন'; - - @override - String get check_for_updates => 'আপডেট চেক করুন'; - - @override - String get about_spotube => 'Spotube সম্পর্কে বিস্তারিত'; - - @override - String get blacklist => 'কালো তালিকা'; - - @override - String get please_sponsor => 'স্পনসর/সহায়তা করুন'; - - @override - String get spotube_description => - 'Spotube, একটি কর্মদক্ষ, ক্রস-প্ল্যাটফর্ম, বিনামূল্যের জন্য Spotify ক্লায়েন্ট'; - - @override - String get version => 'সংস্করণ'; - - @override - String get build_number => 'বিল্ড নম্বর'; - - @override - String get founder => 'প্রতিষ্ঠাতা'; - - @override - String get repository => 'সংগ্রহস্থল'; - - @override - String get bug_issues => 'বাগ/সমস্যা'; - - @override - String get made_with => '❤️ দিয়ে বাংলাদেশে🇧🇩 তৈরি'; - - @override - String get kingkor_roy_tirtho => 'কিংকর রায় তীর্থ'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year কিংকর রায় তীর্থ'; - } - - @override - String get license => 'লাইসেন্স'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'চিন্তা করবেন না, আপনার কোনো লগইন তথ্য সংগ্রহ করা হবে না বা কারো সাথে শেয়ার করা হবে না'; - - @override - String get know_how_to_login => 'আপনি কিভাবে লগইন করবেন তা জানেন না?'; - - @override - String get follow_step_by_step_guide => 'ধাপে ধাপে নির্দেশিকা অনুসরণ করুন'; - - @override - String cookie_name_cookie(Object name) { - return '$name কুকি'; - } - - @override - String get fill_in_all_fields => 'সমস্ত ফর্ম ক্ষেত্র পূরণ করুন'; - - @override - String get submit => 'জমা দিন'; - - @override - String get exit => 'প্রস্থান'; - - @override - String get previous => 'পূর্ববর্তী'; - - @override - String get next => 'পরবর্তী'; - - @override - String get done => 'সম্পন্ন'; - - @override - String get step_1 => 'ধাপ 1'; - - @override - String get first_go_to => 'প্রথমে যান'; - - @override - String get something_went_wrong => 'কিছু ভুল হয়েছে'; - - @override - String get piped_instance => 'Piped সার্ভার এড্রেস'; - - @override - String get piped_description => 'গান ম্যাচ করার জন্য ব্যবহৃত পাইপড সার্ভার'; - - @override - String get piped_warning => - 'এগুলোর মধ্যে কিছু ভাল কাজ নাও করতে পারে৷ তাই নিজ দায়িত্বে ব্যবহার করুন'; - - @override - String get invidious_instance => 'ইনভিডিয়াস সার্ভার ইন্সটেন্স'; - - @override - String get invidious_description => - 'ট্রাক মিলানোর জন্য ব্যবহৃত ইনভিডিয়াস সার্ভার'; - - @override - String get invidious_warning => - 'কিছু সার্ভার ভাল কাজ নাও করতে পারে। নিজের ঝুঁকিতে ব্যবহার করুন'; - - @override - String get generate => 'উৎপন্ন করুন'; - - @override - String track_exists(Object track) { - return 'ট্র্যাক $track ইতিমধ্যে বিদ্যমান'; - } - - @override - String get replace_downloaded_tracks => - 'সমস্ত ডাউনলোড করা ট্র্যাক প্রতিস্থাপন করুন'; - - @override - String get skip_download_tracks => 'সমস্ত ডাউনলোড করা ট্র্যাক এ স্কিপ করুন'; - - @override - String get do_you_want_to_replace => - 'আপনি কি বিদ্যমান ট্র্যাকটি প্রতিস্থাপন করতে চান?'; - - @override - String get replace => 'প্রতিস্থাপন করুন'; - - @override - String get skip => 'স্কিপ করুন'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '$count $type পর্যন্ত নির্বাচন করুন'; - } - - @override - String get select_genres => 'গানের ধরণ নির্বাচন করুন'; - - @override - String get add_genres => 'গানের ধরণ যুক্ত করুন'; - - @override - String get country => 'দেশ'; - - @override - String get number_of_tracks_generate => 'উত্পাদিত ট্র্যাকের সংখ্যা'; - - @override - String get acousticness => 'অধ্যাত্মিকতা'; - - @override - String get danceability => 'নৃত্যমূলকতা'; - - @override - String get energy => 'শক্তি'; - - @override - String get instrumentalness => 'সাধারণতা'; - - @override - String get liveness => 'জীবনমুক্ততা'; - - @override - String get loudness => 'স্বরের উচ্চতা'; - - @override - String get speechiness => 'বক্তব্যমূলকতা'; - - @override - String get valence => 'সন্তোষমূলকতা'; - - @override - String get popularity => 'জনপ্রিয়তা'; - - @override - String get key => 'কী'; - - @override - String get duration => 'সময়কাল (সেকেন্ড)'; - - @override - String get tempo => 'গতি (বিপিএম)'; - - @override - String get mode => 'মোড'; - - @override - String get time_signature => 'সময়ের স্বাক্ষর'; - - @override - String get short => 'সংক্ষিপ্ত'; - - @override - String get medium => 'মাঝারি'; - - @override - String get long => 'দীর্ঘ'; - - @override - String get min => 'সর্বনিম্ন'; - - @override - String get max => 'সর্বাধিক'; - - @override - String get target => 'লক্ষ্য'; - - @override - String get moderate => 'মাঝারি'; - - @override - String get deselect_all => 'সমস্ত অপচুন করুন'; - - @override - String get select_all => 'সমস্ত নির্বাচন করুন'; - - @override - String get are_you_sure => 'আপনি কি নিশ্চিত?'; - - @override - String get generating_playlist => 'আপনার কাস্টম প্লেলিস্ট তৈরি হচ্ছে...'; - - @override - String selected_count_tracks(Object count) { - return '$count ট্র্যাক নির্বাচিত'; - } - - @override - String get download_warning => - 'যদি আপনি সমস্ত ট্র্যাকগুলি একসঙ্গে ডাউনলোড করেন, তবে আপনি নিশ্চিতভাবে সঙ্গীত চুরি করছেন এবং সৃষ্টিশীল সমাজে ক্ষতি দিচ্ছেন। আমি আশা করি আপনি এটা সম্পর্কে জানেন। সর্বদা, শিল্পীদের কঠিন পরিশ্রমকে সম্মান করতে চেষ্টা করুন এবং সমর্থন করুন'; - - @override - String get download_ip_ban_warning => - 'তথ্যবিশ্বস্ত করে নেওয়া যায় যে, আপনার IP ঠিকানাটি YouTube দ্বারা স্থানান্তরিত করা হতে পারে যখন সাধারন থেকে বেশি ডাউনলোড অনুরোধ হয়। IP ব্লকের মাধ্যমে আপনি কমপক্ষে ২-৩ মাস ধরে (ঐ IP ডিভাইস থেকে) YouTube ব্যবহার করতে পারবেন না। এবং Spotube কোনও দায়িত্ব সম্পর্কে দায়িত্ব বহন করে না যদি এটি ঘটে।'; - - @override - String get by_clicking_accept_terms => - '\'গ্রহণ\' ক্লিক করে আপনি নিম্নলিখিত শর্তাদি স্বীকার করছেন:'; - - @override - String get download_agreement_1 => 'আমি জানি আমি সঙ্গীত চুরি করছি। আমি খারাপ'; - - @override - String get download_agreement_2 => - 'আমি কেবলমাত্র তাদের কাজ কেনার জন্য অর্থ নেই কিন্তু যেখানে প্রয়োজন সেখানে আমি শিল্পীদের সমর্থন করব।'; - - @override - String get download_agreement_3 => - 'আমি সম্পূর্ণরূপে জানি যে আমার IP YouTube-তে ব্লক হতে পারে এবং আমি Spotube বা তার মালিকানাধীন কোনও দায়িত্ব পেতে পারিনি আমার বর্তমান ক্রিয়াটি দ্বারা সৃষ্ট দুর্ঘটনা করার জন্য'; - - @override - String get decline => 'অগ্রায়ন করুন'; - - @override - String get accept => 'গ্রহণ করুন'; - - @override - String get details => 'বিস্তারিত'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'চ্যানেল'; - - @override - String get likes => 'লাইক'; - - @override - String get dislikes => 'অপছন্দ'; - - @override - String get views => 'দর্শনার্থী'; - - @override - String get streamUrl => 'স্ট্রিম URL'; - - @override - String get stop => 'বন্ধ করুন'; - - @override - String get sort_newest => 'নতুনতম অনুসারে সাজান'; - - @override - String get sort_oldest => 'পুরানোতম অনুসারে সাজান'; - - @override - String get sleep_timer => 'স্লীপ টাইমার'; - - @override - String mins(Object minutes) { - return '$minutes মিনিট'; - } - - @override - String hours(Object hours) { - return '$hours ঘন্টা'; - } - - @override - String hour(Object hours) { - return '$hours ঘন্টা'; - } - - @override - String get custom_hours => 'কাস্টম ঘন্টা'; - - @override - String get logs => 'লগ'; - - @override - String get developers => 'ডেভেলপার'; - - @override - String get not_logged_in => 'আপনি লগইন করা নেই'; - - @override - String get search_mode => 'অনুসন্ধান মোড'; - - @override - String get audio_source => 'অডিও উৎস'; - - @override - String get ok => 'ঠিক আছে'; - - @override - String get failed_to_encrypt => 'এনক্রিপ্ট করা ব্যর্থ হয়েছে'; - - @override - String get encryption_failed_warning => - 'Spotube আপনার তথ্যগুলি নিরাপদভাবে স্টোর করতে এনক্রিপশন ব্যবহার করে। কিন্তু এটি ব্যর্থ হয়েছে। তাই এটি অনিরাপদ স্টোরে ফলফল হবে\nযদি আপনি Linux ব্যবহার করেন, তবে দয়া করে নিশ্চিত হউন যে আপনার কোনও সিক্রেট-সার্ভিস gnome-keyring, kde-wallet, keepassxc ইত্যাদি ইনস্টল করা আছে'; - - @override - String get querying_info => 'তথ্য অনুসন্ধান করা হচ্ছে'; - - @override - String get piped_api_down => 'পাইপড API ডাউন আছে'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'বর্তমানে পাইপড ইনস্ট্যান্স $pipedInstance ডাউন আছে\n\nইনস্ট্যান্স পরিবর্তন করুন অথবা \'API টাইপ\' পরিবর্তন করুন অফিসিয়াল ইউটিউব API হতে\n\nপরিবর্তনের পরে অ্যাপটি পুনরায় চালানোর নিশ্চিত করুন'; - } - - @override - String get you_are_offline => 'আপনি বর্তমানে অফলাইন'; - - @override - String get connection_restored => 'আপনার ইন্টারনেট সংযোগ পুনরুদ্ধার হয়েছে'; - - @override - String get use_system_title_bar => 'সিস্টেম শিরোনাম বার ব্যবহার করুন'; - - @override - String get crunching_results => 'ফলাফল বিশ্লেষণ করা হচ্ছে...'; - - @override - String get search_to_get_results => 'ফলাফল পেতে খোঁজ করুন'; - - @override - String get use_amoled_mode => 'AMOLED মোড ব্যবহার করুন'; - - @override - String get pitch_dark_theme => 'পিচ ব্ল্যাক ডার্ট থিম'; - - @override - String get normalize_audio => 'অডিও স্তরমান করুন'; - - @override - String get change_cover => 'কভার পরিবর্তন করুন'; - - @override - String get add_cover => 'কভার যোগ করুন'; - - @override - String get restore_defaults => 'ডিফল্ট সেটিংস পুনরুদ্ধার করুন'; - - @override - String get download_music_format => 'গান ডাউনলোডের বিন্যাস'; - - @override - String get streaming_music_format => 'গান স্ট্রিমিং এর বিন্যাস'; - - @override - String get download_music_quality => 'গান ডাউনলোডের মান'; - - @override - String get streaming_music_quality => 'গান স্ট্রিমিং এর মান'; - - @override - String get login_with_lastfm => 'Last.fm দিয়ে লগইন করুন'; - - @override - String get connect => 'সংযোগ করুন'; - - @override - String get disconnect_lastfm => 'Last.fm সংযোগ বিচ্ছিন্ন করুন'; - - @override - String get disconnect => 'সংযোগ বিচ্ছিন্ন করুন'; - - @override - String get username => 'ব্যবহারকারীর নাম'; - - @override - String get password => 'পাসওয়ার্ড'; - - @override - String get login => 'লগইন'; - - @override - String get login_with_your_lastfm => - 'আপনার Last.fm অ্যাকাউন্ট দিয়ে লগইন করুন'; - - @override - String get scrobble_to_lastfm => 'Last.fm এ স্ক্রবল করুন'; - - @override - String get go_to_album => 'الانتقال إلى الألبوم'; - - @override - String get discord_rich_presence => 'وجود ديسكورد الغني'; - - @override - String get browse_all => 'تصفح الكل'; - - @override - String get genres => 'الأنواع الموسيقية'; - - @override - String get explore_genres => 'استكشاف الأنواع'; - - @override - String get friends => 'বন্ধু'; - - @override - String get no_lyrics_available => - 'দুঃখিত, এই ট্র্যাকের জন্য কথা খুঁজে পাওয়া গেলনা'; - - @override - String get start_a_radio => 'রেডিও শুরু করুন'; - - @override - String get how_to_start_radio => 'রেডিও কিভাবে শুরু করতে চান?'; - - @override - String get replace_queue_question => - 'আপনি বর্তমান কিউটি প্রতিস্থাপন করতে চান কিনা বা এর সাথে যুক্ত করতে চান?'; - - @override - String get endless_playback => 'অবিরাম প্রচার'; - - @override - String get delete_playlist => 'প্লেলিস্ট মুছুন'; - - @override - String get delete_playlist_confirmation => - 'আপনি কি নিশ্চিত যে আপনি এই প্লেলিস্টটি মুছতে চান?'; - - @override - String get local_tracks => 'স্থানীয় ট্র্যাক'; - - @override - String get local_tab => 'স্থানীয়'; - - @override - String get song_link => 'গানের লিংক'; - - @override - String get skip_this_nonsense => 'এই বাকবাস পালান'; - - @override - String get freedom_of_music => '“সংগীতের স্বাধীনতা”'; - - @override - String get freedom_of_music_palm => '“তোমার হাতের কাছে সংগীতের স্বাধীনতা”'; - - @override - String get get_started => 'শুরু করা যাক'; - - @override - String get youtube_source_description => 'প্রস্তাবিত এবং সেরা কাজ করে।'; - - @override - String get piped_source_description => 'মন খারাপ? ইউটিউবের মতো আবার ফ্রি।'; - - @override - String get jiosaavn_source_description => 'দক্ষিণ এশিয়ান অঞ্চলের জন্য সেরা।'; - - @override - String get invidious_source_description => - 'পাইপের মতো কিন্তু আরও বেশি উপলব্ধতা সহ'; - - @override - String highest_quality(Object quality) { - return 'সর্বোচ্চ গুণগতি: $quality'; - } - - @override - String get select_audio_source => 'অডিও উৎস নির্বাচন করুন'; - - @override - String get endless_playback_description => - 'নতুন গান নিজে নিজে প্লেলিস্টের শেষে\nসংযুক্ত করুন'; - - @override - String get choose_your_region => 'আপনার অঞ্চল নির্বাচন করুন'; - - @override - String get choose_your_region_description => - 'এটি স্পটুবে আপনাকে আপনার অবস্থানের জন্য ঠিক কন্টেন্ট দেখানোর সাহায্য করবে।'; - - @override - String get choose_your_language => 'আপনার ভাষা নির্বাচন করুন'; - - @override - String get help_project_grow => 'এই প্রকল্পের বৃদ্ধি করুন'; - - @override - String get help_project_grow_description => - 'স্পটুব একটি ওপেন সোর্স প্রকল্প। আপনি প্রকল্পে অবদান রাখেন, বাগ রিপোর্ট করেন, বা নতুন বৈশিষ্ট্যগুলি সুপারিশ করেন।'; - - @override - String get contribute_on_github => 'গিটহাবে অবদান রাখুন'; - - @override - String get donate_on_open_collective => 'ওপেন কলেক্টিভে অনুদান করুন'; - - @override - String get browse_anonymously => 'অজানে ব্রাউজ করুন'; - - @override - String get enable_connect => 'সংযোগ সক্রিয় করুন'; - - @override - String get enable_connect_description => - 'অন্যান্য ডিভাইস থেকে Spotube নিয়ন্ত্রণ করুন'; - - @override - String get devices => 'ডিভাইস'; - - @override - String get select => 'নির্বাচন করুন'; - - @override - String connect_client_alert(Object client) { - return 'আপনি $client দ্বারা নিয়ন্ত্রিত হচ্ছেন'; - } - - @override - String get this_device => 'এই ডিভাইস'; - - @override - String get remote => 'রিমোট'; - - @override - String get stats => 'পরিসংখ্যান'; - - @override - String and_n_more(Object count) { - return 'এবং $count আরও'; - } - - @override - String get recently_played => 'সম্প্রতি বাজানো'; - - @override - String get browse_more => 'আরও ব্রাউজ করুন'; - - @override - String get no_title => 'কোনো শিরোনাম নেই'; - - @override - String get not_playing => 'চালানো হচ্ছে না'; - - @override - String get epic_failure => 'বিরাট ব্যর্থতা!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length ট্র্যাক সারিতে যোগ করা হয়েছে'; - } - - @override - String get spotube_has_an_update => 'স্পটিউবে একটি আপডেট আছে'; - - @override - String get download_now => 'এখনই ডাউনলোড করুন'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'স্পটিউব নাইটলি $nightlyBuildNum প্রকাশিত হয়েছে'; - } - - @override - String release_version(Object version) { - return 'স্পটিউব v$version প্রকাশিত হয়েছে'; - } - - @override - String get read_the_latest => 'সর্বশেষ পড়ুন'; - - @override - String get release_notes => 'রিলিজ নোট'; - - @override - String get pick_color_scheme => 'রঙের থিম নির্বাচন করুন'; - - @override - String get save => 'সংরক্ষণ করুন'; - - @override - String get choose_the_device => 'ডিভাইস নির্বাচন করুন:'; - - @override - String get multiple_device_connected => - 'একাধিক ডিভাইস সংযুক্ত রয়েছে।\nযে ডিভাইসে আপনি এই ক্রিয়াটি চালাতে চান সেটি নির্বাচন করুন'; - - @override - String get nothing_found => 'কিছুই পাওয়া যায়নি'; - - @override - String get the_box_is_empty => 'বাক্সটি খালি'; - - @override - String get top_artists => 'শীর্ষ শিল্পী'; - - @override - String get top_albums => 'শীর্ষ অ্যালবাম'; - - @override - String get this_week => 'এই সপ্তাহ'; - - @override - String get this_month => 'এই মাস'; - - @override - String get last_6_months => 'গত ৬ মাস'; - - @override - String get this_year => 'এই বছর'; - - @override - String get last_2_years => 'গত ২ বছর'; - - @override - String get all_time => 'সব সময়'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName দ্বারা চালিত'; - } - - @override - String get email => 'ইমেইল'; - - @override - String get profile_followers => 'অনুসারী'; - - @override - String get birthday => 'জন্মদিন'; - - @override - String get subscription => 'সাবস্ক্রিপশন'; - - @override - String get not_born => 'জন্মগ্রহণ করেনি'; - - @override - String get hacker => 'হ্যাকার'; - - @override - String get profile => 'প্রোফাইল'; - - @override - String get no_name => 'কোন নাম নেই'; - - @override - String get edit => 'সম্পাদনা করুন'; - - @override - String get user_profile => 'ব্যবহারকারীর প্রোফাইল'; - - @override - String count_plays(Object count) { - return '$count বার প্লে হয়েছে'; - } - - @override - String get streaming_fees_hypothetical => 'স্ট্রিমিং ফি (ধারণাগত)'; - - @override - String get minutes_listened => 'শুনেছেন মিনিট'; - - @override - String get streamed_songs => 'স্ট্রিম করা গান'; - - @override - String count_streams(Object count) { - return '$count বার স্ট্রিম'; - } - - @override - String get owned_by_you => 'আপনার মালিকানাধীন'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl ক্লিপবোর্ডে কপি করা হয়েছে'; - } - - @override - String get hipotetical_calculation => - '*এটি নিরূপণ করা হয়েছে গড় অনলাইন মিউজিক স্ট্রিমিং প্ল্যাটফর্মের প্রতি স্ট্রিম 0.003–0.005 USD পেআউটের ভিত্তিতে। এটি একটি কাল্পনিক হিসাব যা ব্যবহারকারীকে ধারণা দিতে পারে তারা অন্যান্য স্ট্রিমিং প্ল্যাটফর্মে একই গান শোনার জন্য শিল্পীদের কত টাকা দিয়েছেন হোক।'; - - @override - String count_mins(Object minutes) { - return '$minutes মিনিট'; - } - - @override - String get summary_minutes => 'মিনিট'; - - @override - String get summary_listened_to_music => 'সঙ্গীত শুনেছেন'; - - @override - String get summary_songs => 'গান'; - - @override - String get summary_streamed_overall => 'মোট স্ট্রিম'; - - @override - String get summary_owed_to_artists => 'এই মাসে\nশিল্পীদেরকে ঋণী'; - - @override - String get summary_artists => 'শিল্পীর'; - - @override - String get summary_music_reached_you => 'আপনার কাছে পৌঁছেছে সঙ্গীত'; - - @override - String get summary_full_albums => 'সম্পূর্ণ অ্যালবাম'; - - @override - String get summary_got_your_love => 'আপনার ভালোবাসা পেয়েছে'; - - @override - String get summary_playlists => 'প্লেলিস্ট'; - - @override - String get summary_were_on_repeat => 'পুনরাবৃত্তিতে ছিল'; - - @override - String total_money(Object money) { - return 'মোট $money'; - } - - @override - String get webview_not_found => 'ওয়েবভিউ পাওয়া যায়নি'; - - @override - String get webview_not_found_description => - 'আপনার ডিভাইসে কোনো ওয়েবভিউ রানটাইম ইনস্টল করা নেই।\nযদি ইনস্টল থাকে, তা নিশ্চিত করুন যে এটি environment PATH এ রয়েছে\n\nইনস্টল করার পর, অ্যাপটি পুনরায় চালু করুন'; - - @override - String get unsupported_platform => 'সমর্থিত প্ল্যাটফর্ম নয়'; - - @override - String get cache_music => 'ক্যাশে সংগীত'; - - @override - String get open => 'খুলুন'; - - @override - String get cache_folder => 'ক্যাশে ফোল্ডার'; - - @override - String get export => 'রপ্তানি'; - - @override - String get clear_cache => 'ক্যাশে পরিষ্কার'; - - @override - String get clear_cache_confirmation => 'আপনি কি ক্যাশে পরিষ্কার করতে চান?'; - - @override - String get export_cache_files => 'ক্যাশে ফাইল রপ্তানি'; - - @override - String found_n_files(Object count) { - return '$count টি ফাইল পাওয়া গেছে'; - } - - @override - String get export_cache_confirmation => - 'আপনি কি এই ফাইলগুলি রপ্তানি করতে চান'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported টি ফাইল রপ্তানি করা হয়েছে $files এর মধ্যে'; - } - - @override - String get undo => 'পূর্বাবস্থায় ফিরুন'; - - @override - String get download_all => 'সব ডাউনলোড করুন'; - - @override - String get add_all_to_playlist => 'সব প্লেলিস্টে যোগ করুন'; - - @override - String get add_all_to_queue => 'সব কিউতে যোগ করুন'; - - @override - String get play_all_next => 'সব পরবর্তী খেলুন'; - - @override - String get pause => 'বিরতি'; - - @override - String get view_all => 'সব দেখুন'; - - @override - String get no_tracks_added_yet => 'এখনও কোনো ট্র্যাক যোগ করা হয়নি মনে হচ্ছে'; - - @override - String get no_tracks => 'এখানে কোনো ট্র্যাক নেই মনে হচ্ছে'; - - @override - String get no_tracks_listened_yet => 'এখনও কিছু শোনা হয়নি মনে হচ্ছে'; - - @override - String get not_following_artists => 'আপনি কোনো শিল্পীকে অনুসরণ করছেন না'; - - @override - String get no_favorite_albums_yet => - 'এখনও কোনো অ্যালবাম প্রিয় তালিকায় যোগ করা হয়নি মনে হচ্ছে'; - - @override - String get no_logs_found => 'কোনো লগ পাওয়া যায়নি'; - - @override - String get youtube_engine => 'ইউটিউব ইঞ্জিন'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine ইনস্টল করা নেই'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine আপনার সিস্টেমে ইনস্টল করা নেই।'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'এটি PATH ভেরিয়েবলে উপলব্ধ কিনা নিশ্চিত করুন অথবা\nনীচে $engine এক্সিকিউটেবল এর পূর্ণপথ সেট করুন'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/Unix-এর মতো অপারেটিং সিস্টেমে, .zshrc/.bashrc/.bash_profile ইত্যাদিতে পাথ সেট করা কাজ করবে না।\nআপনাকে শেল কনফিগারেশন ফাইলে পাথ সেট করতে হবে'; - - @override - String get download => 'ডাউনলোড'; - - @override - String get file_not_found => 'ফাইল পাওয়া যায়নি'; - - @override - String get custom => 'কাস্টম'; - - @override - String get add_custom_url => 'কাস্টম URL যোগ করুন'; - - @override - String get edit_port => 'পোর্ট সম্পাদনা করুন'; - - @override - String get port_helper_msg => - 'ডিফল্ট হল -1 যা এলোমেলো সংখ্যা নির্দেশ করে। যদি আপনার ফায়ারওয়াল কনফিগার করা থাকে, তবে এটি সেট করা সুপারিশ করা হয়।'; - - @override - String connect_request(Object client) { - return '$client কে সংযোগ করতে অনুমতি দেবেন?'; - } - - @override - String get connection_request_denied => - 'সংযোগ অস্বীকৃত। ব্যবহারকারী প্রবেশাধিকার অস্বীকার করেছে।'; - - @override - String get an_error_occurred => 'একটি ত্রুটি ঘটেছে'; - - @override - String get copy_to_clipboard => 'ক্লিপবোর্ডে কপি করুন'; - - @override - String get view_logs => 'লগ দেখুন'; - - @override - String get retry => 'পুনরায় চেষ্টা করুন'; - - @override - String get no_default_metadata_provider_selected => - 'আপনি কোনো ডিফল্ট মেটাডেটা প্রদানকারী সেট করেননি'; - - @override - String get manage_metadata_providers => 'মেটাডেটা প্রদানকারীগণ পরিচালনা করুন'; - - @override - String get open_link_in_browser => 'লিংকটি ব্রাউজারে খুলবেন?'; - - @override - String get do_you_want_to_open_the_following_link => - 'নিচের লিংকটি খুলতে চান?'; - - @override - String get unsafe_url_warning => - 'অবিশ্বাসযোগ্য উৎস থেকে লিংক খোলা নিরাপদ নাও হতে পারে। সতর্ক থাকুন!\nআপনি এটি ক্লিপবোর্ডে কপি করতে পারেন।'; - - @override - String get copy_link => 'লিংক কপি করুন'; - - @override - String get building_your_timeline => - 'আপনার শোনার ধারা অনুযায়ী টাইমলাইন তৈরি করা হচ্ছে...'; - - @override - String get official => 'সরকারি'; - - @override - String author_name(Object author) { - return 'লেখক: $author'; - } - - @override - String get third_party => 'তৃতীয় পক্ষ'; - - @override - String get plugin_requires_authentication => 'প্লাগইনটি প্রমাণীকরণ প্রয়োজন'; - - @override - String get update_available => 'হালনাগাদ উপলব্ধ'; - - @override - String get supports_scrobbling => 'স্ক্রোব্বলিং সমর্থিত'; - - @override - String get plugin_scrobbling_info => - 'এই প্লাগইনটি আপনার সঙ্গীত স্ক্রোব্বল করে আপনার শোনা ইতিহাস তৈরি করে।'; - - @override - String get default_metadata_source => 'ডিফল্ট মেটাডেটা উৎস'; - - @override - String get set_default_metadata_source => 'ডিফল্ট মেটাডেটা উৎস সেট করুন'; - - @override - String get default_audio_source => 'ডিফল্ট অডিও উৎস'; - - @override - String get set_default_audio_source => 'ডিফল্ট অডিও উৎস সেট করুন'; - - @override - String get set_default => 'ডিফল্ট হিসাবে নির্ধারণ করুন'; - - @override - String get support => 'সমর্থন'; - - @override - String get support_plugin_development => 'প্লাগইন উন্নয়নকে সমর্থন করুন'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API-তে অ্যাক্সেস করতে পারে'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'আপনি কি এই প্লাগইন ইনস্টল করতে চান?'; - - @override - String get third_party_plugin_warning => - 'এই প্লাগইন একটি তৃতীয় পক্ষের রেপোজিটরির। ইনস্টল করার আগে উৎস বিশ্বস্ত কিনা নিশ্চিত করুন।'; - - @override - String get author => 'লেখক'; - - @override - String get this_plugin_can_do_following => 'এই প্লাগইন নিচের কাজ করতে পারে'; - - @override - String get install => 'ইনস্টল করুন'; - - @override - String get install_a_metadata_provider => - 'একটি মেটাডেটা প্রদানকারী ইনস্টল করুন'; - - @override - String get no_tracks_playing => 'বর্তমানে কোনো ট্র্যাক শোনা হচ্ছে না'; - - @override - String get synced_lyrics_not_available => - 'এই গানের জন্য সিঙ্ক্রোনাইজড লিরিক্স পাওয়া যায় না। অনুগ্রহ করে ব্যবহার করুন'; - - @override - String get plain_lyrics => 'সহজ লিরিক্স'; - - @override - String get tab_instead => 'তার পরিবর্তে ট্যাব ব্যবহার করুন।'; - - @override - String get disclaimer => 'অস্বীকৃতি'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube দল কোনো “তৃতীয় পক্ষ” প্লাগইনের জন্য কোনো (আইনগত সহ) দায়িত্ব নেয় না। নিজের বিপদে ব্যবহার করুন। কোনো বাগ/সমস্যা হলে প্লাগইন রেপোজিটরিতে জানাতে অনুরোধ করা হচ্ছে।\n\nযদি কোনো “তৃতীয় পক্ষ” প্লাগইন কোনো পরিষেবা/আইনগত সংস্থার ToS/DMCA ভূঙ্গ করে, অনুগ্রহ করে “তৃতীয় পক্ষ” প্লাগইনের লেখক বা হোস্টিং প্ল্যাটফর্মে (যেমন GitHub/Codeberg) পদক্ষেপ নিতে বলুন। “তৃতীয় পক্ষ” লেবেলযুক্ত যুক্তিগুলি সকলই পাবলিক/কমিউনিটি দ্বারা রক্ষণাবেক্ষণ করা হয়; আমরা সেগুলি কিউরেট করি না, তাই আমরা কোনো পদক্ষেপ নিতে পারি না।\n\n'; - - @override - String get input_does_not_match_format => - 'ইনপুট প্রয়োজনীয় ফরম্যাটের সাথে মেলে না'; - - @override - String get plugins => 'প্লাগইন'; - - @override - String get paste_plugin_download_url => - 'ডাউনলোড URL বা GitHub/Codeberg রিপো URL বা .smplug ফাইলের সরাসরি লিঙ্ক পেস্ট করুন'; - - @override - String get download_and_install_plugin_from_url => - 'URL থেকে প্লাগইন ডাউনলোড এবং ইনস্টল করুন'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'প্লাগইন যোগ করতে ব্যর্থ: $error'; - } - - @override - String get upload_plugin_from_file => 'ফাইল থেকে প্লাগইন আপলোড করুন'; - - @override - String get installed => 'ইনস্টল করা হয়েছে'; - - @override - String get available_plugins => 'উপলব্ধ প্লাগইনগুলো'; - - @override - String get configure_plugins => - 'আপনার নিজের মেটাডেটা প্রদানকারী এবং অডিও উৎস প্লাগইন কনফিগার করুন'; - - @override - String get audio_scrobblers => 'অডিও স্ক্রোব্বলার্স'; - - @override - String get scrobbling => 'স্ক্রোব্বলিং'; - - @override - String get source => 'উৎস: '; - - @override - String get uncompressed => 'অ-সংকুচিত'; - - @override - String get dab_music_source_description => - 'অডিওফাইলদের জন্য। উচ্চ-মানের/লসলেস অডিও স্ট্রিম প্রদান করে। সঠিক ISRC ভিত্তিক ট্র্যাক ম্যাচিং।'; -} diff --git a/lib/l10n/generated/app_localizations_ca.dart b/lib/l10n/generated/app_localizations_ca.dart deleted file mode 100644 index a4f587c9..00000000 --- a/lib/l10n/generated/app_localizations_ca.dart +++ /dev/null @@ -1,1579 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Catalan Valencian (`ca`). -class AppLocalizationsCa extends AppLocalizations { - AppLocalizationsCa([String locale = 'ca']) : super(locale); - - @override - String get guest => 'Convidat'; - - @override - String get browse => 'Explorar'; - - @override - String get search => 'Cercar'; - - @override - String get library => 'Biblioteca'; - - @override - String get lyrics => 'Lletres'; - - @override - String get settings => 'Configuració'; - - @override - String get genre_categories_filter => 'Filtrar categories o gèneres...'; - - @override - String get genre => 'Gènere'; - - @override - String get personalized => 'Personalizat'; - - @override - String get featured => 'Destacat'; - - @override - String get new_releases => 'Nous Llançaments'; - - @override - String get songs => 'Cançons'; - - @override - String playing_track(Object track) { - return 'Reproduint $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Això eliminarà la llista actual. S\'eliminaran $track_length cançons.\n¿Vol continuar?'; - } - - @override - String get load_more => 'Carregar més'; - - @override - String get playlists => 'Llistes de reproducció'; - - @override - String get artists => 'Artistes'; - - @override - String get albums => 'Àlbums'; - - @override - String get tracks => 'Cançons'; - - @override - String get downloads => 'Descàrregues'; - - @override - String get filter_playlists => 'Filtrar les seves llistes de reproducció...'; - - @override - String get liked_tracks => 'Cançons Preferides'; - - @override - String get liked_tracks_description => 'Totes les seves cançons preferides'; - - @override - String get playlist => 'Llista de reproducció'; - - @override - String get create_a_playlist => 'Crear una llista de reproducció'; - - @override - String get update_playlist => 'Actualitzar la llista de reproducció'; - - @override - String get create => 'Crear'; - - @override - String get cancel => 'Cancel·lar'; - - @override - String get update => 'Actualitzar'; - - @override - String get playlist_name => 'Nom de la llista'; - - @override - String get name_of_playlist => 'Nom de la lista'; - - @override - String get description => 'Descripció'; - - @override - String get public => 'Pública'; - - @override - String get collaborative => 'Col·laborativa'; - - @override - String get search_local_tracks => 'Cercar cançons locals...'; - - @override - String get play => 'Reproduir'; - - @override - String get delete => 'Eliminar'; - - @override - String get none => 'Cap'; - - @override - String get sort_a_z => 'Ordenar de la A a la Z'; - - @override - String get sort_z_a => 'Ordenar de la Z a la A'; - - @override - String get sort_artist => 'Ordenar per Artista'; - - @override - String get sort_album => 'Ordenar per Àlbum'; - - @override - String get sort_duration => 'Ordenar per Durada'; - - @override - String get sort_tracks => 'Ordenar Cançons'; - - @override - String currently_downloading(Object tracks_length) { - return 'Descàrrega en curs ($tracks_length)'; - } - - @override - String get cancel_all => 'Cancel·lar todo'; - - @override - String get filter_artist => 'Filtrar artistes...'; - - @override - String followers(Object followers) { - return '$followers Seguidors'; - } - - @override - String get add_artist_to_blacklist => 'Afegir artista a la llista negra'; - - @override - String get top_tracks => 'Millors Cançons'; - - @override - String get fans_also_like => 'Als fans també els hi agrada'; - - @override - String get loading => 'Carregant...'; - - @override - String get artist => 'Artista'; - - @override - String get blacklisted => 'A la llista negra'; - - @override - String get following => 'Seguint'; - - @override - String get follow => 'Seguir'; - - @override - String get artist_url_copied => 'URL de l\'artista copiada al porta-retalls '; - - @override - String added_to_queue(Object tracks) { - return '$tracks cançons afegides a la llista'; - } - - @override - String get filter_albums => 'Filtrar àlbums...'; - - @override - String get synced => 'Sincronitzat'; - - @override - String get plain => 'Normal'; - - @override - String get shuffle => 'Aleatori'; - - @override - String get search_tracks => 'Buscar cançons...'; - - @override - String get released => 'Publicat'; - - @override - String error(Object error) { - return 'Error $error'; - } - - @override - String get title => 'Títul'; - - @override - String get time => 'Duració'; - - @override - String get more_actions => 'Més accios'; - - @override - String download_count(Object count) { - return 'Descarregar ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Afegir ($count) a la llista de reproducció'; - } - - @override - String add_count_to_queue(Object count) { - return 'Agregar ($count) a la llista'; - } - - @override - String play_count_next(Object count) { - return 'Reproduir ($count) a continuació'; - } - - @override - String get album => 'Àlbum'; - - @override - String copied_to_clipboard(Object data) { - return '$data copiado al porta-retalls'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Afegir $track a les llistes de reproducció següents'; - } - - @override - String get add => 'Afegir'; - - @override - String added_track_to_queue(Object track) { - return '$track afegida a la llista'; - } - - @override - String get add_to_queue => 'Afegir a la llista'; - - @override - String track_will_play_next(Object track) { - return '$track es reproduirà a continuació'; - } - - @override - String get play_next => 'Reproduir a continuació'; - - @override - String removed_track_from_queue(Object track) { - return '$track eliminada de la llista'; - } - - @override - String get remove_from_queue => 'Eliminar de la llista'; - - @override - String get remove_from_favorites => 'Eliminar de preferits'; - - @override - String get save_as_favorite => 'Guardar a preferits'; - - @override - String get add_to_playlist => 'Afegir a la llista de reproducció'; - - @override - String get remove_from_playlist => 'Eliminar de la llista de reproducció'; - - @override - String get add_to_blacklist => 'Afegir a la llista negra'; - - @override - String get remove_from_blacklist => 'Eliminar de la llista negra'; - - @override - String get share => 'Compartir'; - - @override - String get mini_player => 'Reproductor Petit'; - - @override - String get slide_to_seek => 'Lliscar per cercar endavant o endarrere'; - - @override - String get shuffle_playlist => 'Mesclar la llista de reproducció'; - - @override - String get unshuffle_playlist => 'No mesclar la llista de reproducció'; - - @override - String get previous_track => 'Cançó anterior'; - - @override - String get next_track => 'Canço següent'; - - @override - String get pause_playback => 'Pausar reproducció'; - - @override - String get resume_playback => 'Continuar reproducció'; - - @override - String get loop_track => 'Repetir canço'; - - @override - String get no_loop => 'Sense repetició'; - - @override - String get repeat_playlist => 'Repetir la llista de reproducció'; - - @override - String get queue => 'Llista'; - - @override - String get alternative_track_sources => 'Fonts alternatives de cançons'; - - @override - String get download_track => 'Descarregar cançó'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks cançons a la llista'; - } - - @override - String get clear_all => 'Netejar tot'; - - @override - String get show_hide_ui_on_hover => - 'Mostrar/Ocultar interfície al passar el cursor'; - - @override - String get always_on_top => 'Sempre visible'; - - @override - String get exit_mini_player => 'Sortir del reproductor petit'; - - @override - String get download_location => 'Ubicació de descàrregues'; - - @override - String get local_library => 'Biblioteca local'; - - @override - String get add_library_location => 'Afegeix a la biblioteca'; - - @override - String get remove_library_location => 'Elimina de la biblioteca'; - - @override - String get account => 'Compte'; - - @override - String get logout => 'Tancar sessió'; - - @override - String get logout_of_this_account => 'Tancar sessió d\'aquest compte'; - - @override - String get language_region => 'Idioma i Regió'; - - @override - String get language => 'Idioma'; - - @override - String get system_default => 'Predeterminat del sistema'; - - @override - String get market_place_region => 'Regió de la botiga'; - - @override - String get recommendation_country => 'País de recomanació'; - - @override - String get appearance => 'Apariència'; - - @override - String get layout_mode => 'Mode de disseny'; - - @override - String get override_layout_settings => - 'Anul·leu la configuració del mode de disseny responsiu'; - - @override - String get adaptive => 'Adaptable'; - - @override - String get compact => 'Compacte'; - - @override - String get extended => 'Extès'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Fosc'; - - @override - String get light => 'Clar'; - - @override - String get system => 'Sistema'; - - @override - String get accent_color => 'Color d\'accent'; - - @override - String get sync_album_color => 'Sincronitzar color de l\'àlbum'; - - @override - String get sync_album_color_description => - 'Utilitza el color dominant de l\'álbum com a color d\'accent'; - - @override - String get playback => 'Reproducció'; - - @override - String get audio_quality => 'Qualitat d\'àudio'; - - @override - String get high => 'Alta'; - - @override - String get low => 'Baixa'; - - @override - String get pre_download_play => 'Descàrrega prèvia i reproduir'; - - @override - String get pre_download_play_description => - 'En lloc de transmetre l\'àudio, descarrega bytes i ho reprodueix (recomendat per usuaris amb un bon ample de banda)'; - - @override - String get skip_non_music => - 'Ometre segments que no son música (SponsorBlock)'; - - @override - String get blacklist_description => 'Cançons i artistes de la llista negra'; - - @override - String get wait_for_download_to_finish => - 'Si us plau, esperi que acabi la descàrrega actual'; - - @override - String get desktop => 'Escriptori'; - - @override - String get close_behavior => 'Comportament al tancar'; - - @override - String get close => 'Tancar'; - - @override - String get minimize_to_tray => 'Minimizar a la safata del sistema'; - - @override - String get show_tray_icon => 'Mostrar icona a la safata del sistema'; - - @override - String get about => 'Sobre'; - - @override - String get u_love_spotube => 'Sabem que li encanta Spotube'; - - @override - String get check_for_updates => 'Buscar actualitzacions'; - - @override - String get about_spotube => 'Sobre Spotube'; - - @override - String get blacklist => 'Llista negra'; - - @override - String get please_sponsor => 'Si us plau, patrocina/dona'; - - @override - String get spotube_description => - 'Spotube, un client lleuger, multiplataforma i gratuït de Spotify'; - - @override - String get version => 'Versió'; - - @override - String get build_number => 'Número de compilació'; - - @override - String get founder => 'Fundador'; - - @override - String get repository => 'Repositori'; - - @override - String get bug_issues => 'Errors i problemes'; - - @override - String get made_with => 'Fet amb ❤️ a Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Llicència'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'No es preocupi, les seves credencials no seran recollides ni compartides amb ningú'; - - @override - String get know_how_to_login => 'No sap com fer-ho?'; - - @override - String get follow_step_by_step_guide => 'Segueixi la guia pas a pas'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Si us plau, completi tots els camps'; - - @override - String get submit => 'Enviar'; - - @override - String get exit => 'Sortir'; - - @override - String get previous => 'Anterior'; - - @override - String get next => 'Següent'; - - @override - String get done => 'Fet'; - - @override - String get step_1 => 'Pas 1'; - - @override - String get first_go_to => 'Primer, vagi a'; - - @override - String get something_went_wrong => 'Quelcom ha sortit malament'; - - @override - String get piped_instance => 'Instància del servidor Piped'; - - @override - String get piped_description => - 'La instància del servidor Piped a utilitzar per la coincidència de cançons'; - - @override - String get piped_warning => - 'Algunes poden no funcionar bé, utilitzi-les sota el seu propi risc'; - - @override - String get invidious_instance => 'Instància del servidor Invidious'; - - @override - String get invidious_description => - 'La instància del servidor Invidious per fer coincidir pistes'; - - @override - String get invidious_warning => - 'Algunes instàncies podrien no funcionar bé. Feu-les servir sota la vostra responsabilitat'; - - @override - String get generate => 'Generar'; - - @override - String track_exists(Object track) { - return 'La cançó $track ja existeix'; - } - - @override - String get replace_downloaded_tracks => - 'Substituir totes les cançons descarregades'; - - @override - String get skip_download_tracks => - 'Ometre la descàrrega de totes les cançons descarregades'; - - @override - String get do_you_want_to_replace => 'Vol substituir la cançó existent?'; - - @override - String get replace => 'Substituir'; - - @override - String get skip => 'Ometre'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Seleccionar fins$count $type'; - } - - @override - String get select_genres => 'Seleccionar Gèneres'; - - @override - String get add_genres => 'Afegir Gèneres'; - - @override - String get country => 'País'; - - @override - String get number_of_tracks_generate => 'Número de cançons a generar'; - - @override - String get acousticness => 'Acústica'; - - @override - String get danceability => 'Ballabilitat'; - - @override - String get energy => 'Energia'; - - @override - String get instrumentalness => 'Instrumental'; - - @override - String get liveness => 'En viu'; - - @override - String get loudness => 'Sonoritat'; - - @override - String get speechiness => 'Parla'; - - @override - String get valence => 'Valencia'; - - @override - String get popularity => 'Popularidad'; - - @override - String get key => 'To'; - - @override - String get duration => 'Duració (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'Signatura de temps'; - - @override - String get short => 'Curt'; - - @override - String get medium => 'Mig'; - - @override - String get long => 'Llarg'; - - @override - String get min => 'Mín.'; - - @override - String get max => 'Màx.'; - - @override - String get target => 'Objetiu'; - - @override - String get moderate => 'Moderat'; - - @override - String get deselect_all => 'Desseleccionar tot'; - - @override - String get select_all => 'Seleccionar tot'; - - @override - String get are_you_sure => 'Està segur?'; - - @override - String get generating_playlist => - 'Generant la seva llista de reproducció personalitzada...'; - - @override - String selected_count_tracks(Object count) { - return 'Cançons $count seleccionades'; - } - - @override - String get download_warning => - 'Si descarrega totes les cançons de cop, està piratejant música clarament i causant dany a la societat creativa de la música. Espero que sigui conscient d\'això i sempre intenti respectar i recolzar la forta feina dels artístes'; - - @override - String get download_ip_ban_warning => - 'Per cert, la seva IP pot ser bloquejada a YouTube degut a solicituds de descàrrega excessives. El bloqueig d\'IP vol dir que no podrà utilitzar YouTube (fins i tot si ha iniciat sessió) durant un mínim de 2-3 meses desde esa dirección IP. I Spotube no es fa responsable si això succeeix en alguna ocasió'; - - @override - String get by_clicking_accept_terms => - 'Al fer clic a \'Acceptar\', acepta els següents termes:'; - - @override - String get download_agreement_1 => - 'Se que estic piratejant música. Sóc dolent'; - - @override - String get download_agreement_2 => - 'Recolzaré l\'artista quan pugui i només ho faig perquè no tinc diners per comprar el seu art'; - - @override - String get download_agreement_3 => - 'Sóc completament conscient que la meva IP pot ser bloqueada per YouTube i no responsabilizo a Spotube ni als seus propietaris/contribuents per qualsevol incident causat per la meva acció actual'; - - @override - String get decline => 'Rebutjar'; - - @override - String get accept => 'Acceptar'; - - @override - String get details => 'Detalls'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Canal'; - - @override - String get likes => 'M\'agrada'; - - @override - String get dislikes => 'No m\'agrada'; - - @override - String get views => 'Vistes'; - - @override - String get streamUrl => 'URL del streaming'; - - @override - String get stop => 'Parar'; - - @override - String get sort_newest => 'Ordenar per més noves'; - - @override - String get sort_oldest => 'Ordenar per més antigues'; - - @override - String get sleep_timer => 'Temporitzador d\'apagat'; - - @override - String mins(Object minutes) { - return '$minutes minuts'; - } - - @override - String hours(Object hours) { - return '$hours hores'; - } - - @override - String hour(Object hours) { - return '$hours hora'; - } - - @override - String get custom_hours => 'Hores personalitzades'; - - @override - String get logs => 'Registres'; - - @override - String get developers => 'Desenvolupadors'; - - @override - String get not_logged_in => 'No ha iniciat sesió'; - - @override - String get search_mode => 'Mode de cerca'; - - @override - String get audio_source => 'Font d\'àudio'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => 'Error al xifrar'; - - @override - String get encryption_failed_warning => - 'Spotube utilitza el xifrado per emmagatzemar les seves dades de forma segura. Però ha fallat. Per tant, tornarà a un emmagatzament no segur\nSi estè utilizant Linux, asseguri\'s de tenir instal·lats els serveis secrets com gnome-keyring, kde-wallet i keepassxc'; - - @override - String get querying_info => 'Consultant informació...'; - - @override - String get piped_api_down => 'La API de Piped no està operativa'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'La instància de Piped $pipedInstance no està operativa en aquest moment\n\nCanvieu la instància o canvieu el \'Tipus d\'API\' a l\'API oficial de YouTube\n\nAssegureu-vos de reiniciar l\'aplicació després del canvi'; - } - - @override - String get you_are_offline => 'Actualment no teniu connexió a internet'; - - @override - String get connection_restored => 'S\'ha restablert la connexió a internet'; - - @override - String get use_system_title_bar => 'Utilitza la barra de títol del sistema'; - - @override - String get crunching_results => 'Processant resultats...'; - - @override - String get search_to_get_results => 'Cerca per obtenir resultats'; - - @override - String get use_amoled_mode => 'Utilitza el mode AMOLED'; - - @override - String get pitch_dark_theme => 'Tema de dart negre intens'; - - @override - String get normalize_audio => 'Normalitza l\'àudio'; - - @override - String get change_cover => 'Canvia la coberta'; - - @override - String get add_cover => 'Afegeix una coberta'; - - @override - String get restore_defaults => 'Restaura els valors per defecte'; - - @override - String get download_music_format => 'Format de descàrrega de música'; - - @override - String get streaming_music_format => - 'Format de reproducció de música en temps real'; - - @override - String get download_music_quality => 'Qualitat de descàrrega de música'; - - @override - String get streaming_music_quality => - 'Qualitat de reproducció de música en temps real'; - - @override - String get login_with_lastfm => 'Inicia la sessió amb Last.fm'; - - @override - String get connect => 'Connecta'; - - @override - String get disconnect_lastfm => 'Desconnecta de Last.fm'; - - @override - String get disconnect => 'Desconnecta'; - - @override - String get username => 'Nom d\'usuari'; - - @override - String get password => 'Contrasenya'; - - @override - String get login => 'Inicia la sessió'; - - @override - String get login_with_your_lastfm => - 'Inicia la sessió amb el teu compte de Last.fm'; - - @override - String get scrobble_to_lastfm => 'Scrobble a Last.fm'; - - @override - String get go_to_album => 'Anar a l\'àlbum'; - - @override - String get discord_rich_presence => 'Presència rica de Discord'; - - @override - String get browse_all => 'Navega per tot'; - - @override - String get genres => 'Gèneres'; - - @override - String get explore_genres => 'Explora els gèneres'; - - @override - String get friends => 'Amics'; - - @override - String get no_lyrics_available => - 'Ho sentim, no es poden trobar les lletres d\'aquesta pista'; - - @override - String get start_a_radio => 'Inicia una ràdio'; - - @override - String get how_to_start_radio => 'Com vols començar la ràdio?'; - - @override - String get replace_queue_question => - 'Voleu substituir la cua actual o afegir-hi?'; - - @override - String get endless_playback => 'Reproducció infinita'; - - @override - String get delete_playlist => 'Suprimeix la llista de reproducció'; - - @override - String get delete_playlist_confirmation => - 'Esteu segur que voleu suprimir aquesta llista de reproducció?'; - - @override - String get local_tracks => 'Pistes locals'; - - @override - String get local_tab => 'Local'; - - @override - String get song_link => 'Enllaç de la cançó'; - - @override - String get skip_this_nonsense => 'Omet aquesta tonteria'; - - @override - String get freedom_of_music => '“Llibertat de la música”'; - - @override - String get freedom_of_music_palm => - '“Llibertat de la música a la palma de la mà”'; - - @override - String get get_started => 'Comencem'; - - @override - String get youtube_source_description => 'Recomanat i funciona millor.'; - - @override - String get piped_source_description => - 'Et sents lliure? El mateix que YouTube però més lliure.'; - - @override - String get jiosaavn_source_description => - 'El millor per a la regió del sud d\'Àsia.'; - - @override - String get invidious_source_description => - 'Similar a Piped però amb més disponibilitat'; - - @override - String highest_quality(Object quality) { - return 'Qualitat més alta: $quality'; - } - - @override - String get select_audio_source => 'Seleccioneu la font d\'àudio'; - - @override - String get endless_playback_description => - 'Afegiu automàticament noves cançons\nal final de la cua'; - - @override - String get choose_your_region => 'Trieu la vostra regió'; - - @override - String get choose_your_region_description => - 'Això ajudarà a Spotube a mostrar-vos el contingut adequat\nper a la vostra ubicació.'; - - @override - String get choose_your_language => 'Trieu el vostre idioma'; - - @override - String get help_project_grow => 'Ajuda a fer créixer aquest projecte'; - - @override - String get help_project_grow_description => - 'Spotube és un projecte de codi obert. Podeu ajudar a fer créixer aquest projecte contribuint al projecte, informant d\'errors o suggerint noves funcionalitats.'; - - @override - String get contribute_on_github => 'Contribueix a GitHub'; - - @override - String get donate_on_open_collective => 'Fes una donació a Open Collective'; - - @override - String get browse_anonymously => 'Navega de manera anònima'; - - @override - String get enable_connect => 'Habilita la connexió'; - - @override - String get enable_connect_description => - 'Controla Spotube des d\'altres dispositius'; - - @override - String get devices => 'Dispositius'; - - @override - String get select => 'Selecciona'; - - @override - String connect_client_alert(Object client) { - return 'Estàs sent controlat per $client'; - } - - @override - String get this_device => 'Aquest dispositiu'; - - @override - String get remote => 'Remot'; - - @override - String get stats => 'Estadístiques'; - - @override - String and_n_more(Object count) { - return 'i $count més'; - } - - @override - String get recently_played => 'Reproduït recentment'; - - @override - String get browse_more => 'Navega més'; - - @override - String get no_title => 'Sense títol'; - - @override - String get not_playing => 'No s\'està reproduint'; - - @override - String get epic_failure => 'Fracàs èpic!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Afegit $tracks_length pistes a la cua'; - } - - @override - String get spotube_has_an_update => 'Spotube té una actualització'; - - @override - String get download_now => 'Descarregar ara'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum ha estat publicat'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version ha estat publicat'; - } - - @override - String get read_the_latest => 'Llegeix el més recent'; - - @override - String get release_notes => 'notes de la versió'; - - @override - String get pick_color_scheme => 'Tria l\'esquema de colors'; - - @override - String get save => 'Desar'; - - @override - String get choose_the_device => 'Tria el dispositiu:'; - - @override - String get multiple_device_connected => - 'Hi ha diversos dispositius connectats.\nTria el dispositiu on vols realitzar aquesta acció'; - - @override - String get nothing_found => 'No s\'ha trobat res'; - - @override - String get the_box_is_empty => 'La caixa està buida'; - - @override - String get top_artists => 'Millors artistes'; - - @override - String get top_albums => 'Millors àlbums'; - - @override - String get this_week => 'Aquesta setmana'; - - @override - String get this_month => 'Aquest mes'; - - @override - String get last_6_months => 'Últims 6 mesos'; - - @override - String get this_year => 'Aquest any'; - - @override - String get last_2_years => 'Últims 2 anys'; - - @override - String get all_time => 'Tots els temps'; - - @override - String powered_by_provider(Object providerName) { - return 'Funciona amb $providerName'; - } - - @override - String get email => 'Correu electrònic'; - - @override - String get profile_followers => 'Seguidors'; - - @override - String get birthday => 'Aniversari'; - - @override - String get subscription => 'Subscripció'; - - @override - String get not_born => 'No ha nascut'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Perfil'; - - @override - String get no_name => 'Sense nom'; - - @override - String get edit => 'Editar'; - - @override - String get user_profile => 'Perfil d\'usuari'; - - @override - String count_plays(Object count) { - return '$count reproduccions'; - } - - @override - String get streaming_fees_hypothetical => - 'Comissions de streaming (hipotètic)'; - - @override - String get minutes_listened => 'minuts escoltats'; - - @override - String get streamed_songs => 'cançons reproduïdes'; - - @override - String count_streams(Object count) { - return '$count reproduccions'; - } - - @override - String get owned_by_you => 'De la teva propietat'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'S\'ha copiat $shareUrl al porta-retalls'; - } - - @override - String get hipotetical_calculation => - '*Això està calculat en funció d’un pagament mitjà per reproducció de 0,003–0,005 USD en plataformes de reproducció musical en línia. És un càlcul hipotètic per ajudar l’usuari a entendre quant hauria pagat als artistes si hagués escoltat la seva cançó en diferents plataformes.'; - - @override - String count_mins(Object minutes) { - return '$minutes minuts'; - } - - @override - String get summary_minutes => 'minuts'; - - @override - String get summary_listened_to_music => 'has escoltat música'; - - @override - String get summary_songs => 'cançons'; - - @override - String get summary_streamed_overall => 'reproduït en general'; - - @override - String get summary_owed_to_artists => 'degut als artistes\nAquest mes'; - - @override - String get summary_artists => 'artistes'; - - @override - String get summary_music_reached_you => 'La música t\'ha arribat'; - - @override - String get summary_full_albums => 'Àlbums complets'; - - @override - String get summary_got_your_love => 'ha aconseguit el teu amor'; - - @override - String get summary_playlists => 'llistes de reproducció'; - - @override - String get summary_were_on_repeat => 'estaven en repetició'; - - @override - String total_money(Object money) { - return 'total $money'; - } - - @override - String get webview_not_found => 'No s\'ha trobat el Webview'; - - @override - String get webview_not_found_description => - 'No hi ha cap temps d\'execució de Webview instal·lat al dispositiu.\nSi està instal·lat, assegureu-vos que estigui en el environment PATH\n\nDesprés d\'instal·lar-lo, reinicieu l\'aplicació'; - - @override - String get unsupported_platform => 'Plataforma no compatible'; - - @override - String get cache_music => 'Música en caché'; - - @override - String get open => 'Obrir'; - - @override - String get cache_folder => 'Carpeta de caché'; - - @override - String get export => 'Exportar'; - - @override - String get clear_cache => 'Netejar caché'; - - @override - String get clear_cache_confirmation => 'Voleu netejar la memòria cau?'; - - @override - String get export_cache_files => 'Exportar arxius en caché'; - - @override - String found_n_files(Object count) { - return 'S\'han trobat $count arxius'; - } - - @override - String get export_cache_confirmation => 'Voleu exportar aquests arxius a'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'S\'han exportat $filesExported de $files arxius'; - } - - @override - String get undo => 'Desfer'; - - @override - String get download_all => 'Descarregar tot'; - - @override - String get add_all_to_playlist => 'Afegir tot a la llista de reproducció'; - - @override - String get add_all_to_queue => 'Afegir tot a la cua'; - - @override - String get play_all_next => 'Reproduir tot a continuació'; - - @override - String get pause => 'Pausa'; - - @override - String get view_all => 'Veure tot'; - - @override - String get no_tracks_added_yet => 'Sembla que encara no has afegit cap pista'; - - @override - String get no_tracks => 'Sembla que no hi ha pistes aquí'; - - @override - String get no_tracks_listened_yet => 'Sembla que no has escoltat res encara'; - - @override - String get not_following_artists => 'No estàs seguint cap artista'; - - @override - String get no_favorite_albums_yet => - 'Sembla que encara no has afegit cap àlbum als teus favorits'; - - @override - String get no_logs_found => 'No s\'han trobat registres'; - - @override - String get youtube_engine => 'Motor de YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine no està instal·lat'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine no està instal·lat al teu sistema.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Assegura\'t que estigui disponible a la variable PATH o\nestableix el camí absolut a l\'executable de $engine a continuació'; - } - - @override - String get youtube_engine_unix_issue_message => - 'En macOS/Linux/Unix com a sistemes operatius, establir el camí a .zshrc/.bashrc/.bash_profile etc. no funcionarà.\nHas de configurar el camí al fitxer de configuració de la shell'; - - @override - String get download => 'Descarregar'; - - @override - String get file_not_found => 'Fitxer no trobat'; - - @override - String get custom => 'Personalitzat'; - - @override - String get add_custom_url => 'Afegir URL personalitzada'; - - @override - String get edit_port => 'Editar port'; - - @override - String get port_helper_msg => - 'El valor per defecte és -1, que indica un número aleatori. Si teniu un tallafoc configurat, es recomana establir-ho.'; - - @override - String connect_request(Object client) { - return 'Permetre que $client es connecti?'; - } - - @override - String get connection_request_denied => - 'Connexió denegada. L\'usuari ha denegat l\'accés.'; - - @override - String get an_error_occurred => 'S’ha produït un error'; - - @override - String get copy_to_clipboard => 'Copiar al porta-retalls'; - - @override - String get view_logs => 'Veure registres'; - - @override - String get retry => 'Tornar-ho a provar'; - - @override - String get no_default_metadata_provider_selected => - 'No has configurat cap proveïdor de metadades predeterminat'; - - @override - String get manage_metadata_providers => 'Gestionar proveïdors de metadades'; - - @override - String get open_link_in_browser => 'Obrir l’enllaç en el navegador?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Vols obrir l’enllaç següent?'; - - @override - String get unsafe_url_warning => - 'Pot ser perillós obrir enllaços de fonts no fiables. Sigues precavís!\nTambé pots copiar l’enllaç al porta-retalls.'; - - @override - String get copy_link => 'Copiar enllaç'; - - @override - String get building_your_timeline => - 'Construint la teva cronologia en funció de les teves escoltes...'; - - @override - String get official => 'Oficial'; - - @override - String author_name(Object author) { - return 'Autor: $author'; - } - - @override - String get third_party => 'Tercers'; - - @override - String get plugin_requires_authentication => - 'El complement requereix autenticació'; - - @override - String get update_available => 'Actualització disponible'; - - @override - String get supports_scrobbling => 'Admet scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Aquest complement fa scrobbling de la teva música per generar l’historial d’escoltes.'; - - @override - String get default_metadata_source => 'Font de metadades per defecte'; - - @override - String get set_default_metadata_source => - 'Estableix la font de metadades per defecte'; - - @override - String get default_audio_source => 'Font d\'àudio per defecte'; - - @override - String get set_default_audio_source => - 'Estableix la font d\'àudio per defecte'; - - @override - String get set_default => 'Establir com a predeterminat'; - - @override - String get support => 'Suport'; - - @override - String get support_plugin_development => - 'Suportar el desenvolupament del complement'; - - @override - String can_access_name_api(Object name) { - return '- Pot accedir a l’API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Vols instal·lar aquest complement?'; - - @override - String get third_party_plugin_warning => - 'Aquest complement prové d’un repositori de tercers. Assegura’t de confiar en la font abans d’instal·lar-lo.'; - - @override - String get author => 'Autor'; - - @override - String get this_plugin_can_do_following => - 'Aquest complement pot fer el següent'; - - @override - String get install => 'Instal·lar'; - - @override - String get install_a_metadata_provider => - 'Instal·lar un proveïdor de metadades'; - - @override - String get no_tracks_playing => 'No s’està reproduint cap pista actualment'; - - @override - String get synced_lyrics_not_available => - 'Les lletres sincronitzades no estan disponibles per a aquesta cançó. Si us plau, usa'; - - @override - String get plain_lyrics => 'Lletres sense format'; - - @override - String get tab_instead => 'en lloc d’això, utilitza la tecla Tab.'; - - @override - String get disclaimer => 'Avís legal'; - - @override - String get third_party_plugin_dmca_notice => - 'L’equip de Spotube no accepta cap responsabilitat (inclosa legal) pels complements de “tercers”.\nFes-los servir sota la teva responsabilitat. Si detectes errors/problemes, informa’ls al repositori del complement.\n\nSi algun complement de “tercers” incompleix els ToS/DMCA d’un servei o entitat legal, contacta amb l’autor del complement o amb la plataforma d’allotjament (per exemple GitHub/Codeberg) per prendre mesures. Els complements etiquetats com a “tercers” són públics i gestionats per la comunitat; no els curatem, per la qual cosa no podem intervenir-hi.\n\n'; - - @override - String get input_does_not_match_format => - 'L’entrada no coincideix amb el format requerit'; - - @override - String get plugins => 'Connectors'; - - @override - String get paste_plugin_download_url => - 'Enllaça l’URL de descàrrega o el repositori de GitHub/Codeberg o l’enllaç directe al fitxer .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Descarrega i instal·la el complement des d’un URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Error en afegir el complement: $error'; - } - - @override - String get upload_plugin_from_file => 'Penja el complement des d’un fitxer'; - - @override - String get installed => 'Instal·lat'; - - @override - String get available_plugins => 'Complements disponibles'; - - @override - String get configure_plugins => - 'Configura els teus propis connectors de proveïdor de metadades i de font d\'àudio'; - - @override - String get audio_scrobblers => 'Scrobblers d’àudio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Font: '; - - @override - String get uncompressed => 'Sense comprimir'; - - @override - String get dab_music_source_description => - 'Per als audiòfils. Ofereix fluxos d\'àudio d\'alta qualitat/sense pèrdua. Coincidència precisa de pistes basada en ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_cs.dart b/lib/l10n/generated/app_localizations_cs.dart deleted file mode 100644 index 24d5b34b..00000000 --- a/lib/l10n/generated/app_localizations_cs.dart +++ /dev/null @@ -1,1566 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Czech (`cs`). -class AppLocalizationsCs extends AppLocalizations { - AppLocalizationsCs([String locale = 'cs']) : super(locale); - - @override - String get guest => 'Host'; - - @override - String get browse => 'Procházet'; - - @override - String get search => 'Hledat'; - - @override - String get library => 'Knihovna'; - - @override - String get lyrics => 'Texty'; - - @override - String get settings => 'Nastavení'; - - @override - String get genre_categories_filter => 'Filtrovat kategorie nebo žánry...'; - - @override - String get genre => 'Žánr'; - - @override - String get personalized => 'Personalizované'; - - @override - String get featured => 'Doporučené'; - - @override - String get new_releases => 'Nově vydané'; - - @override - String get songs => 'Skladby'; - - @override - String playing_track(Object track) { - return 'Hraje $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Toto vymaže aktuální frontu. $track_length skladeb bude odstraněno\nChcete pokračovat?'; - } - - @override - String get load_more => 'Načíst více'; - - @override - String get playlists => 'Playlisty'; - - @override - String get artists => 'Umělci'; - - @override - String get albums => 'Alba'; - - @override - String get tracks => 'Skladby'; - - @override - String get downloads => 'Stahování'; - - @override - String get filter_playlists => 'Filtrovat playlisty...'; - - @override - String get liked_tracks => 'Oblíbené skladby'; - - @override - String get liked_tracks_description => 'Všechny vaše oblíbené skladby'; - - @override - String get playlist => 'Seznam skladeb'; - - @override - String get create_a_playlist => 'Vytvořit playlist'; - - @override - String get update_playlist => 'Aktualizovat playlist'; - - @override - String get create => 'Vytvořit'; - - @override - String get cancel => 'Zrušit'; - - @override - String get update => 'Aktualizovat'; - - @override - String get playlist_name => 'Název playlistu'; - - @override - String get name_of_playlist => 'Název playlistu'; - - @override - String get description => 'Popis'; - - @override - String get public => 'Veřejné'; - - @override - String get collaborative => 'Společný'; - - @override - String get search_local_tracks => 'Hledat místní skladby...'; - - @override - String get play => 'Přehrát'; - - @override - String get delete => 'Smazat'; - - @override - String get none => 'Žádné'; - - @override - String get sort_a_z => 'Seřadit od A-Z'; - - @override - String get sort_z_a => 'Seřadit od Z-A'; - - @override - String get sort_artist => 'Seřadit podle umělce'; - - @override - String get sort_album => 'Seřadit podle alba'; - - @override - String get sort_duration => 'Seřadit podle délky'; - - @override - String get sort_tracks => 'Seřadit skladby'; - - @override - String currently_downloading(Object tracks_length) { - return 'Právě se stahuje ($tracks_length)'; - } - - @override - String get cancel_all => 'Zrušit vše'; - - @override - String get filter_artist => 'Filtrovat umělce...'; - - @override - String followers(Object followers) { - return '$followers Sledující'; - } - - @override - String get add_artist_to_blacklist => 'Přidat umělce na černou listinu'; - - @override - String get top_tracks => 'Top skladby'; - - @override - String get fans_also_like => 'Fanoušci mají také rádi'; - - @override - String get loading => 'Načítání...'; - - @override - String get artist => 'Umělec'; - - @override - String get blacklisted => 'Na černé listině'; - - @override - String get following => 'Sleduje'; - - @override - String get follow => 'Sledovat'; - - @override - String get artist_url_copied => 'URL umělce zkopírována do schránky'; - - @override - String added_to_queue(Object tracks) { - return 'Přidáno $tracks skladeb do fronty'; - } - - @override - String get filter_albums => 'Filtrovat alba...'; - - @override - String get synced => 'Synchronizováno'; - - @override - String get plain => 'Jednoduché'; - - @override - String get shuffle => 'Zamíchat'; - - @override - String get search_tracks => 'Hledat skladby...'; - - @override - String get released => 'Vydáno'; - - @override - String error(Object error) { - return 'Chyba $error'; - } - - @override - String get title => 'Název'; - - @override - String get time => 'Čas'; - - @override - String get more_actions => 'Více akcí'; - - @override - String download_count(Object count) { - return 'Stáhnout ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Přidat ($count) do playlistu'; - } - - @override - String add_count_to_queue(Object count) { - return 'Přidat ($count) do fronty'; - } - - @override - String play_count_next(Object count) { - return 'Přehrát ($count) dalších'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return 'Zkopírováno $data do schránky'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Přidat $track do následujících playlistů'; - } - - @override - String get add => 'Přidat'; - - @override - String added_track_to_queue(Object track) { - return 'Přidána skladba $track do fronty'; - } - - @override - String get add_to_queue => 'Přidat do fronty'; - - @override - String track_will_play_next(Object track) { - return '$track se přehraje jako další'; - } - - @override - String get play_next => 'Přehrát další'; - - @override - String removed_track_from_queue(Object track) { - return 'Odstraněna skladba $track z fronty'; - } - - @override - String get remove_from_queue => 'Odstranit z fronty'; - - @override - String get remove_from_favorites => 'Odstranit z oblíbených'; - - @override - String get save_as_favorite => 'Uložit jako oblíbené'; - - @override - String get add_to_playlist => 'Přidat do playlistu'; - - @override - String get remove_from_playlist => 'Odstranit z playlistu'; - - @override - String get add_to_blacklist => 'Přidat na černou listinu'; - - @override - String get remove_from_blacklist => 'Odstranit z černé listiny'; - - @override - String get share => 'Sdílet'; - - @override - String get mini_player => 'Mini přehrávač'; - - @override - String get slide_to_seek => 'Táhněte pro posunutí vpřed nebo vzad'; - - @override - String get shuffle_playlist => 'Zamíchat playlist'; - - @override - String get unshuffle_playlist => 'Zrušit zamíchání playlistu'; - - @override - String get previous_track => 'Předchozí skladba'; - - @override - String get next_track => 'Další skladba'; - - @override - String get pause_playback => 'Pozastavit přehrávání'; - - @override - String get resume_playback => 'Pokračovat v přehrávání'; - - @override - String get loop_track => 'Opakovat skladbu'; - - @override - String get no_loop => 'Žádné opakování'; - - @override - String get repeat_playlist => 'Opakovat playlist'; - - @override - String get queue => 'Fronta'; - - @override - String get alternative_track_sources => 'Alternativní zdroje skladeb'; - - @override - String get download_track => 'Stáhnout skladbu'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks skladeb ve frontě'; - } - - @override - String get clear_all => 'Vymazat vše'; - - @override - String get show_hide_ui_on_hover => 'Zobrazit/Skrýt UI při najetí'; - - @override - String get always_on_top => 'Vždy nahoře'; - - @override - String get exit_mini_player => 'Zavřít mini přehrávač'; - - @override - String get download_location => 'Umístění stahování'; - - @override - String get local_library => 'Místní knihovna'; - - @override - String get add_library_location => 'Přidat do knihovny'; - - @override - String get remove_library_location => 'Odebrat z knihovny'; - - @override - String get account => 'Účet'; - - @override - String get logout => 'Odhlásit se'; - - @override - String get logout_of_this_account => 'Odhlásit se z tohoto účtu'; - - @override - String get language_region => 'Jazyk a region'; - - @override - String get language => 'Jazyk'; - - @override - String get system_default => 'Systém'; - - @override - String get market_place_region => 'Region'; - - @override - String get recommendation_country => 'Země pro doporučení'; - - @override - String get appearance => 'Vzhled'; - - @override - String get layout_mode => 'Režim rozložení'; - - @override - String get override_layout_settings => 'Přepsat režim rozložení'; - - @override - String get adaptive => 'Adaptivní'; - - @override - String get compact => 'Kompaktní'; - - @override - String get extended => 'Rozšířený'; - - @override - String get theme => 'Téma'; - - @override - String get dark => 'Tmavé'; - - @override - String get light => 'Světlé'; - - @override - String get system => 'Systém'; - - @override - String get accent_color => 'Barva akcentu'; - - @override - String get sync_album_color => 'Synchronizovat barvu alba'; - - @override - String get sync_album_color_description => - 'Používá dominantní barvu obalu alba jako barvu akcentu'; - - @override - String get playback => 'Přehrávání'; - - @override - String get audio_quality => 'Kvalita zvuku'; - - @override - String get high => 'Vysoká'; - - @override - String get low => 'Nízká'; - - @override - String get pre_download_play => 'Předstáhnout a přehrát'; - - @override - String get pre_download_play_description => - 'Místo streamování audia stáhnout skladbu a přehrát (doporučeno pro uživatele s rychlejším internetem)'; - - @override - String get skip_non_music => 'Přeskočit nehudební segmenty (SponsorBlock)'; - - @override - String get blacklist_description => 'Zakázané skladby a umělci'; - - @override - String get wait_for_download_to_finish => 'Počkejte, až se dokončí stahování'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Chování při zavření'; - - @override - String get close => 'Zavřít'; - - @override - String get minimize_to_tray => 'Minimalizovat do lišty'; - - @override - String get show_tray_icon => 'Zobrazit ikonu v systémové liště'; - - @override - String get about => 'O aplikaci'; - - @override - String get u_love_spotube => 'Víme, že milujete Spotube'; - - @override - String get check_for_updates => 'Zkontrolovat aktualizace'; - - @override - String get about_spotube => 'O Spotube'; - - @override - String get blacklist => 'Černá listina'; - - @override - String get please_sponsor => 'Sponzorovat/darovat'; - - @override - String get spotube_description => - 'Spotube, rychlý, multiplatformní, bezplatný Spotify klient'; - - @override - String get version => 'Verze'; - - @override - String get build_number => 'Číslo sestavení'; - - @override - String get founder => 'Zakladatel'; - - @override - String get repository => 'Repozitář'; - - @override - String get bug_issues => 'Chyby+Problémy'; - - @override - String get made_with => 'Vytvořeno s ❤️ v Bangladéši🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licence'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Nebojte, žádné z vašich údajů nebudou shromažďovány ani s nikým sdíleny'; - - @override - String get know_how_to_login => 'Nevíte, jak na to?'; - - @override - String get follow_step_by_step_guide => 'Postupujte podle návodu'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Vyplňte prosím všechna pole'; - - @override - String get submit => 'Odeslat'; - - @override - String get exit => 'Ukončit'; - - @override - String get previous => 'Předchozí'; - - @override - String get next => 'Další'; - - @override - String get done => 'Hotovo'; - - @override - String get step_1 => 'Krok 1'; - - @override - String get first_go_to => 'Nejprve jděte na'; - - @override - String get something_went_wrong => 'Něco se pokazilo'; - - @override - String get piped_instance => 'Instance serveru Piped'; - - @override - String get piped_description => - 'Instance serveru Piped, kterou použít pro hledání skladeb'; - - @override - String get piped_warning => - 'Některé z nich nemusí dobře fungovat. Používejte na vlastní riziko'; - - @override - String get invidious_instance => 'Instance serveru Invidious'; - - @override - String get invidious_description => - 'Instance serveru Invidious pro párování stop'; - - @override - String get invidious_warning => - 'Některé instance nemusí fungovat správně. Používejte na vlastní riziko'; - - @override - String get generate => 'Generovat'; - - @override - String track_exists(Object track) { - return 'Skladba $track již existuje'; - } - - @override - String get replace_downloaded_tracks => 'Nahradit všechny stažené skladby'; - - @override - String get skip_download_tracks => - 'Přeskočit stahování všech stažených skladeb'; - - @override - String get do_you_want_to_replace => 'Chcete nahradit existující skladbu??'; - - @override - String get replace => 'Nahradit'; - - @override - String get skip => 'Přeskočit'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Vyberte až $count $type'; - } - - @override - String get select_genres => 'Vyberte žánry'; - - @override - String get add_genres => 'Přidat žánry'; - - @override - String get country => 'Země'; - - @override - String get number_of_tracks_generate => 'Počet skladeb k vygenerování'; - - @override - String get acousticness => 'Akustičnost'; - - @override - String get danceability => 'Tanečnost'; - - @override - String get energy => 'Energie'; - - @override - String get instrumentalness => 'Instrumentálnost'; - - @override - String get liveness => 'Živost'; - - @override - String get loudness => 'Hlasitost'; - - @override - String get speechiness => 'Mluvnost'; - - @override - String get valence => 'Valence'; - - @override - String get popularity => 'Popularita'; - - @override - String get key => 'Klíč'; - - @override - String get duration => 'Délka (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Režim'; - - @override - String get time_signature => 'Udání taktu'; - - @override - String get short => 'Krátký'; - - @override - String get medium => 'Střední'; - - @override - String get long => 'Dlouhý'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Cíl'; - - @override - String get moderate => 'Mírný'; - - @override - String get deselect_all => 'Zrušit výběr'; - - @override - String get select_all => 'Vybrat vše'; - - @override - String get are_you_sure => 'Jste si jisti?'; - - @override - String get generating_playlist => 'Generování vašeho vlastního playlistu...'; - - @override - String selected_count_tracks(Object count) { - return 'Vybráno $count skladeb'; - } - - @override - String get download_warning => - 'Pokud stáhnete všechny skladby najednou, pirátíte tím hudbu a škodíte kreativní společnosti hudby. Doufám, že jste si toho vědomi. Vždy se snažte respektovat a podporovat tvrdou práci umělců'; - - @override - String get download_ip_ban_warning => - 'Mimochodem, vaše IP může být na YouTube zablokována kvůli nadměrným požadavkům na stahování. Blokování IP znamená, že nemůžete používat YouTube (i když jste přihlášeni) alespoň 2-3 měsíce ze zařízení s touto IP. A Spotube nenese žádnou odpovědnost, pokud se to někdy stane'; - - @override - String get by_clicking_accept_terms => - 'Kliknutím na \'přijmout\' souhlasíte s následujícími podmínkami:'; - - @override - String get download_agreement_1 => 'Vím, že pirátím hudbu. Jsem špatný'; - - @override - String get download_agreement_2 => - 'Budu podporovat umělce, kdekoliv to bude možné, a dělám to jen proto, že nemám peníze na koupi jejich umění'; - - @override - String get download_agreement_3 => - 'Jsem si naprosto vědom toho, že moje IP může být na YouTube zablokována a nenesu žádnou odpovědnost za nehody způsobené mým současným jednáním'; - - @override - String get decline => 'Odmítnout'; - - @override - String get accept => 'Přijmout'; - - @override - String get details => 'Podrobnosti'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanál'; - - @override - String get likes => 'Líbí se'; - - @override - String get dislikes => 'Nelíbí se'; - - @override - String get views => 'Zobrazení'; - - @override - String get streamUrl => 'URL streamu'; - - @override - String get stop => 'Zastavit'; - - @override - String get sort_newest => 'Seřadit od nejnovějších'; - - @override - String get sort_oldest => 'Seřadit od nejstarších'; - - @override - String get sleep_timer => 'Časovač spánku'; - - @override - String mins(Object minutes) { - return '$minutes Minut'; - } - - @override - String hours(Object hours) { - return '$hours Hodin'; - } - - @override - String hour(Object hours) { - return '$hours Hodina'; - } - - @override - String get custom_hours => 'Vlastní hodiny'; - - @override - String get logs => 'Protokoly'; - - @override - String get developers => 'Vývojáři'; - - @override - String get not_logged_in => 'Nejste přihlášeni'; - - @override - String get search_mode => 'Režim hledání'; - - @override - String get audio_source => 'Zdroj zvuku'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Šifrování selhalo'; - - @override - String get encryption_failed_warning => - 'Spotube používá šifrování k bezpečnému ukládání vašich dat. Ale selhalo. Takže se vrátí k nezabezpečenému úložišti\nPokud používáte linux, ujistěte se, že máte nainstalovanou jakoukoli službu k ukládání bezpečnostních pověření (gnome-keyring, kde-wallet, keepassxc atd.)'; - - @override - String get querying_info => 'Získávání informací...'; - - @override - String get piped_api_down => 'Piped API je mimo provoz'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Instance Piped $pipedInstance je momentálně mimo provoz\n\nBuď změňte instanci nebo změňte \'Typ API\' na oficiální YouTube API\n\nPo změně se ujistěte, že aplikaci restartujete'; - } - - @override - String get you_are_offline => 'Momentálně jste offline'; - - @override - String get connection_restored => 'Vaše internetové připojení bylo obnoveno'; - - @override - String get use_system_title_bar => 'Použít systémové záhlaví okna'; - - @override - String get crunching_results => 'Zpracovávání výsledků...'; - - @override - String get search_to_get_results => 'Hledejte pro získání výsledků'; - - @override - String get use_amoled_mode => 'Úplně černé téma'; - - @override - String get pitch_dark_theme => 'AMOLED režim'; - - @override - String get normalize_audio => 'Normalizovat audio'; - - @override - String get change_cover => 'Změnit obal'; - - @override - String get add_cover => 'Přidat obal'; - - @override - String get restore_defaults => 'Obnovit výchozí'; - - @override - String get download_music_format => 'Formát stahování hudby'; - - @override - String get streaming_music_format => 'Formát streamování hudby'; - - @override - String get download_music_quality => 'Kvalita stahování hudby'; - - @override - String get streaming_music_quality => 'Kvalita streamování hudby'; - - @override - String get login_with_lastfm => 'Přihlásit se pomocí Last.fm'; - - @override - String get connect => 'Připojit'; - - @override - String get disconnect_lastfm => 'Odpojit Last.fm'; - - @override - String get disconnect => 'Odpojit'; - - @override - String get username => 'Uživatelské jméno'; - - @override - String get password => 'Heslo'; - - @override - String get login => 'Přihlásit se'; - - @override - String get login_with_your_lastfm => - 'Přihlásit se pomocí vašeho Last.fm účtu'; - - @override - String get scrobble_to_lastfm => 'Scrobble na Last.fm'; - - @override - String get go_to_album => 'Přejít na album'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'Procházet vše'; - - @override - String get genres => 'Žánry'; - - @override - String get explore_genres => 'Prozkoumat žánry'; - - @override - String get friends => 'Přátelé'; - - @override - String get no_lyrics_available => - 'Omlouváme se, není možné najít texty pro tuto skladbu'; - - @override - String get start_a_radio => 'Vytvořit rádio'; - - @override - String get how_to_start_radio => 'Jak chcete vytvořit rádio?'; - - @override - String get replace_queue_question => - 'Chcete nahradit aktuální frontu nebo k ní přidat?'; - - @override - String get endless_playback => 'Nekonečné přehrávání'; - - @override - String get delete_playlist => 'Smazat playlist'; - - @override - String get delete_playlist_confirmation => - 'Jste si jisti, že chcete smazat tento playlist?'; - - @override - String get local_tracks => 'Místní skladby'; - - @override - String get local_tab => 'Místní'; - - @override - String get song_link => 'Odkaz na skladbu'; - - @override - String get skip_this_nonsense => 'Přeskočit tenhle nesmysl'; - - @override - String get freedom_of_music => '“Svobodná hudba”'; - - @override - String get freedom_of_music_palm => '“Svobodná hudba ve vaší dlani”'; - - @override - String get get_started => 'Začít'; - - @override - String get youtube_source_description => 'Doporučeno a funguje nejlépe.'; - - @override - String get piped_source_description => - 'Nechcete být sledováni? Stejné jako YouTube, ale respektuje soukromí.'; - - @override - String get jiosaavn_source_description => 'Nejlepší pro jihoasijský region.'; - - @override - String get invidious_source_description => - 'Podobné Piped, ale s vyšší dostupností'; - - @override - String highest_quality(Object quality) { - return 'Nejvyšší kvalita: $quality'; - } - - @override - String get select_audio_source => 'Vyberte zdroj zvuku'; - - @override - String get endless_playback_description => - 'Automaticky přidávat nové skladby\nna konec fronty'; - - @override - String get choose_your_region => 'Vyberte svůj region'; - - @override - String get choose_your_region_description => - 'To pomůže Spotube ukázat vám správný obsah\npro vaši lokalitu.'; - - @override - String get choose_your_language => 'Vyberte svůj jazyk'; - - @override - String get help_project_grow => 'Pomozte tomuto projektu růst'; - - @override - String get help_project_grow_description => - 'Spotube je open-source projekt. Můžete pomoci tomuto projektu růst tím, že přispějete do projektu, nahlásíte chyby nebo navrhnete nové funkce.'; - - @override - String get contribute_on_github => 'Přispějte na GitHub'; - - @override - String get donate_on_open_collective => 'Darujte na Open Collective'; - - @override - String get browse_anonymously => 'Procházet anonymně'; - - @override - String get enable_connect => 'Povolit ovládání'; - - @override - String get enable_connect_description => - 'Ovládejte Spotube z jiného zařízení'; - - @override - String get devices => 'Zařízení'; - - @override - String get select => 'Vybrat'; - - @override - String connect_client_alert(Object client) { - return 'Zařízení je ovládáno z $client'; - } - - @override - String get this_device => 'Toto zařízení'; - - @override - String get remote => 'Ovladač'; - - @override - String get stats => 'Statistiky'; - - @override - String and_n_more(Object count) { - return 'a dalších $count'; - } - - @override - String get recently_played => 'Nedávno přehráno'; - - @override - String get browse_more => 'Procházet více'; - - @override - String get no_title => 'Bez názvu'; - - @override - String get not_playing => 'Nepřehrává se'; - - @override - String get epic_failure => 'Epické selhání!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Přidáno $tracks_length skladeb do fronty'; - } - - @override - String get spotube_has_an_update => 'Spotube má aktualizaci'; - - @override - String get download_now => 'Stáhnout nyní'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Byla vydána noční verze Spotube $nightlyBuildNum'; - } - - @override - String release_version(Object version) { - return 'Byla vydána verze Spotube v$version'; - } - - @override - String get read_the_latest => 'Přečtěte si nejnovější '; - - @override - String get release_notes => 'poznámky k vydání'; - - @override - String get pick_color_scheme => 'Vyberte barevné schéma'; - - @override - String get save => 'Uložit'; - - @override - String get choose_the_device => 'Vyberte zařízení:'; - - @override - String get multiple_device_connected => - 'Je připojeno více zařízení.\nVyberte zařízení, na kterém chcete provést tuto akci'; - - @override - String get nothing_found => 'Nic nenalezeno'; - - @override - String get the_box_is_empty => 'Krabice je prázdná'; - - @override - String get top_artists => 'Nejlepší umělci'; - - @override - String get top_albums => 'Nejlepší alba'; - - @override - String get this_week => 'Tento týden'; - - @override - String get this_month => 'Tento měsíc'; - - @override - String get last_6_months => 'Posledních 6 měsíců'; - - @override - String get this_year => 'Tento rok'; - - @override - String get last_2_years => 'Poslední 2 roky'; - - @override - String get all_time => 'Všechny časy'; - - @override - String powered_by_provider(Object providerName) { - return 'Pohání $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Sledující'; - - @override - String get birthday => 'Narozeniny'; - - @override - String get subscription => 'Předplatné'; - - @override - String get not_born => 'Nenarozen'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profil'; - - @override - String get no_name => 'Bez jména'; - - @override - String get edit => 'Upravit'; - - @override - String get user_profile => 'Uživatelský profil'; - - @override - String count_plays(Object count) { - return '$count přehrání'; - } - - @override - String get streaming_fees_hypothetical => - 'Poplatky za streamování (hypotetické)'; - - @override - String get minutes_listened => 'Poslouchané minuty'; - - @override - String get streamed_songs => 'Streamované skladby'; - - @override - String count_streams(Object count) { - return '$count streamů'; - } - - @override - String get owned_by_you => 'Vlastněno vámi'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'Zkopírováno $shareUrl do schránky'; - } - - @override - String get hipotetical_calculation => - '*Toto je vypočítáno na základě průměrného výplatu za přehrání 0,003–0,005 USD na online hudebních streamovacích platformách. Jedná se o hypotetický výpočet, který má uživateli ukázat, kolik by umělci dostali, pokud by jeho píseň poslouchal na jiné platformě.'; - - @override - String count_mins(Object minutes) { - return '$minutes minut'; - } - - @override - String get summary_minutes => 'minuty'; - - @override - String get summary_listened_to_music => 'Poslouchal(a) hudbu'; - - @override - String get summary_songs => 'písně'; - - @override - String get summary_streamed_overall => 'Streamováno celkově'; - - @override - String get summary_owed_to_artists => 'Dluženo umělcům\nTento měsíc'; - - @override - String get summary_artists => 'umělců'; - - @override - String get summary_music_reached_you => 'Hudba vás oslovila'; - - @override - String get summary_full_albums => 'plná alba'; - - @override - String get summary_got_your_love => 'Získal vaši lásku'; - - @override - String get summary_playlists => 'playlisty'; - - @override - String get summary_were_on_repeat => 'Byly na opakování'; - - @override - String total_money(Object money) { - return 'Celkem $money'; - } - - @override - String get webview_not_found => 'Webview nebyl nalezen'; - - @override - String get webview_not_found_description => - 'Na vašem zařízení není nainstalováno žádné runtime prostředí Webview.\nPokud je nainstalováno, ujistěte se, že je v environment PATH\n\nPo instalaci restartujte aplikaci'; - - @override - String get unsupported_platform => 'Nepodporovaná platforma'; - - @override - String get cache_music => 'Hudba v mezipaměti'; - - @override - String get open => 'Otevřít'; - - @override - String get cache_folder => 'Složka mezipaměti'; - - @override - String get export => 'Exportovat'; - - @override - String get clear_cache => 'Vymazat mezipaměť'; - - @override - String get clear_cache_confirmation => 'Opravdu chcete vymazat mezipaměť?'; - - @override - String get export_cache_files => 'Exportovat soubory z mezipaměti'; - - @override - String found_n_files(Object count) { - return 'Nalezeno $count souborů'; - } - - @override - String get export_cache_confirmation => 'Chcete exportovat tyto soubory do'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Exportováno $filesExported z $files souborů'; - } - - @override - String get undo => 'Zpět'; - - @override - String get download_all => 'Stáhnout vše'; - - @override - String get add_all_to_playlist => 'Přidat vše do seznamu skladeb'; - - @override - String get add_all_to_queue => 'Přidat vše do fronty'; - - @override - String get play_all_next => 'Přehrát vše následně'; - - @override - String get pause => 'Pauza'; - - @override - String get view_all => 'Zobrazit vše'; - - @override - String get no_tracks_added_yet => - 'Zdá se, že jste ještě nepřidali žádné skladby'; - - @override - String get no_tracks => 'Zdá se, že zde nejsou žádné skladby'; - - @override - String get no_tracks_listened_yet => - 'Zdá se, že jste ještě nic neposlouchali'; - - @override - String get not_following_artists => 'Nezajímáte se o žádné umělce'; - - @override - String get no_favorite_albums_yet => - 'Zdá se, že jste ještě nepřidali žádné alba mezi oblíbené'; - - @override - String get no_logs_found => 'Žádné záznamy nenalezeny'; - - @override - String get youtube_engine => 'YouTube Engine'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine není nainstalován'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine není nainstalován ve vašem systému.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Ujistěte se, že je k dispozici v proměnné PATH nebo\nnastavte absolutní cestu k $engine spustitelnému souboru níže'; - } - - @override - String get youtube_engine_unix_issue_message => - 'V macOS/Linux/Unixových systémech nebude fungovat nastavení cesty v .zshrc/.bashrc/.bash_profile atd.\nMusíte nastavit cestu v konfiguračním souboru shellu'; - - @override - String get download => 'Stáhnout'; - - @override - String get file_not_found => 'Soubor nenalezen'; - - @override - String get custom => 'Vlastní'; - - @override - String get add_custom_url => 'Přidat vlastní URL'; - - @override - String get edit_port => 'Upravit port'; - - @override - String get port_helper_msg => - 'Výchozí hodnota je -1, což znamená náhodné číslo. Pokud máte nakonfigurován firewall, doporučuje se to nastavit.'; - - @override - String connect_request(Object client) { - return 'Povolit $client připojení?'; - } - - @override - String get connection_request_denied => - 'Připojení bylo zamítnuto. Uživatel odmítl přístup.'; - - @override - String get an_error_occurred => 'Došlo k chybě'; - - @override - String get copy_to_clipboard => 'Kopírovat do schránky'; - - @override - String get view_logs => 'Zobrazit protokoly'; - - @override - String get retry => 'Zkusit znovu'; - - @override - String get no_default_metadata_provider_selected => - 'Nemáte nastaven výchozí poskytovatel metadat'; - - @override - String get manage_metadata_providers => 'Spravovat poskytovatele metadat'; - - @override - String get open_link_in_browser => 'Otevřít odkaz v prohlížeči?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Chcete otevřít následující odkaz?'; - - @override - String get unsafe_url_warning => - 'Odkazy z nedůvěryhodných zdrojů mohou být nebezpečné. Buďte opatrní!\nOdkaz si také můžete zkopírovat do schránky.'; - - @override - String get copy_link => 'Zkopírovat odkaz'; - - @override - String get building_your_timeline => - 'Vytváří se váš časový přehled podle poslechů...'; - - @override - String get official => 'Oficiální'; - - @override - String author_name(Object author) { - return 'Autor: $author'; - } - - @override - String get third_party => 'Třetí strana'; - - @override - String get plugin_requires_authentication => 'Plugin vyžaduje ověření'; - - @override - String get update_available => 'Aktualizace dostupná'; - - @override - String get supports_scrobbling => 'Podpora scrobblování'; - - @override - String get plugin_scrobbling_info => - 'Tento plugin scrobbles vaši hudbu pro vytvoření historie poslechů.'; - - @override - String get default_metadata_source => 'Výchozí zdroj metadat'; - - @override - String get set_default_metadata_source => 'Nastavit výchozí zdroj metadat'; - - @override - String get default_audio_source => 'Výchozí zdroj zvuku'; - - @override - String get set_default_audio_source => 'Nastavit výchozí zdroj zvuku'; - - @override - String get set_default => 'Nastavit jako výchozí'; - - @override - String get support => 'Podpora'; - - @override - String get support_plugin_development => 'Podpořit vývoj pluginu'; - - @override - String can_access_name_api(Object name) { - return '- Může přistupovat k API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Chcete tento plugin nainstalovat?'; - - @override - String get third_party_plugin_warning => - 'Tento plugin pochází z repozitáře třetí strany. Ujistěte se, že důvěřujete zdroji, než ho nainstalujete.'; - - @override - String get author => 'Autor'; - - @override - String get this_plugin_can_do_following => - 'Tento plugin může provádět následující úkony'; - - @override - String get install => 'Instalovat'; - - @override - String get install_a_metadata_provider => - 'Nainstalovat poskytovatele metadat'; - - @override - String get no_tracks_playing => 'Momentálně není přehrávána žádná skladba'; - - @override - String get synced_lyrics_not_available => - 'Synchronizované texty nejsou k dispozici k této písni. Prosím použijte'; - - @override - String get plain_lyrics => 'Prostý text'; - - @override - String get tab_instead => 'místo toho použijte tabulátor.'; - - @override - String get disclaimer => 'Prohlášení'; - - @override - String get third_party_plugin_dmca_notice => - 'Tým Spotube nenese žádnou odpovědnost (včetně právní) za pluginy „třetích stran“.\nPoužívejte je na vlastní riziko. Pro chyby/problémy je nahlaste do repozitáře pluginu.\n\nPokud jakýkoli plugin „třetí strany“ porušuje podmínky služby nebo DMCA kteréhokoli poskytovatele či právního subjektu, požádejte autora pluginu nebo hostingovou platformu (např. GitHub/Codeberg), aby podnikla kroky. Pluginy označené jako „třetí strana“ jsou otevřené a spravovány komunitou; nespravujeme je, tudíž nemůžeme jednat.\n\n'; - - @override - String get input_does_not_match_format => - 'Vstup neodpovídá požadovanému formátu'; - - @override - String get plugins => 'Pluginy'; - - @override - String get paste_plugin_download_url => - 'Vložte URL ke stažení nebo GitHub/Codeberg repozitář či přímý odkaz na soubor .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Stáhnout a nainstalovat plugin z URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Nepodařilo se přidat plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'Nahrát plugin ze souboru'; - - @override - String get installed => 'Nainstalováno'; - - @override - String get available_plugins => 'Dostupné pluginy'; - - @override - String get configure_plugins => - 'Konfigurujte své vlastní pluginy poskytovatele metadat a zdroje zvuku'; - - @override - String get audio_scrobblers => 'Audio scrobblers'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Zdroj: '; - - @override - String get uncompressed => 'Nekomprimováno'; - - @override - String get dab_music_source_description => - 'Pro audiofily. Poskytuje vysoce kvalitní/bezztrátové zvukové toky. Přesná shoda skladeb na základě ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_de.dart b/lib/l10n/generated/app_localizations_de.dart deleted file mode 100644 index 4ab10266..00000000 --- a/lib/l10n/generated/app_localizations_de.dart +++ /dev/null @@ -1,1579 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for German (`de`). -class AppLocalizationsDe extends AppLocalizations { - AppLocalizationsDe([String locale = 'de']) : super(locale); - - @override - String get guest => 'Gast'; - - @override - String get browse => 'Durchsuchen'; - - @override - String get search => 'Suchen'; - - @override - String get library => 'Bibliothek'; - - @override - String get lyrics => 'Songtexte'; - - @override - String get settings => 'Einstellungen'; - - @override - String get genre_categories_filter => 'Filtere Kategorien oder Genres...'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Personalisiert'; - - @override - String get featured => 'Empfohlen'; - - @override - String get new_releases => 'Neue Veröffentlichungen'; - - @override - String get songs => 'Songs'; - - @override - String playing_track(Object track) { - return 'Wiedergabe: $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Dadurch wird die aktuelle Warteschlange gelöscht. $track_length Titel werden entfernt.\nMöchten Sie fortfahren?'; - } - - @override - String get load_more => 'Mehr laden'; - - @override - String get playlists => 'Playlists'; - - @override - String get artists => 'Künstler'; - - @override - String get albums => 'Alben'; - - @override - String get tracks => 'Titel'; - - @override - String get downloads => 'Downloads'; - - @override - String get filter_playlists => 'Filtere deine Playlists...'; - - @override - String get liked_tracks => 'Gefällt mir-Titel'; - - @override - String get liked_tracks_description => 'Alle deine geliketen Titel'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Erstelle eine Playlist'; - - @override - String get update_playlist => 'Wiedergabeliste aktualisieren'; - - @override - String get create => 'Erstellen'; - - @override - String get cancel => 'Abbrechen'; - - @override - String get update => 'Aktualisieren'; - - @override - String get playlist_name => 'Playlist-Name'; - - @override - String get name_of_playlist => 'Name der Playlist'; - - @override - String get description => 'Beschreibung'; - - @override - String get public => 'Öffentlich'; - - @override - String get collaborative => 'Kollaborativ'; - - @override - String get search_local_tracks => 'Lokale Titel durchsuchen...'; - - @override - String get play => 'Wiedergabe'; - - @override - String get delete => 'Löschen'; - - @override - String get none => 'Keine'; - - @override - String get sort_a_z => 'Sortieren nach A-Z'; - - @override - String get sort_z_a => 'Sortieren nach Z-A'; - - @override - String get sort_artist => 'Sortieren nach Künstler'; - - @override - String get sort_album => 'Sortieren nach Album'; - - @override - String get sort_duration => 'Nach Dauer sortieren'; - - @override - String get sort_tracks => 'Titel sortieren'; - - @override - String currently_downloading(Object tracks_length) { - return 'Derzeitige Downloads ($tracks_length)'; - } - - @override - String get cancel_all => 'Alle abbrechen'; - - @override - String get filter_artist => 'Künstler filtern...'; - - @override - String followers(Object followers) { - return '$followers Follower'; - } - - @override - String get add_artist_to_blacklist => - 'Künstler zur Schwarzen Liste hinzufügen'; - - @override - String get top_tracks => 'Top-Titel'; - - @override - String get fans_also_like => 'Fans mögen auch'; - - @override - String get loading => 'Laden...'; - - @override - String get artist => 'Künstler'; - - @override - String get blacklisted => 'Auf der Schwarzen Liste'; - - @override - String get following => 'Folgen'; - - @override - String get follow => 'Folgen'; - - @override - String get artist_url_copied => 'Künstler-URL in Zwischenablage kopiert'; - - @override - String added_to_queue(Object tracks) { - return '$tracks Titel zur Warteschlange hinzugefügt'; - } - - @override - String get filter_albums => 'Alben filtern...'; - - @override - String get synced => 'Synchronisiert'; - - @override - String get plain => 'Einfach'; - - @override - String get shuffle => 'Zufällige Wiedergabe'; - - @override - String get search_tracks => 'Titel durchsuchen...'; - - @override - String get released => 'Veröffentlicht'; - - @override - String error(Object error) { - return 'Fehler $error'; - } - - @override - String get title => 'Titel'; - - @override - String get time => 'Dauer'; - - @override - String get more_actions => 'Weitere Aktionen'; - - @override - String download_count(Object count) { - return 'Download ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Zu Playlist hinzufügen ($count)'; - } - - @override - String add_count_to_queue(Object count) { - return 'Zur Warteschlange hinzufügen ($count)'; - } - - @override - String play_count_next(Object count) { - return 'Als nächstes abspielen ($count)'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return '$data in Zwischenablage kopiert'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track zu folgenden Playlists hinzufügen'; - } - - @override - String get add => 'Hinzufügen'; - - @override - String added_track_to_queue(Object track) { - return '$track zur Warteschlange hinzugefügt'; - } - - @override - String get add_to_queue => 'Zur Warteschlange hinzufügen'; - - @override - String track_will_play_next(Object track) { - return '$track wird als nächstes abgespielt'; - } - - @override - String get play_next => 'Als nächstes abspielen'; - - @override - String removed_track_from_queue(Object track) { - return '$track aus der Warteschlange entfernt'; - } - - @override - String get remove_from_queue => 'Aus der Warteschlange entfernen'; - - @override - String get remove_from_favorites => 'Aus Favoriten entfernen'; - - @override - String get save_as_favorite => 'Als Favorit speichern'; - - @override - String get add_to_playlist => 'Zur Playlist hinzufügen'; - - @override - String get remove_from_playlist => 'Aus der Playlist entfernen'; - - @override - String get add_to_blacklist => 'Zur Schwarzen Liste hinzufügen'; - - @override - String get remove_from_blacklist => 'Aus der Schwarzen Liste entfernen'; - - @override - String get share => 'Teilen'; - - @override - String get mini_player => 'Mini-Player'; - - @override - String get slide_to_seek => 'Zum Vor- oder Zurückspulen ziehen'; - - @override - String get shuffle_playlist => 'Playlist mischen'; - - @override - String get unshuffle_playlist => 'Playlist nicht mehr mischen'; - - @override - String get previous_track => 'Vorheriger Track'; - - @override - String get next_track => 'Nächster Track'; - - @override - String get pause_playback => 'Wiedergabe pausieren'; - - @override - String get resume_playback => 'Wiedergabe fortsetzen'; - - @override - String get loop_track => 'Track wiederholen'; - - @override - String get no_loop => 'Kein Loop'; - - @override - String get repeat_playlist => 'Playlist wiederholen'; - - @override - String get queue => 'Warteschlange'; - - @override - String get alternative_track_sources => 'Alternative Track-Quellen'; - - @override - String get download_track => 'Track herunterladen'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks Tracks in der Warteschlange'; - } - - @override - String get clear_all => 'Alle löschen'; - - @override - String get show_hide_ui_on_hover => 'UI beim Überfahren anzeigen/ausblenden'; - - @override - String get always_on_top => 'Immer im Vordergrund'; - - @override - String get exit_mini_player => 'Mini-Player verlassen'; - - @override - String get download_location => 'Download-Speicherort'; - - @override - String get local_library => 'Lokale Bibliothek'; - - @override - String get add_library_location => 'Zur Bibliothek hinzufügen'; - - @override - String get remove_library_location => 'Aus der Bibliothek entfernen'; - - @override - String get account => 'Konto'; - - @override - String get logout => 'Abmelden'; - - @override - String get logout_of_this_account => 'Von diesem Konto abmelden'; - - @override - String get language_region => 'Sprache & Region'; - - @override - String get language => 'Sprache'; - - @override - String get system_default => 'Systemstandard'; - - @override - String get market_place_region => 'Marktplatzregion'; - - @override - String get recommendation_country => 'Empfehlungsland'; - - @override - String get appearance => 'Erscheinungsbild'; - - @override - String get layout_mode => 'Layout-Modus'; - - @override - String get override_layout_settings => - 'Responsiven Layout-Modus-Einstellungen überschreiben'; - - @override - String get adaptive => 'Adaptiv'; - - @override - String get compact => 'Kompakt'; - - @override - String get extended => 'Erweitert'; - - @override - String get theme => 'Design'; - - @override - String get dark => 'Dunkel'; - - @override - String get light => 'Hell'; - - @override - String get system => 'System'; - - @override - String get accent_color => 'Akzentfarbe'; - - @override - String get sync_album_color => 'Albumfarbe synchronisieren'; - - @override - String get sync_album_color_description => - 'Verwendet die dominante Farbe des Album Covers als Akzentfarbe'; - - @override - String get playback => 'Wiedergabe'; - - @override - String get audio_quality => 'Audioqualität'; - - @override - String get high => 'Hoch'; - - @override - String get low => 'Niedrig'; - - @override - String get pre_download_play => 'Vorab herunterladen und abspielen'; - - @override - String get pre_download_play_description => - 'Anstatt Audio zu streamen, Bytes herunterladen und abspielen (Empfohlen für Benutzer mit hoher Bandbreite)'; - - @override - String get skip_non_music => - 'Überspringe Nicht-Musik-Segmente (SponsorBlock)'; - - @override - String get blacklist_description => 'Gesperrte Titel und Künstler'; - - @override - String get wait_for_download_to_finish => - 'Bitte warten Sie, bis der aktuelle Download abgeschlossen ist'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Verhalten beim Schließen'; - - @override - String get close => 'Schließen'; - - @override - String get minimize_to_tray => 'In Taskleiste minimieren'; - - @override - String get show_tray_icon => 'Systemsymbol anzeigen'; - - @override - String get about => 'Über'; - - @override - String get u_love_spotube => 'Wir wissen, dass Sie Spotube lieben'; - - @override - String get check_for_updates => 'Nach Updates suchen'; - - @override - String get about_spotube => 'Über Spotube'; - - @override - String get blacklist => 'Gesperrte Titel'; - - @override - String get please_sponsor => 'Bitte unterstützen/Spenden Sie'; - - @override - String get spotube_description => - 'Spotube, ein leichtgewichtiger, plattformübergreifender und kostenloser Spotify-Client'; - - @override - String get version => 'Version'; - - @override - String get build_number => 'Build-Nummer'; - - @override - String get founder => 'Gründer'; - - @override - String get repository => 'Repository'; - - @override - String get bug_issues => 'Fehler und Probleme'; - - @override - String get made_with => 'Entwickelt mit ❤️ in Bangladesch 🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Lizenz'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Keine Sorge, Ihre Anmeldeinformationen werden nicht erfasst oder mit anderen geteilt'; - - @override - String get know_how_to_login => 'Wissen Sie nicht, wie es geht?'; - - @override - String get follow_step_by_step_guide => - 'Befolgen Sie die schrittweise Anleitung'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => 'Bitte füllen Sie alle Felder aus'; - - @override - String get submit => 'Senden'; - - @override - String get exit => 'Beenden'; - - @override - String get previous => 'Zurück'; - - @override - String get next => 'Weiter'; - - @override - String get done => 'Fertig'; - - @override - String get step_1 => 'Schritt 1'; - - @override - String get first_go_to => 'Gehe zuerst zu'; - - @override - String get something_went_wrong => 'Etwas ist schiefgelaufen'; - - @override - String get piped_instance => 'Piped-Serverinstanz'; - - @override - String get piped_description => - 'Die Piped-Serverinstanz, die zur Titelzuordnung verwendet werden soll'; - - @override - String get piped_warning => - 'Einige von ihnen funktionieren möglicherweise nicht gut. Verwende sie also auf eigenes Risiko'; - - @override - String get invidious_instance => 'Invidious-Serverinstanz'; - - @override - String get invidious_description => - 'Die Invidious-Serverinstanz zur Titelerkennung'; - - @override - String get invidious_warning => - 'Einige Instanzen funktionieren möglicherweise nicht gut. Benutzung auf eigene Gefahr'; - - @override - String get generate => 'Generieren'; - - @override - String track_exists(Object track) { - return 'Track $track existiert bereits'; - } - - @override - String get replace_downloaded_tracks => - 'Alle heruntergeladenen Titel ersetzen'; - - @override - String get skip_download_tracks => - 'Das Herunterladen aller heruntergeladenen Titel überspringen'; - - @override - String get do_you_want_to_replace => - 'Möchtest du den vorhandenen Track ersetzen?'; - - @override - String get replace => 'Ersetzen'; - - @override - String get skip => 'Überspringen'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Wähle bis zu $count $type aus'; - } - - @override - String get select_genres => 'Genres auswählen'; - - @override - String get add_genres => 'Genres hinzufügen'; - - @override - String get country => 'Land'; - - @override - String get number_of_tracks_generate => 'Anzahl der zu generierenden Titel'; - - @override - String get acousticness => 'Akustik'; - - @override - String get danceability => 'Tanzbarkeit'; - - @override - String get energy => 'Energie'; - - @override - String get instrumentalness => 'Instrumentalität'; - - @override - String get liveness => 'Lebendigkeit'; - - @override - String get loudness => 'Lautstärke'; - - @override - String get speechiness => 'Sprechanteil'; - - @override - String get valence => 'Stimmung'; - - @override - String get popularity => 'Beliebtheit'; - - @override - String get key => 'Tonart'; - - @override - String get duration => 'Dauer (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Modus'; - - @override - String get time_signature => 'Taktart'; - - @override - String get short => 'Kurz'; - - @override - String get medium => 'Mittel'; - - @override - String get long => 'Lang'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Ziel'; - - @override - String get moderate => 'Mäßig'; - - @override - String get deselect_all => 'Alle abwählen'; - - @override - String get select_all => 'Alle auswählen'; - - @override - String get are_you_sure => 'Bist du sicher?'; - - @override - String get generating_playlist => - 'Erstelle deine individuelle Wiedergabeliste...'; - - @override - String selected_count_tracks(Object count) { - return '$count Titel ausgewählt'; - } - - @override - String get download_warning => - 'Wenn du alle Titel in großen Mengen herunterlädst, betreibst du eindeutig Raubkopien von Musik und schadest der kreativen Gesellschaft der Musik. Ich hoffe, dir ist dies bewusst. Versuche immer, die harte Arbeit der Künstler zu respektieren und zu unterstützen.'; - - @override - String get download_ip_ban_warning => - 'Übrigens, deine IP-Adresse kann aufgrund übermäßiger Downloadanfragen von YouTube gesperrt werden. Eine IP-Sperre bedeutet, dass du YouTube (auch wenn du angemeldet bist) für mindestens 2-3 Monate von diesem IP-Gerät aus nicht nutzen kannst. Spotube übernimmt keine Verantwortung, falls dies jemals geschieht.'; - - @override - String get by_clicking_accept_terms => - 'Durch Klicken auf \'Akzeptieren\' stimmst du den folgenden Bedingungen zu:'; - - @override - String get download_agreement_1 => - 'Ich weiß, dass ich Raubkopien von Musik betreibe. Ich bin böse.'; - - @override - String get download_agreement_2 => - 'Ich werde die Künstler, wo immer ich kann, unterstützen, und ich tue dies nur, weil ich kein Geld habe, um ihre Kunst zu kaufen.'; - - @override - String get download_agreement_3 => - 'Mir ist vollkommen bewusst, dass meine IP-Adresse auf YouTube gesperrt werden kann, und ich halte Spotube oder seine Eigentümer/Mitarbeiter nicht für etwaige Unfälle verantwortlich, die durch meine derzeitige Handlung verursacht werden.'; - - @override - String get decline => 'Ablehnen'; - - @override - String get accept => 'Akzeptieren'; - - @override - String get details => 'Details'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanal'; - - @override - String get likes => 'Likes'; - - @override - String get dislikes => 'Dislikes'; - - @override - String get views => 'Aufrufe'; - - @override - String get streamUrl => 'Stream-URL'; - - @override - String get stop => 'Stopp'; - - @override - String get sort_newest => 'Nach neuesten Hinzufügungen sortieren'; - - @override - String get sort_oldest => 'Nach ältesten Hinzufügungen sortieren'; - - @override - String get sleep_timer => 'Schlaftimer'; - - @override - String mins(Object minutes) { - return '$minutes Minuten'; - } - - @override - String hours(Object hours) { - return '$hours Stunden'; - } - - @override - String hour(Object hours) { - return '$hours Stunde'; - } - - @override - String get custom_hours => 'Benutzerdefinierte Stunden'; - - @override - String get logs => 'Protokolle'; - - @override - String get developers => 'Entwickler'; - - @override - String get not_logged_in => 'Sie sind nicht angemeldet'; - - @override - String get search_mode => 'Suchmodus'; - - @override - String get audio_source => 'Audioquelle'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => 'Verschlüsselung fehlgeschlagen'; - - @override - String get encryption_failed_warning => - 'Spotube verwendet Verschlüsselung, um Ihre Daten sicher zu speichern. Dies ist jedoch fehlgeschlagen. Daher wird es auf unsichere Speicherung zurückgreifen\nWenn Sie Linux verwenden, stellen Sie bitte sicher, dass Sie Secret-Services wie gnome-keyring, kde-wallet und keepassxc installiert haben'; - - @override - String get querying_info => 'Abfrageinformationen...'; - - @override - String get piped_api_down => 'Die Piped API ist ausgefallen'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Die Piped-Instanz $pipedInstance ist derzeit nicht verfügbar\n\nEntweder ändern Sie die Instanz oder wechseln Sie den \'API-Typ\' zur offiziellen YouTube API\n\nStellen Sie sicher, dass Sie die App nach der Änderung neu starten'; - } - - @override - String get you_are_offline => 'Sie sind derzeit offline'; - - @override - String get connection_restored => - 'Ihre Internetverbindung wurde wiederhergestellt'; - - @override - String get use_system_title_bar => 'System-Titelleiste verwenden'; - - @override - String get crunching_results => 'Ergebnisse werden verarbeitet...'; - - @override - String get search_to_get_results => 'Suche, um Ergebnisse zu erhalten'; - - @override - String get use_amoled_mode => 'AMOLED-Modus verwenden'; - - @override - String get pitch_dark_theme => 'Pitch Black Dart Theme'; - - @override - String get normalize_audio => 'Audio normalisieren'; - - @override - String get change_cover => 'Cover ändern'; - - @override - String get add_cover => 'Cover hinzufügen'; - - @override - String get restore_defaults => 'Standardeinstellungen wiederherstellen'; - - @override - String get download_music_format => 'Musik-Downloadformat'; - - @override - String get streaming_music_format => 'Musik-Streamingformat'; - - @override - String get download_music_quality => 'Musik-Downloadqualität'; - - @override - String get streaming_music_quality => 'Musik-Streamingqualität'; - - @override - String get login_with_lastfm => 'Mit Last.fm anmelden'; - - @override - String get connect => 'Verbinden'; - - @override - String get disconnect_lastfm => 'Last.fm trennen'; - - @override - String get disconnect => 'Trennen'; - - @override - String get username => 'Benutzername'; - - @override - String get password => 'Passwort'; - - @override - String get login => 'Anmelden'; - - @override - String get login_with_your_lastfm => 'Mit Ihrem Last.fm-Konto anmelden'; - - @override - String get scrobble_to_lastfm => 'Auf Last.fm scrobbeln'; - - @override - String get go_to_album => 'Zum Album gehen'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'Alles durchsuchen'; - - @override - String get genres => 'Genres'; - - @override - String get explore_genres => 'Genres erkunden'; - - @override - String get friends => 'Freunde'; - - @override - String get no_lyrics_available => - 'Entschuldigung, Texte für diesen Track konnten nicht gefunden werden'; - - @override - String get start_a_radio => 'Radio starten'; - - @override - String get how_to_start_radio => 'Wie möchten Sie das Radio starten?'; - - @override - String get replace_queue_question => - 'Möchten Sie die aktuelle Wiedergabeliste ersetzen oder hinzufügen?'; - - @override - String get endless_playback => 'Endlose Wiedergabe'; - - @override - String get delete_playlist => 'Wiedergabeliste löschen'; - - @override - String get delete_playlist_confirmation => - 'Sind Sie sicher, dass Sie diese Wiedergabeliste löschen möchten?'; - - @override - String get local_tracks => 'Lokale Titel'; - - @override - String get local_tab => 'Lokal'; - - @override - String get song_link => 'Lied-Link'; - - @override - String get skip_this_nonsense => 'Diesen Unsinn überspringen'; - - @override - String get freedom_of_music => '“Freiheit der Musik”'; - - @override - String get freedom_of_music_palm => - '“Freiheit der Musik in Ihrer Handfläche”'; - - @override - String get get_started => 'Lass uns anfangen'; - - @override - String get youtube_source_description => - 'Empfohlen und funktioniert am besten.'; - - @override - String get piped_source_description => - 'Fühlen Sie sich frei? Wie YouTube, aber viel freier.'; - - @override - String get jiosaavn_source_description => - 'Am besten für die südasiatische Region.'; - - @override - String get invidious_source_description => - 'Ähnlich wie Piped, aber mit höherer Verfügbarkeit'; - - @override - String highest_quality(Object quality) { - return 'Höchste Qualität: $quality'; - } - - @override - String get select_audio_source => 'Audioquelle auswählen'; - - @override - String get endless_playback_description => - 'Neue Lieder automatisch\nam Ende der Wiedergabeliste hinzufügen'; - - @override - String get choose_your_region => 'Wählen Sie Ihre Region'; - - @override - String get choose_your_region_description => - 'Dies wird Spotube helfen, Ihnen den richtigen Inhalt\nfür Ihren Standort anzuzeigen.'; - - @override - String get choose_your_language => 'Wählen Sie Ihre Sprache'; - - @override - String get help_project_grow => 'Helfen Sie diesem Projekt zu wachsen'; - - @override - String get help_project_grow_description => - 'Spotube ist ein Open-Source-Projekt. Sie können diesem Projekt helfen, indem Sie zum Projekt beitragen, Fehler melden oder neue Funktionen vorschlagen.'; - - @override - String get contribute_on_github => 'Auf GitHub beitragen'; - - @override - String get donate_on_open_collective => 'Auf Open Collective spenden'; - - @override - String get browse_anonymously => 'Anonym durchsuchen'; - - @override - String get enable_connect => 'Verbindung aktivieren'; - - @override - String get enable_connect_description => - 'Spotube von anderen Geräten steuern'; - - @override - String get devices => 'Geräte'; - - @override - String get select => 'Auswählen'; - - @override - String connect_client_alert(Object client) { - return 'Du wirst von $client gesteuert'; - } - - @override - String get this_device => 'Dieses Gerät'; - - @override - String get remote => 'Fernbedienung'; - - @override - String get stats => 'Statistiken'; - - @override - String and_n_more(Object count) { - return 'und $count mehr'; - } - - @override - String get recently_played => 'Zuletzt gespielt'; - - @override - String get browse_more => 'Mehr durchsuchen'; - - @override - String get no_title => 'Kein Titel'; - - @override - String get not_playing => 'Wird nicht abgespielt'; - - @override - String get epic_failure => 'Episches Versagen!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length Titel zur Warteschlange hinzugefügt'; - } - - @override - String get spotube_has_an_update => 'Spotube hat ein Update'; - - @override - String get download_now => 'Jetzt herunterladen'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum wurde veröffentlicht'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version wurde veröffentlicht'; - } - - @override - String get read_the_latest => 'Lese die neuesten '; - - @override - String get release_notes => 'Versionshinweise'; - - @override - String get pick_color_scheme => 'Farbschema wählen'; - - @override - String get save => 'Speichern'; - - @override - String get choose_the_device => 'Wähle das Gerät:'; - - @override - String get multiple_device_connected => - 'Es sind mehrere Geräte verbunden.\nWähle das Gerät, auf dem diese Aktion ausgeführt werden soll'; - - @override - String get nothing_found => 'Nichts gefunden'; - - @override - String get the_box_is_empty => 'Die Box ist leer'; - - @override - String get top_artists => 'Top-Künstler'; - - @override - String get top_albums => 'Top-Alben'; - - @override - String get this_week => 'Diese Woche'; - - @override - String get this_month => 'Diesen Monat'; - - @override - String get last_6_months => 'Letzte 6 Monate'; - - @override - String get this_year => 'Dieses Jahr'; - - @override - String get last_2_years => 'Letzte 2 Jahre'; - - @override - String get all_time => 'Alle Zeiten'; - - @override - String powered_by_provider(Object providerName) { - return 'Bereitgestellt von $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Follower'; - - @override - String get birthday => 'Geburtstag'; - - @override - String get subscription => 'Abonnement'; - - @override - String get not_born => 'Nicht geboren'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profil'; - - @override - String get no_name => 'Kein Name'; - - @override - String get edit => 'Bearbeiten'; - - @override - String get user_profile => 'Benutzerprofil'; - - @override - String count_plays(Object count) { - return '$count Wiedergaben'; - } - - @override - String get streaming_fees_hypothetical => 'Streaming-Gebühren (hypothetisch)'; - - @override - String get minutes_listened => 'Gehörte Minuten'; - - @override - String get streamed_songs => 'Gestreamte Lieder'; - - @override - String count_streams(Object count) { - return '$count Streams'; - } - - @override - String get owned_by_you => 'In Ihrem Besitz'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl in die Zwischenablage kopiert'; - } - - @override - String get hipotetical_calculation => - '*Diese Berechnung basiert auf der durchschnittlichen Auszahlung pro Stream (0,003 USD bis 0,005 USD) auf Online-Musik-Streaming-Plattformen. Sie ist hypothetisch und soll dem Nutzer veranschaulichen, wie viel er den Künstlern bezahlt hätte, wenn er ihren Song auf verschiedenen Streaming-Plattformen gehört hätte.'; - - @override - String count_mins(Object minutes) { - return '$minutes Minuten'; - } - - @override - String get summary_minutes => 'Minuten'; - - @override - String get summary_listened_to_music => 'Hat Musik gehört'; - - @override - String get summary_songs => 'Lieder'; - - @override - String get summary_streamed_overall => 'Insgesamt gestreamt'; - - @override - String get summary_owed_to_artists => - 'Den Künstlern geschuldet\nDiesen Monat'; - - @override - String get summary_artists => 'Künstler'; - - @override - String get summary_music_reached_you => 'Musik hat Sie erreicht'; - - @override - String get summary_full_albums => 'volle Alben'; - - @override - String get summary_got_your_love => 'Hat Ihre Liebe gewonnen'; - - @override - String get summary_playlists => 'Wiedergabelisten'; - - @override - String get summary_were_on_repeat => 'Wurden wiederholt'; - - @override - String total_money(Object money) { - return 'Gesamt $money'; - } - - @override - String get webview_not_found => 'Webview nicht gefunden'; - - @override - String get webview_not_found_description => - 'Es ist keine Webview-Laufzeitumgebung auf Ihrem Gerät installiert.\nFalls installiert, stellen Sie sicher, dass es im environment PATH ist\n\nNach der Installation starten Sie die App neu'; - - @override - String get unsupported_platform => 'Nicht unterstützte Plattform'; - - @override - String get cache_music => 'Musik zwischenspeichern'; - - @override - String get open => 'Öffnen'; - - @override - String get cache_folder => 'Cache-Ordner'; - - @override - String get export => 'Exportieren'; - - @override - String get clear_cache => 'Cache leeren'; - - @override - String get clear_cache_confirmation => 'Möchten Sie den Cache leeren?'; - - @override - String get export_cache_files => 'Cachedateien exportieren'; - - @override - String found_n_files(Object count) { - return '$count Dateien gefunden'; - } - - @override - String get export_cache_confirmation => - 'Möchten Sie diese Dateien exportieren nach'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported von $files Dateien exportiert'; - } - - @override - String get undo => 'Rückgängig'; - - @override - String get download_all => 'Alle herunterladen'; - - @override - String get add_all_to_playlist => 'Alle zur Playlist hinzufügen'; - - @override - String get add_all_to_queue => 'Alle zur Warteschlange hinzufügen'; - - @override - String get play_all_next => 'Alle als Nächstes abspielen'; - - @override - String get pause => 'Pause'; - - @override - String get view_all => 'Alle ansehen'; - - @override - String get no_tracks_added_yet => 'Sie haben noch keine Titel hinzugefügt.'; - - @override - String get no_tracks => 'Es sieht so aus, als ob hier keine Titel sind.'; - - @override - String get no_tracks_listened_yet => - 'Es scheint, dass Sie noch nichts gehört haben.'; - - @override - String get not_following_artists => 'Sie folgen noch keinem Künstler.'; - - @override - String get no_favorite_albums_yet => - 'Es sieht so aus, als ob Sie noch keine Alben zu Ihren Favoriten hinzugefügt haben.'; - - @override - String get no_logs_found => 'Keine Protokolle gefunden'; - - @override - String get youtube_engine => 'YouTube-Engine'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine ist nicht installiert'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine ist nicht auf Ihrem System installiert.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Stellen Sie sicher, dass es im PATH verfügbar ist oder\nsetzen Sie den absoluten Pfad zur $engine ausführbaren Datei unten.'; - } - - @override - String get youtube_engine_unix_issue_message => - 'In macOS/Linux/unixähnlichen Betriebssystemen funktioniert das Setzen des Pfads in .zshrc/.bashrc/.bash_profile usw. nicht.\nSie müssen den Pfad in der Shell-Konfigurationsdatei festlegen.'; - - @override - String get download => 'Herunterladen'; - - @override - String get file_not_found => 'Datei nicht gefunden'; - - @override - String get custom => 'Benutzerdefiniert'; - - @override - String get add_custom_url => 'Benutzerdefinierte URL hinzufügen'; - - @override - String get edit_port => 'Port bearbeiten'; - - @override - String get port_helper_msg => - 'Der Standardwert ist -1, was eine zufällige Zahl bedeutet. Wenn Sie eine Firewall konfiguriert haben, wird empfohlen, dies einzustellen.'; - - @override - String connect_request(Object client) { - return '$client die Verbindung erlauben?'; - } - - @override - String get connection_request_denied => - 'Verbindung abgelehnt. Benutzer hat den Zugriff verweigert.'; - - @override - String get an_error_occurred => 'Ein Fehler ist aufgetreten'; - - @override - String get copy_to_clipboard => 'In die Zwischenablage kopieren'; - - @override - String get view_logs => 'Protokolle anzeigen'; - - @override - String get retry => 'Erneut versuchen'; - - @override - String get no_default_metadata_provider_selected => - 'Sie haben keinen Standard-Metadatenanbieter festgelegt'; - - @override - String get manage_metadata_providers => 'Metadatenanbieter verwalten'; - - @override - String get open_link_in_browser => 'Link im Browser öffnen?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Möchten Sie folgenden Link öffnen?'; - - @override - String get unsafe_url_warning => - 'Das Öffnen von Links aus nicht vertrauenswürdigen Quellen kann unsicher sein. Seien Sie vorsichtig!\nSie können den Link auch in Ihre Zwischenablage kopieren.'; - - @override - String get copy_link => 'Link kopieren'; - - @override - String get building_your_timeline => - 'Ihr Zeitverlauf wird basierend auf Ihren Hördaten erstellt…'; - - @override - String get official => 'Offiziell'; - - @override - String author_name(Object author) { - return 'Autor: $author'; - } - - @override - String get third_party => 'Drittanbieter'; - - @override - String get plugin_requires_authentication => - 'Plugin erfordert Authentifizierung'; - - @override - String get update_available => 'Update verfügbar'; - - @override - String get supports_scrobbling => 'Unterstützt Scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Dieses Plugin scrobbelt Ihre Musik, um Ihre Hörhistorie zu erstellen.'; - - @override - String get default_metadata_source => 'Standard-Metadatenquelle'; - - @override - String get set_default_metadata_source => - 'Standard-Metadatenquelle festlegen'; - - @override - String get default_audio_source => 'Standard-Audioquelle'; - - @override - String get set_default_audio_source => 'Standard-Audioquelle festlegen'; - - @override - String get set_default => 'Als Standard festlegen'; - - @override - String get support => 'Unterstützung'; - - @override - String get support_plugin_development => 'Plugin-Entwicklung unterstützen'; - - @override - String can_access_name_api(Object name) { - return '- Kann auf **$name**-API zugreifen'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Möchten Sie dieses Plugin installieren?'; - - @override - String get third_party_plugin_warning => - 'Dieses Plugin stammt aus einem Drittanbieter-Repository. Bitte stellen Sie sicher, dass Sie der Quelle vertrauen, bevor Sie es installieren.'; - - @override - String get author => 'Autor'; - - @override - String get this_plugin_can_do_following => 'Dieses Plugin kann Folgendes:'; - - @override - String get install => 'Installieren'; - - @override - String get install_a_metadata_provider => - 'Einen Metadatenanbieter installieren'; - - @override - String get no_tracks_playing => 'Derzeit wird kein Titel abgespielt'; - - @override - String get synced_lyrics_not_available => - 'Synchronisierte Liedtexte sind für dieses Lied nicht verfügbar. Bitte verwenden Sie stattdessen'; - - @override - String get plain_lyrics => 'Einfache Liedtexte'; - - @override - String get tab_instead => 'stattdessen die Tab-Taste verwenden.'; - - @override - String get disclaimer => 'Haftungsausschluss'; - - @override - String get third_party_plugin_dmca_notice => - 'Das Spotube-Team übernimmt keine Verantwortung (auch nicht rechtlicher Art) für Plugins \"Drittanbieter\". Nutzen Sie diese auf eigenes Risiko. Für Fehler/Probleme melden Sie sich bitte beim Plugin-Repository.\n\nWenn ein Plugin \"Drittanbieter\" gegen die ToS/DMCA eines Dienstes bzw. gesetzlicher Vorschriften verstößt, wenden Sie sich bitte an den Plugin-Autor oder die Hosting-Plattform (z. B. GitHub/Codeberg), um Maßnahmen zu ergreifen. Die genannten Plugins (mit \"Drittanbieter\"-Kennzeichnung) werden öffentlich und gemeinschaftlich gepflegt. Wir kuratieren sie nicht und können keine Maßnahmen ergreifen.\n\n'; - - @override - String get input_does_not_match_format => - 'Eingabe entspricht nicht dem geforderten Format'; - - @override - String get plugins => 'Plugins'; - - @override - String get paste_plugin_download_url => - 'Download-URL, GitHub/Codeberg-Repo-URL oder direkten Link zur .smplug-Datei einfügen'; - - @override - String get download_and_install_plugin_from_url => - 'Plugin per URL herunterladen und installieren'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Plugin konnte nicht hinzugefügt werden: $error'; - } - - @override - String get upload_plugin_from_file => 'Plugin per Datei hochladen'; - - @override - String get installed => 'Installiert'; - - @override - String get available_plugins => 'Verfügbare Plugins'; - - @override - String get configure_plugins => - 'Richte deine eigenen Metadatenanbieter- und Audioquellen-Plugins ein'; - - @override - String get audio_scrobblers => 'Audio-Scrobbler'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Quelle: '; - - @override - String get uncompressed => 'Unkomprimiert'; - - @override - String get dab_music_source_description => - 'Für Audiophile. Bietet hochwertige/verlustfreie Audiostreams. Präzises ISRC-basiertes Track-Matching.'; -} diff --git a/lib/l10n/generated/app_localizations_en.dart b/lib/l10n/generated/app_localizations_en.dart deleted file mode 100644 index 83a2c24c..00000000 --- a/lib/l10n/generated/app_localizations_en.dart +++ /dev/null @@ -1,1564 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for English (`en`). -class AppLocalizationsEn extends AppLocalizations { - AppLocalizationsEn([String locale = 'en']) : super(locale); - - @override - String get guest => 'Guest'; - - @override - String get browse => 'Browse'; - - @override - String get search => 'Search'; - - @override - String get library => 'Library'; - - @override - String get lyrics => 'Lyrics'; - - @override - String get settings => 'Settings'; - - @override - String get genre_categories_filter => 'Filter categories or genres...'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Personalized'; - - @override - String get featured => 'Featured'; - - @override - String get new_releases => 'New Releases'; - - @override - String get songs => 'Songs'; - - @override - String playing_track(Object track) { - return 'Playing $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'This will clear the current queue. $track_length tracks will be removed\nDo you want to continue?'; - } - - @override - String get load_more => 'Load more'; - - @override - String get playlists => 'Playlists'; - - @override - String get artists => 'Artists'; - - @override - String get albums => 'Albums'; - - @override - String get tracks => 'Tracks'; - - @override - String get downloads => 'Downloads'; - - @override - String get filter_playlists => 'Filter your playlists...'; - - @override - String get liked_tracks => 'Liked Tracks'; - - @override - String get liked_tracks_description => 'All your liked tracks'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Create a playlist'; - - @override - String get update_playlist => 'Update playlist'; - - @override - String get create => 'Create'; - - @override - String get cancel => 'Cancel'; - - @override - String get update => 'Update'; - - @override - String get playlist_name => 'Playlist Name'; - - @override - String get name_of_playlist => 'Name of the playlist'; - - @override - String get description => 'Description'; - - @override - String get public => 'Public'; - - @override - String get collaborative => 'Collaborative'; - - @override - String get search_local_tracks => 'Search local tracks...'; - - @override - String get play => 'Play'; - - @override - String get delete => 'Delete'; - - @override - String get none => 'None'; - - @override - String get sort_a_z => 'Sort by A-Z'; - - @override - String get sort_z_a => 'Sort by Z-A'; - - @override - String get sort_artist => 'Sort by Artist'; - - @override - String get sort_album => 'Sort by Album'; - - @override - String get sort_duration => 'Sort by Duration'; - - @override - String get sort_tracks => 'Sort Tracks'; - - @override - String currently_downloading(Object tracks_length) { - return 'Currently Downloading ($tracks_length)'; - } - - @override - String get cancel_all => 'Cancel All'; - - @override - String get filter_artist => 'Filter artists...'; - - @override - String followers(Object followers) { - return '$followers Followers'; - } - - @override - String get add_artist_to_blacklist => 'Add artist to blacklist'; - - @override - String get top_tracks => 'Top Tracks'; - - @override - String get fans_also_like => 'Fans also like'; - - @override - String get loading => 'Loading...'; - - @override - String get artist => 'Artist'; - - @override - String get blacklisted => 'Blacklisted'; - - @override - String get following => 'Following'; - - @override - String get follow => 'Follow'; - - @override - String get artist_url_copied => 'Artist URL copied to clipboard'; - - @override - String added_to_queue(Object tracks) { - return 'Added $tracks tracks to queue'; - } - - @override - String get filter_albums => 'Filter albums...'; - - @override - String get synced => 'Synced'; - - @override - String get plain => 'Plain'; - - @override - String get shuffle => 'Shuffle'; - - @override - String get search_tracks => 'Search tracks...'; - - @override - String get released => 'Released'; - - @override - String error(Object error) { - return 'Error $error'; - } - - @override - String get title => 'Title'; - - @override - String get time => 'Time'; - - @override - String get more_actions => 'More actions'; - - @override - String download_count(Object count) { - return 'Download ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Add ($count) to Playlist'; - } - - @override - String add_count_to_queue(Object count) { - return 'Add ($count) to Queue'; - } - - @override - String play_count_next(Object count) { - return 'Play ($count) next'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return 'Copied $data to clipboard'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Add $track to following Playlists'; - } - - @override - String get add => 'Add'; - - @override - String added_track_to_queue(Object track) { - return 'Added $track to queue'; - } - - @override - String get add_to_queue => 'Add to queue'; - - @override - String track_will_play_next(Object track) { - return '$track will play next'; - } - - @override - String get play_next => 'Play next'; - - @override - String removed_track_from_queue(Object track) { - return 'Removed $track from queue'; - } - - @override - String get remove_from_queue => 'Remove from queue'; - - @override - String get remove_from_favorites => 'Remove from favorites'; - - @override - String get save_as_favorite => 'Save as favorite'; - - @override - String get add_to_playlist => 'Add to playlist'; - - @override - String get remove_from_playlist => 'Remove from playlist'; - - @override - String get add_to_blacklist => 'Add to blacklist'; - - @override - String get remove_from_blacklist => 'Remove from blacklist'; - - @override - String get share => 'Share'; - - @override - String get mini_player => 'Mini Player'; - - @override - String get slide_to_seek => 'Slide to seek forward or backward'; - - @override - String get shuffle_playlist => 'Shuffle playlist'; - - @override - String get unshuffle_playlist => 'Unshuffle playlist'; - - @override - String get previous_track => 'Previous track'; - - @override - String get next_track => 'Next track'; - - @override - String get pause_playback => 'Pause Playback'; - - @override - String get resume_playback => 'Resume Playback'; - - @override - String get loop_track => 'Loop track'; - - @override - String get no_loop => 'No loop'; - - @override - String get repeat_playlist => 'Repeat playlist'; - - @override - String get queue => 'Queue'; - - @override - String get alternative_track_sources => 'Alternative track sources'; - - @override - String get download_track => 'Download track'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks tracks in queue'; - } - - @override - String get clear_all => 'Clear all'; - - @override - String get show_hide_ui_on_hover => 'Show/Hide UI on hover'; - - @override - String get always_on_top => 'Always on top'; - - @override - String get exit_mini_player => 'Exit Mini player'; - - @override - String get download_location => 'Download location'; - - @override - String get local_library => 'Local library'; - - @override - String get add_library_location => 'Add to library'; - - @override - String get remove_library_location => 'Remove from library'; - - @override - String get account => 'Account'; - - @override - String get logout => 'Logout'; - - @override - String get logout_of_this_account => 'Logout of this account'; - - @override - String get language_region => 'Language & Region'; - - @override - String get language => 'Language'; - - @override - String get system_default => 'System Default'; - - @override - String get market_place_region => 'Marketplace Region'; - - @override - String get recommendation_country => 'Recommendation Country'; - - @override - String get appearance => 'Appearance'; - - @override - String get layout_mode => 'Layout Mode'; - - @override - String get override_layout_settings => - 'Override responsive layout mode settings'; - - @override - String get adaptive => 'Adaptive'; - - @override - String get compact => 'Compact'; - - @override - String get extended => 'Extended'; - - @override - String get theme => 'Theme'; - - @override - String get dark => 'Dark'; - - @override - String get light => 'Light'; - - @override - String get system => 'System'; - - @override - String get accent_color => 'Accent Color'; - - @override - String get sync_album_color => 'Sync album color'; - - @override - String get sync_album_color_description => - 'Uses the dominant color of the album art as the accent color'; - - @override - String get playback => 'Playback'; - - @override - String get audio_quality => 'Audio Quality'; - - @override - String get high => 'High'; - - @override - String get low => 'Low'; - - @override - String get pre_download_play => 'Pre-download and play'; - - @override - String get pre_download_play_description => - 'Instead of streaming audio, download bytes and play instead (Recommended for higher bandwidth users)'; - - @override - String get skip_non_music => 'Skip non-music segments (SponsorBlock)'; - - @override - String get blacklist_description => 'Blacklisted tracks and artists'; - - @override - String get wait_for_download_to_finish => - 'Please wait for the current download to finish'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Close Behavior'; - - @override - String get close => 'Close'; - - @override - String get minimize_to_tray => 'Minimize to tray'; - - @override - String get show_tray_icon => 'Show System tray icon'; - - @override - String get about => 'About'; - - @override - String get u_love_spotube => 'We know you love Spotube'; - - @override - String get check_for_updates => 'Check for updates'; - - @override - String get about_spotube => 'About Spotube'; - - @override - String get blacklist => 'Blacklist'; - - @override - String get please_sponsor => 'Please Sponsor/Donate'; - - @override - String get spotube_description => - 'Open source extensible music streaming platform and app, based on BYOMM (Bring your own music metadata) concept'; - - @override - String get version => 'Version'; - - @override - String get build_number => 'Build Number'; - - @override - String get founder => 'Founder'; - - @override - String get repository => 'Repository'; - - @override - String get bug_issues => 'Bug+Issues'; - - @override - String get made_with => 'Made with ❤️ in Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'License'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Don\'t worry, any of your credentials won\'t be collected or shared with anyone'; - - @override - String get know_how_to_login => 'Don\'t know how to do this?'; - - @override - String get follow_step_by_step_guide => 'Follow along the Step by Step guide'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => 'Please fill in all the fields'; - - @override - String get submit => 'Submit'; - - @override - String get exit => 'Exit'; - - @override - String get previous => 'Previous'; - - @override - String get next => 'Next'; - - @override - String get done => 'Done'; - - @override - String get step_1 => 'Step 1'; - - @override - String get first_go_to => 'First, Go to'; - - @override - String get something_went_wrong => 'Something went wrong'; - - @override - String get piped_instance => 'Piped Server Instance'; - - @override - String get piped_description => - 'The Piped server instance to use for track matching'; - - @override - String get piped_warning => - 'Some of them might not work well. So use at your own risk'; - - @override - String get invidious_instance => 'Invidious Server Instance'; - - @override - String get invidious_description => - 'The Invidious server instance to use for track matching'; - - @override - String get invidious_warning => - 'Some of them might not work well. So use at your own risk'; - - @override - String get generate => 'Generate'; - - @override - String track_exists(Object track) { - return 'Track $track already exists'; - } - - @override - String get replace_downloaded_tracks => 'Replace all downloaded tracks'; - - @override - String get skip_download_tracks => 'Skip downloading all downloaded tracks'; - - @override - String get do_you_want_to_replace => - 'Do you want to replace the existing track??'; - - @override - String get replace => 'Replace'; - - @override - String get skip => 'Skip'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Select up to $count $type'; - } - - @override - String get select_genres => 'Select Genres'; - - @override - String get add_genres => 'Add Genres'; - - @override - String get country => 'Country'; - - @override - String get number_of_tracks_generate => 'Number of tracks to generate'; - - @override - String get acousticness => 'Acousticness'; - - @override - String get danceability => 'Danceability'; - - @override - String get energy => 'Energy'; - - @override - String get instrumentalness => 'Instrumentalness'; - - @override - String get liveness => 'Liveness'; - - @override - String get loudness => 'Loudness'; - - @override - String get speechiness => 'Speechiness'; - - @override - String get valence => 'Valence'; - - @override - String get popularity => 'Popularity'; - - @override - String get key => 'Key'; - - @override - String get duration => 'Duration (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'Time Signature'; - - @override - String get short => 'Short'; - - @override - String get medium => 'Medium'; - - @override - String get long => 'Long'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Target'; - - @override - String get moderate => 'Moderate'; - - @override - String get deselect_all => 'Deselect All'; - - @override - String get select_all => 'Select All'; - - @override - String get are_you_sure => 'Are you sure?'; - - @override - String get generating_playlist => 'Generating your custom playlist...'; - - @override - String selected_count_tracks(Object count) { - return 'Selected $count tracks'; - } - - @override - String get download_warning => - 'If you download all Tracks at bulk you\'re clearly pirating Music & causing damage to the creative society of Music. I hope you are aware of this. Always, try respecting & supporting Artist\'s hard work'; - - @override - String get download_ip_ban_warning => - 'BTW, your IP can get blocked on YouTube due excessive download requests than usual. IP block means you can\'t use YouTube (even if you\'re logged in) for at least 2-3 months from that IP device. And Spotube doesn\'t hold any responsibility if this ever happens'; - - @override - String get by_clicking_accept_terms => - 'By clicking \'accept\' you agree to following terms:'; - - @override - String get download_agreement_1 => 'I know I\'m pirating Music. I\'m bad'; - - @override - String get download_agreement_2 => - 'I\'ll support the Artist wherever I can and I\'m only doing this because I don\'t have money to buy their art'; - - @override - String get download_agreement_3 => - 'I\'m completely aware that my IP can get blocked on YouTube & I don\'t hold Spotube or his owners/contributors responsible for any accidents caused by my current action'; - - @override - String get decline => 'Decline'; - - @override - String get accept => 'Accept'; - - @override - String get details => 'Details'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Channel'; - - @override - String get likes => 'Likes'; - - @override - String get dislikes => 'Dislikes'; - - @override - String get views => 'Views'; - - @override - String get streamUrl => 'Stream URL'; - - @override - String get stop => 'Stop'; - - @override - String get sort_newest => 'Sort by newest added'; - - @override - String get sort_oldest => 'Sort by oldest added'; - - @override - String get sleep_timer => 'Sleep Timer'; - - @override - String mins(Object minutes) { - return '$minutes Minutes'; - } - - @override - String hours(Object hours) { - return '$hours Hours'; - } - - @override - String hour(Object hours) { - return '$hours Hour'; - } - - @override - String get custom_hours => 'Custom Hours'; - - @override - String get logs => 'Logs'; - - @override - String get developers => 'Developers'; - - @override - String get not_logged_in => 'You\'re not logged in'; - - @override - String get search_mode => 'Search Mode'; - - @override - String get audio_source => 'Audio Source'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Failed to encrypt'; - - @override - String get encryption_failed_warning => - 'Spotube uses encryption to securely store your data. But failed to do so. So it\'ll fallback to insecure storage\nIf you\'re using linux, please make sure you\'ve any secret-service (gnome-keyring, kde-wallet, keepassxc etc) installed'; - - @override - String get querying_info => 'Querying info...'; - - @override - String get piped_api_down => 'Piped API is down'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'The Piped instance $pipedInstance is currently down\n\nEither change the instance or change the \'API type\' to official YouTube API\n\nMake sure to restart the app after change'; - } - - @override - String get you_are_offline => 'You are currently offline'; - - @override - String get connection_restored => 'Your internet connection was restored'; - - @override - String get use_system_title_bar => 'Use system title bar'; - - @override - String get crunching_results => 'Crunching results...'; - - @override - String get search_to_get_results => 'Search to get results'; - - @override - String get use_amoled_mode => 'Pitch black dark theme'; - - @override - String get pitch_dark_theme => 'AMOLED Mode'; - - @override - String get normalize_audio => 'Normalize audio'; - - @override - String get change_cover => 'Change cover'; - - @override - String get add_cover => 'Add cover'; - - @override - String get restore_defaults => 'Restore defaults'; - - @override - String get download_music_format => 'Download music format'; - - @override - String get streaming_music_format => 'Streaming music format'; - - @override - String get download_music_quality => 'Download music quality'; - - @override - String get streaming_music_quality => 'Streaming music quality'; - - @override - String get login_with_lastfm => 'Login with Last.fm'; - - @override - String get connect => 'Connect'; - - @override - String get disconnect_lastfm => 'Disconnect Last.fm'; - - @override - String get disconnect => 'Disconnect'; - - @override - String get username => 'Username'; - - @override - String get password => 'Password'; - - @override - String get login => 'Login'; - - @override - String get login_with_your_lastfm => 'Login with your Last.fm account'; - - @override - String get scrobble_to_lastfm => 'Scrobble to Last.fm'; - - @override - String get go_to_album => 'Go to Album'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'Browse All'; - - @override - String get genres => 'Genres'; - - @override - String get explore_genres => 'Explore Genres'; - - @override - String get friends => 'Friends'; - - @override - String get no_lyrics_available => 'Sorry, unable find lyrics for this track'; - - @override - String get start_a_radio => 'Start a Radio'; - - @override - String get how_to_start_radio => 'How do you want to start the radio?'; - - @override - String get replace_queue_question => - 'Do you want to replace the current queue or append to it?'; - - @override - String get endless_playback => 'Endless Playback'; - - @override - String get delete_playlist => 'Delete Playlist'; - - @override - String get delete_playlist_confirmation => - 'Are you sure you want to delete this playlist?'; - - @override - String get local_tracks => 'Local Tracks'; - - @override - String get local_tab => 'Local'; - - @override - String get song_link => 'Song Link'; - - @override - String get skip_this_nonsense => 'Skip this nonsense'; - - @override - String get freedom_of_music => '“Freedom of Music”'; - - @override - String get freedom_of_music_palm => - '“Freedom of Music in the palm of your hand”'; - - @override - String get get_started => 'Let\'s get started'; - - @override - String get youtube_source_description => 'Recommended and works best.'; - - @override - String get piped_source_description => - 'Feeling free? Same as YouTube but a lot free.'; - - @override - String get jiosaavn_source_description => 'Best for South Asian region.'; - - @override - String get invidious_source_description => - 'Similar to Piped but with higher availability.'; - - @override - String highest_quality(Object quality) { - return 'Highest Quality: $quality'; - } - - @override - String get select_audio_source => 'Select Audio Source'; - - @override - String get endless_playback_description => - 'Automatically append new songs\nto the end of the queue'; - - @override - String get choose_your_region => 'Choose your region'; - - @override - String get choose_your_region_description => - 'This will help Spotube show you the right content\nfor your location.'; - - @override - String get choose_your_language => 'Choose your language'; - - @override - String get help_project_grow => 'Help this project grow'; - - @override - String get help_project_grow_description => - 'Spotube is an open-source project. You can help this project grow by contributing to the project, reporting bugs, or suggesting new features.'; - - @override - String get contribute_on_github => 'Contribute on GitHub'; - - @override - String get donate_on_open_collective => 'Donate on Open Collective'; - - @override - String get browse_anonymously => 'Browse Anonymously'; - - @override - String get enable_connect => 'Enable Connect'; - - @override - String get enable_connect_description => 'Control Spotube from other devices'; - - @override - String get devices => 'Devices'; - - @override - String get select => 'Select'; - - @override - String connect_client_alert(Object client) { - return 'You\'re being controlled by $client'; - } - - @override - String get this_device => 'This Device'; - - @override - String get remote => 'Remote'; - - @override - String get stats => 'Stats'; - - @override - String and_n_more(Object count) { - return 'and $count more'; - } - - @override - String get recently_played => 'Recently Played'; - - @override - String get browse_more => 'Browse More'; - - @override - String get no_title => 'No Title'; - - @override - String get not_playing => 'Not playing'; - - @override - String get epic_failure => 'Epic failure!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Added $tracks_length tracks to queue'; - } - - @override - String get spotube_has_an_update => 'Spotube has an update'; - - @override - String get download_now => 'Download Now'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum has been released'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version has been released'; - } - - @override - String get read_the_latest => 'Read the latest '; - - @override - String get release_notes => 'release notes'; - - @override - String get pick_color_scheme => 'Pick color scheme'; - - @override - String get save => 'Save'; - - @override - String get choose_the_device => 'Choose the device:'; - - @override - String get multiple_device_connected => - 'There are multiple device connected.\nChoose the device you want this action to take place'; - - @override - String get nothing_found => 'Nothing found'; - - @override - String get the_box_is_empty => 'The box is empty'; - - @override - String get top_artists => 'Top Artists'; - - @override - String get top_albums => 'Top Albums'; - - @override - String get this_week => 'This week'; - - @override - String get this_month => 'This month'; - - @override - String get last_6_months => 'Last 6 months'; - - @override - String get this_year => 'This year'; - - @override - String get last_2_years => 'Last 2 years'; - - @override - String get all_time => 'All time'; - - @override - String powered_by_provider(Object providerName) { - return 'Powered by $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Followers'; - - @override - String get birthday => 'Birthday'; - - @override - String get subscription => 'Subscription'; - - @override - String get not_born => 'Not born'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profile'; - - @override - String get no_name => 'No Name'; - - @override - String get edit => 'Edit'; - - @override - String get user_profile => 'User Profile'; - - @override - String count_plays(Object count) { - return '$count plays'; - } - - @override - String get streaming_fees_hypothetical => 'Streaming fees (hypothetical)'; - - @override - String get minutes_listened => 'Minutes listened'; - - @override - String get streamed_songs => 'Streamed songs'; - - @override - String count_streams(Object count) { - return '$count streams'; - } - - @override - String get owned_by_you => 'Owned by you'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'Copied $shareUrl to clipboard'; - } - - @override - String get hipotetical_calculation => - '*This is calculated based on average online music streaming platform\'s per stream\npayout of \$0.003 to \$0.005. This is a hypothetical\ncalculation to give user insight about how much they\nwould have paid to the artists if they were to listen\ntheir song in different music streaming platform.'; - - @override - String count_mins(Object minutes) { - return '$minutes mins'; - } - - @override - String get summary_minutes => 'minutes'; - - @override - String get summary_listened_to_music => 'Listened to music'; - - @override - String get summary_songs => 'songs'; - - @override - String get summary_streamed_overall => 'Streamed overall'; - - @override - String get summary_owed_to_artists => 'Owed to artists\nthis month'; - - @override - String get summary_artists => 'artist\'s'; - - @override - String get summary_music_reached_you => 'Music reached you'; - - @override - String get summary_full_albums => 'full albums'; - - @override - String get summary_got_your_love => 'Got your love'; - - @override - String get summary_playlists => 'playlists'; - - @override - String get summary_were_on_repeat => 'Were on repeat'; - - @override - String total_money(Object money) { - return 'Total $money'; - } - - @override - String get webview_not_found => 'Webview not found'; - - @override - String get webview_not_found_description => - 'No webview runtime is installed in your device.\nIf it\'s installed make sure it\'s in the Environment PATH\n\nAfter installing, restart the app'; - - @override - String get unsupported_platform => 'Unsupported platform'; - - @override - String get cache_music => 'Cache music'; - - @override - String get open => 'Open'; - - @override - String get cache_folder => 'Cache folder'; - - @override - String get export => 'Export'; - - @override - String get clear_cache => 'Clear cache'; - - @override - String get clear_cache_confirmation => 'Do you want to clear the cache?'; - - @override - String get export_cache_files => 'Export Cached Files'; - - @override - String found_n_files(Object count) { - return 'Found $count files'; - } - - @override - String get export_cache_confirmation => - 'Do you want to export these files to'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Exported $filesExported out of $files files'; - } - - @override - String get undo => 'Undo'; - - @override - String get download_all => 'Download all'; - - @override - String get add_all_to_playlist => 'Add all to playlist'; - - @override - String get add_all_to_queue => 'Add all to queue'; - - @override - String get play_all_next => 'Play all next'; - - @override - String get pause => 'Pause'; - - @override - String get view_all => 'View all'; - - @override - String get no_tracks_added_yet => - 'Looks like you haven\'t added any tracks yet'; - - @override - String get no_tracks => 'Looks like there are no tracks here'; - - @override - String get no_tracks_listened_yet => - 'Looks like you haven\'t listened to anything yet'; - - @override - String get not_following_artists => 'You\'re not following any artists'; - - @override - String get no_favorite_albums_yet => - 'Looks like you haven\'t added any albums to your favorites yet'; - - @override - String get no_logs_found => 'No logs found'; - - @override - String get youtube_engine => 'YouTube Engine'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine is not installed'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine is not installed in your system.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Make sure it\'s available in the PATH variable or\nset the absolute path to the $engine executable below'; - } - - @override - String get youtube_engine_unix_issue_message => - 'In macOS/Linux/unix like OS\'s, setting path on .zshrc/.bashrc/.bash_profile etc. won\'t work.\nYou need to set the path in the shell configuration file'; - - @override - String get download => 'Download'; - - @override - String get file_not_found => 'File not found'; - - @override - String get custom => 'Custom'; - - @override - String get add_custom_url => 'Add custom URL'; - - @override - String get edit_port => 'Edit port'; - - @override - String get port_helper_msg => - 'Default is -1 which indicates random number. If you\'ve firewall configured, setting this is recommended.'; - - @override - String connect_request(Object client) { - return 'Allow $client to connect?'; - } - - @override - String get connection_request_denied => - 'Connection denied. User denied access.'; - - @override - String get an_error_occurred => 'An error occurred'; - - @override - String get copy_to_clipboard => 'Copy to clipboard'; - - @override - String get view_logs => 'View logs'; - - @override - String get retry => 'Retry'; - - @override - String get no_default_metadata_provider_selected => - 'You\'ve no default metadata provider set'; - - @override - String get manage_metadata_providers => 'Manage metadata providers'; - - @override - String get open_link_in_browser => 'Open Link in Browser?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Do you want to open the following link'; - - @override - String get unsafe_url_warning => - 'It can be unsafe to open links from untrusted sources. Be cautious!\nYou can also copy the link to your clipboard.'; - - @override - String get copy_link => 'Copy Link'; - - @override - String get building_your_timeline => - 'Building your timeline based on your listenings...'; - - @override - String get official => 'Official'; - - @override - String author_name(Object author) { - return 'Author: $author'; - } - - @override - String get third_party => 'Third-party'; - - @override - String get plugin_requires_authentication => 'Plugin requires authentication'; - - @override - String get update_available => 'Update available'; - - @override - String get supports_scrobbling => 'Supports scrobbling'; - - @override - String get plugin_scrobbling_info => - 'This plugin scrobbles your music to generate your listening history.'; - - @override - String get default_metadata_source => 'Default metadata source'; - - @override - String get set_default_metadata_source => 'Set default metadata source'; - - @override - String get default_audio_source => 'Default audio source'; - - @override - String get set_default_audio_source => 'Set default audio source'; - - @override - String get set_default => 'Set default'; - - @override - String get support => 'Support'; - - @override - String get support_plugin_development => 'Support plugin development'; - - @override - String can_access_name_api(Object name) { - return '- Can access **$name** API'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Do you want to install this plugin?'; - - @override - String get third_party_plugin_warning => - 'This plugin is from a third-party repository. Please ensure you trust the source before installing.'; - - @override - String get author => 'Author'; - - @override - String get this_plugin_can_do_following => 'This plugin can do following'; - - @override - String get install => 'Install'; - - @override - String get install_a_metadata_provider => 'Install a Metadata Provider'; - - @override - String get no_tracks_playing => 'No Track being played currently'; - - @override - String get synced_lyrics_not_available => - 'Synced lyrics are not available for this song. Please use the'; - - @override - String get plain_lyrics => 'Plain Lyrics'; - - @override - String get tab_instead => 'tab instead.'; - - @override - String get disclaimer => 'Disclaimer'; - - @override - String get third_party_plugin_dmca_notice => - 'The Spotube team does not hold any responsibility (including legal) for any \"Third-party\" plugins.\nPlease use them at your own risk. For any bugs/issues, please report them to the plugin repository.\n\nIf any \"Third-party\" plugin is breaking ToS/DMCA of any service/legal entity, please ask the \"Third-party\" plugin author or the hosting platform .e.g GitHub/Codeberg to take action. Above listed (\"Third-party\" labelled) are all public/community maintained plugins. We\'re not curating them, so we cannot take any action on them.\n\n'; - - @override - String get input_does_not_match_format => - 'Input doesn\'t match the required format'; - - @override - String get plugins => 'Plugins'; - - @override - String get paste_plugin_download_url => - 'Paste download url or GitHub/Codeberg repo url or direct link to .smplug file'; - - @override - String get download_and_install_plugin_from_url => - 'Download and install plugin from url'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Failed to add plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'Upload plugin from file'; - - @override - String get installed => 'Installed'; - - @override - String get available_plugins => 'Available plugins'; - - @override - String get configure_plugins => - 'Configure your own metadata provider and audio source plugins'; - - @override - String get audio_scrobblers => 'Audio Scrobblers'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Source: '; - - @override - String get uncompressed => 'Uncompressed'; - - @override - String get dab_music_source_description => - 'For audiophiles. Provides high-quality/lossless audio streams. Accurate ISRC based track matching.'; -} diff --git a/lib/l10n/generated/app_localizations_es.dart b/lib/l10n/generated/app_localizations_es.dart deleted file mode 100644 index 0fcd6739..00000000 --- a/lib/l10n/generated/app_localizations_es.dart +++ /dev/null @@ -1,1580 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Spanish Castilian (`es`). -class AppLocalizationsEs extends AppLocalizations { - AppLocalizationsEs([String locale = 'es']) : super(locale); - - @override - String get guest => 'Invitado'; - - @override - String get browse => 'Explorar'; - - @override - String get search => 'Buscar'; - - @override - String get library => 'Biblioteca'; - - @override - String get lyrics => 'Letras'; - - @override - String get settings => 'Configuración'; - - @override - String get genre_categories_filter => 'Filtrar categorías o géneros...'; - - @override - String get genre => 'Género'; - - @override - String get personalized => 'Personalizado'; - - @override - String get featured => 'Destacado'; - - @override - String get new_releases => 'Nuevos Lanzamientos'; - - @override - String get songs => 'Canciones'; - - @override - String playing_track(Object track) { - return 'Reproduciendo $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Esto eliminará la lista actual. Se eliminarán $track_length canciones.\n¿Deseas continuar?'; - } - - @override - String get load_more => 'Cargar más'; - - @override - String get playlists => 'Listas de reproducción'; - - @override - String get artists => 'Artistas'; - - @override - String get albums => 'Álbumes'; - - @override - String get tracks => 'Canciones'; - - @override - String get downloads => 'Descargas'; - - @override - String get filter_playlists => 'Filtrar tus listas de reproducción...'; - - @override - String get liked_tracks => 'Canciones Favoritas'; - - @override - String get liked_tracks_description => 'Todas tus canciones favoritas'; - - @override - String get playlist => 'Lista de reproducción'; - - @override - String get create_a_playlist => 'Crear una lista de reproducción'; - - @override - String get update_playlist => 'Actualizar lista de reproducción'; - - @override - String get create => 'Crear'; - - @override - String get cancel => 'Cancelar'; - - @override - String get update => 'Actualizar'; - - @override - String get playlist_name => 'Nombre de la lista'; - - @override - String get name_of_playlist => 'Nombre de la lista'; - - @override - String get description => 'Descripción'; - - @override - String get public => 'Pública'; - - @override - String get collaborative => 'Colaborativa'; - - @override - String get search_local_tracks => 'Buscar canciones locales...'; - - @override - String get play => 'Reproducir'; - - @override - String get delete => 'Eliminar'; - - @override - String get none => 'Ninguno'; - - @override - String get sort_a_z => 'Ordenar de la A a la Z'; - - @override - String get sort_z_a => 'Ordenar de la Z a la A'; - - @override - String get sort_artist => 'Ordenar por Artista'; - - @override - String get sort_album => 'Ordenar por Álbum'; - - @override - String get sort_duration => 'Ordenar por Duración'; - - @override - String get sort_tracks => 'Ordenar Canciones'; - - @override - String currently_downloading(Object tracks_length) { - return 'Descargando en curso ($tracks_length)'; - } - - @override - String get cancel_all => 'Cancelar todo'; - - @override - String get filter_artist => 'Filtrar artistas...'; - - @override - String followers(Object followers) { - return '$followers Seguidores'; - } - - @override - String get add_artist_to_blacklist => 'Agregar artista a la lista negra'; - - @override - String get top_tracks => 'Mejores Canciones'; - - @override - String get fans_also_like => 'A los fans también les gusta'; - - @override - String get loading => 'Cargando...'; - - @override - String get artist => 'Artista'; - - @override - String get blacklisted => 'En la lista negra'; - - @override - String get following => 'Siguiendo'; - - @override - String get follow => 'Seguir'; - - @override - String get artist_url_copied => 'URL del artista copiada al portapapeles'; - - @override - String added_to_queue(Object tracks) { - return 'Agregadas $tracks canciones a la lista'; - } - - @override - String get filter_albums => 'Filtrar álbumes...'; - - @override - String get synced => 'Sincronizado'; - - @override - String get plain => 'Normal'; - - @override - String get shuffle => 'Aleatorio'; - - @override - String get search_tracks => 'Buscar canciones...'; - - @override - String get released => 'Lanzado'; - - @override - String error(Object error) { - return 'Error $error'; - } - - @override - String get title => 'Título'; - - @override - String get time => 'Duración'; - - @override - String get more_actions => 'Más acciones'; - - @override - String download_count(Object count) { - return 'Descargas ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Agregar ($count) a la lista'; - } - - @override - String add_count_to_queue(Object count) { - return 'Agregar ($count) a la lista'; - } - - @override - String play_count_next(Object count) { - return 'Reproducir ($count) a continuación'; - } - - @override - String get album => 'Álbum'; - - @override - String copied_to_clipboard(Object data) { - return '$data copiado al portapapeles'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Agregar $track a las listas de reproducción siguientes'; - } - - @override - String get add => 'Agregar'; - - @override - String added_track_to_queue(Object track) { - return '$track agregada a la lista'; - } - - @override - String get add_to_queue => 'Agregar a la lista'; - - @override - String track_will_play_next(Object track) { - return '$track se reproducirá a continuación'; - } - - @override - String get play_next => 'Reproducir a continuación'; - - @override - String removed_track_from_queue(Object track) { - return '$track eliminada de la lista'; - } - - @override - String get remove_from_queue => 'Eliminar de la lista'; - - @override - String get remove_from_favorites => 'Eliminar de favoritos'; - - @override - String get save_as_favorite => 'Guardar como favorito'; - - @override - String get add_to_playlist => 'Agregar a la lista'; - - @override - String get remove_from_playlist => 'Eliminar de la lista'; - - @override - String get add_to_blacklist => 'Agregar a la lista negra'; - - @override - String get remove_from_blacklist => 'Eliminar de la lista negra'; - - @override - String get share => 'Compartir'; - - @override - String get mini_player => 'Reproductor Mini'; - - @override - String get slide_to_seek => 'Desliza para buscar adelante o atrás'; - - @override - String get shuffle_playlist => 'Reproducir lista en orden aleatorio'; - - @override - String get unshuffle_playlist => 'Desactivar reproducción aleatoria'; - - @override - String get previous_track => 'Pista anterior'; - - @override - String get next_track => 'Pista siguiente'; - - @override - String get pause_playback => 'Pausar reproducción'; - - @override - String get resume_playback => 'Reanudar reproducción'; - - @override - String get loop_track => 'Repetir pista'; - - @override - String get no_loop => 'Sin bucle'; - - @override - String get repeat_playlist => 'Repetir lista'; - - @override - String get queue => 'Lista'; - - @override - String get alternative_track_sources => 'Fuentes alternativas de canciones'; - - @override - String get download_track => 'Descargar canción'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks canciones en la lista'; - } - - @override - String get clear_all => 'Limpiar todo'; - - @override - String get show_hide_ui_on_hover => - 'Mostrar/Ocultar interfaz al pasar el cursor'; - - @override - String get always_on_top => 'Siempre visible'; - - @override - String get exit_mini_player => 'Salir del reproductor mini'; - - @override - String get download_location => 'Ubicación de descargas'; - - @override - String get local_library => 'Biblioteca local'; - - @override - String get add_library_location => 'Añadir a la biblioteca'; - - @override - String get remove_library_location => 'Eliminar de la biblioteca'; - - @override - String get account => 'Cuenta'; - - @override - String get logout => 'Cerrar sesión'; - - @override - String get logout_of_this_account => 'Cerrar sesión de esta cuenta'; - - @override - String get language_region => 'Idioma y Región'; - - @override - String get language => 'Idioma'; - - @override - String get system_default => 'Predeterminado del sistema'; - - @override - String get market_place_region => 'Región de la tienda'; - - @override - String get recommendation_country => 'País de recomendación'; - - @override - String get appearance => 'Apariencia'; - - @override - String get layout_mode => 'Modo de diseño'; - - @override - String get override_layout_settings => - 'Anular la configuración del modo de diseño responsive'; - - @override - String get adaptive => 'Adaptable'; - - @override - String get compact => 'Compacto'; - - @override - String get extended => 'Extendido'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Oscuro'; - - @override - String get light => 'Claro'; - - @override - String get system => 'Sistema'; - - @override - String get accent_color => 'Color de acento'; - - @override - String get sync_album_color => 'Sincronizar color del álbum'; - - @override - String get sync_album_color_description => - 'Usa el color dominante del arte del álbum como color de acento'; - - @override - String get playback => 'Reproducción'; - - @override - String get audio_quality => 'Calidad de audio'; - - @override - String get high => 'Alta'; - - @override - String get low => 'Baja'; - - @override - String get pre_download_play => 'Pre-descargar y reproducir'; - - @override - String get pre_download_play_description => - 'En lugar de transmitir audio, descarga bytes y reproduce en su lugar (recomendado para usuarios con mayor ancho de banda)'; - - @override - String get skip_non_music => - 'Omitir segmentos que no son música (SponsorBlock)'; - - @override - String get blacklist_description => 'Canciones y artistas en la lista negra'; - - @override - String get wait_for_download_to_finish => - 'Por favor, espera a que termine la descarga actual'; - - @override - String get desktop => 'Escritorio'; - - @override - String get close_behavior => 'Comportamiento al cerrar'; - - @override - String get close => 'Cerrar'; - - @override - String get minimize_to_tray => 'Minimizar en la bandeja del sistema'; - - @override - String get show_tray_icon => 'Mostrar icono en la bandeja del sistema'; - - @override - String get about => 'Acerca de'; - - @override - String get u_love_spotube => 'Sabemos que te encanta Spotube'; - - @override - String get check_for_updates => 'Buscar actualizaciones'; - - @override - String get about_spotube => 'Acerca de Spotube'; - - @override - String get blacklist => 'Lista negra'; - - @override - String get please_sponsor => 'Por favor, apoya/dona'; - - @override - String get spotube_description => - 'Spotube, un cliente ligero, multiplataforma y gratuito de Spotify'; - - @override - String get version => 'Versión'; - - @override - String get build_number => 'Número de compilación'; - - @override - String get founder => 'Fundador'; - - @override - String get repository => 'Repositorio'; - - @override - String get bug_issues => 'Errores y problemas'; - - @override - String get made_with => 'Hecho con ❤️ en Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licencia'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'No te preocupes, tus credenciales no serán recopiladas ni compartidas con nadie'; - - @override - String get know_how_to_login => '¿No sabes cómo hacerlo?'; - - @override - String get follow_step_by_step_guide => 'Sigue la guía paso a paso'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Por favor, completa todos los campos'; - - @override - String get submit => 'Enviar'; - - @override - String get exit => 'Salir'; - - @override - String get previous => 'Anterior'; - - @override - String get next => 'Siguiente'; - - @override - String get done => 'Listo'; - - @override - String get step_1 => 'Paso 1'; - - @override - String get first_go_to => 'Primero, ve a'; - - @override - String get something_went_wrong => 'Algo salió mal'; - - @override - String get piped_instance => 'Instancia del servidor Piped'; - - @override - String get piped_description => - 'La instancia del servidor Piped a utilizar para la coincidencia de pistas'; - - @override - String get piped_warning => - 'Algunas pueden no funcionar bien, úsalas bajo tu propio riesgo'; - - @override - String get invidious_instance => 'Instancia del Servidor Invidious'; - - @override - String get invidious_description => - 'La instancia del servidor Invidious para identificar pistas'; - - @override - String get invidious_warning => - 'Algunas instancias podrían no funcionar bien. Úselas bajo su propio riesgo'; - - @override - String get generate => 'Generar'; - - @override - String track_exists(Object track) { - return 'La canción $track ya existe'; - } - - @override - String get replace_downloaded_tracks => - 'Reemplazar todas las canciones descargadas'; - - @override - String get skip_download_tracks => - 'Omitir la descarga de todas las canciones descargadas'; - - @override - String get do_you_want_to_replace => - '¿Deseas reemplazar la canción existente?'; - - @override - String get replace => 'Reemplazar'; - - @override - String get skip => 'Omitir'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Seleccionar hasta $count $type'; - } - - @override - String get select_genres => 'Seleccionar Géneros'; - - @override - String get add_genres => 'Agregar Géneros'; - - @override - String get country => 'País'; - - @override - String get number_of_tracks_generate => 'Número de canciones a generar'; - - @override - String get acousticness => 'Acousticness'; - - @override - String get danceability => 'Danceability'; - - @override - String get energy => 'Energía'; - - @override - String get instrumentalness => 'Instrumentalidad'; - - @override - String get liveness => 'En vivo'; - - @override - String get loudness => 'Volumen'; - - @override - String get speechiness => 'Habla'; - - @override - String get valence => 'Valencia'; - - @override - String get popularity => 'Popularidad'; - - @override - String get key => 'Tono'; - - @override - String get duration => 'Duración (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Modo'; - - @override - String get time_signature => 'Compás'; - - @override - String get short => 'Corto'; - - @override - String get medium => 'Medio'; - - @override - String get long => 'Largo'; - - @override - String get min => 'Mín.'; - - @override - String get max => 'Máx.'; - - @override - String get target => 'Objetivo'; - - @override - String get moderate => 'Moderado'; - - @override - String get deselect_all => 'Deseleccionar todo'; - - @override - String get select_all => 'Seleccionar todo'; - - @override - String get are_you_sure => '¿Estás seguro?'; - - @override - String get generating_playlist => - 'Generando tu lista de reproducción personalizada...'; - - @override - String selected_count_tracks(Object count) { - return 'Seleccionadas $count canciones'; - } - - @override - String get download_warning => - 'Si descargas todas las canciones de golpe, estás claramente pirateando música y causando daño a la sociedad creativa de la música. Espero que seas consciente de esto y siempre intentes respetar y apoyar el arduo trabajo de los artistas'; - - @override - String get download_ip_ban_warning => - 'Por cierto, tu IP puede ser bloqueada en YouTube debido a solicitudes de descarga excesivas. El bloqueo de IP significa que no podrás usar YouTube (incluso si has iniciado sesión) durante al menos 2-3 meses desde esa dirección IP. Y Spotube no se hace responsable si esto ocurre alguna vez'; - - @override - String get by_clicking_accept_terms => - 'Al hacer clic en \'Aceptar\', aceptas los siguientes términos:'; - - @override - String get download_agreement_1 => 'Sé que estoy pirateando música. Soy malo'; - - @override - String get download_agreement_2 => - 'Apoyaré al artista donde pueda y solo lo hago porque no tengo dinero para comprar su arte'; - - @override - String get download_agreement_3 => - 'Soy completamente consciente de que mi IP puede ser bloqueada en YouTube y no responsabilizo a Spotube ni a sus dueños/contribuyentes por cualquier incidente causado por mi acción actual'; - - @override - String get decline => 'Rechazar'; - - @override - String get accept => 'Aceptar'; - - @override - String get details => 'Detalles'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Canal'; - - @override - String get likes => 'Me gusta'; - - @override - String get dislikes => 'No me gusta'; - - @override - String get views => 'Vistas'; - - @override - String get streamUrl => 'URL del streaming'; - - @override - String get stop => 'Detener'; - - @override - String get sort_newest => 'Ordenar por más recientes'; - - @override - String get sort_oldest => 'Ordenar por más antiguos'; - - @override - String get sleep_timer => 'Temporizador de apagado'; - - @override - String mins(Object minutes) { - return '$minutes minutos'; - } - - @override - String hours(Object hours) { - return '$hours horas'; - } - - @override - String hour(Object hours) { - return '$hours hora'; - } - - @override - String get custom_hours => 'Horas personalizadas'; - - @override - String get logs => 'Registros'; - - @override - String get developers => 'Desarrolladores'; - - @override - String get not_logged_in => 'No has iniciado sesión'; - - @override - String get search_mode => 'Modo de búsqueda'; - - @override - String get audio_source => 'Fuente de audio'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => 'Error al cifrar'; - - @override - String get encryption_failed_warning => - 'Spotube utiliza el cifrado para almacenar sus datos de forma segura. Pero ha fallado. Por lo tanto, volverá a un almacenamiento no seguro\nSi está utilizando Linux, asegúrese de tener instalados servicios secretos como gnome-keyring, kde-wallet y keepassxc'; - - @override - String get querying_info => 'Consultando información...'; - - @override - String get piped_api_down => 'La API de Piped no está disponible'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'La instancia de Piped $pipedInstance no está funcionando en este momento\n\nCambie la instancia o cambie el \'Tipo de API\' a la API oficial de YouTube\n\nAsegúrese de reiniciar la aplicación después del cambio'; - } - - @override - String get you_are_offline => 'Actualmente estás sin conexión'; - - @override - String get connection_restored => 'Se ha restablecido tu conexión a internet'; - - @override - String get use_system_title_bar => 'Usar la barra de título del sistema'; - - @override - String get crunching_results => 'Procesando resultados...'; - - @override - String get search_to_get_results => 'Buscar para obtener resultados'; - - @override - String get use_amoled_mode => 'Usar modo AMOLED'; - - @override - String get pitch_dark_theme => 'Tema oscuro de dart'; - - @override - String get normalize_audio => 'Normalizar audio'; - - @override - String get change_cover => 'Cambiar portada'; - - @override - String get add_cover => 'Agregar portada'; - - @override - String get restore_defaults => 'Restaurar valores predeterminados'; - - @override - String get download_music_format => 'Formato de descarga de música'; - - @override - String get streaming_music_format => 'Formato de transmisión de música'; - - @override - String get download_music_quality => 'Calidad de descarga de música'; - - @override - String get streaming_music_quality => 'Calidad de transmisión de música'; - - @override - String get login_with_lastfm => 'Iniciar sesión con Last.fm'; - - @override - String get connect => 'Conectar'; - - @override - String get disconnect_lastfm => 'Desconectar de Last.fm'; - - @override - String get disconnect => 'Desconectar'; - - @override - String get username => 'Nombre de usuario'; - - @override - String get password => 'Contraseña'; - - @override - String get login => 'Iniciar sesión'; - - @override - String get login_with_your_lastfm => - 'Iniciar sesión con tu cuenta de Last.fm'; - - @override - String get scrobble_to_lastfm => 'Scrobble a Last.fm'; - - @override - String get go_to_album => 'Ir al álbum'; - - @override - String get discord_rich_presence => 'Presencia rica en Discord'; - - @override - String get browse_all => 'Explorar todo'; - - @override - String get genres => 'Géneros'; - - @override - String get explore_genres => 'Explorar géneros'; - - @override - String get friends => 'Amigos'; - - @override - String get no_lyrics_available => - 'Lo siento, no se pueden encontrar las letras de esta pista'; - - @override - String get start_a_radio => 'Iniciar una Radio'; - - @override - String get how_to_start_radio => '¿Cómo quieres iniciar la radio?'; - - @override - String get replace_queue_question => - '¿Quieres reemplazar la lista de reproducción actual o añadir a ella?'; - - @override - String get endless_playback => 'Reproducción Infinita'; - - @override - String get delete_playlist => 'Eliminar Lista de Reproducción'; - - @override - String get delete_playlist_confirmation => - '¿Estás seguro de que quieres eliminar esta lista de reproducción?'; - - @override - String get local_tracks => 'Pistas Locales'; - - @override - String get local_tab => 'Local'; - - @override - String get song_link => 'Enlace de la Canción'; - - @override - String get skip_this_nonsense => 'Saltar esta tontería'; - - @override - String get freedom_of_music => '“Libertad de la Música”'; - - @override - String get freedom_of_music_palm => - '“Libertad de la Música en la palma de tu mano”'; - - @override - String get get_started => 'Empecemos'; - - @override - String get youtube_source_description => 'Recomendado y funciona mejor.'; - - @override - String get piped_source_description => - '¿Te sientes libre? Igual que YouTube pero más libre.'; - - @override - String get jiosaavn_source_description => - 'Lo mejor para la región del sur de Asia.'; - - @override - String get invidious_source_description => - 'Similar a Piped, pero con mayor disponibilidad'; - - @override - String highest_quality(Object quality) { - return 'Mayor Calidad: $quality'; - } - - @override - String get select_audio_source => 'Seleccionar Fuente de Audio'; - - @override - String get endless_playback_description => - 'Añadir automáticamente nuevas canciones\nal final de la cola de reproducción'; - - @override - String get choose_your_region => 'Elige tu región'; - - @override - String get choose_your_region_description => - 'Esto ayudará a Spotube a mostrarte el contenido adecuado\npara tu ubicación.'; - - @override - String get choose_your_language => 'Elige tu idioma'; - - @override - String get help_project_grow => 'Ayuda a que este proyecto crezca'; - - @override - String get help_project_grow_description => - 'Spotube es un proyecto de código abierto. Puedes ayudar a que este proyecto crezca contribuyendo al proyecto, informando errores o sugiriendo nuevas funciones.'; - - @override - String get contribute_on_github => 'Contribuir en GitHub'; - - @override - String get donate_on_open_collective => 'Donar en Open Collective'; - - @override - String get browse_anonymously => 'Navegar Anónimamente'; - - @override - String get enable_connect => 'Habilitar conexión'; - - @override - String get enable_connect_description => - 'Controla Spotube desde otros dispositivos'; - - @override - String get devices => 'Dispositivos'; - - @override - String get select => 'Seleccionar'; - - @override - String connect_client_alert(Object client) { - return 'Estás siendo controlado por $client'; - } - - @override - String get this_device => 'Este dispositivo'; - - @override - String get remote => 'Remoto'; - - @override - String get stats => 'Estadísticas'; - - @override - String and_n_more(Object count) { - return 'y $count más'; - } - - @override - String get recently_played => 'Recién reproducido'; - - @override - String get browse_more => 'Explorar más'; - - @override - String get no_title => 'Sin título'; - - @override - String get not_playing => 'No reproduciendo'; - - @override - String get epic_failure => '¡Fallo épico!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Se añadieron $tracks_length canciones a la cola'; - } - - @override - String get spotube_has_an_update => 'Spotube tiene una actualización'; - - @override - String get download_now => 'Descargar ahora'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum ha sido lanzado'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version ha sido lanzado'; - } - - @override - String get read_the_latest => 'Lee las últimas '; - - @override - String get release_notes => 'notas de la versión'; - - @override - String get pick_color_scheme => 'Elige esquema de color'; - - @override - String get save => 'Guardar'; - - @override - String get choose_the_device => 'Elige el dispositivo:'; - - @override - String get multiple_device_connected => - 'Hay múltiples dispositivos conectados.\nElige el dispositivo en el que deseas realizar esta acción'; - - @override - String get nothing_found => 'Nada encontrado'; - - @override - String get the_box_is_empty => 'La caja está vacía'; - - @override - String get top_artists => 'Artistas principales'; - - @override - String get top_albums => 'Álbumes principales'; - - @override - String get this_week => 'Esta semana'; - - @override - String get this_month => 'Este mes'; - - @override - String get last_6_months => 'Últimos 6 meses'; - - @override - String get this_year => 'Este año'; - - @override - String get last_2_years => 'Últimos 2 años'; - - @override - String get all_time => 'Todos los tiempos'; - - @override - String powered_by_provider(Object providerName) { - return 'Impulsado por $providerName'; - } - - @override - String get email => 'Correo electrónico'; - - @override - String get profile_followers => 'Seguidores'; - - @override - String get birthday => 'Cumpleaños'; - - @override - String get subscription => 'Suscripción'; - - @override - String get not_born => 'No nacido'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Perfil'; - - @override - String get no_name => 'Sin nombre'; - - @override - String get edit => 'Editar'; - - @override - String get user_profile => 'Perfil de usuario'; - - @override - String count_plays(Object count) { - return '$count reproducciones'; - } - - @override - String get streaming_fees_hypothetical => - 'Tarifas de streaming (hipotéticas)'; - - @override - String get minutes_listened => 'Minutos escuchados'; - - @override - String get streamed_songs => 'Canciones reproducidas'; - - @override - String count_streams(Object count) { - return '$count streams'; - } - - @override - String get owned_by_you => 'En tu posesión'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'Copiado $shareUrl al portapapeles'; - } - - @override - String get hipotetical_calculation => - '*Este cálculo se basa en el pago promedio por reproducción en plataformas de música en línea (de 0,003 a 0,005 USD). Es hipotético y sirve para dar al usuario una idea de cuánto habría pagado a los artistas si hubiera escuchado su canción en distintas plataformas.'; - - @override - String count_mins(Object minutes) { - return '$minutes minutos'; - } - - @override - String get summary_minutes => 'minutos'; - - @override - String get summary_listened_to_music => 'Escuchó música'; - - @override - String get summary_songs => 'canciones'; - - @override - String get summary_streamed_overall => 'Transmitido en general'; - - @override - String get summary_owed_to_artists => 'Debido a los artistas\nEste mes'; - - @override - String get summary_artists => 'artistas'; - - @override - String get summary_music_reached_you => 'La música te alcanzó'; - - @override - String get summary_full_albums => 'álbumes completos'; - - @override - String get summary_got_your_love => 'Obtuvo tu amor'; - - @override - String get summary_playlists => 'listas de reproducción'; - - @override - String get summary_were_on_repeat => 'Estaban en repetición'; - - @override - String total_money(Object money) { - return 'Total $money'; - } - - @override - String get webview_not_found => 'No se encontró el Webview'; - - @override - String get webview_not_found_description => - 'No hay tiempo de ejecución de Webview instalado en su dispositivo.\nSi está instalado, asegúrese de que esté en el environment PATH\n\nDespués de instalar, reinicie la aplicación'; - - @override - String get unsupported_platform => 'Plataforma no soportada'; - - @override - String get cache_music => 'Caché de música'; - - @override - String get open => 'Abrir'; - - @override - String get cache_folder => 'Carpeta de caché'; - - @override - String get export => 'Exportar'; - - @override - String get clear_cache => 'Limpiar caché'; - - @override - String get clear_cache_confirmation => '¿Desea limpiar la caché?'; - - @override - String get export_cache_files => 'Exportar archivos en caché'; - - @override - String found_n_files(Object count) { - return 'Se encontraron $count archivos'; - } - - @override - String get export_cache_confirmation => '¿Desea exportar estos archivos a'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Se exportaron $filesExported de $files archivos'; - } - - @override - String get undo => 'Deshacer'; - - @override - String get download_all => 'Descargar todo'; - - @override - String get add_all_to_playlist => 'Agregar todo a la lista de reproducción'; - - @override - String get add_all_to_queue => 'Agregar todo a la cola'; - - @override - String get play_all_next => 'Reproducir todo a continuación'; - - @override - String get pause => 'Pausa'; - - @override - String get view_all => 'Ver todo'; - - @override - String get no_tracks_added_yet => - 'Parece que aún no has agregado ninguna canción.'; - - @override - String get no_tracks => 'Parece que no hay canciones aquí.'; - - @override - String get no_tracks_listened_yet => - 'Parece que no has escuchado nada todavía.'; - - @override - String get not_following_artists => 'No sigues a ningún artista.'; - - @override - String get no_favorite_albums_yet => - 'Parece que aún no has agregado ningún álbum a tus favoritos.'; - - @override - String get no_logs_found => 'No se encontraron registros'; - - @override - String get youtube_engine => 'Motor de YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine no está instalado'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine no está instalado en tu sistema.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Asegúrate de que esté disponible en la variable PATH o\nestablece la ruta absoluta del ejecutable de $engine a continuación.'; - } - - @override - String get youtube_engine_unix_issue_message => - 'En macOS/Linux/sistemas operativos similares a Unix, establecer la ruta en .zshrc/.bashrc/.bash_profile etc. no funcionará.\nNecesitas establecer la ruta en el archivo de configuración del shell.'; - - @override - String get download => 'Descargar'; - - @override - String get file_not_found => 'Archivo no encontrado'; - - @override - String get custom => 'Personalizado'; - - @override - String get add_custom_url => 'Agregar URL personalizada'; - - @override - String get edit_port => 'Editar puerto'; - - @override - String get port_helper_msg => - 'El valor predeterminado es -1, lo que indica un número aleatorio. Si tienes un firewall configurado, se recomienda establecer esto.'; - - @override - String connect_request(Object client) { - return '¿Permitir que $client se conecte?'; - } - - @override - String get connection_request_denied => - 'Conexión denegada. El usuario denegó el acceso.'; - - @override - String get an_error_occurred => 'Ocurrió un error'; - - @override - String get copy_to_clipboard => 'Copiar al portapapeles'; - - @override - String get view_logs => 'Ver registros'; - - @override - String get retry => 'Reintentar'; - - @override - String get no_default_metadata_provider_selected => - 'No has configurado un proveedor de metadatos predeterminado'; - - @override - String get manage_metadata_providers => 'Gestionar proveedores de metadatos'; - - @override - String get open_link_in_browser => '¿Abrir enlace en el navegador?'; - - @override - String get do_you_want_to_open_the_following_link => - '¿Quieres abrir el siguiente enlace?'; - - @override - String get unsafe_url_warning => - 'Abrir enlaces de fuentes no confiables puede ser inseguro. ¡Ten cuidado!\nTambién puedes copiar el enlace al portapapeles.'; - - @override - String get copy_link => 'Copiar enlace'; - - @override - String get building_your_timeline => - 'Construyendo tu línea de tiempo según tus escuchas…'; - - @override - String get official => 'Oficial'; - - @override - String author_name(Object author) { - return 'Autor: $author'; - } - - @override - String get third_party => 'Terceros'; - - @override - String get plugin_requires_authentication => - 'El complemento requiere autenticación'; - - @override - String get update_available => 'Actualización disponible'; - - @override - String get supports_scrobbling => 'Admite scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Este complemento scrobblea tu música para generar tu historial de reproducción.'; - - @override - String get default_metadata_source => 'Fuente de metadatos predeterminada'; - - @override - String get set_default_metadata_source => - 'Establecer fuente de metadatos predeterminada'; - - @override - String get default_audio_source => 'Fuente de audio predeterminada'; - - @override - String get set_default_audio_source => - 'Establecer fuente de audio predeterminada'; - - @override - String get set_default => 'Establecer como predeterminado'; - - @override - String get support => 'Soporte'; - - @override - String get support_plugin_development => - 'Apoyar el desarrollo del complemento'; - - @override - String can_access_name_api(Object name) { - return '- Puede acceder a la API de **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - '¿Deseas instalar este complemento?'; - - @override - String get third_party_plugin_warning => - 'Este complemento proviene de un repositorio de terceros. Asegúrate de confiar en la fuente antes de instalarlo.'; - - @override - String get author => 'Autor'; - - @override - String get this_plugin_can_do_following => - 'Este complemento puede hacer lo siguiente'; - - @override - String get install => 'Instalar'; - - @override - String get install_a_metadata_provider => - 'Instalar un proveedor de metadatos'; - - @override - String get no_tracks_playing => - 'No hay ninguna pista reproduciéndose actualmente'; - - @override - String get synced_lyrics_not_available => - 'Las letras sincronizadas no están disponibles para esta canción. Por favor, utiliza'; - - @override - String get plain_lyrics => 'Letras sin formato'; - - @override - String get tab_instead => 'en su lugar, usa la tecla Tab.'; - - @override - String get disclaimer => 'Descargo de responsabilidad'; - - @override - String get third_party_plugin_dmca_notice => - 'El equipo de Spotube no asume ninguna responsabilidad (incluida la legal) por complementos de \"terceros\". Úsalos bajo tu propio riesgo. Para errores o problemas, repórtalos en el repositorio del complemento.\n\nSi algún complemento de “terceros” infringe los ToS/DMCA de algún servicio o entidad legal, por favor, solicita al autor del complemento o a la plataforma de alojamiento (p. ej., GitHub/Codeberg) que tome medidas. Los complementos etiquetados como “de terceros” son mantenidos públicamente por la comunidad; no los gestionamos y no podemos intervenir.\n\n'; - - @override - String get input_does_not_match_format => - 'La entrada no coincide con el formato requerido'; - - @override - String get plugins => 'Plugins'; - - @override - String get paste_plugin_download_url => - 'Pega la URL de descarga, el repositorio de GitHub/Codeberg o el enlace directo al archivo .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Descargar e instalar el complemento desde una URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Error al añadir el complemento: $error'; - } - - @override - String get upload_plugin_from_file => 'Subir complemento desde archivo'; - - @override - String get installed => 'Instalado'; - - @override - String get available_plugins => 'Complementos disponibles'; - - @override - String get configure_plugins => - 'Configura tus propios plugins de proveedor de metadatos y fuente de audio'; - - @override - String get audio_scrobblers => 'Scrobblers de audio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Fuente: '; - - @override - String get uncompressed => 'Sin comprimir'; - - @override - String get dab_music_source_description => - 'Para audiófilos. Proporciona transmisiones de audio de alta calidad/sin pérdida. Coincidencia precisa de pistas basada en ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_eu.dart b/lib/l10n/generated/app_localizations_eu.dart deleted file mode 100644 index 5f80397e..00000000 --- a/lib/l10n/generated/app_localizations_eu.dart +++ /dev/null @@ -1,1577 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Basque (`eu`). -class AppLocalizationsEu extends AppLocalizations { - AppLocalizationsEu([String locale = 'eu']) : super(locale); - - @override - String get guest => 'Gonbidatua'; - - @override - String get browse => 'Arakatu'; - - @override - String get search => 'Bilatu'; - - @override - String get library => 'Liburutegia'; - - @override - String get lyrics => 'Hitzak'; - - @override - String get settings => 'Ezarpenak'; - - @override - String get genre_categories_filter => 'Kategoria edo generoak filtratu...'; - - @override - String get genre => 'Generoa'; - - @override - String get personalized => 'Pertsonalizatua'; - - @override - String get featured => 'Nabarmenduak'; - - @override - String get new_releases => 'Argitaratze berriak'; - - @override - String get songs => 'Abestiak'; - - @override - String playing_track(Object track) { - return '$track erreproduzitzen'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Uneko zerrenda ezabatuko da. $track_length abesti ezabatuko dira.\nJarraitu nahi duzu?'; - } - - @override - String get load_more => 'Gehiago kargatu'; - - @override - String get playlists => 'Zerrendak'; - - @override - String get artists => 'Artistak'; - - @override - String get albums => 'Albumak'; - - @override - String get tracks => 'Kantak'; - - @override - String get downloads => 'Deskargak'; - - @override - String get filter_playlists => 'Zure zerrendak filtratu...'; - - @override - String get liked_tracks => 'Gustuko Kantak'; - - @override - String get liked_tracks_description => 'Zure gustuko kanta guztiak'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Sortu zerrenda bat'; - - @override - String get update_playlist => 'Eguneratu zerrenda'; - - @override - String get create => 'Sortu'; - - @override - String get cancel => 'Ezeztatu'; - - @override - String get update => 'Eguneratu'; - - @override - String get playlist_name => 'Zerrenda Izena'; - - @override - String get name_of_playlist => 'Zerrendaren izena'; - - @override - String get description => 'Deskribapena'; - - @override - String get public => 'Publikoa'; - - @override - String get collaborative => 'Kolaboratiboa'; - - @override - String get search_local_tracks => 'Bilatu kanta lokalak...'; - - @override - String get play => 'Erreproduzitu'; - - @override - String get delete => 'Ezabatu'; - - @override - String get none => 'Batere ez'; - - @override - String get sort_a_z => 'Ordenatu A-Z'; - - @override - String get sort_z_a => 'Ordenatu Z-A'; - - @override - String get sort_artist => 'Ordenatu Artistaren arabera'; - - @override - String get sort_album => 'Ordenatu Albumaren arabera'; - - @override - String get sort_duration => 'Ordenar Iraupenaren arabera'; - - @override - String get sort_tracks => 'Ordenatu Kantak'; - - @override - String currently_downloading(Object tracks_length) { - return 'Oraintxe ($tracks_length) deskargatzen'; - } - - @override - String get cancel_all => 'Ezeztatu dena'; - - @override - String get filter_artist => 'Filtratu artistak...'; - - @override - String followers(Object followers) { - return '$followers Jarraitzaile'; - } - - @override - String get add_artist_to_blacklist => 'Gehitu artista zerrenda beltzera'; - - @override - String get top_tracks => 'Top Kantak'; - - @override - String get fans_also_like => 'Fan-ek hau ere gustuko dute'; - - @override - String get loading => 'Kargatzen...'; - - @override - String get artist => 'Artista'; - - @override - String get blacklisted => 'Zerrenda beltzean'; - - @override - String get following => 'Jarraitzen'; - - @override - String get follow => 'Jarraitu'; - - @override - String get artist_url_copied => 'Artistaren URL-a arbelera kopiatua'; - - @override - String added_to_queue(Object tracks) { - return '$tracks kanta zerrendara gehituak'; - } - - @override - String get filter_albums => 'Albumak filtratu...'; - - @override - String get synced => 'Sinkronizatuta'; - - @override - String get plain => 'Arrunta'; - - @override - String get shuffle => 'Ausaz'; - - @override - String get search_tracks => 'Bilatu kantak...'; - - @override - String get released => 'Argitaratua'; - - @override - String error(Object error) { - return 'Errorea: $error'; - } - - @override - String get title => 'Izenburua'; - - @override - String get time => 'Iraupena'; - - @override - String get more_actions => 'Ekintza gehiago'; - - @override - String download_count(Object count) { - return '($count) deskarga'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Gehitu ($count) zerrendara'; - } - - @override - String add_count_to_queue(Object count) { - return 'Gehitu ($count) ilarara'; - } - - @override - String play_count_next(Object count) { - return 'Erreproduzitu hurrengo ($count)-ak'; - } - - @override - String get album => 'Albuma'; - - @override - String copied_to_clipboard(Object data) { - return '$data arbelean kopiatua'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Gehitu $track hurrengo erreprodukzio-zerrendetara'; - } - - @override - String get add => 'Gehitu'; - - @override - String added_track_to_queue(Object track) { - return '$track zerrendan gehitua'; - } - - @override - String get add_to_queue => 'Gehitu zerrendan'; - - @override - String track_will_play_next(Object track) { - return '$track erreproduzituko da ondoren'; - } - - @override - String get play_next => 'Hurrengo erreprodukzioa'; - - @override - String removed_track_from_queue(Object track) { - return '$track zerrendatik ezabatua'; - } - - @override - String get remove_from_queue => 'Ezabatu ilaratik'; - - @override - String get remove_from_favorites => 'Ezabatu gogokoetatik'; - - @override - String get save_as_favorite => 'Gorde gogokoetan'; - - @override - String get add_to_playlist => 'Gehitu zerrendara'; - - @override - String get remove_from_playlist => 'Ezabatu zerrendatik'; - - @override - String get add_to_blacklist => 'Gehitu zerrenda beltzera'; - - @override - String get remove_from_blacklist => 'Ezabatu zerrenda beltzetik'; - - @override - String get share => 'Elkarbanatu'; - - @override - String get mini_player => 'Mini Erreproduzitzailea'; - - @override - String get slide_to_seek => 'Arrastatu aurrerantz edo atzearantz bilatzeko'; - - @override - String get shuffle_playlist => 'Erreproduzitu zerrenda ausazko ordenean'; - - @override - String get unshuffle_playlist => 'Desgaitu ausazko erreprodukzioa'; - - @override - String get previous_track => 'Aurreko pista'; - - @override - String get next_track => 'Hurrengo pista'; - - @override - String get pause_playback => 'Pausatu erreprodukzioa'; - - @override - String get resume_playback => 'Berrabiarazi erreprodukzioa'; - - @override - String get loop_track => 'Kanta begiztan'; - - @override - String get no_loop => 'Ez dago loop-ik'; - - @override - String get repeat_playlist => 'Errepikatu lista'; - - @override - String get queue => 'Ilara'; - - @override - String get alternative_track_sources => 'Kanten iturri alternatiboak'; - - @override - String get download_track => 'Deskargatu kanta'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks kanta zerrendan'; - } - - @override - String get clear_all => 'Garbitu dena'; - - @override - String get show_hide_ui_on_hover => - 'Erakutsi/Ezkutatu interfazea kurtsorea pasatzean'; - - @override - String get always_on_top => 'Beti ikusgai'; - - @override - String get exit_mini_player => 'Irten mini erreproduzitzailetik'; - - @override - String get download_location => 'Deskargen kokapena'; - - @override - String get local_library => 'Liburutegi lokala'; - - @override - String get add_library_location => 'Gehitu liburutegira'; - - @override - String get remove_library_location => 'Kendu liburutegitik'; - - @override - String get account => 'Kontua'; - - @override - String get logout => 'Itxi saioa'; - - @override - String get logout_of_this_account => 'Itxi kontu honen saioa'; - - @override - String get language_region => 'Hizkuntza eta Herrialdea'; - - @override - String get language => 'Hizkuntza'; - - @override - String get system_default => 'Sisteman lehenetsia'; - - @override - String get market_place_region => 'Dendaren herrialdea'; - - @override - String get recommendation_country => 'Gomendio herrialdea'; - - @override - String get appearance => 'Itxura'; - - @override - String get layout_mode => 'Diseinua'; - - @override - String get override_layout_settings => - 'Responsive diseinuaren ezarpenak ezeztatu'; - - @override - String get adaptive => 'Moldagarria'; - - @override - String get compact => 'Trinkoa'; - - @override - String get extended => 'Hedatua'; - - @override - String get theme => 'Gaia'; - - @override - String get dark => 'Iluna'; - - @override - String get light => 'Argia'; - - @override - String get system => 'Sistema'; - - @override - String get accent_color => 'Azentu kolorea'; - - @override - String get sync_album_color => 'Sinkronizatu albumaren kolorea'; - - @override - String get sync_album_color_description => - 'Albumaren artearen kolore nagusia erabili azentu kolore bezala'; - - @override - String get playback => 'Erreprodukzioa'; - - @override - String get audio_quality => 'Audioaren kalitatea'; - - @override - String get high => 'Altua'; - - @override - String get low => 'Baxua'; - - @override - String get pre_download_play => 'Aurre-deskargatu eta erreproduzitu'; - - @override - String get pre_download_play_description => - 'Streaming egin beharrean, byte-ak deskargatu eta erreproduzitu (banda-zabalera handia duten erabiltzaileentzat gomendagarria)'; - - @override - String get skip_non_music => - 'Musika ez diren segmentuak baztertu (SponsorBlock)'; - - @override - String get blacklist_description => 'Zerrenda beltzeko abesti eta artistak'; - - @override - String get wait_for_download_to_finish => - 'Mesedez, itxaron uneko deskarga bukatu arte'; - - @override - String get desktop => 'Mahaigaina'; - - @override - String get close_behavior => 'Ixterako Portaera'; - - @override - String get close => 'Itxi'; - - @override - String get minimize_to_tray => 'Sistemako erretilura minimizatu'; - - @override - String get show_tray_icon => 'Erakutsi ikonoa sistemaren erretiluan'; - - @override - String get about => 'Honi buruz'; - - @override - String get u_love_spotube => 'Badakigu Spotube maite duzula'; - - @override - String get check_for_updates => 'Bilatu eguneraketak'; - - @override - String get about_spotube => 'Spotube-ri buruz'; - - @override - String get blacklist => 'Zerrenda beltza'; - - @override - String get please_sponsor => 'Mesedez, babestu/diruz lagundu'; - - @override - String get spotube_description => - 'Spotube, arina, plataforma-anitza eta doakoa den Spotify-ren bezeroa'; - - @override - String get version => 'Bertsioa'; - - @override - String get build_number => 'Konpilazio zenbakia'; - - @override - String get founder => 'Sortzailea'; - - @override - String get repository => 'Errepositorioa'; - - @override - String get bug_issues => 'Erroreak eta arazoak'; - - @override - String get made_with => 'Bangladesh🇧🇩-en ❤️-z egina'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Lizentzia'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Ez arduratu, zure kredentzialak ez ditugu bilduko edo inorekin elkarbanatuko'; - - @override - String get know_how_to_login => 'Ez dakizu nola egin?'; - - @override - String get follow_step_by_step_guide => 'Jarraitu pausoz-pausoko gida'; - - @override - String cookie_name_cookie(Object name) { - return '$name cookiea'; - } - - @override - String get fill_in_all_fields => 'Mesedez, osatu eremu guztiak'; - - @override - String get submit => 'Bidali'; - - @override - String get exit => 'Irten'; - - @override - String get previous => 'Aurrekoa'; - - @override - String get next => 'Hurrengoa'; - - @override - String get done => 'Eginda'; - - @override - String get step_1 => '1. pausua'; - - @override - String get first_go_to => 'Hasteko, joan hona'; - - @override - String get something_went_wrong => 'Zerbaitek huts egin du'; - - @override - String get piped_instance => 'Piped zerbitzariaren instantzia'; - - @override - String get piped_description => - 'Kanten koizidentzietan erabiltzeko Piped zerbitzariaren instantzia'; - - @override - String get piped_warning => - 'Batzuk agian ez dute ongi funtzionatuko, zure ardurapean erabili'; - - @override - String get invidious_instance => 'Invidious zerbitzari instantzia'; - - @override - String get invidious_description => - 'Invidious zerbitzari instantzia, pistak bat egiteko'; - - @override - String get invidious_warning => - 'Instantzia batzuek ez dute ondo funtzionatuko. Zure erantzukizunpean erabili'; - - @override - String get generate => 'Sortu'; - - @override - String track_exists(Object track) { - return '$track kanta dagoeneko badago'; - } - - @override - String get replace_downloaded_tracks => - 'Ordezkatu deskargatutako kanta guztiak'; - - @override - String get skip_download_tracks => - 'Deskargatutako kanta guztien deskarga baztertu'; - - @override - String get do_you_want_to_replace => 'Dagoen kanta ordezkatu nahi duzu??'; - - @override - String get replace => 'Ordezkatu'; - - @override - String get skip => 'Baztertu'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Aukertu $count $type'; - } - - @override - String get select_genres => 'Aukeratu Generoak'; - - @override - String get add_genres => 'Gehitu Generoak'; - - @override - String get country => 'Herrialdea'; - - @override - String get number_of_tracks_generate => 'Sortzeko kanta kopurua'; - - @override - String get acousticness => 'Akustikotasuna'; - - @override - String get danceability => 'Dantzagarritasuna'; - - @override - String get energy => 'Energia'; - - @override - String get instrumentalness => 'Instrumentaltasuna'; - - @override - String get liveness => 'Zuzenean'; - - @override - String get loudness => 'Ozentasuna'; - - @override - String get speechiness => 'Hitzaldia'; - - @override - String get valence => 'Balentzia'; - - @override - String get popularity => 'Populartasuna'; - - @override - String get key => 'Tonua'; - - @override - String get duration => 'Iraupena (s)'; - - @override - String get tempo => 'Tenpoa (BPM)'; - - @override - String get mode => 'Modua'; - - @override - String get time_signature => 'Konpasa'; - - @override - String get short => 'Motza'; - - @override - String get medium => 'Ertaina'; - - @override - String get long => 'Luzea'; - - @override - String get min => 'Min.'; - - @override - String get max => 'Max.'; - - @override - String get target => 'Helburua'; - - @override - String get moderate => 'Moderatua'; - - @override - String get deselect_all => 'Desaukeratu dena'; - - @override - String get select_all => 'Aukeratu dena'; - - @override - String get are_you_sure => 'Ziur zaude?'; - - @override - String get generating_playlist => - 'Zure pertsonalizatutako zerrenda sortzen...'; - - @override - String selected_count_tracks(Object count) { - return '$count kanta aukeratuta'; - } - - @override - String get download_warning => - 'Abesti guztiak aldi berean deskargatuz gero, argi dago musika pirateatzen ari zarela eta musikaren gizarte sortzaileari kalte egiten diozula. Honen jakitun izan eta artisten lan gogorra errespetatu eta babestea espero dut'; - - @override - String get download_ip_ban_warning => - 'Bidenabar, baliteke zure IPa YouTuben blokeatzea deskarga eskera gehiegi egiten badituzu. IPa blokeatzeak esan nahi du ezin izango duzula YouTube erabili (nahiz eta saioa hasia izan) gutxienez 2-3 hilabetez IP helbide horretatik. Eta Spotube ez da erantzule izango hori gertatzen bazaizu'; - - @override - String get by_clicking_accept_terms => - '\'Onartu\' klikatzean, ondorengo baldintzak onartzen dituzu:'; - - @override - String get download_agreement_1 => - 'Badakit musika pirateatzen ari naizela. Gaiztoa naiz'; - - @override - String get download_agreement_2 => - 'Ahal dudanean lagunduko diot artistari baina oraingoz ez dut bere artea erosteko dirurik'; - - @override - String get download_agreement_3 => - 'Erabat jakitun naiz YouTubek nire IPa blokea dezakeela eta ez diot Spotube-ri edo bere jabe/laguntzaileei erantzukizunik eskatuko nire oraingo jokaerak ekar ditzakeen arazoengatik'; - - @override - String get decline => 'Baztertu'; - - @override - String get accept => 'Onartu'; - - @override - String get details => 'Xehetasunak'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanala'; - - @override - String get likes => 'Gustukoak'; - - @override - String get dislikes => 'Ez gustukoak'; - - @override - String get views => 'Ikuspenak'; - - @override - String get streamUrl => 'Streaming-aren URLa'; - - @override - String get stop => 'Gelditu'; - - @override - String get sort_newest => 'Ordenatu gehitu berrienetik'; - - @override - String get sort_oldest => 'Ordenatu gehitu zaharrenetik'; - - @override - String get sleep_timer => 'Itzaltzeko tenporizadorea'; - - @override - String mins(Object minutes) { - return '$minutes minutu'; - } - - @override - String hours(Object hours) { - return '$hours ordu'; - } - - @override - String hour(Object hours) { - return '$hours ordu'; - } - - @override - String get custom_hours => 'Ordu pertsonalizatuak'; - - @override - String get logs => 'Log-ak'; - - @override - String get developers => 'Garatzaileak'; - - @override - String get not_logged_in => 'Ez duzu saioa hasi'; - - @override - String get search_mode => 'Bilaketa modua'; - - @override - String get audio_source => 'Audio Iturria'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => 'Errorea zifratzean'; - - @override - String get encryption_failed_warning => - 'Spotube-ek zifratzea darabil datuak modu seguruan biltegiratzeko. Baina huts egin du. Hori dela eta, biltegiratzea ez da segurua izango\nLinux erabiltzen ari bazara, ziurtatu edozein sekretu-zerbitzu (gnome-keyring, kde-wallet, keepassxc etab.) instalatuta duzula'; - - @override - String get querying_info => 'Informazioa egiaztatzen...'; - - @override - String get piped_api_down => 'Piped-en APIa ez dago eskuragarri'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Piped-en $pipedInstance instantzia ez dago martxan une honetan\n\nAldatu instantzia edo aldatu \'API mota\' YouTuberen API ofizialera\n\nZiurtatu aplikazioa berrabiarazten duzula aldaketa eta gero'; - } - - @override - String get you_are_offline => 'Une honetan konexiorik gabe zaude'; - - @override - String get connection_restored => 'Internet konexioa berrezarri egin da'; - - @override - String get use_system_title_bar => 'Erabili sistemako izenburu barra'; - - @override - String get crunching_results => 'Emaitzak prozesatzen...'; - - @override - String get search_to_get_results => 'Bilatu emaitzak lortzeko'; - - @override - String get use_amoled_mode => 'Erabili AMOLED modua'; - - @override - String get pitch_dark_theme => 'Dart-en gai iluna'; - - @override - String get normalize_audio => 'Normalizatu audioa'; - - @override - String get change_cover => 'Aldatu azala'; - - @override - String get add_cover => 'Gehitu azala'; - - @override - String get restore_defaults => 'Berrezarri berezko balioak'; - - @override - String get download_music_format => 'Musika deskargatzeko formatua'; - - @override - String get streaming_music_format => 'Musika streaming bidezko formatua'; - - @override - String get download_music_quality => 'Musika deskargaren kalitatea'; - - @override - String get streaming_music_quality => 'Streaming bidezko musika kalitatea'; - - @override - String get login_with_lastfm => 'Hasi saioa Last.fm-n'; - - @override - String get connect => 'Konektatu'; - - @override - String get disconnect_lastfm => 'Deskonektatu Last.fm-tik'; - - @override - String get disconnect => 'Deskonektatu'; - - @override - String get username => 'Erabiltzaile izena'; - - @override - String get password => 'Pasahitza'; - - @override - String get login => 'Hasi saioa'; - - @override - String get login_with_your_lastfm => 'Hasi saioa Last.fm-ko zure kontuarekin'; - - @override - String get scrobble_to_lastfm => 'Scrobble Last.fm-ra'; - - @override - String get go_to_album => 'Albumera joan'; - - @override - String get discord_rich_presence => 'Discord-en presentzia aberatsa'; - - @override - String get browse_all => 'Esploratu dena'; - - @override - String get genres => 'Generoak'; - - @override - String get explore_genres => 'Esploratu generoak'; - - @override - String get friends => 'Lagunak'; - - @override - String get no_lyrics_available => - 'Sentitzen dugu, ezin dira kanta honen hitzak aurkitu'; - - @override - String get start_a_radio => 'Hasi Irrati bat'; - - @override - String get how_to_start_radio => 'Nola hasi nahi duzu irratia?'; - - @override - String get replace_queue_question => - 'Uneko zerrenda ordezkatu nahi duzu edo bertan gehitu?'; - - @override - String get endless_playback => 'Amaigabeko erreprodukzioa'; - - @override - String get delete_playlist => 'Ezabatu zerrenda'; - - @override - String get delete_playlist_confirmation => - 'Ziur zaude zerrenda ezabatu nahi duzula?'; - - @override - String get local_tracks => 'Kanta lokalak'; - - @override - String get local_tab => 'Lokalean'; - - @override - String get song_link => 'Kantaren lotura'; - - @override - String get skip_this_nonsense => 'Utzi txorakeria hau'; - - @override - String get freedom_of_music => '“Musika Askatasuna”'; - - @override - String get freedom_of_music_palm => '“Musika Askatasuna zure eskuetan”'; - - @override - String get get_started => 'Has gaitezen'; - - @override - String get youtube_source_description => 'Gomendatua eta hobekien dabilena.'; - - @override - String get piped_source_description => - 'Aske zara? YouTube bezala, baino askeago.'; - - @override - String get jiosaavn_source_description => - 'Asia hegoaldeko herrialdeetarako hoberena.'; - - @override - String get invidious_source_description => - 'Piped-en antzekoa, baina eskuragarritasun handiagoarekin'; - - @override - String highest_quality(Object quality) { - return 'Kalitate Onena: $quality'; - } - - @override - String get select_audio_source => 'Aukeratu Audio Iturria'; - - @override - String get endless_playback_description => - 'Gehitu automatikoki kanta berriak\n ilararen bukaeran'; - - @override - String get choose_your_region => 'Aukeratu zure herrialdea'; - - @override - String get choose_your_region_description => - 'Honekin Spotube-k zure kokalerakuari dagokion edukia\neskeiniko dizu.'; - - @override - String get choose_your_language => 'Aukeratu zure hizkuntza'; - - @override - String get help_project_grow => 'Lagundu proiektu honi hazten'; - - @override - String get help_project_grow_description => - 'Spotube kode irekiko proiektu bat da. Proiektu hau hazten lagundu dezakezu, erroreak jakinaraziz edo ezaugarri berriak proposatuz.'; - - @override - String get contribute_on_github => 'GitHub-en lagundu'; - - @override - String get donate_on_open_collective => 'Open Collective-en diruz lagundu'; - - @override - String get browse_anonymously => 'Nabigatu Anonimoki'; - - @override - String get enable_connect => 'Gaitu konexioa'; - - @override - String get enable_connect_description => - 'Kontrolatu Spotube beste gailu batzuetatik'; - - @override - String get devices => 'Gailuak'; - - @override - String get select => 'Aukeratu'; - - @override - String connect_client_alert(Object client) { - return '$client gailuak kontrolatzen zaitu'; - } - - @override - String get this_device => 'Gailu hau'; - - @override - String get remote => 'Urrunekoa'; - - @override - String get stats => 'Estatistikak'; - - @override - String and_n_more(Object count) { - return 'eta $count gehiago'; - } - - @override - String get recently_played => 'Berriki entzunak'; - - @override - String get browse_more => 'Gehiago Bilatu'; - - @override - String get no_title => 'Titulurik ez'; - - @override - String get not_playing => 'Erreprodukziorik ez'; - - @override - String get epic_failure => 'Sekulako errorea!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length kanta gehitu dira zerrendara'; - } - - @override - String get spotube_has_an_update => 'Spotube-ren eguneraketa bat dago'; - - @override - String get download_now => 'Orain deskargatu'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube $nightlyBuildNum Nightly-a argitaratu da'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version argitaratu da'; - } - - @override - String get read_the_latest => 'Irakurri azken '; - - @override - String get release_notes => 'argitatratze oharrak'; - - @override - String get pick_color_scheme => 'Aukeratu kolore eskema'; - - @override - String get save => 'Gorde'; - - @override - String get choose_the_device => 'Aukeratu gailua:'; - - @override - String get multiple_device_connected => - 'Hainbat gailu daude konektatuta.\nAukeratu zein gailutan aplikatu nahi duzun ekintza hau'; - - @override - String get nothing_found => 'Ezer ez da aurkitu'; - - @override - String get the_box_is_empty => 'Kaxa hutsik dago'; - - @override - String get top_artists => 'Top Artistak'; - - @override - String get top_albums => 'Top Albumak'; - - @override - String get this_week => 'Aste honetan'; - - @override - String get this_month => 'Hilabete honetan'; - - @override - String get last_6_months => 'Azken 6 hilabeteetan'; - - @override - String get this_year => 'Aurten'; - - @override - String get last_2_years => 'Azken 2 urtetan'; - - @override - String get all_time => 'Betidanik'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName-ren eskutik'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Jarraitzaileak'; - - @override - String get birthday => 'Jaiotze-data'; - - @override - String get subscription => 'Harpidetzak'; - - @override - String get not_born => 'Jaio gabe'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profila'; - - @override - String get no_name => 'Izenik Ez'; - - @override - String get edit => 'Editatu'; - - @override - String get user_profile => 'Erabiltzaile Profila'; - - @override - String count_plays(Object count) { - return '$count erreprodukzio'; - } - - @override - String get streaming_fees_hypothetical => - 'Streaming ordainketa (hipotetikoa)'; - - @override - String get minutes_listened => 'Entzundako minutuak'; - - @override - String get streamed_songs => 'Streaming-ez entzundako kantak'; - - @override - String count_streams(Object count) { - return '$count stream'; - } - - @override - String get owned_by_you => 'Zure jabetzakoa'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl arbelera kopiatua'; - } - - @override - String get hipotetical_calculation => - '*Kalkulu hau online musika-streaming plataformetako batez besteko irteerako ordainari (0,003–0,005 USD) oinarrituta dago. Hipotetikoa da eta erabiltzaileari ideia bat ematen laguntzen dio artista nork zenbat kobratu zuen jakiteko, bere abestia plataform desberdinetan entzungo balu.'; - - @override - String count_mins(Object minutes) { - return '$minutes minutu'; - } - - @override - String get summary_minutes => 'minutu'; - - @override - String get summary_listened_to_music => 'Musika entzuten'; - - @override - String get summary_songs => 'kanta'; - - @override - String get summary_streamed_overall => 'Streaming abesti oro har'; - - @override - String get summary_owed_to_artists => 'Hilabete honetan\nartistei zor zaiena'; - - @override - String get summary_artists => 'artisten'; - - @override - String get summary_music_reached_you => 'Musika ailegatu zaizu'; - - @override - String get summary_full_albums => 'album osok'; - - @override - String get summary_got_your_love => 'Jaso dute zure maitasuna'; - - @override - String get summary_playlists => 'zerrenda'; - - @override - String get summary_were_on_repeat => 'Dituzu errepikatze moduan'; - - @override - String total_money(Object money) { - return 'Guztira $money'; - } - - @override - String get webview_not_found => 'Ez da Webview aurkitu'; - - @override - String get webview_not_found_description => - 'Ez dago Webview abiarazte denbora-instalaziorik zure gailuan.\nInstalatuta badago, ziurtatu environment PATH-an dagoela\n\nInstalatu ondoren, berrabiarazi aplikazioa'; - - @override - String get unsupported_platform => 'Plataforma ez onartua'; - - @override - String get cache_music => 'Musika cachean'; - - @override - String get open => 'Ireki'; - - @override - String get cache_folder => 'Cache karpeta'; - - @override - String get export => 'Esportatu'; - - @override - String get clear_cache => 'Garbitu cachea'; - - @override - String get clear_cache_confirmation => 'Cachea garbitu nahi al duzu?'; - - @override - String get export_cache_files => 'Esportatu cache fitxategiak'; - - @override - String found_n_files(Object count) { - return '$count fitxategi aurkitu dira'; - } - - @override - String get export_cache_confirmation => - 'Fitxategi hauek esportatu nahi al dituzu'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported fitxategi esportatu dira $files -tik'; - } - - @override - String get undo => 'Desegondu'; - - @override - String get download_all => 'Guztia deskargatu'; - - @override - String get add_all_to_playlist => 'Guztia playlist-era gehitu'; - - @override - String get add_all_to_queue => 'Guztia zerrendara gehitu'; - - @override - String get play_all_next => 'Guztia hurrengoan jolastu'; - - @override - String get pause => 'Pausatu'; - - @override - String get view_all => 'Ikusi guztia'; - - @override - String get no_tracks_added_yet => - 'Dirudienez, oraindik ez duzu abestirik gehitu.'; - - @override - String get no_tracks => 'Ez dirudi hemen abestirik dagoenik.'; - - @override - String get no_tracks_listened_yet => - 'Dirudienez, oraindik ez duzu ezer entzun.'; - - @override - String get not_following_artists => 'Ez zaude artisten atzetik.'; - - @override - String get no_favorite_albums_yet => - 'Dirudienez, oraindik ez duzu albumik gehitu zure gogokoen artean.'; - - @override - String get no_logs_found => 'Ez dira log-ak aurkitu'; - - @override - String get youtube_engine => 'YouTube Motorra'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine ez dago instalatuta'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine ez dago zure sisteman instalatuta.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Ziurtatu PATH aldagaiaren barruan dagoela edo\nezarri $engine exekutagarriaren helbide absolutua behean.'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/Unix bezalako sistemetan, .zshrc/.bashrc/.bash_profile bezalako fitxategietan bidearen ezarpenak ez dira funtzionatuko.\nBidearen ezarpena shell konfigurazio fitxategian egin behar duzu.'; - - @override - String get download => 'Deskargatu'; - - @override - String get file_not_found => 'Fitxategia ez da aurkitu'; - - @override - String get custom => 'Pertsonalizatua'; - - @override - String get add_custom_url => 'Gehitu URL pertsonalizatua'; - - @override - String get edit_port => 'Editatu portua'; - - @override - String get port_helper_msg => - 'Lehenetsitako balioa -1 da, zenbaki aleatorioa adierazten duena. Su firewall konfiguratu baduzu, gomendatzen da hau ezartzea.'; - - @override - String connect_request(Object client) { - return '$client konektatzea baimendu?'; - } - - @override - String get connection_request_denied => - 'Konektatzea ukatu da. Erabiltzaileak sarbidea ukatu du.'; - - @override - String get an_error_occurred => 'Errore bat gertatu da'; - - @override - String get copy_to_clipboard => 'Hiztegiraino kopiatzea'; - - @override - String get view_logs => 'Erregistroak ikusi'; - - @override - String get retry => 'Berriro saiatu'; - - @override - String get no_default_metadata_provider_selected => - 'Ezarri ez duzu metadaten hornitzaile lehenetsirik'; - - @override - String get manage_metadata_providers => 'Metadaten hornitzaileak kudeatu'; - - @override - String get open_link_in_browser => 'Esteka nabigatzailean irekiko duzu?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Hurrengo esteka irekiko duzu?'; - - @override - String get unsafe_url_warning => - 'Iturri seguru gabeko estekak irekiz gero, ez da seguru suerta daiteke. Arduratu zaitez!\nEsteka ere hiztegirainokoan kopiatu dezakezu.'; - - @override - String get copy_link => 'Esteka kopiatu'; - - @override - String get building_your_timeline => - 'Zure entzuteen arabera zure kronologia eraikitzen…'; - - @override - String get official => 'Ofiziala'; - - @override - String author_name(Object author) { - return 'Egilea: $author'; - } - - @override - String get third_party => 'Hirugarrena'; - - @override - String get plugin_requires_authentication => - 'Pluginak autentifikazioa eskatzen du'; - - @override - String get update_available => 'Eguneratze bat dago eskuragarri'; - - @override - String get supports_scrobbling => 'Scrobbling-a onartzen du'; - - @override - String get plugin_scrobbling_info => - 'Plugin honek zure musika scrobbled egiten du zure entzuteen historia sortzeko.'; - - @override - String get default_metadata_source => 'Metadatu-iturburu lehenetsia'; - - @override - String get set_default_metadata_source => - 'Ezarri metadatu-iturburu lehenetsia'; - - @override - String get default_audio_source => 'Audio-iturburu lehenetsia'; - - @override - String get set_default_audio_source => 'Ezarri audio-iturburu lehenetsia'; - - @override - String get set_default => 'Lehenetsi gisa ezarri'; - - @override - String get support => 'Laguntza'; - - @override - String get support_plugin_development => 'Pluginaren garapena lagundu'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API-ra sar daiteke'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Plugin hau instalatu nahiko zenuke?'; - - @override - String get third_party_plugin_warning => - 'Plugin hau hirugarrenen biltegi batetik dator. Instalatu aurretik iturriari konfiantza behar diozu.'; - - @override - String get author => 'Egilea'; - - @override - String get this_plugin_can_do_following => - 'Plugin honek honako hau egin dezake:'; - - @override - String get install => 'Instalatu'; - - @override - String get install_a_metadata_provider => - 'Metadaten hornitzaile bat instalatu'; - - @override - String get no_tracks_playing => - 'Une honetan ez dago abestirik erreproduzitzen'; - - @override - String get synced_lyrics_not_available => - 'Abestiarentzako letra sinkronizatua ez dago erabilgarri. Mesedez, erabili'; - - @override - String get plain_lyrics => 'Letra arrunta'; - - @override - String get tab_instead => 'horren ordez, Tab teklatxaza erabili.'; - - @override - String get disclaimer => 'Aldez aurreko oharra'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube taldea ezin da arduratu (“hirugarrenen”) plugin-en>gatik (barne legala). Erabili zure arriskuarekin. Erroreak/ arazoak dituzu, jakinarazi pluginaren biltegiari.\n\nPlugin batek edozein zerbitzu/legalki entitate baten ToS/DMCA hautsi baditu, eska iezaiozu pluginaren egileari edo hosting plataformari (adibidez GitHub/Codeberg) neurriak har ditzaten. “Hirugarrena” etiketatutako plugin guztiak komunitate publikoaren bidez mantentzen dira; ez ditugu kuratoriatu, beraz ezin dugu inplikatu.\n\n'; - - @override - String get input_does_not_match_format => - 'Sarrera ezin da beharrezko formatutik desberdina izan'; - - @override - String get plugins => 'Pluginak'; - - @override - String get paste_plugin_download_url => - 'Kopiatu deskarga-URLa, GitHub/Codeberg biltegi-URLa edo .smplug fitxategiaren esteka zuzena'; - - @override - String get download_and_install_plugin_from_url => - 'Download eta instalatu plugin-a URL batetik'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Plugin gehitu ezin izan da: $error'; - } - - @override - String get upload_plugin_from_file => 'Plugin fitxategi batetik igo'; - - @override - String get installed => 'Instalatuta'; - - @override - String get available_plugins => 'Eskaintzen diren pluginak'; - - @override - String get configure_plugins => - 'Konfiguratu zure metadatu-hornitzaile eta audio-iturburu pluginak'; - - @override - String get audio_scrobblers => 'Audio scrobbler-ak'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Iturburua: '; - - @override - String get uncompressed => 'Konprimitu gabea'; - - @override - String get dab_music_source_description => - 'Audiozaleentzat. Kalitate handiko/galerarik gabeko audio-streamak eskaintzen ditu. ISRC oinarritutako pistaren parekatze zehatza.'; -} diff --git a/lib/l10n/generated/app_localizations_fa.dart b/lib/l10n/generated/app_localizations_fa.dart deleted file mode 100644 index 5c0b7c2b..00000000 --- a/lib/l10n/generated/app_localizations_fa.dart +++ /dev/null @@ -1,1564 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Persian (`fa`). -class AppLocalizationsFa extends AppLocalizations { - AppLocalizationsFa([String locale = 'fa']) : super(locale); - - @override - String get guest => 'مهمان'; - - @override - String get browse => 'مرور'; - - @override - String get search => 'جستجو'; - - @override - String get library => 'مجموعه'; - - @override - String get lyrics => 'متن'; - - @override - String get settings => 'تنظیمات'; - - @override - String get genre_categories_filter => 'دسته ها یا ژانر ها را فیلتر کنید'; - - @override - String get genre => 'ژانر'; - - @override - String get personalized => ' شخصی سازی شده'; - - @override - String get featured => 'ویژه'; - - @override - String get new_releases => 'آخرین انتشارات'; - - @override - String get songs => 'آهنگ ها'; - - @override - String playing_track(Object track) { - return 'درحال پخش $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'با این کار صف فعلی پاک می شود. $track_length آهنگ از صف حذف میشود\n؟آیا ادامه میدهید'; - } - - @override - String get load_more => 'بارگذاری بیشتر'; - - @override - String get playlists => 'لیست های پخش'; - - @override - String get artists => 'هنرمندان'; - - @override - String get albums => 'آلبوم ها'; - - @override - String get tracks => 'آهنگ ها'; - - @override - String get downloads => 'بارگیری شده ها'; - - @override - String get filter_playlists => 'لیست پخش خود را فیلتر کنید...'; - - @override - String get liked_tracks => 'آهنگ های مورد علاقه'; - - @override - String get liked_tracks_description => 'همه آهنگ های دوست داشتنی شما'; - - @override - String get playlist => 'لیست پخش'; - - @override - String get create_a_playlist => 'ساخت لیست پخش'; - - @override - String get update_playlist => 'بروز کردن لیست پخش'; - - @override - String get create => 'ساختن'; - - @override - String get cancel => 'لغو'; - - @override - String get update => 'بروز رسانی'; - - @override - String get playlist_name => 'نام لیست پخش'; - - @override - String get name_of_playlist => 'نام لیست پخش'; - - @override - String get description => 'توضیحات'; - - @override - String get public => 'عمومی'; - - @override - String get collaborative => 'مبتنی بر همکاری'; - - @override - String get search_local_tracks => 'جستجوی آهنگ های محلی...'; - - @override - String get play => 'پخش'; - - @override - String get delete => 'حذف'; - - @override - String get none => 'هیچ کدام'; - - @override - String get sort_a_z => 'مرتب سازی بر اساس حروف الفبا'; - - @override - String get sort_z_a => 'مرتب سازی برعکس حروف الفبا'; - - @override - String get sort_artist => 'مرتب سازی بر اساس هنرمند'; - - @override - String get sort_album => 'مرتب سازی بر اساس آلبوم'; - - @override - String get sort_duration => 'مرتب کردن بر اساس مدت زمان'; - - @override - String get sort_tracks => 'مرتب سازی آهنگ ها'; - - @override - String currently_downloading(Object tracks_length) { - return 'در حال بارگیری ($tracks_length)'; - } - - @override - String get cancel_all => 'لغو همه'; - - @override - String get filter_artist => 'فیلتر کردن هنرمند...'; - - @override - String followers(Object followers) { - return '$followers دنبال کننده'; - } - - @override - String get add_artist_to_blacklist => 'اضافه کردن هنرمند به لیست سیاه'; - - @override - String get top_tracks => 'بهترین آهنگ ها'; - - @override - String get fans_also_like => 'طرفداران هم دوست داشتند'; - - @override - String get loading => 'بارگزاری...'; - - @override - String get artist => 'هنرمند'; - - @override - String get blacklisted => 'در لیست سیاه قرار گرفته است'; - - @override - String get following => 'دنبال کننده'; - - @override - String get follow => 'دنبال کردن'; - - @override - String get artist_url_copied => 'لینک هنرمند در کلیپ بورد کپی شد'; - - @override - String added_to_queue(Object tracks) { - return 'تعداد $tracks آهنگ به صف اضافه شد'; - } - - @override - String get filter_albums => 'فیلتر کردن آلبوم...'; - - @override - String get synced => 'همگام سازی شد'; - - @override - String get plain => 'ساده'; - - @override - String get shuffle => 'تصادفی'; - - @override - String get search_tracks => 'جستجوی آهنگ ها...'; - - @override - String get released => 'منتشر شده'; - - @override - String error(Object error) { - return 'خطا $error'; - } - - @override - String get title => 'عنوان'; - - @override - String get time => 'زمان'; - - @override - String get more_actions => 'اقدامات بیشتر'; - - @override - String download_count(Object count) { - return 'دانلود ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'اضافه کردن ($count) به لیست پخش'; - } - - @override - String add_count_to_queue(Object count) { - return 'اضافه کردن ($count) به صف'; - } - - @override - String play_count_next(Object count) { - return 'پخش ($count) بعدی'; - } - - @override - String get album => 'آلبوم'; - - @override - String copied_to_clipboard(Object data) { - return '$data در کلیپ بورد کپی شد'; - } - - @override - String add_to_following_playlists(Object track) { - return 'اضافه کردن $track به لیست پخش زیر'; - } - - @override - String get add => 'اضافه کردن'; - - @override - String added_track_to_queue(Object track) { - return '$track به لیست پخش اضافه شد'; - } - - @override - String get add_to_queue => 'اضافه کردن به صف'; - - @override - String track_will_play_next(Object track) { - return '$track پخش خواهد شد'; - } - - @override - String get play_next => 'پخش آهنگ بعدی'; - - @override - String removed_track_from_queue(Object track) { - return '$track از لیست پخش حذف شد'; - } - - @override - String get remove_from_queue => 'از لیست پخش حذف شد'; - - @override - String get remove_from_favorites => 'از علاقمندی ها حدف شد'; - - @override - String get save_as_favorite => 'ذخیره به عنوان علاقمندی ها'; - - @override - String get add_to_playlist => 'به لیست پخش اضافه کردن'; - - @override - String get remove_from_playlist => 'از لیست پخش حذف کردن'; - - @override - String get add_to_blacklist => 'به لیست سیاه اضافه کردن'; - - @override - String get remove_from_blacklist => 'از لیست سیاه حذف کردن'; - - @override - String get share => 'اشتراک گذاری'; - - @override - String get mini_player => 'پخش کننده '; - - @override - String get slide_to_seek => 'برای جستجو عقب یا جلو بکشید'; - - @override - String get shuffle_playlist => 'پخش تصادفی'; - - @override - String get unshuffle_playlist => 'خاموش کردن پخش تصادفی'; - - @override - String get previous_track => 'آهنگ قبلی'; - - @override - String get next_track => 'آهنگ بعدی'; - - @override - String get pause_playback => 'توقف آهنگ'; - - @override - String get resume_playback => 'ادامه آهنگ'; - - @override - String get loop_track => 'تکرار آهنگ'; - - @override - String get no_loop => 'بدون حلقه'; - - @override - String get repeat_playlist => 'تکرار لیست پخش'; - - @override - String get queue => 'صف'; - - @override - String get alternative_track_sources => ' منبع آهنگ را جاگزین کردن '; - - @override - String get download_track => 'بارگیری آهنگ'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks آهنگ در صف'; - } - - @override - String get clear_all => 'همه را حدف کن'; - - @override - String get show_hide_ui_on_hover => 'نمایش/پنهان رابط کاربری در حالت شناور'; - - @override - String get always_on_top => 'همیشه روشن'; - - @override - String get exit_mini_player => 'از پخش کننده خارج شوید'; - - @override - String get download_location => 'محل بارگیری'; - - @override - String get local_library => 'کتابخانه محلی'; - - @override - String get add_library_location => 'اضافه کردن به کتابخانه'; - - @override - String get remove_library_location => 'حذف از کتابخانه'; - - @override - String get account => 'حساب کاربری'; - - @override - String get logout => 'خارج شدن'; - - @override - String get logout_of_this_account => 'از حساب کاربری خارج شوید'; - - @override - String get language_region => 'زبان و منطقه '; - - @override - String get language => 'زبان '; - - @override - String get system_default => 'پیش فرض سیستم'; - - @override - String get market_place_region => 'منطقه'; - - @override - String get recommendation_country => 'کشور های پیشنهادی'; - - @override - String get appearance => 'ظاهر'; - - @override - String get layout_mode => 'حالت چیدمان'; - - @override - String get override_layout_settings => - 'تنطیمات حالت واکنشگرای چیدمان را لغو کن'; - - @override - String get adaptive => 'قابل تطبیق'; - - @override - String get compact => 'فشرده'; - - @override - String get extended => 'گسترده'; - - @override - String get theme => 'تم'; - - @override - String get dark => 'تاریک'; - - @override - String get light => 'روشن'; - - @override - String get system => 'سیستم'; - - @override - String get accent_color => 'رنگ تاکیدی'; - - @override - String get sync_album_color => 'هنگام سازی رنگ البوم'; - - @override - String get sync_album_color_description => - 'از رنگ البوم هنرمند به عنوان رنگ تاکیدی استفاده میکند'; - - @override - String get playback => 'پخش'; - - @override - String get audio_quality => 'کیفیت صدا'; - - @override - String get high => 'زیاد'; - - @override - String get low => 'کم'; - - @override - String get pre_download_play => 'دانلود و پخش کنید'; - - @override - String get pre_download_play_description => - 'به جای پخش جریانی صدا، بایت ها را دانلود کنید و به جای آن پخش کنید (برای کاربران با پهنای باند بالاتر توصیه می شود)'; - - @override - String get skip_non_music => 'رد شدن از پخش های غیر موسیقی (SponsorBlock)'; - - @override - String get blacklist_description => 'آهنگ ها و هنرمند های در لیست سیاه'; - - @override - String get wait_for_download_to_finish => - 'لطفا صبر کنید تا دانلود آهنگ جاری تمام شود'; - - @override - String get desktop => 'میز کار'; - - @override - String get close_behavior => 'رفتار نزدیک'; - - @override - String get close => 'بستن'; - - @override - String get minimize_to_tray => 'پتجره را کوچک کنید'; - - @override - String get show_tray_icon => 'نماد را نمایش بده'; - - @override - String get about => 'درباره'; - - @override - String get u_love_spotube => 'دوست داریدSpotubeما میدانیم شما '; - - @override - String get check_for_updates => 'بروزرسانی را بررسی کنید'; - - @override - String get about_spotube => 'Spotube درباره'; - - @override - String get blacklist => 'لیست سیاه'; - - @override - String get please_sponsor => 'لطفا کمک/حمایت کنید'; - - @override - String get spotube_description => - 'یک برنامه سبک و مولتی پلتفرم و رایگان برای همه استSpotube'; - - @override - String get version => 'نسخه'; - - @override - String get build_number => 'شماره ساخت'; - - @override - String get founder => 'بنیانگذار'; - - @override - String get repository => 'مخزن'; - - @override - String get bug_issues => 'اشکال+مسایل'; - - @override - String get made_with => '🇧🇩ساخته شده با ❤️ در بنگلادش'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'مجوز'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'نگران نباشید هیچ کدوما از اعتبارات شما جمع اوری نمیشود یا با کسی اشتراک گزاشته نمیشود'; - - @override - String get know_how_to_login => 'نمیدانی چگونه این کار را انجام بدهی؟'; - - @override - String get follow_step_by_step_guide => 'راهنما را گام به گام دنبال کنید'; - - @override - String cookie_name_cookie(Object name) { - return '$name کوکی'; - } - - @override - String get fill_in_all_fields => 'لطفا تمام فلید ها را پر کنید'; - - @override - String get submit => 'ثبت'; - - @override - String get exit => 'خروج'; - - @override - String get previous => 'قبلی'; - - @override - String get next => 'بعدی '; - - @override - String get done => 'اتمام'; - - @override - String get step_1 => 'گام 1'; - - @override - String get first_go_to => 'اول برو داخل '; - - @override - String get something_went_wrong => 'اشتباهی رخ داده'; - - @override - String get piped_instance => 'مشکل در ارتباط با سرور'; - - @override - String get piped_description => 'مشکل در ارتباط با سرور در دریافت آهنگ ها'; - - @override - String get piped_warning => - 'برخی از آنها ممکن است خوب کارنکند.بنابراین با مسولیت خود استفاده کنید'; - - @override - String get invidious_instance => 'نمونه سرور Invidious'; - - @override - String get invidious_description => 'نمونه سرور Invidious برای تطبیق آهنگ'; - - @override - String get invidious_warning => - 'برخی از نمونه‌ها ممکن است به خوبی کار نکنند. با احتیاط استفاده کنید'; - - @override - String get generate => 'ایجاد'; - - @override - String track_exists(Object track) { - return 'آهنگ $track وجود دارد'; - } - - @override - String get replace_downloaded_tracks => - 'همه ی آهنگ های دانلود شده را جایگزین کنید'; - - @override - String get skip_download_tracks => 'همه ی آهنگ های دانلود شده را رد کنید'; - - @override - String get do_you_want_to_replace => - 'ایا میخواهید آهنگ های موجود جایگزین کنید؟'; - - @override - String get replace => 'جایگزین کردن'; - - @override - String get skip => 'رد کردن'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'انتخاب کنید تا $count $type'; - } - - @override - String get select_genres => 'ژانر ها را انتخاب کنید'; - - @override - String get add_genres => 'ژانر را اطافه کنید'; - - @override - String get country => 'کشور'; - - @override - String get number_of_tracks_generate => 'تعداد آهنگ های ساخته شده'; - - @override - String get acousticness => 'آکوستیک'; - - @override - String get danceability => 'رقصیدن'; - - @override - String get energy => 'انرژی'; - - @override - String get instrumentalness => 'بی کلام'; - - @override - String get liveness => 'حس زندگی'; - - @override - String get loudness => 'صدای بلند'; - - @override - String get speechiness => 'دکلمه'; - - @override - String get valence => 'ظرفیت'; - - @override - String get popularity => 'محبوبیت'; - - @override - String get key => 'کلید'; - - @override - String get duration => 'مدت زمان (ثانیه)'; - - @override - String get tempo => 'تمپو (BPM)'; - - @override - String get mode => 'حالت'; - - @override - String get time_signature => 'امضای زمان'; - - @override - String get short => 'کوتاه'; - - @override - String get medium => 'متوسط'; - - @override - String get long => 'بلند'; - - @override - String get min => 'حداقل'; - - @override - String get max => 'حداکثر'; - - @override - String get target => 'هدف'; - - @override - String get moderate => 'حد وسط'; - - @override - String get deselect_all => 'همه را لغو انتخاب کنید'; - - @override - String get select_all => 'همه را انتخاب کنید'; - - @override - String get are_you_sure => 'ایا مطمعن هستید؟'; - - @override - String get generating_playlist => ' درحال ایجاد لیست پخش سفارشی شما'; - - @override - String selected_count_tracks(Object count) { - return 'آهنگ انتخاب شده $count'; - } - - @override - String get download_warning => - 'اگر همه ی آهنگ ها را به صورت انبو دانلود کنید به وضوح در حال دزدی موسقی هستید و در حال اسیب وارد کردن به جامه ی خلاق هنری می باشید .امیدوارم که از این موضوع اگاه باشید .همیشه سعی کنید به کار سخت هنرمند اخترام بگذارید.'; - - @override - String get download_ip_ban_warning => - 'راستی آی پی شما می تواند در یوتوب به دلیل درخواست های دانلود بیش از حد معمول مسدود شود. بلوک آی پی به این معنی است که شما نمی توانید از یوتوب (حتی اگر وارد سیستم شده باشید) حداقل 2-3 ماه از آن دستگاه آی پی استفاده کنید. و Spotube هیچ مسئولیتی در صورت وقوع این اتفاق ندارد'; - - @override - String get by_clicking_accept_terms => - 'با کلیک بر روی قبول با شرایط زیر موافقت می کنید:'; - - @override - String get download_agreement_1 => 'من میدانم در حال دزدی هستم .من بد هستم'; - - @override - String get download_agreement_2 => - 'من هر کجا ک بتوانم از هنرمندان حمایت میکنم اما این کارا فقط به دلیل اینکه توانایی مالی ندارم انجام میدهم'; - - @override - String get download_agreement_3 => - 'من کاملا میدانم که از طرف یوتوب بلاک میشم و این برنامه و مالکان را مسول این حادثه نمیدانم.'; - - @override - String get decline => 'قبول نکردن'; - - @override - String get accept => 'قبول'; - - @override - String get details => 'جزئیات'; - - @override - String get youtube => 'یوتیوب'; - - @override - String get channel => 'کانال'; - - @override - String get likes => 'دوست داشتن'; - - @override - String get dislikes => 'دوست نداشتن'; - - @override - String get views => 'بازدید'; - - @override - String get streamUrl => 'لینک اثر'; - - @override - String get stop => 'توقف'; - - @override - String get sort_newest => 'مرتب سازی بر اساس جدید ترین اضافه شده'; - - @override - String get sort_oldest => 'مرتب سازی بر اساس قدیمی ترین اضافه شده'; - - @override - String get sleep_timer => 'زمان خواب'; - - @override - String mins(Object minutes) { - return '$minutes دقیقه'; - } - - @override - String hours(Object hours) { - return '$hours ساعت'; - } - - @override - String hour(Object hours) { - return '$hours ساعت'; - } - - @override - String get custom_hours => 'ساعت سفارشی'; - - @override - String get logs => 'رسید خطا'; - - @override - String get developers => 'توسعه دهنده ها'; - - @override - String get not_logged_in => 'شما وارد نشده اید '; - - @override - String get search_mode => 'حالت جستجو'; - - @override - String get audio_source => 'منبع صدا'; - - @override - String get ok => 'باشد'; - - @override - String get failed_to_encrypt => 'رمز گذاری نشده'; - - @override - String get encryption_failed_warning => - 'Spotube از رمزگذاری برای ذخیره ایمن داده های شما استفاده می کند. اما موفق به انجام این کار نشد. بنابراین به فضای ذخیره‌سازی ناامن تبدیل می‌شود\nاگر از لینوکس استفاده می‌کنید، لطفاً مطمئن شوید که سرویس مخفی (gnome-keyring، kde-wallet، keepassxc و غیره) را نصب کرده‌اید.'; - - @override - String get querying_info => 'جستجو درباره '; - - @override - String get piped_api_down => 'ایراد در سرور'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'به دلیل مشکل $pipedInstance ارتباط با سرور مقدور نیست\n\nنمونه را تغییر دهید یا «نوع API» را به API رسمی YouTube تغییر دهید\n\nحتماً پس از تغییر، برنامه را دوباره راه‌اندازی کنید'; - } - - @override - String get you_are_offline => 'شما در حال حاضر افلاین هستید '; - - @override - String get connection_restored => 'اتصال به اینترنت شما بازیابی شد '; - - @override - String get use_system_title_bar => 'از نوار عنوان سیستم استفاده کنید '; - - @override - String get crunching_results => 'نتایج خرد کردن...'; - - @override - String get search_to_get_results => 'جستجو کنید تا به نتیجه برسید'; - - @override - String get use_amoled_mode => 'استفاده از حالت AMOLED'; - - @override - String get pitch_dark_theme => 'تم تیره دارت'; - - @override - String get normalize_audio => 'نرمال کردن صدا'; - - @override - String get change_cover => 'تغییر جلد'; - - @override - String get add_cover => 'افزودن جلد'; - - @override - String get restore_defaults => 'بازیابی پیش فرض ها'; - - @override - String get download_music_format => 'فرمت دانلود موسیقی'; - - @override - String get streaming_music_format => 'فرمت پخش آنلاین موسیقی'; - - @override - String get download_music_quality => 'کیفیت دانلود موسیقی'; - - @override - String get streaming_music_quality => 'کیفیت پخش آنلاین موسیقی'; - - @override - String get login_with_lastfm => 'ورود با Last.fm'; - - @override - String get connect => 'اتصال'; - - @override - String get disconnect_lastfm => 'قطع ارتباط با Last.fm'; - - @override - String get disconnect => 'قطع ارتباط'; - - @override - String get username => 'نام کاربری'; - - @override - String get password => 'رمز عبور'; - - @override - String get login => 'ورود'; - - @override - String get login_with_your_lastfm => 'ورود با حساب کاربری Last.fm خود'; - - @override - String get scrobble_to_lastfm => 'Scrobble به Last.fm'; - - @override - String get go_to_album => 'رفتن به آلبوم'; - - @override - String get discord_rich_presence => 'حضور غنی دیسکورد'; - - @override - String get browse_all => 'مرور همه'; - - @override - String get genres => 'ژانرها'; - - @override - String get explore_genres => 'استکشاف ژانرها'; - - @override - String get friends => 'دوستان'; - - @override - String get no_lyrics_available => - 'متاسفیم، قادر به یافتن متن این قطعه نیستیم'; - - @override - String get start_a_radio => 'شروع یک رادیو'; - - @override - String get how_to_start_radio => 'چگونه می‌خواهید رادیو را شروع کنید؟'; - - @override - String get replace_queue_question => - 'آیا می‌خواهید لیست پخش فعلی را جایگزین کنید یا به آن اضافه کنید؟'; - - @override - String get endless_playback => 'پخش بی‌پایان'; - - @override - String get delete_playlist => 'حذف لیست پخش'; - - @override - String get delete_playlist_confirmation => - 'آیا مطمئن هستید که می‌خواهید این لیست پخش را حذف کنید؟'; - - @override - String get local_tracks => 'موسیقی‌های محلی'; - - @override - String get local_tab => 'محلی'; - - @override - String get song_link => 'پیوند آهنگ'; - - @override - String get skip_this_nonsense => 'این احمقانه را بگذرانید'; - - @override - String get freedom_of_music => '“آزادی موسیقی”'; - - @override - String get freedom_of_music_palm => '“آزادی موسیقی در دستان شما”'; - - @override - String get get_started => 'بیایید شروع کنیم'; - - @override - String get youtube_source_description => 'پیشنهاد شده و بهترین عمل می‌کند.'; - - @override - String get piped_source_description => - 'احساس آزادی می‌کنید؟ مانند یوتیوب اما بیشتر آزاد.'; - - @override - String get jiosaavn_source_description => 'بهترین برای منطقه جنوب آسیا.'; - - @override - String get invidious_source_description => - 'شبیه Piped اما با در دسترس بودن بیشتر'; - - @override - String highest_quality(Object quality) { - return 'بالاترین کیفیت: $quality'; - } - - @override - String get select_audio_source => 'انتخاب منبع صوتی'; - - @override - String get endless_playback_description => - 'خودکار اضافه کردن آهنگ‌های جدید\nبه انتهای صف'; - - @override - String get choose_your_region => 'منطقه خود را انتخاب کنید'; - - @override - String get choose_your_region_description => - 'این به Spotube کمک می‌کند تا محتوای مناسبی را برای موقعیت شما نشان دهد.'; - - @override - String get choose_your_language => 'زبان خود را انتخاب کنید'; - - @override - String get help_project_grow => 'کمک به رشد این پروژه'; - - @override - String get help_project_grow_description => - 'Spotube یک پروژه متن باز است. شما می‌توانید با به پروژه کمک کردن، گزارش دادن اشکالات یا پیشنهاد ویژگی‌های جدید، به این پروژه کمک کنید.'; - - @override - String get contribute_on_github => 'مشارکت در GitHub'; - - @override - String get donate_on_open_collective => 'کمک مالی در Open Collective'; - - @override - String get browse_anonymously => 'مرور به صورت ناشناس'; - - @override - String get enable_connect => 'فعال‌سازی اتصال'; - - @override - String get enable_connect_description => 'کنترل Spotube از دیگر دستگاه‌ها'; - - @override - String get devices => 'دستگاه‌ها'; - - @override - String get select => 'انتخاب'; - - @override - String connect_client_alert(Object client) { - return 'شما توسط $client کنترل می‌شوید'; - } - - @override - String get this_device => 'این دستگاه'; - - @override - String get remote => 'راه‌دور'; - - @override - String get stats => 'آمار'; - - @override - String and_n_more(Object count) { - return 'و $count بیشتر'; - } - - @override - String get recently_played => 'اخیراً پخش شده'; - - @override - String get browse_more => 'بیشتر مرور کنید'; - - @override - String get no_title => 'بدون عنوان'; - - @override - String get not_playing => 'در حال پخش نیست'; - - @override - String get epic_failure => 'شکست حماسی!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length ترک به صف اضافه شد'; - } - - @override - String get spotube_has_an_update => 'Spotube یک بروزرسانی دارد'; - - @override - String get download_now => 'اکنون دانلود کنید'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'نسخه شبانه Spotube $nightlyBuildNum منتشر شد'; - } - - @override - String release_version(Object version) { - return 'نسخه Spotube v$version منتشر شد'; - } - - @override - String get read_the_latest => 'آخرین‌ها را بخوانید'; - - @override - String get release_notes => 'یادداشت‌های انتشار'; - - @override - String get pick_color_scheme => 'طرح رنگ را انتخاب کنید'; - - @override - String get save => 'ذخیره'; - - @override - String get choose_the_device => 'دستگاه را انتخاب کنید:'; - - @override - String get multiple_device_connected => - 'چندین دستگاه متصل هستند.\nدستگاهی را انتخاب کنید که می‌خواهید این عملیات بر روی آن انجام شود'; - - @override - String get nothing_found => 'چیزی پیدا نشد'; - - @override - String get the_box_is_empty => 'جعبه خالی است'; - - @override - String get top_artists => 'بهترین هنرمندان'; - - @override - String get top_albums => 'بهترین آلبوم‌ها'; - - @override - String get this_week => 'این هفته'; - - @override - String get this_month => 'این ماه'; - - @override - String get last_6_months => '۶ ماه گذشته'; - - @override - String get this_year => 'امسال'; - - @override - String get last_2_years => '۲ سال گذشته'; - - @override - String get all_time => 'همیشه'; - - @override - String powered_by_provider(Object providerName) { - return 'توسط $providerName پشتیبانی شده است'; - } - - @override - String get email => 'ایمیل'; - - @override - String get profile_followers => 'دنبال‌کنندگان'; - - @override - String get birthday => 'تولد'; - - @override - String get subscription => 'اشتراک'; - - @override - String get not_born => 'متولد نشده'; - - @override - String get hacker => 'هکر'; - - @override - String get profile => 'پروفایل'; - - @override - String get no_name => 'بدون نام'; - - @override - String get edit => 'ویرایش'; - - @override - String get user_profile => 'پروفایل کاربر'; - - @override - String count_plays(Object count) { - return '$count پخش'; - } - - @override - String get streaming_fees_hypothetical => 'هزینه‌های پخش (فرضی)'; - - @override - String get minutes_listened => 'دقایق گوش داده شده'; - - @override - String get streamed_songs => 'ترانه‌های پخش شده'; - - @override - String count_streams(Object count) { - return '$count پخش'; - } - - @override - String get owned_by_you => 'توسط شما مالکیت شده'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl به کلیپ‌بورد کپی شد'; - } - - @override - String get hipotetical_calculation => - '*این محاسبه بر اساس میانگین پرداخت به ازای هر پخش (0.003 تا 0.005 دلار) در پلتفرم‌های استریم موزیک آنلاین انجام شده است. این یک محاسبه فرضی است که به کاربر دیدی از مقدار پرداختی به هنرمندان در صورت گوش دادن به آهنگ آن‌ها در پلتفرم‌های مختلف ارائه می‌دهد.'; - - @override - String count_mins(Object minutes) { - return '$minutes دقیقه'; - } - - @override - String get summary_minutes => 'دقیقه‌ها'; - - @override - String get summary_listened_to_music => 'به موسیقی گوش داده شده'; - - @override - String get summary_songs => 'ترانه‌ها'; - - @override - String get summary_streamed_overall => 'پخش شده به طور کلی'; - - @override - String get summary_owed_to_artists => 'به هنرمندان بدهکار است\nاین ماه'; - - @override - String get summary_artists => 'هنرمندان'; - - @override - String get summary_music_reached_you => 'موسیقی به شما رسیده است'; - - @override - String get summary_full_albums => 'آلبوم‌های کامل'; - - @override - String get summary_got_your_love => 'عشق شما را به دست آورد'; - - @override - String get summary_playlists => 'لیست‌های پخش'; - - @override - String get summary_were_on_repeat => 'در تکرار بودند'; - - @override - String total_money(Object money) { - return 'مجموع $money'; - } - - @override - String get webview_not_found => 'وب‌ویو پیدا نشد'; - - @override - String get webview_not_found_description => - 'هیچ اجرای وب‌ویو روی دستگاه شما نصب نشده است.\nدر صورت نصب، مطمئن شوید که در environment PATH قرار دارد\n\nپس از نصب، برنامه را مجدداً راه‌اندازی کنید'; - - @override - String get unsupported_platform => 'پلتفرم پشتیبانی نمی‌شود'; - - @override - String get cache_music => 'موسیقی در حافظه موقت'; - - @override - String get open => 'باز کردن'; - - @override - String get cache_folder => 'پوشه حافظه موقت'; - - @override - String get export => 'صادر کردن'; - - @override - String get clear_cache => 'پاک کردن حافظه موقت'; - - @override - String get clear_cache_confirmation => - 'آیا می‌خواهید حافظه موقت را پاک کنید؟'; - - @override - String get export_cache_files => 'صادر کردن فایل‌های حافظه موقت'; - - @override - String found_n_files(Object count) { - return '$count فایل یافت شد'; - } - - @override - String get export_cache_confirmation => - 'آیا می‌خواهید این فایل‌ها را صادر کنید به'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported از $files فایل صادر شد'; - } - - @override - String get undo => 'بازگشت'; - - @override - String get download_all => 'دانلود همه'; - - @override - String get add_all_to_playlist => 'افزودن همه به لیست پخش'; - - @override - String get add_all_to_queue => 'افزودن همه به صف'; - - @override - String get play_all_next => 'پخش همه بعدی'; - - @override - String get pause => 'مکث'; - - @override - String get view_all => 'مشاهده همه'; - - @override - String get no_tracks_added_yet => - 'به نظر می‌رسد هنوز هیچ آهنگی اضافه نکرده‌اید.'; - - @override - String get no_tracks => 'به نظر می‌رسد هیچ آهنگی در اینجا وجود ندارد.'; - - @override - String get no_tracks_listened_yet => 'به نظر می‌رسد هنوز چیزی نشنیده‌اید.'; - - @override - String get not_following_artists => 'شما هیچ هنرمندی را دنبال نمی‌کنید.'; - - @override - String get no_favorite_albums_yet => - 'به نظر می‌رسد هنوز هیچ آلبومی را به علاقه‌مندی‌هایتان اضافه نکرده‌اید.'; - - @override - String get no_logs_found => 'هیچ لاگی پیدا نشد'; - - @override - String get youtube_engine => 'موتور YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine نصب نشده است'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine در سیستم شما نصب نشده است.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'اطمینان حاصل کنید که در متغیر PATH موجود است یا\nآدرس مطلق فایل اجرایی $engine را در زیر تنظیم کنید.'; - } - - @override - String get youtube_engine_unix_issue_message => - 'در macOS/Linux/سیستم‌عامل‌های مشابه Unix، تنظیم مسیر در .zshrc/.bashrc/.bash_profile و غیره کار نمی‌کند.\nباید مسیر را در فایل پیکربندی شل تنظیم کنید.'; - - @override - String get download => 'دانلود'; - - @override - String get file_not_found => 'فایل پیدا نشد'; - - @override - String get custom => 'شخصی‌سازی شده'; - - @override - String get add_custom_url => 'اضافه کردن URL سفارشی'; - - @override - String get edit_port => 'ویرایش پورت'; - - @override - String get port_helper_msg => - 'پیش‌فرض -1 است که نشان‌دهنده یک عدد تصادفی است. اگر فایروال شما پیکربندی شده است، توصیه می‌شود این را تنظیم کنید.'; - - @override - String connect_request(Object client) { - return 'آیا اجازه می‌دهید $client متصل شود؟'; - } - - @override - String get connection_request_denied => - 'اتصال رد شد. کاربر دسترسی را رد کرد.'; - - @override - String get an_error_occurred => 'خطایی رخ داد'; - - @override - String get copy_to_clipboard => 'کپی به کلیپ‌بورد'; - - @override - String get view_logs => 'مشاهده لاگ‌ها'; - - @override - String get retry => 'دوباره تلاش کن'; - - @override - String get no_default_metadata_provider_selected => - 'هیچ ارائه‌دهندهٔ پیش‌فرض متادیتا تعیین نکرده‌اید'; - - @override - String get manage_metadata_providers => 'مدیریت ارائه‌دهندگان متادیتا'; - - @override - String get open_link_in_browser => 'باز کردن لینک در مرورگر؟'; - - @override - String get do_you_want_to_open_the_following_link => - 'آیا می‌خواهید لینک زیر را باز کنید؟'; - - @override - String get unsafe_url_warning => - 'باز کردن لینک از منابع نامطمئن می‌تواند ناامن باشد. مراقب باشید!\nهمچنین می‌توانید لینک را در کلیپ‌بورد خود کپی کنید.'; - - @override - String get copy_link => 'کپی لینک'; - - @override - String get building_your_timeline => - 'در حال ساخت جدول زمانی بر اساس شنیده‌هایتان…'; - - @override - String get official => 'رسمی'; - - @override - String author_name(Object author) { - return 'نویسنده: $author'; - } - - @override - String get third_party => 'سوم‌شخص'; - - @override - String get plugin_requires_authentication => 'افزونه نیاز به احراز هویت دارد'; - - @override - String get update_available => 'به‌روزرسانی در دسترس است'; - - @override - String get supports_scrobbling => 'پشتیبانی از اسکراب‌بلینگ'; - - @override - String get plugin_scrobbling_info => - 'این افزونه موسیقی شما را اسکراب می‌کند تا تاریخچهٔ شنیداری‌تان را تولید کند.'; - - @override - String get default_metadata_source => 'منبع پیش‌فرض فراداده'; - - @override - String get set_default_metadata_source => 'تنظیم منبع پیش‌فرض فراداده'; - - @override - String get default_audio_source => 'منبع پیش‌فرض صوت'; - - @override - String get set_default_audio_source => 'تنظیم منبع پیش‌فرض صوت'; - - @override - String get set_default => 'تنظیم به عنوان پیش‌فرض'; - - @override - String get support => 'پشتیبانی'; - - @override - String get support_plugin_development => 'حمایت از توسعهٔ افزونه'; - - @override - String can_access_name_api(Object name) { - return '- می‌تواند به API **$name** دسترسی پیدا کند'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'می‌خواهید این افزونه را نصب کنید؟'; - - @override - String get third_party_plugin_warning => - 'این افزونه از مخزن شخص ثالث آمده است. لطفاً قبل از نصب از منابع آن مطمئن شوید.'; - - @override - String get author => 'نویسنده'; - - @override - String get this_plugin_can_do_following => - 'این افزونه می‌تواند موارد زیر را انجام دهد'; - - @override - String get install => 'نصب'; - - @override - String get install_a_metadata_provider => 'نصب یک ارائه‌دهندهٔ متادیتا'; - - @override - String get no_tracks_playing => 'در حال‌ حاضر هیچ تراکی در حال پخش نیست'; - - @override - String get synced_lyrics_not_available => - 'متن هم‌زمان‌شده برای این آهنگ در دسترس نیست. لطفاً از'; - - @override - String get plain_lyrics => 'متن ساده'; - - @override - String get tab_instead => 'به‌جای آن از کلید Tab استفاده کنید.'; - - @override - String get disclaimer => 'سلب مسئولیت'; - - @override - String get third_party_plugin_dmca_notice => - 'تیم Spotube هیچ مسئولیتی (حتی قانونی) در قبال افزونه‌های \"شخص ثالث\" ندارد. از آن‌ها به‌خاطر خود استفاده کنید. برای خطاها/مشکلات، لطفاً در مخزن افزونه گزارش دهید.\n\nاگر هر افزونهٔ \"شخص ثالث\" قوانین ToS/DMCA سرویس یا نهاد قانونی را نقض کند، لطفاً از نویسندهٔ افزونه یا پلتفرم میزبانی (مثل GitHub/Codeberg) درخواست اقدام کنید. افزونه‌هایی که با برچسب \"شخص ثالث\" مشخص شده‌اند، عمومی هستند و توسط جامعه نگهداری می‌شوند؛ ما آن‌ها را تغییر یا مدیریت نمی‌کنیم و نمی‌توانیم دخالت کنیم.\n\n'; - - @override - String get input_does_not_match_format => - 'ورودی با قالب مورد نیاز تطابق ندارد'; - - @override - String get plugins => 'افزونه‌ها'; - - @override - String get paste_plugin_download_url => - 'URL دانلود یا مخزن GitHub/Codeberg یا لینک مستقیم فایل .smplug را الصاق کنید'; - - @override - String get download_and_install_plugin_from_url => - 'دانلود و نصب افزونه از طریق لینک'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'افزونه اضافه نشد: $error'; - } - - @override - String get upload_plugin_from_file => 'بارگذاری افزونه از فایل'; - - @override - String get installed => 'نصب شد'; - - @override - String get available_plugins => 'افزونه‌های موجود'; - - @override - String get configure_plugins => - 'افزونه‌های منبع صوت و ارائه‌دهنده فراداده خود را پیکربندی کنید'; - - @override - String get audio_scrobblers => 'اسکراب‌بلرهای صوتی'; - - @override - String get scrobbling => 'اسکراب‌بلینگ'; - - @override - String get source => 'منبع: '; - - @override - String get uncompressed => 'بدون فشرده‌سازی'; - - @override - String get dab_music_source_description => - 'مخصوص علاقه‌مندان صدا. ارائه‌دهنده استریم‌های باکیفیت/بدون افت. تطبیق دقیق آهنگ بر اساس ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_fi.dart b/lib/l10n/generated/app_localizations_fi.dart deleted file mode 100644 index 3f616849..00000000 --- a/lib/l10n/generated/app_localizations_fi.dart +++ /dev/null @@ -1,1564 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Finnish (`fi`). -class AppLocalizationsFi extends AppLocalizations { - AppLocalizationsFi([String locale = 'fi']) : super(locale); - - @override - String get guest => 'Vieras'; - - @override - String get browse => 'Selaa'; - - @override - String get search => 'Hae'; - - @override - String get library => 'Kirjasto'; - - @override - String get lyrics => 'Lyriikat'; - - @override - String get settings => 'Asetukset'; - - @override - String get genre_categories_filter => 'Suodata kategorioita tai genrejä'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Personoidut'; - - @override - String get featured => 'Esittelyssä'; - - @override - String get new_releases => 'Uusi julkaisu'; - - @override - String get songs => 'Laulut'; - - @override - String playing_track(Object track) { - return 'Soitetaan $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Tämä tulee tyhjentämään jonon. $track_length Kappaleita poistetaan\nHaluatko jatkaa?'; - } - - @override - String get load_more => 'Lataa lisää'; - - @override - String get playlists => 'Soittolistat'; - - @override - String get artists => 'Artistit'; - - @override - String get albums => 'Albumit'; - - @override - String get tracks => 'Kappaleet'; - - @override - String get downloads => 'Lataukset'; - - @override - String get filter_playlists => 'Suodata soittolistasi...'; - - @override - String get liked_tracks => 'Tykätyt kappaleet'; - - @override - String get liked_tracks_description => 'Kaikki tykättysi kappaleet'; - - @override - String get playlist => 'Soittolista'; - - @override - String get create_a_playlist => 'Luo soittolista'; - - @override - String get update_playlist => 'Päivitä soittolista'; - - @override - String get create => 'Luo'; - - @override - String get cancel => 'Peruuta'; - - @override - String get update => 'Päivitä'; - - @override - String get playlist_name => 'Soittolistan nimi'; - - @override - String get name_of_playlist => 'Soittolistan nimi'; - - @override - String get description => 'Kuvaus'; - - @override - String get public => 'Julkinen'; - - @override - String get collaborative => 'Collaborative'; - - @override - String get search_local_tracks => 'Hae paikallisia lauluja...'; - - @override - String get play => 'Soita'; - - @override - String get delete => 'Poista'; - - @override - String get none => 'Ei mitään'; - - @override - String get sort_a_z => 'Suodata A-Z'; - - @override - String get sort_z_a => 'Suodata Z-A'; - - @override - String get sort_artist => 'Suodata Artistilta'; - - @override - String get sort_album => 'Suodata Albumilta'; - - @override - String get sort_duration => 'Suodata Pituudelta'; - - @override - String get sort_tracks => 'Suodata Kappaleet'; - - @override - String currently_downloading(Object tracks_length) { - return 'Ladataan ($tracks_length)'; - } - - @override - String get cancel_all => 'Peru kaikki'; - - @override - String get filter_artist => 'Suodata artistit...'; - - @override - String followers(Object followers) { - return '$followers Seuraajaa'; - } - - @override - String get add_artist_to_blacklist => 'Lisää artisti mustalle listalle'; - - @override - String get top_tracks => 'Suosituimmat kappaleet'; - - @override - String get fans_also_like => 'Fanit myös tykkäsivät'; - - @override - String get loading => 'Ladataan...'; - - @override - String get artist => 'Artisti'; - - @override - String get blacklisted => 'Mustalistattu'; - - @override - String get following => 'Seurataan'; - - @override - String get follow => 'Seuraa'; - - @override - String get artist_url_copied => 'Aristin URL kopioitiin leikepöytään'; - - @override - String added_to_queue(Object tracks) { - return 'Lisättiin $tracks kappaletta jonoon'; - } - - @override - String get filter_albums => 'Suodata albumit...'; - - @override - String get synced => 'Synkronoitu'; - - @override - String get plain => 'Tavallinen'; - - @override - String get shuffle => 'Sekoita'; - - @override - String get search_tracks => 'Hae kappaleita...'; - - @override - String get released => 'Julkaistu'; - - @override - String error(Object error) { - return 'Virhe $error'; - } - - @override - String get title => 'Otsikko'; - - @override - String get time => 'Aika'; - - @override - String get more_actions => 'Lisää toimintoja'; - - @override - String download_count(Object count) { - return 'Lataa ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Lisää ($count) Soittolistaasi'; - } - - @override - String add_count_to_queue(Object count) { - return 'Lisää ($count) Jonoon'; - } - - @override - String play_count_next(Object count) { - return 'Soita ($count) seuraavaksi'; - } - - @override - String get album => 'Albumi'; - - @override - String copied_to_clipboard(Object data) { - return 'Kopioitiin $data leikepöytään'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Lisää $track seuraaviin soittolistoihin'; - } - - @override - String get add => 'Lisää'; - - @override - String added_track_to_queue(Object track) { - return 'Lisättiin $track jonoon'; - } - - @override - String get add_to_queue => 'Lisää jonoon'; - - @override - String track_will_play_next(Object track) { - return '$track Soitetaan seuraavaksi'; - } - - @override - String get play_next => 'Soita seuraavaksi'; - - @override - String removed_track_from_queue(Object track) { - return 'Poistettiin $track jonosta'; - } - - @override - String get remove_from_queue => 'Poista jonosta'; - - @override - String get remove_from_favorites => 'Poista suosikeista'; - - @override - String get save_as_favorite => 'Tallenna soittolistana'; - - @override - String get add_to_playlist => 'Lisää soittolistaan'; - - @override - String get remove_from_playlist => 'Poista soittolistasta'; - - @override - String get add_to_blacklist => 'Lisää mustalle listalle'; - - @override - String get remove_from_blacklist => 'Poista mustalistalta'; - - @override - String get share => 'Jaa'; - - @override - String get mini_player => 'Minisoitin'; - - @override - String get slide_to_seek => 'Liu\'uta mennäkseen eteenpäin tai taaksepäin'; - - @override - String get shuffle_playlist => 'Sekoita soittolista'; - - @override - String get unshuffle_playlist => 'Poista sekoitus soittolistasta'; - - @override - String get previous_track => 'Äskeinen kappale'; - - @override - String get next_track => 'Seuraava kappale'; - - @override - String get pause_playback => 'Pysäytä soittolistan toisto'; - - @override - String get resume_playback => 'Jatka soittolistan toistoa'; - - @override - String get loop_track => 'Uudelleentoista kappale'; - - @override - String get no_loop => 'Ei silmukkaa'; - - @override - String get repeat_playlist => 'Toista soittolista uudelleen'; - - @override - String get queue => 'Jono'; - - @override - String get alternative_track_sources => 'Toinen kappale lähde'; - - @override - String get download_track => 'Lataa kappale'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks kappaletta jonossa'; - } - - @override - String get clear_all => 'Tyhjennä kaikki'; - - @override - String get show_hide_ui_on_hover => 'Näytä/Piilota UI leijumalla'; - - @override - String get always_on_top => 'Aina päällimmäisenä'; - - @override - String get exit_mini_player => 'Lähde minisoittimesta'; - - @override - String get download_location => 'Lataus sijainti'; - - @override - String get local_library => 'Paikallinen kirjasto'; - - @override - String get add_library_location => 'Lisää kirjastoon'; - - @override - String get remove_library_location => 'Poista kirjastosta'; - - @override - String get account => 'Käyttäjä'; - - @override - String get logout => 'Kirjaudu ulos'; - - @override - String get logout_of_this_account => 'Kirjaudu ulos tältä käyttäjältä'; - - @override - String get language_region => 'Kieli ja Maa'; - - @override - String get language => 'Kieli'; - - @override - String get system_default => 'Järjestelmän oletus'; - - @override - String get market_place_region => 'Markkina-alue'; - - @override - String get recommendation_country => 'Suositeltu maa'; - - @override - String get appearance => 'Ulkomuto'; - - @override - String get layout_mode => 'Asettelutila'; - - @override - String get override_layout_settings => - 'Jätä reagoiva asettelutila huomioimatta'; - - @override - String get adaptive => 'Mukautuva'; - - @override - String get compact => 'Kompakti'; - - @override - String get extended => 'Laajennettu'; - - @override - String get theme => 'Teema'; - - @override - String get dark => 'Tumma'; - - @override - String get light => 'Vaalea'; - - @override - String get system => 'Järjestelmä'; - - @override - String get accent_color => 'Korostusväri'; - - @override - String get sync_album_color => 'Synkronoi albumin väri'; - - @override - String get sync_album_color_description => - 'Käyttää albumin kansitaiteen vallitsevaa väirä korostuvärinä'; - - @override - String get playback => 'Toisto'; - - @override - String get audio_quality => 'Äänenlaatu'; - - @override - String get high => 'Korkea'; - - @override - String get low => 'Matala'; - - @override - String get pre_download_play => 'Esilataa ja soita'; - - @override - String get pre_download_play_description => - 'Audion suoratoiston sijaan, lataa tavut ja soita ne (Suositeltu korkeamman kaistanleveyden käyttäjille)'; - - @override - String get skip_non_music => 'Ohita ei-musiikki kohdat (SponsorBlock)'; - - @override - String get blacklist_description => 'Mustalistat kappaleet aja artistit'; - - @override - String get wait_for_download_to_finish => - 'Odota nykyisen latauksen lopetteluun'; - - @override - String get desktop => 'Työpöytä'; - - @override - String get close_behavior => 'Sulkemisen käyttäytyminen'; - - @override - String get close => 'Sulje'; - - @override - String get minimize_to_tray => 'Minimisoi tehtäväpalkkiin'; - - @override - String get show_tray_icon => 'Näytä järjestelmäkuvake'; - - @override - String get about => 'Tietoa'; - - @override - String get u_love_spotube => 'Tiedämme että rakastat Spotubea'; - - @override - String get check_for_updates => 'Tarkista päivitykset'; - - @override - String get about_spotube => 'Tietoa Spotube:sta'; - - @override - String get blacklist => 'Mustalista'; - - @override - String get please_sponsor => 'Sponsoroi/Lahjoita, kiitos'; - - @override - String get spotube_description => - 'Spotube, kevyt, cross-platform, vapaa-kaikille spotify clientti'; - - @override - String get version => 'Versio'; - - @override - String get build_number => 'Rakennusnumero'; - - @override - String get founder => 'Perustaja'; - - @override - String get repository => 'Arkisto'; - - @override - String get bug_issues => 'Bugit+Ongelmat'; - - @override - String get made_with => 'Tehty ❤️ Bangladeshista 🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Lisenssi'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Älä huoli, tunnuksiasi ei talleteta tai jaeta kenenkään kanssa'; - - @override - String get know_how_to_login => 'Etkö tiedä miten tehdä tämä?'; - - @override - String get follow_step_by_step_guide => 'Seuraa askel askeleelta opasta'; - - @override - String cookie_name_cookie(Object name) { - return '$name Keksi'; - } - - @override - String get fill_in_all_fields => 'Täytä kaikki kentät'; - - @override - String get submit => 'Lähetä'; - - @override - String get exit => 'Poistu'; - - @override - String get previous => 'Edellinen'; - - @override - String get next => 'Seuraava'; - - @override - String get done => 'Tehty'; - - @override - String get step_1 => 'Vaihe 1'; - - @override - String get first_go_to => 'Ensiksi, mene'; - - @override - String get something_went_wrong => 'Jotain meni pieleen'; - - @override - String get piped_instance => 'Johdettu palvelinesiintymä'; - - @override - String get piped_description => - 'Johdettu palvelinesiintymä Kappale täsmäyksiin'; - - @override - String get piped_warning => - 'Jotkut niistä eivät toimi hyvin, käytä siis omalla vastuullasi'; - - @override - String get invidious_instance => 'Invidious-palvelinesiintymä'; - - @override - String get invidious_description => - 'Invidious-palvelinesiintymä raitojen yhteensovittamiseen'; - - @override - String get invidious_warning => - 'Jotkin esiintymät eivät välttämättä toimi hyvin. Käytä omalla vastuullasi'; - - @override - String get generate => 'Luo'; - - @override - String track_exists(Object track) { - return 'Kappale $track on jo olemassa!'; - } - - @override - String get replace_downloaded_tracks => 'Korvaa kaikki ladatut kappaleet'; - - @override - String get skip_download_tracks => 'Ohita ladattujen laulujen lataaminen'; - - @override - String get do_you_want_to_replace => - 'Haluatko korvata olemassa olevan kappaleen??'; - - @override - String get replace => 'Korvaa'; - - @override - String get skip => 'Ohita'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Valitse enintään $count $type'; - } - - @override - String get select_genres => 'Valitse Genret'; - - @override - String get add_genres => 'Lisää Genrejä'; - - @override - String get country => 'Maa'; - - @override - String get number_of_tracks_generate => 'Numero tuotettavia kappaleita'; - - @override - String get acousticness => 'Akustisuus'; - - @override - String get danceability => 'Tanssittavuus'; - - @override - String get energy => 'Energia'; - - @override - String get instrumentalness => 'Instrumentaalisuus'; - - @override - String get liveness => 'Elävyyttä'; - - @override - String get loudness => 'Äänekkyys'; - - @override - String get speechiness => 'Puheisuus'; - - @override - String get valence => 'Valenssi'; - - @override - String get popularity => 'Suosio'; - - @override - String get key => 'Sävellaji'; - - @override - String get duration => 'Pituus (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Tila'; - - @override - String get time_signature => 'Aikamerkki'; - - @override - String get short => 'Lyhyt'; - - @override - String get medium => 'Keskikokoinen'; - - @override - String get long => 'Pitkä'; - - @override - String get min => 'Minimi'; - - @override - String get max => 'Maximi'; - - @override - String get target => 'Kohde'; - - @override - String get moderate => 'Kohtalainen'; - - @override - String get deselect_all => 'Poista kaikki valinnat'; - - @override - String get select_all => 'Valitse kaikki'; - - @override - String get are_you_sure => 'Oletko varma?'; - - @override - String get generating_playlist => 'Luodaan mukautettua soittolistoa...'; - - @override - String selected_count_tracks(Object count) { - return 'Valittu $count kappaletta'; - } - - @override - String get download_warning => - 'Jos lataat kaikki laulut kerrällä olet selkeästi Piratoimassa ja aiheuttamassa vahinkoa musiikin luovaan yhteiskuntaan. Toivottavasti olet tietoinen tästä. Yritä aina kunnioittaa ja tukea Artistin kovaa työtä.'; - - @override - String get download_ip_ban_warning => - 'BTW, YouTube voi estää IP-Osoitteesi tavallista liiallisten latauspyyntöjen takia. IP-Osoitteen esto tarkoittaa sitä, ettet voi käyttää YouTubea (vaikka olisit kirjautunut) vähintään 2-3kk aikana kyseiseltä laitteelta. Spotube ei kanna yhtään vastuuta jos se tapahtuu.'; - - @override - String get by_clicking_accept_terms => - 'Painamalla \'hyväksy\' hyväksyt seuraaviin ehtoihin:'; - - @override - String get download_agreement_1 => - 'Tiedän että Piratoin musiikkia. Olen paha.'; - - @override - String get download_agreement_2 => - 'Tuen Artisteja silloin kun pystyn, ja teen tämän vain koska minulla ei ole rahaa ostaa heidän taidetta'; - - @override - String get download_agreement_3 => - 'Ymmärrän että minun YouTube voi estää IP-Osoitteeni ja en pidä Spotubea tai omistajiinsa/avustajia vastuullisena mistään omista teoistsani'; - - @override - String get decline => 'Hylkää'; - - @override - String get accept => 'Hyväksy'; - - @override - String get details => 'Yksityiskohdat'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanava'; - - @override - String get likes => 'Tykkäykset'; - - @override - String get dislikes => 'Epä-tykkäykset'; - - @override - String get views => 'Näyttökerrat'; - - @override - String get streamUrl => 'Suoratoiston URL'; - - @override - String get stop => 'Lopeta'; - - @override - String get sort_newest => 'Suodata uusimmista'; - - @override - String get sort_oldest => 'Suodata vanhimmista'; - - @override - String get sleep_timer => 'Uniajastin'; - - @override - String mins(Object minutes) { - return '$minutes Minuuttia'; - } - - @override - String hours(Object hours) { - return '$hours Tuntia'; - } - - @override - String hour(Object hours) { - return '$hours Tunti'; - } - - @override - String get custom_hours => 'Mukautetut tunnit'; - - @override - String get logs => 'Lokit'; - - @override - String get developers => 'Kehittäjät'; - - @override - String get not_logged_in => 'Et ole kirjautunut sisään.'; - - @override - String get search_mode => 'Hakutila'; - - @override - String get audio_source => 'Äänilähde'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Salaaminen epäonnistui'; - - @override - String get encryption_failed_warning => - 'Spotube käyttää salausta tallentaakseen tietosi, mutta epäonnistui, joten se palaa epäturvalliseen tallennukseen\nJos käytät Linuxia, varmista että sinulla on turvallisuuspalvelu (gnome-keyring, kde-wallet, keepassxc jne) asennettu'; - - @override - String get querying_info => 'Hankitaan tietoa...'; - - @override - String get piped_api_down => 'Johdettu palvelinesiintymä on alhaalla'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Johdettu palvelinesiintymä $pipedInstance on alhaalla.\n\nVaihda joko ilmeytymä tia vahda \'API tyyppi\' YouTuben viralliseen API\n\nKäynnistä sovellus uudestaan vaihdon jälkeen'; - } - - @override - String get you_are_offline => 'Et ole yhdistetty verkkoon'; - - @override - String get connection_restored => 'Verkkoyhteys palautettu'; - - @override - String get use_system_title_bar => 'Käytä järjestelmäpalkkia'; - - @override - String get crunching_results => 'Paloitellaan tuloksia...'; - - @override - String get search_to_get_results => 'Hae saadakseen tuloksia'; - - @override - String get use_amoled_mode => 'Pilkkopimeä tumma teema'; - - @override - String get pitch_dark_theme => 'AMOLED Tila'; - - @override - String get normalize_audio => 'Normalisoi audio'; - - @override - String get change_cover => 'Vaihda koveri'; - - @override - String get add_cover => 'Lisää koveri'; - - @override - String get restore_defaults => 'Palauta oletukset'; - - @override - String get download_music_format => 'Musiikin latausmuoto'; - - @override - String get streaming_music_format => 'Musiikin suoratoistomuoto'; - - @override - String get download_music_quality => 'Musiikin latauslaatu'; - - @override - String get streaming_music_quality => 'Musiikin suoratoistolaadun'; - - @override - String get login_with_lastfm => 'Kirjaudu sisään Last.fm:llä'; - - @override - String get connect => 'Yhdistä'; - - @override - String get disconnect_lastfm => 'Katkaise Last.fm'; - - @override - String get disconnect => 'Katkaise'; - - @override - String get username => 'Käyttäjänimi'; - - @override - String get password => 'Salasana'; - - @override - String get login => 'Kirjaudu'; - - @override - String get login_with_your_lastfm => 'Kirjaudu Last.fm käyttäjälläsi'; - - @override - String get scrobble_to_lastfm => 'Scrobble Last.fm:ään'; - - @override - String get go_to_album => 'Mene albumiin'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'Selaa kaikki'; - - @override - String get genres => 'Genret'; - - @override - String get explore_genres => 'Seikkaile genrejä'; - - @override - String get friends => 'Kaverit'; - - @override - String get no_lyrics_available => - 'Anteeksi, emme löytäneet lyriikoita tälle laululle'; - - @override - String get start_a_radio => 'Aloita Radio'; - - @override - String get how_to_start_radio => 'Kuinka haluat aloittaa radion?'; - - @override - String get replace_queue_question => - 'Haluatko korvata nykyisen jonon vai lisätä siihen?'; - - @override - String get endless_playback => 'Loputon toisto'; - - @override - String get delete_playlist => 'Poista soittolista'; - - @override - String get delete_playlist_confirmation => - 'Oletko varma että haluat poistaa tämän soittolistan?'; - - @override - String get local_tracks => 'Paikalliset kappaleet'; - - @override - String get local_tab => 'Paikallinen'; - - @override - String get song_link => 'Laulun linkki'; - - @override - String get skip_this_nonsense => 'Ohita tämä hölynpöly'; - - @override - String get freedom_of_music => '“Musiikin vapaus”'; - - @override - String get freedom_of_music_palm => '“Musiikin vapaus käsissäsi”'; - - @override - String get get_started => 'Aloitetaan'; - - @override - String get youtube_source_description => 'Suositeltu ja toimii parhaiten.'; - - @override - String get piped_source_description => - 'Tuntuuko vapaalta? Sama kuin YouTube mutta paljon vapautta'; - - @override - String get jiosaavn_source_description => 'Paras Etelä-Aasian alueelle.'; - - @override - String get invidious_source_description => - 'Samankaltainen kuin Piped, mutta korkeammalla saatavuudella'; - - @override - String highest_quality(Object quality) { - return 'Korkein laatu: $quality'; - } - - @override - String get select_audio_source => 'Valitse äänilähde'; - - @override - String get endless_playback_description => - 'Lisää automaattisesti uusia lauluja\njonon perään'; - - @override - String get choose_your_region => 'Valitse alueesi'; - - @override - String get choose_your_region_description => - 'Tämä auttaa Spotube näyttämään sinulle oikeaa sisältöä\nsijaintiasi varten.'; - - @override - String get choose_your_language => 'Valitse kielesi'; - - @override - String get help_project_grow => 'Auta tätä projektia kasvamaan'; - - @override - String get help_project_grow_description => - 'Spotube projekti minkä lähdekoodi on julkisesti saatavilla. Voit autta tätä projektia kasvamaan muutoksilla, ilmoittamalla bugeista, tai ehdottamalla uusia ominaisuuksia.'; - - @override - String get contribute_on_github => 'Auta GitHub:ssa'; - - @override - String get donate_on_open_collective => 'Lahjoita avoimessa kollektiivissa'; - - @override - String get browse_anonymously => 'Selaa anonyyminä'; - - @override - String get enable_connect => 'Ota käyttöön yhdistäminen'; - - @override - String get enable_connect_description => 'Ohjaa Spotubea toiselta laitteelta'; - - @override - String get devices => 'Laitteet'; - - @override - String get select => 'Valitse'; - - @override - String connect_client_alert(Object client) { - return '$client ohjaa sinua'; - } - - @override - String get this_device => 'Tämä laite'; - - @override - String get remote => 'Etä'; - - @override - String get stats => 'Tilastot'; - - @override - String and_n_more(Object count) { - return 'ja $count lisää'; - } - - @override - String get recently_played => 'Äskettäin soitetut'; - - @override - String get browse_more => 'Selaa lisää'; - - @override - String get no_title => 'Ei otsikkoa'; - - @override - String get not_playing => 'Ei soi'; - - @override - String get epic_failure => 'Epäonnistuminen!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Lisätty $tracks_length kappaletta jonoon'; - } - - @override - String get spotube_has_an_update => 'Spotubella on päivitys'; - - @override - String get download_now => 'Lataa nyt'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum on julkaistu'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version on julkaistu'; - } - - @override - String get read_the_latest => 'Lue viimeisimmät'; - - @override - String get release_notes => 'julkaisumuistiinpanot'; - - @override - String get pick_color_scheme => 'Valitse värimaailma'; - - @override - String get save => 'Tallenna'; - - @override - String get choose_the_device => 'Valitse laite:'; - - @override - String get multiple_device_connected => - 'Useita laitteita on kytketty.\nValitse laite, jossa haluat toiminnon suorittaa'; - - @override - String get nothing_found => 'Ei tuloksia'; - - @override - String get the_box_is_empty => 'Laatikko on tyhjä'; - - @override - String get top_artists => 'Suosituimmat artistit'; - - @override - String get top_albums => 'Suosituimmat albumit'; - - @override - String get this_week => 'Tällä viikolla'; - - @override - String get this_month => 'Tässä kuussa'; - - @override - String get last_6_months => 'Viimeiset 6 kuukautta'; - - @override - String get this_year => 'Tänä vuonna'; - - @override - String get last_2_years => 'Viimeiset 2 vuotta'; - - @override - String get all_time => 'Kaikki ajat'; - - @override - String powered_by_provider(Object providerName) { - return 'Tuottanut $providerName'; - } - - @override - String get email => 'Sähköposti'; - - @override - String get profile_followers => 'Seuraajat'; - - @override - String get birthday => 'Syntymäpäivä'; - - @override - String get subscription => 'Tilaus'; - - @override - String get not_born => 'Ei syntynyt'; - - @override - String get hacker => 'Hakkeri'; - - @override - String get profile => 'Profiili'; - - @override - String get no_name => 'Ei nimeä'; - - @override - String get edit => 'Muokkaa'; - - @override - String get user_profile => 'Käyttäjäprofiili'; - - @override - String count_plays(Object count) { - return '$count toistoa'; - } - - @override - String get streaming_fees_hypothetical => - 'Suoratoiston maksut (hypoteettinen)'; - - @override - String get minutes_listened => 'Kuunneltuja minuutteja'; - - @override - String get streamed_songs => 'Suoratoistettuja kappaleita'; - - @override - String count_streams(Object count) { - return '$count suoratoistoa'; - } - - @override - String get owned_by_you => 'Sinun omistama'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl kopioitu leikepöydälle'; - } - - @override - String get hipotetical_calculation => - '*Tämä on laskettu keskimääräisen musiikin suoratoistopalvelun 0,003–0,005 dollarin kappalekohtaisen maksun perusteella. Tämä on hypoteettinen laskelma, joka antaa käyttäjälle käsityksen siitä, kuinka paljon he olisivat maksaneet artisteille, jos he kuuntelisivat heidän kappaleitaan eri musiikin suoratoistopalveluissa.'; - - @override - String count_mins(Object minutes) { - return '$minutes min'; - } - - @override - String get summary_minutes => 'minuuttia'; - - @override - String get summary_listened_to_music => 'Kuunneltu musiikkia'; - - @override - String get summary_songs => 'kappaletta'; - - @override - String get summary_streamed_overall => 'Suoratoistettu yhteensä'; - - @override - String get summary_owed_to_artists => 'Maksettava artisteille\nTässä kuussa'; - - @override - String get summary_artists => 'artisti'; - - @override - String get summary_music_reached_you => 'Musiikki saavutti sinut'; - - @override - String get summary_full_albums => 'täydet albumit'; - - @override - String get summary_got_your_love => 'Sai rakkautesi'; - - @override - String get summary_playlists => 'soittolistat'; - - @override - String get summary_were_on_repeat => 'Olivat toistossa'; - - @override - String total_money(Object money) { - return 'Yhteensä $money'; - } - - @override - String get webview_not_found => 'Webview ei löydy'; - - @override - String get webview_not_found_description => - 'Laitteellasi ei ole asennettua Webview-ajonaikaa.\nJos se on asennettu, varmista, että se on environment PATH:ssa\n\nAsennuksen jälkeen käynnistä sovellus uudelleen'; - - @override - String get unsupported_platform => 'Ei tuettu alusta'; - - @override - String get cache_music => 'Musiikki välimuistissa'; - - @override - String get open => 'Avaa'; - - @override - String get cache_folder => 'Välimuistikansio'; - - @override - String get export => 'Vie'; - - @override - String get clear_cache => 'Tyhjennä välimuisti'; - - @override - String get clear_cache_confirmation => 'Haluatko tyhjentää välimuistin?'; - - @override - String get export_cache_files => 'Vie välimuistitiedostot'; - - @override - String found_n_files(Object count) { - return 'Löydettiin $count tiedostoa'; - } - - @override - String get export_cache_confirmation => 'Haluatko viedä nämä tiedostot'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Vietiin $filesExported/$files tiedostoa'; - } - - @override - String get undo => 'Peruuta'; - - @override - String get download_all => 'Lataa kaikki'; - - @override - String get add_all_to_playlist => 'Lisää kaikki soittolistalle'; - - @override - String get add_all_to_queue => 'Lisää kaikki jonoon'; - - @override - String get play_all_next => 'Toista kaikki seuraavaksi'; - - @override - String get pause => 'Pysäytä'; - - @override - String get view_all => 'Näytä kaikki'; - - @override - String get no_tracks_added_yet => - 'Näyttää siltä, että et ole lisännyt vielä mitään kappaleita.'; - - @override - String get no_tracks => 'Näyttää siltä, että täällä ei ole kappaleita.'; - - @override - String get no_tracks_listened_yet => - 'Näyttää siltä, että et ole kuunnellut mitään vielä.'; - - @override - String get not_following_artists => 'Et seuraa yhtään artistia.'; - - @override - String get no_favorite_albums_yet => - 'Näyttää siltä, että et ole lisännyt yhtään albumia suosikkeihisi.'; - - @override - String get no_logs_found => 'Ei lokitietoja löydetty'; - - @override - String get youtube_engine => 'YouTube-moottori'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine ei ole asennettu'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine ei ole asennettu järjestelmääsi.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Varmista, että se on saatavilla PATH-muuttujassa tai\nasetetaan $engine suoritettavan tiedoston absoluuttinen polku alla.'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/unix-tyyppisissä käyttöjärjestelmissä polun asettaminen .zshrc/.bashrc/.bash_profile jne. ei toimi.\nSinun täytyy asettaa polku shellin asetustiedostoon.'; - - @override - String get download => 'Lataa'; - - @override - String get file_not_found => 'Tiedostoa ei löydy'; - - @override - String get custom => 'Mukautettu'; - - @override - String get add_custom_url => 'Lisää mukautettu URL'; - - @override - String get edit_port => 'Muokkaa porttia'; - - @override - String get port_helper_msg => - 'Oletusarvo on -1, mikä tarkoittaa satunnaista numeroa. Jos sinulla on palomuuri määritetty, tämän asettamista suositellaan.'; - - @override - String connect_request(Object client) { - return 'Salli $client yhdistää?'; - } - - @override - String get connection_request_denied => - 'Yhteys evätty. Käyttäjä eväsi pääsyn.'; - - @override - String get an_error_occurred => 'Tapahtui virhe'; - - @override - String get copy_to_clipboard => 'Kopioi leikepöydälle'; - - @override - String get view_logs => 'Näytä lokit'; - - @override - String get retry => 'Yritä uudelleen'; - - @override - String get no_default_metadata_provider_selected => - 'Et ole asettanut oletusmetatietojen tarjoajaa'; - - @override - String get manage_metadata_providers => 'Hallinnoi metatietojen tarjoajia'; - - @override - String get open_link_in_browser => 'Avaa linkki selaimessa?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Haluatko avata seuraavan linkin'; - - @override - String get unsafe_url_warning => - 'Linkkien avaaminen epäluotettavista lähteistä voi olla vaarallista. Ole varovainen!\nVoit myös kopioida linkin leikepöydälle.'; - - @override - String get copy_link => 'Kopioi linkki'; - - @override - String get building_your_timeline => - 'Rakennetaan aikajanaasi kuuntelujesi perusteella...'; - - @override - String get official => 'Virallinen'; - - @override - String author_name(Object author) { - return 'Tekijä: $author'; - } - - @override - String get third_party => 'Kolmannen osapuolen'; - - @override - String get plugin_requires_authentication => 'Lisäosa vaatii todentamisen'; - - @override - String get update_available => 'Päivitys saatavilla'; - - @override - String get supports_scrobbling => 'Tukee scrobblingia'; - - @override - String get plugin_scrobbling_info => - 'Tämä lisäosa scrobblaa musiikkisi luodakseen kuunteluhistoriasi.'; - - @override - String get default_metadata_source => 'Oletusarvoinen metatietolähde'; - - @override - String get set_default_metadata_source => 'Aseta oletusmetatietolähde'; - - @override - String get default_audio_source => 'Oletusarvoinen äänilähde'; - - @override - String get set_default_audio_source => 'Aseta oletusäänilähde'; - - @override - String get set_default => 'Aseta oletukseksi'; - - @override - String get support => 'Tuki'; - - @override - String get support_plugin_development => 'Tue lisäosan kehitystä'; - - @override - String can_access_name_api(Object name) { - return '- Voi käyttää **$name** APIa'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Haluatko asentaa tämän lisäosan?'; - - @override - String get third_party_plugin_warning => - 'Tämä lisäosa on kolmannen osapuolen arkistosta. Varmista, että luotat lähteeseen ennen asennusta.'; - - @override - String get author => 'Tekijä'; - - @override - String get this_plugin_can_do_following => 'Tämä lisäosa voi tehdä seuraavaa'; - - @override - String get install => 'Asenna'; - - @override - String get install_a_metadata_provider => 'Asenna metatietojen tarjoaja'; - - @override - String get no_tracks_playing => 'Ei kappaletta toistossa tällä hetkellä'; - - @override - String get synced_lyrics_not_available => - 'Synkronoidut sanoitukset eivät ole saatavilla tälle kappaleelle. Käytä sen sijaan'; - - @override - String get plain_lyrics => 'Pelkät sanoitukset'; - - @override - String get tab_instead => 'välilehteä.'; - - @override - String get disclaimer => 'Vastuuvapauslauseke'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube-tiimi ei ota mitään vastuuta (mukaan lukien oikeudellinen) mistään \"kolmannen osapuolen\" lisäosista.\nKäytä niitä omalla vastuullasi. Ilmoita kaikista virheistä/ongelmista lisäosan arkistoon.\n\nJos jokin \"kolmannen osapuolen\" lisäosa rikkoo jonkin palvelun/oikeushenkilön käyttöehtoja/DMCA:ta, pyydä \"kolmannen osapuolen\" lisäosan tekijää tai isännöintialustaa, esim. GitHubia/Codebergiä, ryhtymään toimiin. Yllä luetellut (\"kolmannen osapuolen\" merkityt) ovat kaikki julkisia/yhteisön ylläpitämiä lisäosia. Emme kuratoi niitä, joten emme voi ryhtyä niihin toimiin.\n\n'; - - @override - String get input_does_not_match_format => 'Syöte ei vastaa vaadittua muotoa'; - - @override - String get plugins => 'Laajennukset'; - - @override - String get paste_plugin_download_url => - 'Liitä lataus-URL-osoite tai GitHub/Codeberg-arkiston URL-osoite tai suora linkki .smplug-tiedostoon'; - - @override - String get download_and_install_plugin_from_url => - 'Lataa ja asenna lisäosa URL-osoitteesta'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Lisäosan lisääminen epäonnistui: $error'; - } - - @override - String get upload_plugin_from_file => 'Lataa lisäosa tiedostosta'; - - @override - String get installed => 'Asennettu'; - - @override - String get available_plugins => 'Saatavilla olevat lisäosat'; - - @override - String get configure_plugins => - 'Määritä omat metatietojen tarjoaja- ja äänilähdelaajennukset'; - - @override - String get audio_scrobblers => 'Äänen scrobblerit'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Lähde: '; - - @override - String get uncompressed => 'Pakkaamaton'; - - @override - String get dab_music_source_description => - 'Audiofiileille. Tarjoaa korkealaatuisia/häviöttömiä äänivirtoja. Tarkka ISRC-pohjainen kappaleiden tunnistus.'; -} diff --git a/lib/l10n/generated/app_localizations_fr.dart b/lib/l10n/generated/app_localizations_fr.dart deleted file mode 100644 index 3637391b..00000000 --- a/lib/l10n/generated/app_localizations_fr.dart +++ /dev/null @@ -1,1584 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for French (`fr`). -class AppLocalizationsFr extends AppLocalizations { - AppLocalizationsFr([String locale = 'fr']) : super(locale); - - @override - String get guest => 'Invité'; - - @override - String get browse => 'Explorer'; - - @override - String get search => 'Rechercher'; - - @override - String get library => 'Bibliothèque'; - - @override - String get lyrics => 'Paroles'; - - @override - String get settings => 'Paramètres'; - - @override - String get genre_categories_filter => - 'Filtrer les catégories ou les genres...'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Personnalisé'; - - @override - String get featured => 'En vedette'; - - @override - String get new_releases => 'Nouvelles sorties'; - - @override - String get songs => 'Chansons'; - - @override - String playing_track(Object track) { - return 'Lecture de $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Cela effacera la file d\'attente actuelle. $track_length pistes seront supprimées\nVoulez-vous continuer?'; - } - - @override - String get load_more => 'Charger plus'; - - @override - String get playlists => 'Listes de lecture'; - - @override - String get artists => 'Artistes'; - - @override - String get albums => 'Albums'; - - @override - String get tracks => 'Pistes'; - - @override - String get downloads => 'Téléchargements'; - - @override - String get filter_playlists => 'Filtrer vos listes de lecture...'; - - @override - String get liked_tracks => 'Pistes aimées'; - - @override - String get liked_tracks_description => 'Toutes vos pistes aimées'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Créer une liste de lecture'; - - @override - String get update_playlist => 'Mettre à jour la playlist'; - - @override - String get create => 'Créer'; - - @override - String get cancel => 'Annuler'; - - @override - String get update => 'Mettre à jour'; - - @override - String get playlist_name => 'Nom de la liste de lecture'; - - @override - String get name_of_playlist => 'Nom de la liste de lecture'; - - @override - String get description => 'Description'; - - @override - String get public => 'Public'; - - @override - String get collaborative => 'Collaborative'; - - @override - String get search_local_tracks => 'Rechercher des pistes locales...'; - - @override - String get play => 'Lecture'; - - @override - String get delete => 'Supprimer'; - - @override - String get none => 'Aucun'; - - @override - String get sort_a_z => 'Trier par ordre alphabétique'; - - @override - String get sort_z_a => 'Trier par ordre alphabétique inverse'; - - @override - String get sort_artist => 'Trier par artiste'; - - @override - String get sort_album => 'Trier par album'; - - @override - String get sort_duration => 'Trier par durée'; - - @override - String get sort_tracks => 'Trier les pistes'; - - @override - String currently_downloading(Object tracks_length) { - return 'Téléchargement en cours ($tracks_length)'; - } - - @override - String get cancel_all => 'Tout annuler'; - - @override - String get filter_artist => 'Filtrer les artistes...'; - - @override - String followers(Object followers) { - return '$followers abonnés'; - } - - @override - String get add_artist_to_blacklist => 'Ajouter l\'artiste à la liste noire'; - - @override - String get top_tracks => 'Meilleures pistes'; - - @override - String get fans_also_like => 'Les fans aiment aussi'; - - @override - String get loading => 'Chargement...'; - - @override - String get artist => 'Artiste'; - - @override - String get blacklisted => 'Liste noire'; - - @override - String get following => 'Abonné'; - - @override - String get follow => 'S\'abonner'; - - @override - String get artist_url_copied => - 'URL de l\'artiste copiée dans le presse-papiers'; - - @override - String added_to_queue(Object tracks) { - return '$tracks pistes ajoutées à la file d\'attente'; - } - - @override - String get filter_albums => 'Filtrer les albums...'; - - @override - String get synced => 'Synchronisé'; - - @override - String get plain => 'Simple'; - - @override - String get shuffle => 'Lecture aléatoire'; - - @override - String get search_tracks => 'Rechercher des pistes...'; - - @override - String get released => 'Sorti'; - - @override - String error(Object error) { - return 'Erreur $error'; - } - - @override - String get title => 'Titre'; - - @override - String get time => 'Durée'; - - @override - String get more_actions => 'Plus d\'actions'; - - @override - String download_count(Object count) { - return 'Téléchargement ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Ajouter ($count) à la liste de lecture'; - } - - @override - String add_count_to_queue(Object count) { - return 'Ajouter ($count) à la file d\'attente'; - } - - @override - String play_count_next(Object count) { - return 'Lire ($count) ensuite'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return '$data copié dans le presse-papiers'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Ajouter $track aux listes de lecture suivantes'; - } - - @override - String get add => 'Ajouter'; - - @override - String added_track_to_queue(Object track) { - return '$track ajouté à la file d\'attente'; - } - - @override - String get add_to_queue => 'Ajouter à la file d\'attente'; - - @override - String track_will_play_next(Object track) { - return '$track sera joué ensuite'; - } - - @override - String get play_next => 'Lire ensuite'; - - @override - String removed_track_from_queue(Object track) { - return '$track retiré de la file d\'attente'; - } - - @override - String get remove_from_queue => 'Retirer de la file d\'attente'; - - @override - String get remove_from_favorites => 'Retirer des favoris'; - - @override - String get save_as_favorite => 'Enregistrer comme favori'; - - @override - String get add_to_playlist => 'Ajouter à la liste de lecture'; - - @override - String get remove_from_playlist => 'Retirer de la liste de lecture'; - - @override - String get add_to_blacklist => 'Ajouter à la liste noire'; - - @override - String get remove_from_blacklist => 'Retirer de la liste noire'; - - @override - String get share => 'Partager'; - - @override - String get mini_player => 'Lecteur mini'; - - @override - String get slide_to_seek => 'Faites glisser pour avancer ou reculer'; - - @override - String get shuffle_playlist => 'Lecture aléatoire de la liste de lecture'; - - @override - String get unshuffle_playlist => - 'Annuler la lecture aléatoire de la liste de lecture'; - - @override - String get previous_track => 'Piste précédente'; - - @override - String get next_track => 'Piste suivante'; - - @override - String get pause_playback => 'Mettre en pause la lecture'; - - @override - String get resume_playback => 'Reprendre la lecture'; - - @override - String get loop_track => 'Lecture en boucle de la piste'; - - @override - String get no_loop => 'Pas de boucle'; - - @override - String get repeat_playlist => 'Répéter la liste de lecture'; - - @override - String get queue => 'File d\'attente'; - - @override - String get alternative_track_sources => 'Sources alternatives de pistes'; - - @override - String get download_track => 'Télécharger la piste'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks pistes dans la file d\'attente'; - } - - @override - String get clear_all => 'Tout effacer'; - - @override - String get show_hide_ui_on_hover => - 'Afficher/Masquer l\'interface utilisateur au survol'; - - @override - String get always_on_top => 'Toujours au-dessus'; - - @override - String get exit_mini_player => 'Quitter le lecteur mini'; - - @override - String get download_location => 'Emplacement de téléchargement'; - - @override - String get local_library => 'Bibliothèque locale'; - - @override - String get add_library_location => 'Ajouter à la bibliothèque'; - - @override - String get remove_library_location => 'Retirer de la bibliothèque'; - - @override - String get account => 'Compte'; - - @override - String get logout => 'Se déconnecter'; - - @override - String get logout_of_this_account => 'Se déconnecter de ce compte'; - - @override - String get language_region => 'Langue et région'; - - @override - String get language => 'Langue'; - - @override - String get system_default => 'Paramètres par défaut du système'; - - @override - String get market_place_region => 'Région du marché'; - - @override - String get recommendation_country => 'Pays de recommandation'; - - @override - String get appearance => 'Apparence'; - - @override - String get layout_mode => 'Mode de mise en page'; - - @override - String get override_layout_settings => - 'Remplacer les paramètres de mise en page adaptative'; - - @override - String get adaptive => 'Adaptatif'; - - @override - String get compact => 'Compact'; - - @override - String get extended => 'Étendu'; - - @override - String get theme => 'Thème'; - - @override - String get dark => 'Sombre'; - - @override - String get light => 'Clair'; - - @override - String get system => 'Système'; - - @override - String get accent_color => 'Couleur d\'accentuation'; - - @override - String get sync_album_color => 'Synchroniser la couleur de l\'album'; - - @override - String get sync_album_color_description => - 'Utilise la couleur dominante de l\'art de l\'album comme couleur d\'accentuation'; - - @override - String get playback => 'Lecture'; - - @override - String get audio_quality => 'Qualité audio'; - - @override - String get high => 'Haute'; - - @override - String get low => 'Basse'; - - @override - String get pre_download_play => 'Pré-télécharger et lire'; - - @override - String get pre_download_play_description => - 'Au lieu de diffuser de l\'audio, téléchargez les octets et lisez-les à la place (recommandé pour les utilisateurs à bande passante élevée)'; - - @override - String get skip_non_music => - 'Ignorer les segments non musicaux (SponsorBlock)'; - - @override - String get blacklist_description => 'Pistes et artistes en liste noire'; - - @override - String get wait_for_download_to_finish => - 'Veuillez attendre la fin du téléchargement en cours'; - - @override - String get desktop => 'Bureau'; - - @override - String get close_behavior => 'Comportement de fermeture'; - - @override - String get close => 'Fermer'; - - @override - String get minimize_to_tray => 'Réduire dans la zone de notification'; - - @override - String get show_tray_icon => 'Afficher l\'icône de la zone de notification'; - - @override - String get about => 'À propos'; - - @override - String get u_love_spotube => 'Nous savons que vous aimez Spotube'; - - @override - String get check_for_updates => 'Vérifier les mises à jour'; - - @override - String get about_spotube => 'À propos de Spotube'; - - @override - String get blacklist => 'Liste noire'; - - @override - String get please_sponsor => 'S\'il vous plaît Sponsoriser/Donner'; - - @override - String get spotube_description => - 'Spotube, un client Spotify léger, multiplateforme et gratuit pour tous'; - - @override - String get version => 'Version'; - - @override - String get build_number => 'Numéro de version'; - - @override - String get founder => 'Fondateur'; - - @override - String get repository => 'Dépôt'; - - @override - String get bug_issues => 'Bugs + Problèmes'; - - @override - String get made_with => 'Fabriqué avec ❤️ au Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licence'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Ne vous inquiétez pas, vos identifiants ne seront ni collectés ni partagés avec qui que ce soit'; - - @override - String get know_how_to_login => 'Vous ne savez pas comment faire?'; - - @override - String get follow_step_by_step_guide => 'Suivez le guide étape par étape'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Veuillez remplir tous les champs'; - - @override - String get submit => 'Soumettre'; - - @override - String get exit => 'Quitter'; - - @override - String get previous => 'Précédent'; - - @override - String get next => 'Suivant'; - - @override - String get done => 'Terminé'; - - @override - String get step_1 => 'Étape 1'; - - @override - String get first_go_to => 'Tout d\'abord, allez sur'; - - @override - String get something_went_wrong => 'Quelque chose s\'est mal passé'; - - @override - String get piped_instance => 'Instance pipée'; - - @override - String get piped_description => - 'L\'instance de serveur Piped à utiliser pour la correspondance des pistes'; - - @override - String get piped_warning => - 'Certaines d\'entre elles peuvent ne pas fonctionner correctement. Alors utilisez à vos risques et périls'; - - @override - String get invidious_instance => 'Instance de serveur Invidious'; - - @override - String get invidious_description => - 'L\'instance de serveur Invidious à utiliser pour la correspondance de pistes'; - - @override - String get invidious_warning => - 'Certaines instances pourraient ne pas bien fonctionner. À utiliser à vos risques et périls'; - - @override - String get generate => 'Générer'; - - @override - String track_exists(Object track) { - return 'La piste $track existe déjà'; - } - - @override - String get replace_downloaded_tracks => - 'Remplacer toutes les pistes téléchargées'; - - @override - String get skip_download_tracks => - 'Ignorer le téléchargement de toutes les pistes téléchargées'; - - @override - String get do_you_want_to_replace => - 'Voulez-vous remplacer la piste existante ?'; - - @override - String get replace => 'Remplacer'; - - @override - String get skip => 'Passer'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Sélectionnez jusqu\'à $count $type'; - } - - @override - String get select_genres => 'Sélectionner les genres'; - - @override - String get add_genres => 'Ajouter des genres'; - - @override - String get country => 'Pays'; - - @override - String get number_of_tracks_generate => 'Nombre de pistes à générer'; - - @override - String get acousticness => 'Acoustique'; - - @override - String get danceability => 'Dansabilité'; - - @override - String get energy => 'Énergie'; - - @override - String get instrumentalness => 'Instrumentalité'; - - @override - String get liveness => 'Interprétation en direct'; - - @override - String get loudness => 'Sonorité'; - - @override - String get speechiness => 'Parlé'; - - @override - String get valence => 'Valeur émotionnelle'; - - @override - String get popularity => 'Popularité'; - - @override - String get key => 'Clé'; - - @override - String get duration => 'Durée (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'Signature rythmique'; - - @override - String get short => 'Court'; - - @override - String get medium => 'Moyen'; - - @override - String get long => 'Long'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Cible'; - - @override - String get moderate => 'Modéré'; - - @override - String get deselect_all => 'Tout désélectionner'; - - @override - String get select_all => 'Tout sélectionner'; - - @override - String get are_you_sure => 'Êtes-vous sûr(e) ?'; - - @override - String get generating_playlist => - 'Génération de votre playlist personnalisée en cours...'; - - @override - String selected_count_tracks(Object count) { - return '$count pistes sélectionnées'; - } - - @override - String get download_warning => - 'Si vous téléchargez toutes les pistes en vrac, vous violez clairement les droits d\'auteur de la musique et vous causez des dommages à la société créative de la musique. J\'espère que vous en êtes conscient. Essayez toujours de respecter et de soutenir le travail acharné des artistes.'; - - @override - String get download_ip_ban_warning => - 'Au fait, votre adresse IP peut être bloquée sur YouTube en raison d\'une demande excessive de téléchargements par rapport à la normale. Le blocage de l\'IP signifie que vous ne pourrez pas utiliser YouTube (même si vous êtes connecté) pendant au moins 2 à 3 mois à partir de cet appareil IP. Et Spotube ne peut être tenu responsable si cela se produit.'; - - @override - String get by_clicking_accept_terms => - 'En cliquant sur \'accepter\', vous acceptez les conditions suivantes :'; - - @override - String get download_agreement_1 => - 'Je sais que je pirate de la musique. Je suis méchant(e).'; - - @override - String get download_agreement_2 => - 'Je soutiendrai l\'artiste autant que possible et je ne fais cela que parce que je n\'ai pas d\'argent pour acheter leur art.'; - - @override - String get download_agreement_3 => - 'Je suis parfaitement conscient(e) que mon adresse IP peut être bloquée sur YouTube et je ne tiens pas Spotube ni ses propriétaires/contributeurs responsables de tout accident causé par mon action actuelle.'; - - @override - String get decline => 'Refuser'; - - @override - String get accept => 'Accepter'; - - @override - String get details => 'Détails'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Chaîne'; - - @override - String get likes => 'J\'aime'; - - @override - String get dislikes => 'Je n\'aime pas'; - - @override - String get views => 'Vues'; - - @override - String get streamUrl => 'URL de diffusion'; - - @override - String get stop => 'Arrêter'; - - @override - String get sort_newest => 'Trier par les plus récents'; - - @override - String get sort_oldest => 'Trier par les plus anciens'; - - @override - String get sleep_timer => 'Minuteur de veille'; - - @override - String mins(Object minutes) { - return '$minutes minutes'; - } - - @override - String hours(Object hours) { - return '$hours heures'; - } - - @override - String hour(Object hours) { - return '$hours heure'; - } - - @override - String get custom_hours => 'Heures personnalisées'; - - @override - String get logs => 'Journaux'; - - @override - String get developers => 'Développeurs'; - - @override - String get not_logged_in => 'Vous n\'êtes pas connecté(e)'; - - @override - String get search_mode => 'Mode de recherche'; - - @override - String get audio_source => 'Source audio'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => 'Échec de la cryptage'; - - @override - String get encryption_failed_warning => - 'Spotube utilise le cryptage pour stocker vos données en toute sécurité. Mais cela a échoué. Il basculera donc vers un stockage non sécurisé\nSi vous utilisez Linux, assurez-vous d\'avoir installé des services secrets tels que gnome-keyring, kde-wallet et keepassxc'; - - @override - String get querying_info => 'Interrogation des info...'; - - @override - String get piped_api_down => 'L\'API Piped est hors service'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'L\'instance Piped $pipedInstance est actuellement indisponible\n\nChangez soit l\'instance, soit le \'Type d\'API\' pour utiliser l\'API officielle de YouTube\n\nN\'oubliez pas de redémarrer l\'application après la modification'; - } - - @override - String get you_are_offline => 'Vous êtes actuellement hors ligne'; - - @override - String get connection_restored => 'Votre connexion internet a été rétablie'; - - @override - String get use_system_title_bar => 'Utiliser la barre de titre système'; - - @override - String get crunching_results => 'Traitement des résultats...'; - - @override - String get search_to_get_results => 'Recherche pour obtenir des résultats'; - - @override - String get use_amoled_mode => 'Utiliser le mode AMOLED'; - - @override - String get pitch_dark_theme => 'Thème Dart noir intense'; - - @override - String get normalize_audio => 'Normaliser l\'audio'; - - @override - String get change_cover => 'Changer de couverture'; - - @override - String get add_cover => 'Ajouter une couverture'; - - @override - String get restore_defaults => 'Restaurer les valeurs par défaut'; - - @override - String get download_music_format => 'Format de téléchargement de musique'; - - @override - String get streaming_music_format => 'Format de streaming de musique'; - - @override - String get download_music_quality => 'Qualité de téléchargement de musique'; - - @override - String get streaming_music_quality => 'Qualité de streaming de musique'; - - @override - String get login_with_lastfm => 'Se connecter avec Last.fm'; - - @override - String get connect => 'Connecter'; - - @override - String get disconnect_lastfm => 'Déconnecter de Last.fm'; - - @override - String get disconnect => 'Déconnecter'; - - @override - String get username => 'Nom d\'utilisateur'; - - @override - String get password => 'Mot de passe'; - - @override - String get login => 'Se connecter'; - - @override - String get login_with_your_lastfm => 'Se connecter avec votre compte Last.fm'; - - @override - String get scrobble_to_lastfm => 'Scrobble à Last.fm'; - - @override - String get go_to_album => 'Aller à l\'album'; - - @override - String get discord_rich_presence => 'Présence riche de Discord'; - - @override - String get browse_all => 'Parcourir tout'; - - @override - String get genres => 'Genres'; - - @override - String get explore_genres => 'Explorer les genres'; - - @override - String get friends => 'Amis'; - - @override - String get no_lyrics_available => - 'Désolé, impossible de trouver les paroles de cette piste'; - - @override - String get start_a_radio => 'Démarrer une radio'; - - @override - String get how_to_start_radio => 'Comment voulez-vous démarrer la radio ?'; - - @override - String get replace_queue_question => - 'Voulez-vous remplacer la file d\'attente actuelle ou y ajouter ?'; - - @override - String get endless_playback => 'Lecture sans fin'; - - @override - String get delete_playlist => 'Supprimer la playlist'; - - @override - String get delete_playlist_confirmation => - 'Êtes-vous sûr de vouloir supprimer cette playlist ?'; - - @override - String get local_tracks => 'Titres locaux'; - - @override - String get local_tab => 'Local'; - - @override - String get song_link => 'Lien de la chanson'; - - @override - String get skip_this_nonsense => 'Passer cette absurdité'; - - @override - String get freedom_of_music => '“Liberté de la musique”'; - - @override - String get freedom_of_music_palm => - '“Liberté de la musique dans la paume de votre main”'; - - @override - String get get_started => 'Commençons'; - - @override - String get youtube_source_description => 'Recommandé et fonctionne mieux.'; - - @override - String get piped_source_description => - 'Vous vous sentez libre ? Comme YouTube mais beaucoup plus gratuit.'; - - @override - String get jiosaavn_source_description => - 'Le meilleur pour la région d\'Asie du Sud.'; - - @override - String get invidious_source_description => - 'Similaire à Piped mais avec une meilleure disponibilité'; - - @override - String highest_quality(Object quality) { - return 'Meilleure qualité : $quality'; - } - - @override - String get select_audio_source => 'Sélectionner la source audio'; - - @override - String get endless_playback_description => - 'Ajouter automatiquement de nouvelles chansons à la fin de la file d\'attente'; - - @override - String get choose_your_region => 'Choisissez votre région'; - - @override - String get choose_your_region_description => - 'Cela aidera Spotube à vous montrer le bon contenu pour votre emplacement.'; - - @override - String get choose_your_language => 'Choisissez votre langue'; - - @override - String get help_project_grow => 'Aidez ce projet à grandir'; - - @override - String get help_project_grow_description => - 'Spotube est un projet open-source. Vous pouvez aider ce projet à grandir en contribuant au projet, en signalant des bugs ou en suggérant de nouvelles fonctionnalités.'; - - @override - String get contribute_on_github => 'Contribuer sur GitHub'; - - @override - String get donate_on_open_collective => 'Faire un don sur Open Collective'; - - @override - String get browse_anonymously => 'Naviguer anonymement'; - - @override - String get enable_connect => 'Activer la connexion'; - - @override - String get enable_connect_description => - 'Contrôlez Spotube depuis d\'autres appareils'; - - @override - String get devices => 'Appareils'; - - @override - String get select => 'Sélectionner'; - - @override - String connect_client_alert(Object client) { - return 'Vous êtes contrôlé par $client'; - } - - @override - String get this_device => 'Cet appareil'; - - @override - String get remote => 'À distance'; - - @override - String get stats => 'Statistiques'; - - @override - String and_n_more(Object count) { - return 'et $count de plus'; - } - - @override - String get recently_played => 'Récemment joué'; - - @override - String get browse_more => 'Parcourir plus'; - - @override - String get no_title => 'Sans titre'; - - @override - String get not_playing => 'Non joué'; - - @override - String get epic_failure => 'Échec épique!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length morceaux ajoutés à la file d\'attente'; - } - - @override - String get spotube_has_an_update => 'Spotube a une mise à jour'; - - @override - String get download_now => 'Télécharger maintenant'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum a été publié'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version a été publié'; - } - - @override - String get read_the_latest => 'Lisez les dernières '; - - @override - String get release_notes => 'notes de version'; - - @override - String get pick_color_scheme => 'Choisissez le schéma de couleurs'; - - @override - String get save => 'Sauvegarder'; - - @override - String get choose_the_device => 'Choisissez l\'appareil:'; - - @override - String get multiple_device_connected => - 'Plusieurs appareils sont connectés.\nChoisissez l\'appareil sur lequel vous souhaitez effectuer cette action'; - - @override - String get nothing_found => 'Rien trouvé'; - - @override - String get the_box_is_empty => 'La boîte est vide'; - - @override - String get top_artists => 'Meilleurs artistes'; - - @override - String get top_albums => 'Meilleurs albums'; - - @override - String get this_week => 'Cette semaine'; - - @override - String get this_month => 'Ce mois-ci'; - - @override - String get last_6_months => 'Les 6 derniers mois'; - - @override - String get this_year => 'Cette année'; - - @override - String get last_2_years => 'Les 2 dernières années'; - - @override - String get all_time => 'De tous les temps'; - - @override - String powered_by_provider(Object providerName) { - return 'Propulsé par $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Abonnés'; - - @override - String get birthday => 'Anniversaire'; - - @override - String get subscription => 'Abonnement'; - - @override - String get not_born => 'Non né'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profil'; - - @override - String get no_name => 'Sans nom'; - - @override - String get edit => 'Modifier'; - - @override - String get user_profile => 'Profil utilisateur'; - - @override - String count_plays(Object count) { - return '$count lectures'; - } - - @override - String get streaming_fees_hypothetical => - 'Frais de streaming (hypothétiques)'; - - @override - String get minutes_listened => 'Minutes écoutées'; - - @override - String get streamed_songs => 'Morceaux diffusés'; - - @override - String count_streams(Object count) { - return '$count streams'; - } - - @override - String get owned_by_you => 'Possédé par vous'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl copié dans le presse-papier'; - } - - @override - String get hipotetical_calculation => - '*Ce calcul est basé sur le paiement moyen par lecture des plateformes de streaming musical en ligne, de 0,003 \$ à 0,005 \$. Il s\'agit d\'un calcul hypothétique pour donner à l\'utilisateur un aperçu de ce qu\'il aurait payé aux artistes s\'il écoutait leur chanson sur différentes plateformes de streaming musical.'; - - @override - String count_mins(Object minutes) { - return '$minutes minutes'; - } - - @override - String get summary_minutes => 'minutes'; - - @override - String get summary_listened_to_music => 'A écouté de la musique'; - - @override - String get summary_songs => 'morceaux'; - - @override - String get summary_streamed_overall => 'Diffusé en général'; - - @override - String get summary_owed_to_artists => 'Dû aux artistes\nCe mois-ci'; - - @override - String get summary_artists => 'artistes'; - - @override - String get summary_music_reached_you => 'La musique vous a atteint'; - - @override - String get summary_full_albums => 'albums complets'; - - @override - String get summary_got_your_love => 'A obtenu votre amour'; - - @override - String get summary_playlists => 'playlists'; - - @override - String get summary_were_on_repeat => 'Était en répétition'; - - @override - String total_money(Object money) { - return 'Total $money'; - } - - @override - String get webview_not_found => 'Webview non trouvé'; - - @override - String get webview_not_found_description => - 'Aucun environnement d\'exécution Webview installé sur votre appareil.\nSi c\'est installé, assurez-vous qu\'il soit dans le environment PATH\n\nAprès l\'installation, redémarrez l\'application'; - - @override - String get unsupported_platform => 'Plateforme non prise en charge'; - - @override - String get cache_music => 'Mettre la musique en cache'; - - @override - String get open => 'Ouvrir'; - - @override - String get cache_folder => 'Dossier du cache'; - - @override - String get export => 'Exporter'; - - @override - String get clear_cache => 'Effacer le cache'; - - @override - String get clear_cache_confirmation => 'Voulez-vous effacer le cache ?'; - - @override - String get export_cache_files => 'Exporter les fichiers en cache'; - - @override - String found_n_files(Object count) { - return '$count fichiers trouvés'; - } - - @override - String get export_cache_confirmation => - 'Voulez-vous exporter ces fichiers vers'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported fichiers exportés sur $files'; - } - - @override - String get undo => 'Annuler'; - - @override - String get download_all => 'Télécharger tout'; - - @override - String get add_all_to_playlist => 'Ajouter tout à la playlist'; - - @override - String get add_all_to_queue => 'Ajouter tout à la file d\'attente'; - - @override - String get play_all_next => 'Lire tout suivant'; - - @override - String get pause => 'Pause'; - - @override - String get view_all => 'Voir tout'; - - @override - String get no_tracks_added_yet => - 'Il semble que vous n\'avez encore ajouté aucun morceau.'; - - @override - String get no_tracks => 'Il semble qu\'il n\'y ait pas de morceaux ici.'; - - @override - String get no_tracks_listened_yet => - 'Il semble que vous n\'avez encore rien écouté.'; - - @override - String get not_following_artists => 'Vous ne suivez aucun artiste.'; - - @override - String get no_favorite_albums_yet => - 'Il semble que vous n\'ayez encore ajouté aucun album à vos favoris.'; - - @override - String get no_logs_found => 'Aucun log trouvé'; - - @override - String get youtube_engine => 'Moteur YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine n\'est pas installé'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine n\'est pas installé sur votre système.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Assurez-vous qu\'il est disponible dans la variable PATH ou\nfixez le chemin absolu du fichier exécutable $engine ci-dessous.'; - } - - @override - String get youtube_engine_unix_issue_message => - 'Dans macOS/Linux/les systèmes d\'exploitation similaires à Unix, définir le chemin dans .zshrc/.bashrc/.bash_profile etc. ne fonctionnera pas.\nVous devez définir le chemin dans le fichier de configuration du shell.'; - - @override - String get download => 'Télécharger'; - - @override - String get file_not_found => 'Fichier non trouvé'; - - @override - String get custom => 'Personnalisé'; - - @override - String get add_custom_url => 'Ajouter une URL personnalisée'; - - @override - String get edit_port => 'Modifier le port'; - - @override - String get port_helper_msg => - 'La valeur par défaut est -1, ce qui indique un nombre aléatoire. Si vous avez configuré un pare-feu, il est recommandé de le définir.'; - - @override - String connect_request(Object client) { - return 'Autoriser $client à se connecter ?'; - } - - @override - String get connection_request_denied => - 'Connexion refusée. L\'utilisateur a refusé l\'accès.'; - - @override - String get an_error_occurred => 'Une erreur est survenue'; - - @override - String get copy_to_clipboard => 'Copier dans le presse-papiers'; - - @override - String get view_logs => 'Afficher les journaux'; - - @override - String get retry => 'Réessayer'; - - @override - String get no_default_metadata_provider_selected => - 'Vous n\'avez pas de fournisseur de métadonnées par défaut'; - - @override - String get manage_metadata_providers => - 'Gérer les fournisseurs de métadonnées'; - - @override - String get open_link_in_browser => 'Ouvrir le lien dans le navigateur ?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Voulez-vous ouvrir le lien suivant'; - - @override - String get unsafe_url_warning => - 'L\'ouverture de liens provenant de sources non fiables peut être dangereuse. Soyez prudent !\nVous pouvez également copier le lien dans votre presse-papiers.'; - - @override - String get copy_link => 'Copier le lien'; - - @override - String get building_your_timeline => - 'Construction de votre chronologie en fonction de vos écoutes...'; - - @override - String get official => 'Officiel'; - - @override - String author_name(Object author) { - return 'Auteur : $author'; - } - - @override - String get third_party => 'Tiers'; - - @override - String get plugin_requires_authentication => - 'Le plugin nécessite une authentification'; - - @override - String get update_available => 'Mise à jour disponible'; - - @override - String get supports_scrobbling => 'Supporte le scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Ce plugin scrobble votre musique pour générer votre historique d\'écoute.'; - - @override - String get default_metadata_source => 'Source de métadonnées par défaut'; - - @override - String get set_default_metadata_source => - 'Définir la source de métadonnées par défaut'; - - @override - String get default_audio_source => 'Source audio par défaut'; - - @override - String get set_default_audio_source => 'Définir la source audio par défaut'; - - @override - String get set_default => 'Définir par défaut'; - - @override - String get support => 'Soutien'; - - @override - String get support_plugin_development => - 'Soutenir le développement de plugins'; - - @override - String can_access_name_api(Object name) { - return '- Peut accéder à l\'API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Voulez-vous installer ce plugin ?'; - - @override - String get third_party_plugin_warning => - 'Ce plugin provient d\'un dépôt tiers. Assurez-vous de faire confiance à la source avant de l\'installer.'; - - @override - String get author => 'Auteur'; - - @override - String get this_plugin_can_do_following => 'Ce plugin peut faire ce qui suit'; - - @override - String get install => 'Installer'; - - @override - String get install_a_metadata_provider => - 'Installer un fournisseur de métadonnées'; - - @override - String get no_tracks_playing => - 'Aucune piste n\'est en cours de lecture actuellement'; - - @override - String get synced_lyrics_not_available => - 'Les paroles synchronisées ne sont pas disponibles pour cette chanson. Veuillez utiliser l\'onglet'; - - @override - String get plain_lyrics => 'Paroles simples'; - - @override - String get tab_instead => 'à la place.'; - - @override - String get disclaimer => 'Avertissement'; - - @override - String get third_party_plugin_dmca_notice => - 'L\'équipe de Spotube n\'assume aucune responsabilité (y compris juridique) pour les plugins \"tiers\".\nVeuillez les utiliser à vos propres risques. Pour tout bug/problème, veuillez le signaler au dépôt du plugin.\n\nSi un plugin \"tiers\" enfreint les conditions d\'utilisation/DMCA d\'un service/entité juridique, veuillez demander à l\'auteur du plugin \"tiers\" ou à la plateforme d\'hébergement (par exemple GitHub/Codeberg) de prendre des mesures. Les plugins listés ci-dessus (étiquetés \"tiers\") sont tous des plugins publics/maintenus par la communauté. Nous ne les gérons pas, nous ne pouvons donc prendre aucune mesure à leur sujet.\n\n'; - - @override - String get input_does_not_match_format => - 'L\'entrée ne correspond pas au format requis'; - - @override - String get plugins => 'Plugins'; - - @override - String get paste_plugin_download_url => - 'Collez l\'URL de téléchargement ou l\'URL du dépôt GitHub/Codeberg ou un lien direct vers le fichier .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Télécharger et installer le plugin à partir de l\'URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Échec de l\'ajout du plugin : $error'; - } - - @override - String get upload_plugin_from_file => - 'Télécharger le plugin à partir d\'un fichier'; - - @override - String get installed => 'Installé'; - - @override - String get available_plugins => 'Plugins disponibles'; - - @override - String get configure_plugins => - 'Configurez vos propres plugins de fournisseur de métadonnées et de source audio'; - - @override - String get audio_scrobblers => 'Scrobblers audio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Source : '; - - @override - String get uncompressed => 'Non compressé'; - - @override - String get dab_music_source_description => - 'Pour les audiophiles. Fournit des flux audio de haute qualité/sans perte. Correspondance précise des pistes basée sur ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_hi.dart b/lib/l10n/generated/app_localizations_hi.dart deleted file mode 100644 index 0434e8db..00000000 --- a/lib/l10n/generated/app_localizations_hi.dart +++ /dev/null @@ -1,1570 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Hindi (`hi`). -class AppLocalizationsHi extends AppLocalizations { - AppLocalizationsHi([String locale = 'hi']) : super(locale); - - @override - String get guest => 'अतिथि'; - - @override - String get browse => 'ब्राउज़ करें'; - - @override - String get search => 'खोजें'; - - @override - String get library => 'लाइब्रेरी'; - - @override - String get lyrics => 'गीतों के बोल'; - - @override - String get settings => 'सेटिंग्स'; - - @override - String get genre_categories_filter => 'श्रेणियों या जानरों को फिल्टर करें...'; - - @override - String get genre => 'जानर'; - - @override - String get personalized => 'व्यक्तिगत'; - - @override - String get featured => 'विशेष रुप से प्रदर्शित'; - - @override - String get new_releases => 'नई रिलीज़'; - - @override - String get songs => 'गाने'; - - @override - String playing_track(Object track) { - return '$track चल रहा है'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'यह मौजूदा कतार को साफ़ कर देगा। $track_length ट्रैक हटा दिए जाएंगे\nक्या आप जारी रखना चाहते हैं?'; - } - - @override - String get load_more => 'और लोड करें'; - - @override - String get playlists => 'प्लेलिस्ट'; - - @override - String get artists => 'कलाकार'; - - @override - String get albums => 'एल्बम'; - - @override - String get tracks => 'ट्रैक'; - - @override - String get downloads => 'डाउनलोड'; - - @override - String get filter_playlists => 'अपनी प्लेलिस्टों को फ़िल्टर करें...'; - - @override - String get liked_tracks => 'पसंदीदा ट्रैक'; - - @override - String get liked_tracks_description => 'आपके सभी पसंदीदा ट्रैक'; - - @override - String get playlist => 'प्लेलिस्ट'; - - @override - String get create_a_playlist => 'एक प्लेलिस्ट बनाएं'; - - @override - String get update_playlist => 'प्लेलिस्ट अपडेट करें'; - - @override - String get create => 'बनाएं'; - - @override - String get cancel => 'रद्द करें'; - - @override - String get update => 'अपडेट करें'; - - @override - String get playlist_name => 'प्लेलिस्ट का नाम'; - - @override - String get name_of_playlist => 'प्लेलिस्ट का नाम'; - - @override - String get description => 'विवरण'; - - @override - String get public => 'सार्वजनिक'; - - @override - String get collaborative => 'सहयोगी'; - - @override - String get search_local_tracks => 'स्थानीय ट्रैक खोजें...'; - - @override - String get play => 'चलाएँ'; - - @override - String get delete => 'हटाएँ'; - - @override - String get none => 'कोई नहीं'; - - @override - String get sort_a_z => 'A-Z सॉर्ट करें'; - - @override - String get sort_z_a => 'Z-A सॉर्ट करें'; - - @override - String get sort_artist => 'कलाकार के अनुसार सॉर्ट करें'; - - @override - String get sort_album => 'एल्बम के अनुसार सॉर्ट करें'; - - @override - String get sort_duration => 'समय के आधार पर क्रमबद्ध करें'; - - @override - String get sort_tracks => 'ट्रैक को सॉर्ट करें'; - - @override - String currently_downloading(Object tracks_length) { - return 'वर्तमान में डाउनलोड हो रहा है ($tracks_length)'; - } - - @override - String get cancel_all => 'सभी को रद्द करें'; - - @override - String get filter_artist => 'कलाकारों को फ़िल्टर करें...'; - - @override - String followers(Object followers) { - return '$followers फॉलोअर्स'; - } - - @override - String get add_artist_to_blacklist => 'काल सूची में कलाकार जोड़ें'; - - @override - String get top_tracks => 'शीर्ष ट्रैक'; - - @override - String get fans_also_like => 'फैंस भी पसंद करते हैं'; - - @override - String get loading => 'लोड हो रहा है...'; - - @override - String get artist => 'कलाकार'; - - @override - String get blacklisted => 'काल सूची में है'; - - @override - String get following => 'फॉलो करना'; - - @override - String get follow => 'फॉलो करें'; - - @override - String get artist_url_copied => 'कलाकार URL क्लिपबोर्ड पर कॉपी हुआ'; - - @override - String added_to_queue(Object tracks) { - return '$tracks ट्रैक कतार में जोड़े गए'; - } - - @override - String get filter_albums => 'एल्बमों को फ़िल्टर करें...'; - - @override - String get synced => 'सिंक किया गया'; - - @override - String get plain => 'सादा'; - - @override - String get shuffle => 'शफल'; - - @override - String get search_tracks => 'ट्रैक खोजें...'; - - @override - String get released => 'जारी हुआ'; - - @override - String error(Object error) { - return 'त्रुटि $error'; - } - - @override - String get title => 'शीर्षक'; - - @override - String get time => 'समय'; - - @override - String get more_actions => 'अधिक कार्रवाई'; - - @override - String download_count(Object count) { - return 'डाउनलोड ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return '($count) को प्लेलिस्ट में जोड़ें'; - } - - @override - String add_count_to_queue(Object count) { - return '($count) को कतार में जोड़ें'; - } - - @override - String play_count_next(Object count) { - return '($count) अगले में चलाएँ'; - } - - @override - String get album => 'एल्बम'; - - @override - String copied_to_clipboard(Object data) { - return '$data क्लिपबोर्ड पर कॉपी किया गया'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track को निम्नलिखित प्लेलिस्ट में जोड़ें'; - } - - @override - String get add => 'जोड़ें'; - - @override - String added_track_to_queue(Object track) { - return '$track को कतार में जोड़ दिया गया'; - } - - @override - String get add_to_queue => 'कतार में जोड़ें'; - - @override - String track_will_play_next(Object track) { - return '$track अगले में चलेगा'; - } - - @override - String get play_next => 'अगले में चलाएँ'; - - @override - String removed_track_from_queue(Object track) { - return '$track को कतार से हटा दिया गया'; - } - - @override - String get remove_from_queue => 'कतार से हटाएँ'; - - @override - String get remove_from_favorites => 'पसंदीदा से हटाएँ'; - - @override - String get save_as_favorite => 'पसंदीदा के रूप में सहेजें'; - - @override - String get add_to_playlist => 'प्लेलिस्ट में जोड़ें'; - - @override - String get remove_from_playlist => 'प्लेलिस्ट से हटाएँ'; - - @override - String get add_to_blacklist => 'ब्लैकलिस्ट में जोड़ें'; - - @override - String get remove_from_blacklist => 'ब्लैकलिस्ट से हटाएँ'; - - @override - String get share => 'साझा करें'; - - @override - String get mini_player => 'मिनी प्लेयर'; - - @override - String get slide_to_seek => 'आगे या पीछे खोजने के लिए स्लाइड करें'; - - @override - String get shuffle_playlist => 'प्लेलिस्ट शफल करें'; - - @override - String get unshuffle_playlist => 'अनशफल प्लेलिस्ट'; - - @override - String get previous_track => 'पिछला ट्रैक'; - - @override - String get next_track => 'अगला ट्रैक'; - - @override - String get pause_playback => 'वापसी बंद करें'; - - @override - String get resume_playback => 'पुनः चलाना'; - - @override - String get loop_track => 'लूप ट्रैक'; - - @override - String get no_loop => 'कोई लूप नहीं'; - - @override - String get repeat_playlist => 'प्लेलिस्ट दोहराएं'; - - @override - String get queue => 'कतार'; - - @override - String get alternative_track_sources => 'वैकल्पिक ट्रैक स्रोत'; - - @override - String get download_track => 'ट्रैक डाउनलोड करें'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks ट्रैक कतार में हैं'; - } - - @override - String get clear_all => 'सभी हटाएं'; - - @override - String get show_hide_ui_on_hover => 'होवर पर यूआई दिखाएँ/छिपाएँ'; - - @override - String get always_on_top => 'हमेशा ऊपर हो'; - - @override - String get exit_mini_player => 'मिनी प्लेयर से बाहर निकलें'; - - @override - String get download_location => 'डाउनलोड स्थान'; - - @override - String get local_library => 'स्थानीय पुस्तकालय'; - - @override - String get add_library_location => 'पुस्तकालय में जोड़ें'; - - @override - String get remove_library_location => 'पुस्तकालय से हटाएं'; - - @override - String get account => 'खाता'; - - @override - String get logout => 'लॉगआउट'; - - @override - String get logout_of_this_account => 'इस खाते से लॉगआउट करें'; - - @override - String get language_region => 'भाषा और क्षेत्र'; - - @override - String get language => 'भाषा'; - - @override - String get system_default => 'सिस्टम डिफ़ॉल्ट'; - - @override - String get market_place_region => 'मार्केटप्लेस क्षेत्र'; - - @override - String get recommendation_country => 'सिफ़ारिश देने वाला देश'; - - @override - String get appearance => 'दिखने में'; - - @override - String get layout_mode => 'लेआउट मोड'; - - @override - String get override_layout_settings => - 'ओवरराइड रेस्पॉन्सिव लेआउट मोड सेटिंग्स'; - - @override - String get adaptive => 'अनुकूल'; - - @override - String get compact => 'कॉम्पैक्ट'; - - @override - String get extended => 'विस्तृत'; - - @override - String get theme => 'थीम'; - - @override - String get dark => 'डार्क'; - - @override - String get light => 'लाइट'; - - @override - String get system => 'सिस्टम'; - - @override - String get accent_color => 'अक्षरशैली का रंग'; - - @override - String get sync_album_color => 'एल्बम का रंग सिंक करें'; - - @override - String get sync_album_color_description => - 'एल्बम कला का प्रधान रंग एक्सेंट रंग के रूप में उपयोग किया जाता है'; - - @override - String get playback => 'प्लेबैक'; - - @override - String get audio_quality => 'ऑडियो क्वालिटी'; - - @override - String get high => 'उच्च'; - - @override - String get low => 'निम्न'; - - @override - String get pre_download_play => 'पूर्वावत डाउनलोड और प्ले करें'; - - @override - String get pre_download_play_description => - 'ऑडियो स्ट्रीमिंग की बजाय बाइट्स डाउनलोड करें और बजाय में प्ले करें (उच्च बैंडविड्थ उपयोगकर्ताओं के लिए सिफारिश किया जाता है)'; - - @override - String get skip_non_music => - 'गाने के अलावा सेगमेंट्स को छोड़ें (स्पॉन्सरब्लॉक)'; - - @override - String get blacklist_description => 'ब्लैकलिस्ट में शामिल ट्रैक और कलाकार'; - - @override - String get wait_for_download_to_finish => - 'वर्तमान डाउनलोड समाप्त होने तक कृपया प्रतीक्षा करें'; - - @override - String get desktop => 'डेस्कटॉप'; - - @override - String get close_behavior => 'बंद करने का व्यवहार'; - - @override - String get close => 'बंद करें'; - - @override - String get minimize_to_tray => 'ट्रे में कम करें'; - - @override - String get show_tray_icon => 'सिस्टम ट्रे आइकन दिखाएं'; - - @override - String get about => 'के बारे में'; - - @override - String get u_love_spotube => 'हम जानते हैं कि आप Spotube से प्यार करते हैं'; - - @override - String get check_for_updates => 'अपडेट के लिए जाँच करें'; - - @override - String get about_spotube => 'Spotube के बारे में'; - - @override - String get blacklist => 'ब्लैकलिस्ट'; - - @override - String get please_sponsor => 'कृपया स्पॉन्सर / डोनेट करें'; - - @override - String get spotube_description => - 'Spotube, एक हल्का, सभी प्लेटफॉर्मों पर चलने वाला, मुफ्त स्पॉटिफाई क्लाइंट'; - - @override - String get version => 'संस्करण'; - - @override - String get build_number => 'बिल्ड नंबर'; - - @override - String get founder => 'संस्थापक'; - - @override - String get repository => 'भण्डार'; - - @override - String get bug_issues => 'बग+मुद्दे'; - - @override - String get made_with => 'बांग्लादेश🇧🇩 में दिल से बनाया गया'; - - @override - String get kingkor_roy_tirtho => 'किंगकोर रॉय तिर्थो'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year किंगकोर रॉय तिर्थो'; - } - - @override - String get license => 'लाइसेंस'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'चिंता न करें, आपके क्रेडेंशियल किसी भी तरह से नहीं एकत्रित या साझा किए जाएंगे'; - - @override - String get know_how_to_login => 'इसे कैसे करें पता नहीं?'; - - @override - String get follow_step_by_step_guide => 'कदम से कदम गाइड के साथ चलें'; - - @override - String cookie_name_cookie(Object name) { - return '$name कुकी'; - } - - @override - String get fill_in_all_fields => 'कृपया सभी फ़ील्ड भरें'; - - @override - String get submit => 'सबमिट'; - - @override - String get exit => 'बाहर निकलें'; - - @override - String get previous => 'पिछला'; - - @override - String get next => 'अगला'; - - @override - String get done => 'किया हुआ'; - - @override - String get step_1 => '1 चरण'; - - @override - String get first_go_to => 'पहले, जाएं'; - - @override - String get something_went_wrong => 'कुछ गलत हो गया'; - - @override - String get piped_instance => 'पाइप्ड सर्वर'; - - @override - String get piped_description => 'पाइप किए गए सर्वर'; - - @override - String get piped_warning => - 'गानों का मिलान करने के लिए उपयोग किए जाते हैं, हो सकता है कि उनमें से कुछ के साथ ठीक से काम न करें इसलिए अपने जोखिम पर उपयोग करें'; - - @override - String get invidious_instance => 'इन्विडियस सर्वर इंस्टेंस'; - - @override - String get invidious_description => - 'ट्रैक मिलान के लिए इन्विडियस सर्वर इंस्टेंस'; - - @override - String get invidious_warning => - 'कुछ इंस्टेंस अच्छी तरह से काम नहीं कर सकते। अपने जोखिम पर उपयोग करें'; - - @override - String get generate => 'उत्पन्न करें'; - - @override - String track_exists(Object track) { - return 'ट्रैक $track पहले से मौजूद है'; - } - - @override - String get replace_downloaded_tracks => 'सभी डाउनलोड किए गए ट्रैक्स को बदलें'; - - @override - String get skip_download_tracks => 'सभी डाउनलोड किए गए ट्रैक्स को छोड़ें'; - - @override - String get do_you_want_to_replace => - 'क्या आप मौजूदा ट्रैक को बदलना चाहते हैं?'; - - @override - String get replace => 'बदलें'; - - @override - String get skip => 'छोड़ें'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '$count $type तक चुनें'; - } - - @override - String get select_genres => 'जान्र चुनें'; - - @override - String get add_genres => 'जान्र जोड़ें'; - - @override - String get country => 'देश'; - - @override - String get number_of_tracks_generate => 'उत्पन्न करने के लिए ट्रैक की संख्या'; - - @override - String get acousticness => 'ध्वनिकता'; - - @override - String get danceability => 'नृत्यता'; - - @override - String get energy => 'ऊर्जा'; - - @override - String get instrumentalness => 'आलापिकता'; - - @override - String get liveness => 'जीवंतता'; - - @override - String get loudness => 'शोर'; - - @override - String get speechiness => 'बोलचालता'; - - @override - String get valence => 'मनोदयता'; - - @override - String get popularity => 'लोकप्रियता'; - - @override - String get key => 'कुंजी'; - - @override - String get duration => 'अवधि (सेकंड)'; - - @override - String get tempo => 'गति (BPM)'; - - @override - String get mode => 'मोड'; - - @override - String get time_signature => 'समय छाप'; - - @override - String get short => 'संक्षेप'; - - @override - String get medium => 'मध्यम'; - - @override - String get long => 'लंबा'; - - @override - String get min => 'न्यूनतम'; - - @override - String get max => 'अधिकतम'; - - @override - String get target => 'लक्ष्य'; - - @override - String get moderate => 'मध्यम'; - - @override - String get deselect_all => 'सभी को अचयनित करें'; - - @override - String get select_all => 'सभी को चुनें'; - - @override - String get are_you_sure => 'क्या आपको यकीन है?'; - - @override - String get generating_playlist => 'आपकी कस्टम प्लेलिस्ट बनाई जा रही है...'; - - @override - String selected_count_tracks(Object count) { - return '$count ट्रैक्स चयनित हैं'; - } - - @override - String get download_warning => - 'यदि आप सभी ट्रैक्स को बल्क में डाउनलोड करते हैं, तो आप स्पष्ट रूप से संगीत की अवैध नकली बना रहे हैं और संगीत के रचनात्मक समाज को क्षति पहुंचा रहे हैं। मुझे आशा है कि आप इसके बारे में जागरूक हैं। हमेशा कोशिश करें कि कलाकार के मेहनत का सम्मान और समर्थन करें।'; - - @override - String get download_ip_ban_warning => - 'बाहरी डाउनलोड अनुरोधों के कारण आपका आईपी YouTube पर अधिक से अधिक ब्लॉक हो सकता है। आईपी ब्लॉक का अर्थ है कि आप उसी आईपी उपकरण से कम से कम 2-3 महीनों तक YouTube का उपयोग नहीं कर सकेंगे (यदि आप लॉग इन हैं तो भी)। और स्पोट्यूब किसी भी जिम्मेदारी को नहीं उठाता है अगर ऐसा कभी होता है।'; - - @override - String get by_clicking_accept_terms => - '\'स्वीकार\' पर क्लिक करके आप निम्नलिखित शर्तों से सहमत होते हैं:'; - - @override - String get download_agreement_1 => - 'मुझे पता है कि मैं संगीत की अवैध नकली बना रहा हूं। मैं बुरा हूं'; - - @override - String get download_agreement_2 => - 'मैं कलाकार का समर्थन करूंगा जहां भी मुझे संभव हो और मैं केवल इसल िए ऐसा कर रहा हूं क्योंकि मेरे पास उनकी कला खरीदने के लिए पैसे नहीं हैं।'; - - @override - String get download_agreement_3 => - 'मैं पूरी तरह से जागरूक हूं कि मेरा आईपी YouTube पर ब्लॉक हो सकता है और मैं स्पोट्यूब या उसके मालिकों / सहयोगियों को किसी भी दुर्घटना के लिए जिम्मेदार नहीं मानता।'; - - @override - String get decline => 'इनकार करें'; - - @override - String get accept => 'स्वीकार करें'; - - @override - String get details => 'विवरण'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'चैनल'; - - @override - String get likes => 'पसंद'; - - @override - String get dislikes => 'अप्रिय'; - - @override - String get views => 'दृश्य'; - - @override - String get streamUrl => 'स्ट्रीम URL'; - - @override - String get stop => 'रोकें'; - - @override - String get sort_newest => 'नवीनतम जोड़े गए के अनुसार क्रमबद्ध करें'; - - @override - String get sort_oldest => 'सबसे पुराने जोड़े गए के अनुसार क्रमबद्ध करें'; - - @override - String get sleep_timer => 'स्लीप टाइमर'; - - @override - String mins(Object minutes) { - return '$minutes मिनट'; - } - - @override - String hours(Object hours) { - return '$hours घंटे'; - } - - @override - String hour(Object hours) { - return '$hours घंटा'; - } - - @override - String get custom_hours => 'कस्टम घंटे'; - - @override - String get logs => 'लॉग'; - - @override - String get developers => 'डेवलपर्स'; - - @override - String get not_logged_in => 'आप लॉग इन नहीं हैं'; - - @override - String get search_mode => 'खोज मोड'; - - @override - String get audio_source => 'ऑडियो स्रोत'; - - @override - String get ok => 'ठीक है'; - - @override - String get failed_to_encrypt => 'एन्क्रिप्ट करने में विफल रहा'; - - @override - String get encryption_failed_warning => - 'Spotube आपके डेटा को सुरक्षित रूप से स्टोर करने के लिए एन्क्रिप्शन का उपयोग करता है। लेकिन इसमें विफल रहा। इसलिए, यह असुरक्षित स्टोरेज पर फॉलबैक करेगा\nयदि आप Linux का उपयोग कर रहे हैं, तो कृपया सुनिश्चित करें कि आपके पास gnome-keyring, kde-wallet, keepassxc आदि जैसी कोई सीक्रेट-सर्विस इंस्टॉल की गई है'; - - @override - String get querying_info => 'जानकारी प्राप्त करना'; - - @override - String get piped_api_down => 'पाइप्ड एपीआई डाउन है'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'पाइप्ड इंस्टेंस $pipedInstance वर्तमान में डाउन है\n\nइंस्टेंस बदलें या \'एपीआई प्रकार\' को आधिकृत YouTube एपीआई में बदलें\n\nपरिवर्तन के बाद ऐप को फिर से चालने की सुनिश्चित करें'; - } - - @override - String get you_are_offline => 'आप वर्तमान में ऑफ़लाइन हैं'; - - @override - String get connection_restored => 'आपका इंटरनेट कनेक्शन बहाल हो गया है'; - - @override - String get use_system_title_bar => 'सिस्टम शीर्षक पट्टी का उपयोग करें'; - - @override - String get crunching_results => 'परिणाम को प्रसंस्कृत किया जा रहा है...'; - - @override - String get search_to_get_results => 'परिणाम प्राप्त करने के लिए खोजें'; - - @override - String get use_amoled_mode => 'AMOLED मोड का उपयोग करें'; - - @override - String get pitch_dark_theme => 'पिच ब्लैक डार्ट थीम'; - - @override - String get normalize_audio => 'ऑडियो को सामान्य करें'; - - @override - String get change_cover => 'कवर बदलें'; - - @override - String get add_cover => 'कवर जोड़ें'; - - @override - String get restore_defaults => 'डिफ़ॉल्ट सेटिंग्स को बहाल करें'; - - @override - String get download_music_format => 'संगीत डाउनलोड प्रारूप'; - - @override - String get streaming_music_format => 'संगीत स्ट्रीमिंग प्रारूप'; - - @override - String get download_music_quality => 'संगीत डाउनलोड गुणवत्ता'; - - @override - String get streaming_music_quality => 'संगीत स्ट्रीमिंग गुणवत्ता'; - - @override - String get login_with_lastfm => 'Last.fm से लॉगिन करें'; - - @override - String get connect => 'कनेक्ट करें'; - - @override - String get disconnect_lastfm => 'Last.fm से डिस्कनेक्ट करें'; - - @override - String get disconnect => 'डिस्कनेक्ट करें'; - - @override - String get username => 'उपयोगकर्ता नाम'; - - @override - String get password => 'पासवर्ड'; - - @override - String get login => 'लॉग इन करें'; - - @override - String get login_with_your_lastfm => 'अपने Last.fm अकाउंट से लॉगिन करें'; - - @override - String get scrobble_to_lastfm => 'Last.fm पर स्क्रॉबल करें'; - - @override - String get go_to_album => 'एल्बम पर जाएं'; - - @override - String get discord_rich_presence => 'डिस्कॉर्ड रिच प्रेजेंस'; - - @override - String get browse_all => 'सभी को ब्राउज़ करें'; - - @override - String get genres => 'शैलियाँ'; - - @override - String get explore_genres => 'शैलियों का अन्वेषण करें'; - - @override - String get friends => 'दोस्त'; - - @override - String get no_lyrics_available => - 'क्षमा करें, इस ट्रैक के लिए गाने नहीं मिल सके'; - - @override - String get start_a_radio => 'रेडियो शुरू करें'; - - @override - String get how_to_start_radio => 'रेडियो कैसे शुरू करना चाहते हैं?'; - - @override - String get replace_queue_question => - 'क्या आप वर्तमान कतार को बदलना चाहते हैं या इसे जोड़ना चाहते हैं?'; - - @override - String get endless_playback => 'अंतहीन प्लेबैक'; - - @override - String get delete_playlist => 'प्लेलिस्ट हटाएं'; - - @override - String get delete_playlist_confirmation => - 'क्या आप वाकई इस प्लेलिस्ट को हटाना चाहते हैं?'; - - @override - String get local_tracks => 'स्थानीय ट्रैक्स'; - - @override - String get local_tab => 'स्थानीय'; - - @override - String get song_link => 'गाने का लिंक'; - - @override - String get skip_this_nonsense => 'इस माया को छोड़ें'; - - @override - String get freedom_of_music => '“संगीत की स्वतंत्रता”'; - - @override - String get freedom_of_music_palm => '“हाथ में संगीत की स्वतंत्रता”'; - - @override - String get get_started => 'आइए शुरू करें'; - - @override - String get youtube_source_description => - 'सिफारिश किया गया और सबसे अच्छा काम करता है।'; - - @override - String get piped_source_description => - 'मुफ्त महसूस कर रहे हैं? YouTube के समान लेकिन काफी अधिक मुफ्त।'; - - @override - String get jiosaavn_source_description => - 'दक्षिण एशियाई क्षेत्र के लिए सर्वोत्तम।'; - - @override - String get invidious_source_description => - 'पाइप्ड के समान, लेकिन अधिक उपलब्धता के साथ'; - - @override - String highest_quality(Object quality) { - return 'सर्वोत्तम गुणवत्ता: $quality'; - } - - @override - String get select_audio_source => 'ऑडियो स्रोत चुनें'; - - @override - String get endless_playback_description => - 'क्रमबद्ध कतार के अंत में नए गाने स्वचालित रूप से जोड़ें'; - - @override - String get choose_your_region => 'अपना क्षेत्र चुनें'; - - @override - String get choose_your_region_description => - 'यह Spotube को आपके स्थान के लिए सही सामग्री दिखाने में मदद करेगा।'; - - @override - String get choose_your_language => 'अपनी भाषा चुनें'; - - @override - String get help_project_grow => 'इस परियोजना को बढ़ावा दें'; - - @override - String get help_project_grow_description => - 'Spotube एक ओपन सोर्स परियोजना है। आप इस परियोजना को योगदान देकर, बग रिपोर्ट करके या नई विशेषताओं का सुझाव देकर इस परियोजना को बढ़ा सकते हैं।'; - - @override - String get contribute_on_github => 'GitHub पर योगदान करें'; - - @override - String get donate_on_open_collective => 'ओपन कलेक्टिव पर दान करें'; - - @override - String get browse_anonymously => 'बिना नाम के ब्राउज़ करें'; - - @override - String get enable_connect => 'कनेक्ट सक्षम करें'; - - @override - String get enable_connect_description => - 'अन्य उपकरणों से Spotube को नियंत्रित करें'; - - @override - String get devices => 'उपकरण'; - - @override - String get select => 'चयन करें'; - - @override - String connect_client_alert(Object client) { - return 'आप $client द्वारा नियंत्रित हो रहे हैं'; - } - - @override - String get this_device => 'यह उपकरण'; - - @override - String get remote => 'रिमोट'; - - @override - String get stats => 'आंकड़े'; - - @override - String and_n_more(Object count) { - return 'और $count और'; - } - - @override - String get recently_played => 'हाल ही में खेले गए'; - - @override - String get browse_more => 'अधिक ब्राउज़ करें'; - - @override - String get no_title => 'कोई शीर्षक नहीं'; - - @override - String get not_playing => 'नहीं चल रहा'; - - @override - String get epic_failure => 'महान असफलता!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length ट्रैक्स कतार में जोड़े गए'; - } - - @override - String get spotube_has_an_update => 'Spotube में एक अपडेट है'; - - @override - String get download_now => 'अभी डाउनलोड करें'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum जारी किया गया है'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version जारी किया गया है'; - } - - @override - String get read_the_latest => 'नवीनतम पढ़ें'; - - @override - String get release_notes => 'रिलीज़ नोट्स'; - - @override - String get pick_color_scheme => 'रंग योजना चुनें'; - - @override - String get save => 'सहेजें'; - - @override - String get choose_the_device => 'उपकरण चुनें:'; - - @override - String get multiple_device_connected => - 'कई उपकरण जुड़े हुए हैं।\nउस उपकरण को चुनें जिस पर आप यह क्रिया करना चाहते हैं'; - - @override - String get nothing_found => 'कुछ भी नहीं मिला'; - - @override - String get the_box_is_empty => 'बॉक्स खाली है'; - - @override - String get top_artists => 'शीर्ष कलाकार'; - - @override - String get top_albums => 'शीर्ष एल्बम'; - - @override - String get this_week => 'इस हफ्ते'; - - @override - String get this_month => 'इस महीने'; - - @override - String get last_6_months => 'पिछले 6 महीने'; - - @override - String get this_year => 'इस साल'; - - @override - String get last_2_years => 'पिछले 2 साल'; - - @override - String get all_time => 'सभी समय'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName द्वारा संचालित'; - } - - @override - String get email => 'ईमेल'; - - @override - String get profile_followers => 'अनुयायी'; - - @override - String get birthday => 'जन्मदिन'; - - @override - String get subscription => 'सदस्यता'; - - @override - String get not_born => 'अभी पैदा नहीं हुआ'; - - @override - String get hacker => 'हैकर'; - - @override - String get profile => 'प्रोफ़ाइल'; - - @override - String get no_name => 'कोई नाम नहीं'; - - @override - String get edit => 'संपादित करें'; - - @override - String get user_profile => 'उपयोगकर्ता प्रोफ़ाइल'; - - @override - String count_plays(Object count) { - return '$count प्ले'; - } - - @override - String get streaming_fees_hypothetical => - '*Spotify की प्रति स्ट्रीम भुगतान के आधार पर\n\$0.003 से \$0.005 तक गणना की गई है। यह एक काल्पनिक\nगणना है जो उपयोगकर्ता को यह जानकारी देती है कि वे कितना भुगतान\nकरते यदि वे Spotify पर गाने सुनते।'; - - @override - String get minutes_listened => 'सुनिएका मिनेटहरू'; - - @override - String get streamed_songs => 'स्ट्रीम गरिएका गीतहरू'; - - @override - String count_streams(Object count) { - return '$count स्ट्रिम'; - } - - @override - String get owned_by_you => 'तपाईंले स्वामित्व गरेको'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl क्लिपबोर्डमा कपी गरियो'; - } - - @override - String get hipotetical_calculation => - '*यह औसत ऑनलाइन संगीत स्ट्रीमिंग प्लेटफ़ॉर्म के प्रति स्ट्रीम भुगतान (\$0.003 से \$0.005) के आधार पर गणना की गई है। यह एक काल्पनिक गणना है जो उपयोगकर्ता को यह जानकारी देने के लिए है कि यदि वे विभिन्न संगीत स्ट्रीमिंग प्लेटफ़ॉर्म पर अपने गाने सुनते हैं तो उन्होंने कलाकारों को कितना भुगतान किया होगा।'; - - @override - String count_mins(Object minutes) { - return '$minutes मिनट'; - } - - @override - String get summary_minutes => 'मिनट'; - - @override - String get summary_listened_to_music => 'सुनी गई संगीत'; - - @override - String get summary_songs => 'गाने'; - - @override - String get summary_streamed_overall => 'कुल स्ट्रीम'; - - @override - String get summary_owed_to_artists => 'कलाकारों को देनदार\nइस महीने'; - - @override - String get summary_artists => 'कलाकार'; - - @override - String get summary_music_reached_you => 'संगीत आपके पास पहुंच गया'; - - @override - String get summary_full_albums => 'पूरा एल्बम'; - - @override - String get summary_got_your_love => 'आपका प्यार मिला'; - - @override - String get summary_playlists => 'प्लेलिस्ट'; - - @override - String get summary_were_on_repeat => 'दोहराया गया'; - - @override - String total_money(Object money) { - return 'कुल $money'; - } - - @override - String get webview_not_found => 'वेबव्यू नहीं मिला'; - - @override - String get webview_not_found_description => - 'आपके डिवाइस पर वेबव्यू रनटाइम इंस्टॉल नहीं है।\nअगर इंस्टॉल है, तो सुनिश्चित करें कि यह environment PATH में है\n\nइंस्टॉल करने के बाद, ऐप को पुनः शुरू करें'; - - @override - String get unsupported_platform => 'असमर्थित प्लेटफार्म'; - - @override - String get cache_music => 'संगीत को कैश करें'; - - @override - String get open => 'खोलें'; - - @override - String get cache_folder => 'कैश फ़ोल्डर'; - - @override - String get export => 'निर्यात करें'; - - @override - String get clear_cache => 'कैश साफ़ करें'; - - @override - String get clear_cache_confirmation => 'क्या आप कैश साफ़ करना चाहते हैं?'; - - @override - String get export_cache_files => 'कैश फ़ाइलें निर्यात करें'; - - @override - String found_n_files(Object count) { - return '$count फ़ाइलें मिलीं'; - } - - @override - String get export_cache_confirmation => - 'क्या आप इन फ़ाइलों को निर्यात करना चाहते हैं'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported फ़ाइलें निर्यात की गईं $files में से'; - } - - @override - String get undo => 'पूर्ववत करें'; - - @override - String get download_all => 'सभी डाउनलोड करें'; - - @override - String get add_all_to_playlist => 'सभी को प्लेलिस्ट में जोड़ें'; - - @override - String get add_all_to_queue => 'सभी को कतार में जोड़ें'; - - @override - String get play_all_next => 'सभी को अगले खेलने के लिए'; - - @override - String get pause => 'रोकें'; - - @override - String get view_all => 'सभी देखें'; - - @override - String get no_tracks_added_yet => - 'लगता है आपने अभी तक कोई ट्रैक नहीं जोड़ा है।'; - - @override - String get no_tracks => 'लगता है यहाँ कोई ट्रैक नहीं है।'; - - @override - String get no_tracks_listened_yet => 'लगता है आपने अभी तक कुछ नहीं सुना है।'; - - @override - String get not_following_artists => - 'आप किसी भी कलाकार को फॉलो नहीं कर रहे हैं।'; - - @override - String get no_favorite_albums_yet => - 'लगता है आपने अभी तक कोई एल्बम अपनी पसंदीदा सूची में नहीं जोड़ा है।'; - - @override - String get no_logs_found => 'कोई लॉग नहीं मिला'; - - @override - String get youtube_engine => 'YouTube इंजन'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine स्थापित नहीं है'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine आपके सिस्टम में स्थापित नहीं है।'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'यह सुनिश्चित करें कि यह PATH वेरिएबल में उपलब्ध हो या\nनीचे $engine निष्पादन योग्य फ़ाइल का पूर्ण पथ सेट करें।'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/यूनिक्स जैसे OS में, .zshrc/.bashrc/.bash_profile आदि में पथ सेट करना काम नहीं करेगा।\nआपको पथ को शेल कॉन्फ़िगरेशन फ़ाइल में सेट करना होगा।'; - - @override - String get download => 'डाउनलोड करें'; - - @override - String get file_not_found => 'फाइल नहीं मिली'; - - @override - String get custom => 'कस्टम'; - - @override - String get add_custom_url => 'कस्टम URL जोड़ें'; - - @override - String get edit_port => 'पोर्ट संपादित करें'; - - @override - String get port_helper_msg => - 'डिफ़ॉल्ट -1 है जो यादृच्छिक संख्या को दर्शाता है। यदि आपने फ़ायरवॉल कॉन्फ़िगर किया है, तो इसे सेट करना अनुशंसित है।'; - - @override - String connect_request(Object client) { - return '$client को कनेक्ट करने की अनुमति दें?'; - } - - @override - String get connection_request_denied => - 'कनेक्शन अस्वीकृत। उपयोगकर्ता ने पहुंच अस्वीकृत कर दी।'; - - @override - String get an_error_occurred => 'एक त्रुटि हुई'; - - @override - String get copy_to_clipboard => 'क्लिपबोर्ड पर कॉपी करें'; - - @override - String get view_logs => 'लॉग देखें'; - - @override - String get retry => 'पुनः प्रयास करें'; - - @override - String get no_default_metadata_provider_selected => - 'आपने कोई डिफ़ॉल्ट मेटाडेटा प्रदाता सेट नहीं किया है'; - - @override - String get manage_metadata_providers => 'मेटाडेटा प्रदाताओं को प्रबंधित करें'; - - @override - String get open_link_in_browser => 'ब्राउज़र में लिंक खोलें?'; - - @override - String get do_you_want_to_open_the_following_link => - 'क्या आप निम्नलिखित लिंक खोलना चाहते हैं'; - - @override - String get unsafe_url_warning => - 'अविश्वसनीय स्रोतों से लिंक खोलना असुरक्षित हो सकता है। सावधान रहें!\nआप लिंक को अपने क्लिपबोर्ड पर भी कॉपी कर सकते हैं।'; - - @override - String get copy_link => 'लिंक कॉपी करें'; - - @override - String get building_your_timeline => - 'आपकी सुनने की आदतों के आधार पर आपकी टाइमलाइन बनाई जा रही है...'; - - @override - String get official => 'आधिकारिक'; - - @override - String author_name(Object author) { - return 'लेखक: $author'; - } - - @override - String get third_party => 'तृतीय-पक्ष'; - - @override - String get plugin_requires_authentication => - 'प्लगइन को प्रमाणीकरण की आवश्यकता है'; - - @override - String get update_available => 'अपडेट उपलब्ध है'; - - @override - String get supports_scrobbling => 'स्क्रॉबलिंग का समर्थन करता है'; - - @override - String get plugin_scrobbling_info => - 'यह प्लगइन आपके सुनने के इतिहास को उत्पन्न करने के लिए आपके संगीत को स्क्रॉबल करता है।'; - - @override - String get default_metadata_source => 'डिफ़ॉल्ट मेटाडेटा स्रोत'; - - @override - String get set_default_metadata_source => 'डिफ़ॉल्ट मेटाडेटा स्रोत सेट करें'; - - @override - String get default_audio_source => 'डिफ़ॉल्ट ऑडियो स्रोत'; - - @override - String get set_default_audio_source => 'डिफ़ॉल्ट ऑडियो स्रोत सेट करें'; - - @override - String get set_default => 'डिफ़ॉल्ट सेट करें'; - - @override - String get support => 'समर्थन'; - - @override - String get support_plugin_development => 'प्लगइन विकास का समर्थन करें'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API तक पहुंच सकता है'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'क्या आप इस प्लगइन को स्थापित करना चाहते हैं?'; - - @override - String get third_party_plugin_warning => - 'यह प्लगइन एक तृतीय-पक्ष रिपॉजिटरी से है। कृपया सुनिश्चित करें कि आप इसे स्थापित करने से पहले स्रोत पर भरोसा करते हैं।'; - - @override - String get author => 'लेखक'; - - @override - String get this_plugin_can_do_following => 'यह प्लगइन निम्नलिखित कर सकता है'; - - @override - String get install => 'स्थापित करें'; - - @override - String get install_a_metadata_provider => 'एक मेटाडेटा प्रदाता स्थापित करें'; - - @override - String get no_tracks_playing => 'वर्तमान में कोई ट्रैक नहीं चल रहा है'; - - @override - String get synced_lyrics_not_available => - 'इस गाने के लिए सिंक्रनाइज़ किए गए बोल उपलब्ध नहीं हैं। कृपया'; - - @override - String get plain_lyrics => 'सादे बोल'; - - @override - String get tab_instead => 'टैब का उपयोग करें।'; - - @override - String get disclaimer => 'अस्वीकरण'; - - @override - String get third_party_plugin_dmca_notice => - 'स्पॉट्यूब टीम किसी भी \"तृतीय-पक्ष\" प्लगइन के लिए कोई जिम्मेदारी (कानूनी सहित) नहीं लेती है।\nकृपया उन्हें अपने जोखिम पर उपयोग करें। किसी भी बग/समस्या के लिए, कृपया उन्हें प्लगइन रिपॉजिटरी को रिपोर्ट करें।\n\nयदि कोई \"तृतीय-पक्ष\" प्लगइन किसी सेवा/कानूनी इकाई के ToS/DMCA को तोड़ रहा है, तो कृपया \"तृतीय-पक्ष\" प्लगइन लेखक या होस्टिंग प्लेटफ़ॉर्म जैसे GitHub/Codeberg से कार्रवाई करने के लिए कहें। ऊपर सूचीबद्ध (\"तृतीय-पक्ष\" लेबल वाले) सभी सार्वजनिक/समुदाय-द्वारा-रखरखाव किए गए प्लगइन हैं। हम उन्हें क्यूरेट नहीं कर रहे हैं, इसलिए हम उन पर कोई कार्रवाई नहीं कर सकते हैं।\n\n'; - - @override - String get input_does_not_match_format => - 'इनपुट आवश्यक प्रारूप से मेल नहीं खाता है'; - - @override - String get plugins => 'प्लगइन्स'; - - @override - String get paste_plugin_download_url => - 'डाउनलोड यूआरएल या गिटहब/कोडबर्ग रेपो यूआरएल या .smplug फ़ाइल का सीधा लिंक पेस्ट करें'; - - @override - String get download_and_install_plugin_from_url => - 'यूआरएल से प्लगइन डाउनलोड और स्थापित करें'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'प्लगइन जोड़ने में विफल: $error'; - } - - @override - String get upload_plugin_from_file => 'फ़ाइल से प्लगइन अपलोड करें'; - - @override - String get installed => 'स्थापित'; - - @override - String get available_plugins => 'उपलब्ध प्लगइन'; - - @override - String get configure_plugins => - 'अपने स्वयं के मेटाडेटा प्रदाता और ऑडियो स्रोत प्लगइन्स कॉन्फ़िगर करें'; - - @override - String get audio_scrobblers => 'ऑडियो स्क्रॉबलर्स'; - - @override - String get scrobbling => 'स्क्रॉबलिंग'; - - @override - String get source => 'स्रोत: '; - - @override - String get uncompressed => 'असंपीड़ित'; - - @override - String get dab_music_source_description => - 'ऑडियोफाइलों के लिए। उच्च-गुणवत्ता/बिना हानि वाले ऑडियो स्ट्रीम प्रदान करता है। सटीक ISRC आधारित ट्रैक मिलान।'; -} diff --git a/lib/l10n/generated/app_localizations_id.dart b/lib/l10n/generated/app_localizations_id.dart deleted file mode 100644 index ce250425..00000000 --- a/lib/l10n/generated/app_localizations_id.dart +++ /dev/null @@ -1,1572 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Indonesian (`id`). -class AppLocalizationsId extends AppLocalizations { - AppLocalizationsId([String locale = 'id']) : super(locale); - - @override - String get guest => 'Tamu'; - - @override - String get browse => 'Jelajahi'; - - @override - String get search => 'Cari'; - - @override - String get library => 'Pustaka'; - - @override - String get lyrics => 'Lirik'; - - @override - String get settings => 'Pengaturan'; - - @override - String get genre_categories_filter => 'Urutkan kategori atau genre...'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Dipersonalisasi'; - - @override - String get featured => 'Unggulan'; - - @override - String get new_releases => 'Rilis Terbaru'; - - @override - String get songs => 'Lagu'; - - @override - String playing_track(Object track) { - return 'Memutar $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Ini akan menghapus antrian saat ini This will clear the current queue. $track_length trek akan dihapus\nAnda ingin melanjutkan?'; - } - - @override - String get load_more => 'Lebih Banyak'; - - @override - String get playlists => 'Daftar Putar'; - - @override - String get artists => 'Artis'; - - @override - String get albums => 'Album'; - - @override - String get tracks => 'Trek'; - - @override - String get downloads => 'Unduhan'; - - @override - String get filter_playlists => 'Urutkan daftar putar Anda...'; - - @override - String get liked_tracks => 'Lagu Yang Disukai'; - - @override - String get liked_tracks_description => 'Semua lagu yang Anda sukai'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Buat daftar putar'; - - @override - String get update_playlist => 'Ubah daftar putar'; - - @override - String get create => 'Buat'; - - @override - String get cancel => 'Batal'; - - @override - String get update => 'Ubah'; - - @override - String get playlist_name => 'Nama Daftar Putar'; - - @override - String get name_of_playlist => 'Nama daftar putar'; - - @override - String get description => 'Deskripsi'; - - @override - String get public => 'Publik'; - - @override - String get collaborative => 'Kolaboratif'; - - @override - String get search_local_tracks => 'Cari trek lokal...'; - - @override - String get play => 'Putar'; - - @override - String get delete => 'Hapus'; - - @override - String get none => 'Tidak Ada'; - - @override - String get sort_a_z => 'Urutkan berdasarkan A-Z'; - - @override - String get sort_z_a => 'Urutkan berdasarkan Z-A'; - - @override - String get sort_artist => 'Urutkan berdasarkan Artis'; - - @override - String get sort_album => 'Urutkan berdasarkan Album'; - - @override - String get sort_duration => 'Urutkan berdasarkan Durasi'; - - @override - String get sort_tracks => 'Urutkan trek'; - - @override - String currently_downloading(Object tracks_length) { - return 'Sedang Mengunduh ($tracks_length)'; - } - - @override - String get cancel_all => 'Batalkan Semua'; - - @override - String get filter_artist => 'Urutkan artis...'; - - @override - String followers(Object followers) { - return '$followers Pengikut'; - } - - @override - String get add_artist_to_blacklist => 'Tambah artis ke daftar hitam'; - - @override - String get top_tracks => 'Lagu Teratas'; - - @override - String get fans_also_like => 'Penggemar juga menyukainya'; - - @override - String get loading => 'Memuat...'; - - @override - String get artist => 'Artis'; - - @override - String get blacklisted => 'Masuk Daftar Hitam'; - - @override - String get following => 'Mengikuti'; - - @override - String get follow => 'Ikuti'; - - @override - String get artist_url_copied => 'URL artis telah disalin'; - - @override - String added_to_queue(Object tracks) { - return 'Menambah trek $tracks ke antrean'; - } - - @override - String get filter_albums => 'Urutkan album...'; - - @override - String get synced => 'Disinkronkan'; - - @override - String get plain => 'Normal'; - - @override - String get shuffle => 'Acak'; - - @override - String get search_tracks => 'Cari trek...'; - - @override - String get released => 'Dirilis'; - - @override - String error(Object error) { - return 'Kesalahan $error'; - } - - @override - String get title => 'Judul'; - - @override - String get time => 'Waktu'; - - @override - String get more_actions => 'Tindakan Lainnya'; - - @override - String download_count(Object count) { - return 'Unduhan ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Menambah ($count) ke Daftar Putar'; - } - - @override - String add_count_to_queue(Object count) { - return 'Menambah ($count) ke Antrian'; - } - - @override - String play_count_next(Object count) { - return 'Mainkan ($count) selanjutnya'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return '$data telah disalin'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Menambah $track ke Daftar Putar berikut'; - } - - @override - String get add => 'Tambah'; - - @override - String added_track_to_queue(Object track) { - return 'Menambah $track ke antrian'; - } - - @override - String get add_to_queue => 'Tambah ke antrian'; - - @override - String track_will_play_next(Object track) { - return '$track akan diputar berikutnya'; - } - - @override - String get play_next => 'Mainkan selanjutnya'; - - @override - String removed_track_from_queue(Object track) { - return 'Menghapus $track dari antrian'; - } - - @override - String get remove_from_queue => 'Hapus dari antrian'; - - @override - String get remove_from_favorites => 'Hapus dari favorit'; - - @override - String get save_as_favorite => 'Simpan sebagai favorit'; - - @override - String get add_to_playlist => 'Tambah ke daftar putar'; - - @override - String get remove_from_playlist => 'Hapus dari daftar putar'; - - @override - String get add_to_blacklist => 'Tambah ke daftar hitam'; - - @override - String get remove_from_blacklist => 'Hapus dari daftar hitam'; - - @override - String get share => 'Bagikan'; - - @override - String get mini_player => 'Pemutar Mini'; - - @override - String get slide_to_seek => 'Geser untuk maju atau mundur'; - - @override - String get shuffle_playlist => 'Acak daftar putar'; - - @override - String get unshuffle_playlist => 'Batalkan pengacakan daftar putar'; - - @override - String get previous_track => 'Lagu sebelumnya'; - - @override - String get next_track => 'Lagu berikutnya'; - - @override - String get pause_playback => 'Jeda Pemutaran'; - - @override - String get resume_playback => 'Lanjutkan Pemutaran'; - - @override - String get loop_track => 'Ulangi Pemutaran'; - - @override - String get no_loop => 'No loop'; - - @override - String get repeat_playlist => 'Ulangi daftar putar'; - - @override - String get queue => 'Antrian'; - - @override - String get alternative_track_sources => 'Sumber trek alternatif'; - - @override - String get download_track => 'Unduh lagu'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks trek dalam antrian'; - } - - @override - String get clear_all => 'Bersihkan semua'; - - @override - String get show_hide_ui_on_hover => - 'Tampil/Sembunyikan UI saat mengarahkan kursor'; - - @override - String get always_on_top => 'Selalu di atas'; - - @override - String get exit_mini_player => 'Keluar Pemutar Mini'; - - @override - String get download_location => 'Lokasi unduhan'; - - @override - String get local_library => 'Perpustakaan lokal'; - - @override - String get add_library_location => 'Tambahkan ke perpustakaan'; - - @override - String get remove_library_location => 'Hapus dari perpustakaan'; - - @override - String get account => 'Akun'; - - @override - String get logout => 'Keluar'; - - @override - String get logout_of_this_account => 'Keluar dari akun'; - - @override - String get language_region => 'Bahasa & Wilayah'; - - @override - String get language => 'Bahasa'; - - @override - String get system_default => 'Bawaan Sistem'; - - @override - String get market_place_region => 'Wilayah Pasar'; - - @override - String get recommendation_country => 'Negara Rekomendasi'; - - @override - String get appearance => 'Tampilan'; - - @override - String get layout_mode => 'Mode Tata Letak'; - - @override - String get override_layout_settings => - 'Ganti pengaturan mode tata letak responsif'; - - @override - String get adaptive => 'Adaptif'; - - @override - String get compact => 'Ringkas'; - - @override - String get extended => 'Diperluas'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Gelap'; - - @override - String get light => 'Terang'; - - @override - String get system => 'Sistem'; - - @override - String get accent_color => 'Warna Aksen'; - - @override - String get sync_album_color => 'Sinkronkan warna album'; - - @override - String get sync_album_color_description => - 'Menggunakan warna dominan sampul album sebagai warna aksen'; - - @override - String get playback => 'Pemutaran'; - - @override - String get audio_quality => 'Kualitas Suara'; - - @override - String get high => 'Tinggi'; - - @override - String get low => 'Rendah'; - - @override - String get pre_download_play => 'Unduh dan putar'; - - @override - String get pre_download_play_description => - 'Daripada streaming audio, unduh byte dan mainkan (Direkomendasikan untuk pengguna bandwidth yang lebih tinggi)'; - - @override - String get skip_non_music => 'Lewati segmen non-musik (SponsorBlock)'; - - @override - String get blacklist_description => 'Lagu dan artis di daftar hitam'; - - @override - String get wait_for_download_to_finish => - 'Tunggu hingga unduhan saat ini selesai'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Tutup Perilaku'; - - @override - String get close => 'Tutup'; - - @override - String get minimize_to_tray => 'Perkecil ke tray'; - - @override - String get show_tray_icon => 'Tampilkan tray ikon sistem'; - - @override - String get about => 'Tentang'; - - @override - String get u_love_spotube => 'Kami tahu Anda menyukai Spotube'; - - @override - String get check_for_updates => 'Periksa pembaruan'; - - @override - String get about_spotube => 'Tentang Spotube'; - - @override - String get blacklist => 'Daftar Hitam'; - - @override - String get please_sponsor => 'Silakan Sponsor/Menyumbang'; - - @override - String get spotube_description => - 'Spotube, klien Spotify yang ringan, lintas platform, dan gratis untuk semua'; - - @override - String get version => 'Versi'; - - @override - String get build_number => 'Nomor Pembuatan'; - - @override - String get founder => 'Pendiri'; - - @override - String get repository => 'Repositori'; - - @override - String get bug_issues => 'Bug+Masalah'; - - @override - String get made_with => 'Dibuat dengan ❤️ di Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Lisensi'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Jangan khawatir, kredensial Anda tidak akan dikumpulkan atau dibagikan kepada siapa pun'; - - @override - String get know_how_to_login => 'Tidak tahu bagaimana melakukan ini?'; - - @override - String get follow_step_by_step_guide => 'Ikuti panduan Langkah demi Langkah'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => 'Silakan isi semua kolom'; - - @override - String get submit => 'Kirim'; - - @override - String get exit => 'Keluar'; - - @override - String get previous => 'Sebelumnya'; - - @override - String get next => 'Berikutnya'; - - @override - String get done => 'Selesai'; - - @override - String get step_1 => 'Langkah 1'; - - @override - String get first_go_to => 'Pertama, Pergi ke'; - - @override - String get something_went_wrong => 'Terjadi kesalahan'; - - @override - String get piped_instance => 'Piped Server Instance'; - - @override - String get piped_description => - 'The Piped server instance untuk digunakan sebagai pencocokan trek'; - - @override - String get piped_warning => - 'Beberapa di antaranya mungkin tidak berfungsi dengan baik. Jadi gunakan dengan risiko Anda sendiri'; - - @override - String get invidious_instance => 'Invidious Server Instance'; - - @override - String get invidious_description => - 'The Invidious server instance to use for track matching'; - - @override - String get invidious_warning => - 'Some of them might not work well. So use at your own risk'; - - @override - String get generate => 'Generate'; - - @override - String track_exists(Object track) { - return 'Lagu $track sudah ada'; - } - - @override - String get replace_downloaded_tracks => 'Ganti semua trek yang diunduh'; - - @override - String get skip_download_tracks => - 'Lewati pengunduhan semua trek yang diunduh'; - - @override - String get do_you_want_to_replace => - 'Apakah Anda ingin mengganti track yang ada?'; - - @override - String get replace => 'Ganti'; - - @override - String get skip => 'Lewati'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Pilih hingga $count $type'; - } - - @override - String get select_genres => 'Pilih Genre'; - - @override - String get add_genres => 'Tambah Genre'; - - @override - String get country => 'Negara'; - - @override - String get number_of_tracks_generate => 'Jumlah trek yang akan dihasilkan'; - - @override - String get acousticness => 'Akustik'; - - @override - String get danceability => 'Menari'; - - @override - String get energy => 'Energi'; - - @override - String get instrumentalness => 'Instrumentalitas'; - - @override - String get liveness => 'Kehidupan'; - - @override - String get loudness => 'Kekerasan'; - - @override - String get speechiness => 'Berbicara'; - - @override - String get valence => 'Valensi'; - - @override - String get popularity => 'Popularitas'; - - @override - String get key => 'Kunci'; - - @override - String get duration => 'Durasi (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'Tanda Tangan Waktu'; - - @override - String get short => 'Pendek'; - - @override - String get medium => 'Sedang'; - - @override - String get long => 'Panjang'; - - @override - String get min => 'Minimal'; - - @override - String get max => 'Maksimal'; - - @override - String get target => 'Target'; - - @override - String get moderate => 'Sedang'; - - @override - String get deselect_all => 'Batalkan Semua'; - - @override - String get select_all => 'Pilih Semua'; - - @override - String get are_you_sure => 'Anda yakin?'; - - @override - String get generating_playlist => 'Menghasilkan daftar putar khusus Anda...'; - - @override - String selected_count_tracks(Object count) { - return '$count lagu yang dipilih'; - } - - @override - String get download_warning => - 'Jika Anda mengunduh semua Lagu secara massal, Anda jelas membajak Musik & menyebabkan kerusakan pada masyarakat kreatif Musik. Saya harap Anda menyadari hal ini. Selalu berusaha menghormati & mendukung kerja keras Artis'; - - @override - String get download_ip_ban_warning => - 'BTW, IP Anda bisa diblokir di YouTube karena permintaan unduhan yang berlebihan dari biasanya. Blokir IP berarti Anda tidak dapat menggunakan YouTube (meskipun Anda masuk) setidaknya selama 2-3 bulan dari perangkat IP tersebut. Dan Spotube tidak bertanggung jawab jika hal ini terjadi'; - - @override - String get by_clicking_accept_terms => - 'Dengan mengklik \'terima\' Anda menyetujui ketentuan berikut:'; - - @override - String get download_agreement_1 => - 'Saya tahu saya membajak Musik. Saya buruk'; - - @override - String get download_agreement_2 => - 'Saya akan mendukung Artis di mana pun saya bisa dan saya melakukan ini hanya karena saya tidak punya uang untuk membeli karya seni mereka'; - - @override - String get download_agreement_3 => - 'Saya sepenuhnya menyadari bahwa IP saya dapat diblokir di YouTube & saya tidak menganggap Spotube atau pemilik/kontributornya bertanggung jawab atas kecelakaan apa pun yang disebabkan oleh tindakan saya saat ini'; - - @override - String get decline => 'Menolak'; - - @override - String get accept => 'Setuju'; - - @override - String get details => 'Detail'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Channel'; - - @override - String get likes => 'Suka'; - - @override - String get dislikes => 'Tidak Suka'; - - @override - String get views => 'Dilihat'; - - @override - String get streamUrl => 'URL Stream'; - - @override - String get stop => 'Berhenti'; - - @override - String get sort_newest => 'Urutkan yang baru ditambah'; - - @override - String get sort_oldest => 'Urutkan yang paling lama ditambah'; - - @override - String get sleep_timer => 'Pengatur Waktu Tidur'; - - @override - String mins(Object minutes) { - return '$minutes Menit'; - } - - @override - String hours(Object hours) { - return '$hours Jam'; - } - - @override - String hour(Object hours) { - return '$hours Jam'; - } - - @override - String get custom_hours => 'Jam Kostum'; - - @override - String get logs => 'Log'; - - @override - String get developers => 'Pengembang'; - - @override - String get not_logged_in => 'Anda belum masuk'; - - @override - String get search_mode => 'Mode Pencarian'; - - @override - String get audio_source => 'Sumber Suara'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => 'Gagal mengenkripsi'; - - @override - String get encryption_failed_warning => - 'Spotube menggunakan enkripsi untuk menyimpan data Anda dengan aman. Namun gagal melakukannya. Jadi itu akan kembali ke penyimpanan yang tidak aman\nJika Anda menggunakan linux, pastikan Anda telah menginstal layanan rahasia (gnome-keyring, kde-wallet, keepassxc, dll)'; - - @override - String get querying_info => 'Mencari informasi...'; - - @override - String get piped_api_down => 'Piped API tidak aktif'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Piped Instance $pipedInstance saat ini tidak aktif\n\nUbah instance atau ubah \'jenis API\' menjadi API YouTube resmi\n\nPastikan untuk memulai ulang aplikasi setelah perubahan'; - } - - @override - String get you_are_offline => 'Anda sedang offline'; - - @override - String get connection_restored => 'Koneksi internet Anda telah pulih'; - - @override - String get use_system_title_bar => 'Gunakan bilah judul sistem'; - - @override - String get crunching_results => 'Mengolah hasil...'; - - @override - String get search_to_get_results => 'Cari untuk mendapatkan hasil'; - - @override - String get use_amoled_mode => 'Tema gelap gulita'; - - @override - String get pitch_dark_theme => 'Mode AMOLED'; - - @override - String get normalize_audio => 'Normalisasi audio'; - - @override - String get change_cover => 'Ganti sampul'; - - @override - String get add_cover => 'Tambah sampul'; - - @override - String get restore_defaults => 'Kembalikan semula'; - - @override - String get download_music_format => 'Format unduh musik'; - - @override - String get streaming_music_format => 'Format streaming musik'; - - @override - String get download_music_quality => 'Kualitas unduh musik'; - - @override - String get streaming_music_quality => 'Kualitas streaming musik'; - - @override - String get login_with_lastfm => 'Masuk dengan Last.fm'; - - @override - String get connect => 'Hubungkan'; - - @override - String get disconnect_lastfm => 'Memutuskan Last.fm'; - - @override - String get disconnect => 'Memutuskan'; - - @override - String get username => 'Username'; - - @override - String get password => 'Password'; - - @override - String get login => 'Masuk'; - - @override - String get login_with_your_lastfm => 'Masuk dengan Last.fm Anda'; - - @override - String get scrobble_to_lastfm => 'Scrobble ke Last.fm'; - - @override - String get go_to_album => 'Pergi ke Album'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'Lihat Semua'; - - @override - String get genres => 'Genre'; - - @override - String get explore_genres => 'Jelajahi Genre'; - - @override - String get friends => 'Daftar Teman'; - - @override - String get no_lyrics_available => - 'Maaf, tidak dapat menemukan lirik untuk lagu ini'; - - @override - String get start_a_radio => 'Putar Radio'; - - @override - String get how_to_start_radio => 'Bagaimana Anda ingin memutar radio?'; - - @override - String get replace_queue_question => - 'Apakah Anda ingin mengganti antrean saat ini atau menambahkannya?'; - - @override - String get endless_playback => 'Pemutaran Tanpa Akhir'; - - @override - String get delete_playlist => 'Hapus Daftar Putar'; - - @override - String get delete_playlist_confirmation => - 'Anda yakin ingin menghapus daftar putar ini?'; - - @override - String get local_tracks => 'Trek Lokal'; - - @override - String get local_tab => 'Lokal'; - - @override - String get song_link => 'Tautan Lagu'; - - @override - String get skip_this_nonsense => 'Lewati omong kosong ini'; - - @override - String get freedom_of_music => '“Kebebasan Musik”'; - - @override - String get freedom_of_music_palm => - '“Kebebasan Musik di telapak tangan Anda”'; - - @override - String get get_started => 'Mari kita mulai'; - - @override - String get youtube_source_description => - 'Direkomendasikan dan berfungsi paling baik.'; - - @override - String get piped_source_description => - 'Merasa bebas? Sama seperti YouTube tetapi banyak yang gratis.'; - - @override - String get jiosaavn_source_description => - 'Terbaik untuk wilayah Asia Selatan.'; - - @override - String get invidious_source_description => - 'Similar to Piped but with higher availability.'; - - @override - String highest_quality(Object quality) { - return 'Kualitas Terbaik: $quality'; - } - - @override - String get select_audio_source => 'Pilih Sumber Suara'; - - @override - String get endless_playback_description => - 'Tambahkan lagu baru secara otomatis\nke akhir antrean'; - - @override - String get choose_your_region => 'Pilih wilayah Anda'; - - @override - String get choose_your_region_description => - 'Ini akan membantu Spotube menampilkan konten yang tepat\nuntuk lokasi Anda.'; - - @override - String get choose_your_language => 'Pilih bahasa Anda'; - - @override - String get help_project_grow => 'Bantu proyek ini berkembang'; - - @override - String get help_project_grow_description => - 'Spotube adalah proyek sumber terbuka. Anda dapat membantu proyek ini berkembang dengan berkontribusi pada proyek, melaporkan bug, atau menyarankan fitur baru.'; - - @override - String get contribute_on_github => 'Berkontribusi di GitHub'; - - @override - String get donate_on_open_collective => 'Donasi di Open Collective'; - - @override - String get browse_anonymously => 'Jelajahi Secara Anonim'; - - @override - String get enable_connect => 'Aktifkan Hubungkan'; - - @override - String get enable_connect_description => - 'Kontrol Spotube dari perangkat lain'; - - @override - String get devices => 'Perangkat'; - - @override - String get select => 'Pilih'; - - @override - String connect_client_alert(Object client) { - return 'Anda dikendalikan oleh $client'; - } - - @override - String get this_device => 'Perangkat Ini'; - - @override - String get remote => 'Remot'; - - @override - String get stats => 'Statistik'; - - @override - String and_n_more(Object count) { - return 'dan $count lainnya'; - } - - @override - String get recently_played => 'Baru saja diputar'; - - @override - String get browse_more => 'Telusuri lebih banyak'; - - @override - String get no_title => 'Tanpa judul'; - - @override - String get not_playing => 'Tidak diputar'; - - @override - String get epic_failure => 'Kegagalan epik!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Menambahkan $tracks_length trek ke antrean'; - } - - @override - String get spotube_has_an_update => 'Spotube memiliki pembaruan'; - - @override - String get download_now => 'Unduh sekarang'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum telah dirilis'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version telah dirilis'; - } - - @override - String get read_the_latest => 'Baca yang terbaru '; - - @override - String get release_notes => 'catatan rilis'; - - @override - String get pick_color_scheme => 'Pilih skema warna'; - - @override - String get save => 'Simpan'; - - @override - String get choose_the_device => 'Pilih perangkat:'; - - @override - String get multiple_device_connected => - 'Beberapa perangkat terhubung.\nPilih perangkat tempat Anda ingin melakukan tindakan ini'; - - @override - String get nothing_found => 'Tidak ditemukan apa pun'; - - @override - String get the_box_is_empty => 'Kotak kosong'; - - @override - String get top_artists => 'Artis Teratas'; - - @override - String get top_albums => 'Album Teratas'; - - @override - String get this_week => 'Minggu ini'; - - @override - String get this_month => 'Bulan ini'; - - @override - String get last_6_months => '6 bulan terakhir'; - - @override - String get this_year => 'Tahun ini'; - - @override - String get last_2_years => '2 tahun terakhir'; - - @override - String get all_time => 'Sepanjang waktu'; - - @override - String powered_by_provider(Object providerName) { - return 'Didukung oleh $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Pengikut'; - - @override - String get birthday => 'Ulang Tahun'; - - @override - String get subscription => 'Langganan'; - - @override - String get not_born => 'Belum lahir'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profil'; - - @override - String get no_name => 'Tanpa nama'; - - @override - String get edit => 'Edit'; - - @override - String get user_profile => 'Profil pengguna'; - - @override - String count_plays(Object count) { - return '$count pemutaran'; - } - - @override - String get streaming_fees_hypothetical => 'Biaya streaming (hipotetis)'; - - @override - String get minutes_listened => 'Menit didengarkan'; - - @override - String get streamed_songs => 'Lagu yang disiarkan'; - - @override - String count_streams(Object count) { - return '$count streams'; - } - - @override - String get owned_by_you => 'Dimiliki oleh Anda'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl disalin ke clipboard'; - } - - @override - String get hipotetical_calculation => - '*Ini dihitung berdasarkan pembayaran rata-rata per streaming dari platform streaming musik online sebesar \$0,003 hingga \$0,005. Ini adalah perhitungan hipotetis untuk memberikan wawasan kepada pengguna tentang seberapa banyak yang akan mereka bayarkan kepada artis jika mereka mendengarkan lagu mereka di platform streaming musik yang berbeda.'; - - @override - String count_mins(Object minutes) { - return '$minutes menit'; - } - - @override - String get summary_minutes => 'menit'; - - @override - String get summary_listened_to_music => 'Mendengarkan musik'; - - @override - String get summary_songs => 'lagu'; - - @override - String get summary_streamed_overall => 'Disiarkan secara keseluruhan'; - - @override - String get summary_owed_to_artists => 'Terhutang kepada artis\nBulan ini'; - - @override - String get summary_artists => 'artis'; - - @override - String get summary_music_reached_you => 'Musik mencapai Anda'; - - @override - String get summary_full_albums => 'album lengkap'; - - @override - String get summary_got_your_love => 'Mendapatkan cinta Anda'; - - @override - String get summary_playlists => 'daftar putar'; - - @override - String get summary_were_on_repeat => 'Sedang diulang'; - - @override - String total_money(Object money) { - return 'Total $money'; - } - - @override - String get webview_not_found => 'Webview tidak ditemukan'; - - @override - String get webview_not_found_description => - 'Tidak ada runtime Webview yang diinstal di perangkat Anda.\nJika sudah diinstal, pastikan itu ada di environment PATH\n\nSetelah diinstal, restart aplikasi'; - - @override - String get unsupported_platform => 'Platform tidak didukung'; - - @override - String get cache_music => 'Cache music'; - - @override - String get open => 'Open'; - - @override - String get cache_folder => 'Cache folder'; - - @override - String get export => 'Export'; - - @override - String get clear_cache => 'Clear cache'; - - @override - String get clear_cache_confirmation => 'Do you want to clear the cache?'; - - @override - String get export_cache_files => 'Export Cached Files'; - - @override - String found_n_files(Object count) { - return 'Found $count files'; - } - - @override - String get export_cache_confirmation => - 'Do you want to export these files to'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Exported $filesExported out of $files files'; - } - - @override - String get undo => 'Undo'; - - @override - String get download_all => 'Download all'; - - @override - String get add_all_to_playlist => 'Add all to playlist'; - - @override - String get add_all_to_queue => 'Add all to queue'; - - @override - String get play_all_next => 'Play all next'; - - @override - String get pause => 'Pause'; - - @override - String get view_all => 'View all'; - - @override - String get no_tracks_added_yet => - 'Looks like you haven\'t added any tracks yet'; - - @override - String get no_tracks => 'Looks like there are no tracks here'; - - @override - String get no_tracks_listened_yet => - 'Looks like you haven\'t listened to anything yet'; - - @override - String get not_following_artists => 'You\'re not following any artists'; - - @override - String get no_favorite_albums_yet => - 'Looks like you haven\'t added any albums to your favorites yet'; - - @override - String get no_logs_found => 'No logs found'; - - @override - String get youtube_engine => 'YouTube Engine'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine is not installed'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine is not installed in your system.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Make sure it\'s available in the PATH variable or\nset the absolute path to the $engine executable below'; - } - - @override - String get youtube_engine_unix_issue_message => - 'In macOS/Linux/unix like OS\'s, setting path on .zshrc/.bashrc/.bash_profile etc. won\'t work.\nYou need to set the path in the shell configuration file'; - - @override - String get download => 'Download'; - - @override - String get file_not_found => 'File not found'; - - @override - String get custom => 'Custom'; - - @override - String get add_custom_url => 'Add custom URL'; - - @override - String get edit_port => 'Edit port'; - - @override - String get port_helper_msg => - 'Default adalah -1 yang menunjukkan angka acak. Jika Anda telah mengonfigurasi firewall, disarankan untuk mengatur ini.'; - - @override - String connect_request(Object client) { - return 'Izinkan $client untuk terhubung?'; - } - - @override - String get connection_request_denied => - 'Koneksi ditolak. Pengguna menolak akses.'; - - @override - String get an_error_occurred => 'Terjadi kesalahan'; - - @override - String get copy_to_clipboard => 'Salin ke papan klip'; - - @override - String get view_logs => 'Lihat log'; - - @override - String get retry => 'Coba lagi'; - - @override - String get no_default_metadata_provider_selected => - 'Anda belum mengatur penyedia metadata default'; - - @override - String get manage_metadata_providers => 'Kelola penyedia metadata'; - - @override - String get open_link_in_browser => 'Buka Tautan di Peramban?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Apakah Anda ingin membuka tautan berikut'; - - @override - String get unsafe_url_warning => - 'Tidak aman untuk membuka tautan dari sumber yang tidak tepercaya. Berhati-hatilah!\nAnda juga dapat menyalin tautan ke papan klip Anda.'; - - @override - String get copy_link => 'Salin Tautan'; - - @override - String get building_your_timeline => - 'Membangun garis waktu Anda berdasarkan riwayat mendengarkan Anda...'; - - @override - String get official => 'Resmi'; - - @override - String author_name(Object author) { - return 'Penulis: $author'; - } - - @override - String get third_party => 'Pihak ketiga'; - - @override - String get plugin_requires_authentication => 'Plugin memerlukan otentikasi'; - - @override - String get update_available => 'Pembaruan tersedia'; - - @override - String get supports_scrobbling => 'Mendukung scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Plugin ini scrobble musik Anda untuk menghasilkan riwayat mendengarkan Anda.'; - - @override - String get default_metadata_source => 'Sumber metadata default'; - - @override - String get set_default_metadata_source => 'Atur sumber metadata default'; - - @override - String get default_audio_source => 'Sumber audio default'; - - @override - String get set_default_audio_source => 'Atur sumber audio default'; - - @override - String get set_default => 'Atur sebagai bawaan'; - - @override - String get support => 'Dukungan'; - - @override - String get support_plugin_development => 'Dukung pengembangan plugin'; - - @override - String can_access_name_api(Object name) { - return '- Dapat mengakses API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Apakah Anda ingin menginstal plugin ini?'; - - @override - String get third_party_plugin_warning => - 'Plugin ini berasal dari repositori pihak ketiga. Pastikan Anda memercayai sumbernya sebelum menginstal.'; - - @override - String get author => 'Penulis'; - - @override - String get this_plugin_can_do_following => - 'Plugin ini dapat melakukan hal berikut'; - - @override - String get install => 'Instal'; - - @override - String get install_a_metadata_provider => 'Instal Penyedia Metadata'; - - @override - String get no_tracks_playing => 'Tidak ada Lagu yang sedang diputar saat ini'; - - @override - String get synced_lyrics_not_available => - 'Lirik tersinkronisasi tidak tersedia untuk lagu ini. Silakan gunakan tab'; - - @override - String get plain_lyrics => 'Lirik Polos'; - - @override - String get tab_instead => 'sebagai gantinya.'; - - @override - String get disclaimer => 'Penafian'; - - @override - String get third_party_plugin_dmca_notice => - 'Tim Spotube tidak bertanggung jawab (termasuk hukum) atas plugin \"Pihak ketiga\" mana pun.\nSilakan gunakan dengan risiko Anda sendiri. Untuk bug/masalah apa pun, silakan laporkan ke repositori plugin.\n\nJika ada plugin \"Pihak ketiga\" yang melanggar ToS/DMCA dari layanan/entitas hukum mana pun, silakan minta penulis plugin \"Pihak ketiga\" atau platform hosting, mis. GitHub/Codeberg, untuk mengambil tindakan. Yang tercantum di atas (berlabel \"Pihak ketiga\") adalah semua plugin publik/yang dikelola oleh komunitas. Kami tidak mengkurasi mereka, jadi kami tidak dapat mengambil tindakan apa pun terhadap mereka.\n\n'; - - @override - String get input_does_not_match_format => - 'Masukan tidak cocok dengan format yang diperlukan'; - - @override - String get plugins => 'Plugin'; - - @override - String get paste_plugin_download_url => - 'Tempel url unduhan atau url repo GitHub/Codeberg atau tautan langsung ke file .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Unduh dan instal plugin dari url'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Gagal menambahkan plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'Unggah plugin dari file'; - - @override - String get installed => 'Terinstal'; - - @override - String get available_plugins => 'Plugin yang tersedia'; - - @override - String get configure_plugins => - 'Konfigurasi plugin penyedia metadata dan sumber audio Anda sendiri'; - - @override - String get audio_scrobblers => 'Scrobblers Audio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Sumber: '; - - @override - String get uncompressed => 'Tidak terkompresi'; - - @override - String get dab_music_source_description => - 'Untuk audiophile. Menyediakan aliran audio berkualitas tinggi/tanpa kehilangan. Pencocokkan trek yang akurat berdasarkan ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_it.dart b/lib/l10n/generated/app_localizations_it.dart deleted file mode 100644 index f2dfa5ed..00000000 --- a/lib/l10n/generated/app_localizations_it.dart +++ /dev/null @@ -1,1572 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Italian (`it`). -class AppLocalizationsIt extends AppLocalizations { - AppLocalizationsIt([String locale = 'it']) : super(locale); - - @override - String get guest => 'Ospite'; - - @override - String get browse => 'Sfoglia'; - - @override - String get search => 'Cerca'; - - @override - String get library => 'Libreria'; - - @override - String get lyrics => 'Testi'; - - @override - String get settings => 'Impostazioni'; - - @override - String get genre_categories_filter => 'Filtra categorie e generi...'; - - @override - String get genre => 'Genere'; - - @override - String get personalized => 'Personalizzato'; - - @override - String get featured => 'In evidenza'; - - @override - String get new_releases => 'Novità'; - - @override - String get songs => 'Canzoni'; - - @override - String playing_track(Object track) { - return 'Riproduzione $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Questo cancellerà la coda corrente. $track_length tracce saranno rimosse\nVuoi continuare?'; - } - - @override - String get load_more => 'Carica altro'; - - @override - String get playlists => 'Playlist'; - - @override - String get artists => 'Artisti'; - - @override - String get albums => 'Album'; - - @override - String get tracks => 'Tracce'; - - @override - String get downloads => 'Downloads'; - - @override - String get filter_playlists => 'Filtra le tue playlist...'; - - @override - String get liked_tracks => 'Tracce piaciute'; - - @override - String get liked_tracks_description => 'Tutte le tracce piaciute'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Crea una playlist'; - - @override - String get update_playlist => 'Aggiorna playlist'; - - @override - String get create => 'Crea'; - - @override - String get cancel => 'Annulla'; - - @override - String get update => 'Aggiorna'; - - @override - String get playlist_name => 'Nome Playlist'; - - @override - String get name_of_playlist => 'Nome della playlist'; - - @override - String get description => 'Descrizione'; - - @override - String get public => 'Pubblico'; - - @override - String get collaborative => 'Collaborativo'; - - @override - String get search_local_tracks => 'Cerca tracce locali...'; - - @override - String get play => 'Riproduci'; - - @override - String get delete => 'Cancella'; - - @override - String get none => 'Nessuno'; - - @override - String get sort_a_z => 'Ordina dalla A-Z'; - - @override - String get sort_z_a => 'Ordina dalla Z-A'; - - @override - String get sort_artist => 'Ordina per Artista'; - - @override - String get sort_album => 'Ordina per Album'; - - @override - String get sort_duration => 'Ordina per Durata'; - - @override - String get sort_tracks => 'Ordina tracce'; - - @override - String currently_downloading(Object tracks_length) { - return 'Attualmente in Download ($tracks_length)'; - } - - @override - String get cancel_all => 'Annulla Tutto'; - - @override - String get filter_artist => 'Filtra artisti...'; - - @override - String followers(Object followers) { - return '$followers Seguaci'; - } - - @override - String get add_artist_to_blacklist => 'Aggiungi artista alla lista nera'; - - @override - String get top_tracks => 'Tracce Top'; - - @override - String get fans_also_like => 'Ai fan piace anche'; - - @override - String get loading => 'Caricamento...'; - - @override - String get artist => 'Artista'; - - @override - String get blacklisted => 'In lista nera'; - - @override - String get following => 'Seguendo'; - - @override - String get follow => 'Segui'; - - @override - String get artist_url_copied => 'URL artista copiato negli appunti'; - - @override - String added_to_queue(Object tracks) { - return 'Aggiunto $tracks tracce alla coda'; - } - - @override - String get filter_albums => 'Filtra album...'; - - @override - String get synced => 'Sincronizzato'; - - @override - String get plain => 'Semplice'; - - @override - String get shuffle => 'Casuale'; - - @override - String get search_tracks => 'Cerca tracce...'; - - @override - String get released => 'Rilasciato'; - - @override - String error(Object error) { - return 'Errore $error'; - } - - @override - String get title => 'Titolo'; - - @override - String get time => 'Durata'; - - @override - String get more_actions => 'Più azioni'; - - @override - String download_count(Object count) { - return 'Scaricato ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Aggiungi ($count) alla playlist'; - } - - @override - String add_count_to_queue(Object count) { - return 'Aggiungi ($count) alla Coda'; - } - - @override - String play_count_next(Object count) { - return 'Riproduci ($count) prossime'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return 'Copiato $data negli appunti'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Aggiungi $track nelle seguenti Playlist'; - } - - @override - String get add => 'Aggiungi'; - - @override - String added_track_to_queue(Object track) { - return 'Aggiunto $track alla coda'; - } - - @override - String get add_to_queue => 'Aggiungi alla coda'; - - @override - String track_will_play_next(Object track) { - return 'in seguito sarà riprodotta $track'; - } - - @override - String get play_next => 'Riproduci prossimo'; - - @override - String removed_track_from_queue(Object track) { - return 'Rimosso $track dalla coda'; - } - - @override - String get remove_from_queue => 'Rimuovi dalla coda'; - - @override - String get remove_from_favorites => 'Rimuovi dai preferiti'; - - @override - String get save_as_favorite => 'Salva come preferito'; - - @override - String get add_to_playlist => 'Aggiungi alla playlist'; - - @override - String get remove_from_playlist => 'Rimuovi dalla playlist'; - - @override - String get add_to_blacklist => 'Aggiungi alla blacklist'; - - @override - String get remove_from_blacklist => 'Rimuovi dalla blacklist'; - - @override - String get share => 'Condividi'; - - @override - String get mini_player => 'Mini Riproduttore'; - - @override - String get slide_to_seek => 'Scorri per cercare avanti o indietro'; - - @override - String get shuffle_playlist => 'Playlist casuale'; - - @override - String get unshuffle_playlist => 'Ordina playlist'; - - @override - String get previous_track => 'Traccia precedente'; - - @override - String get next_track => 'Traccia successiva'; - - @override - String get pause_playback => 'Pausa Playback'; - - @override - String get resume_playback => 'Riprendi Playback'; - - @override - String get loop_track => 'Cicla traccia'; - - @override - String get no_loop => 'Nessun ciclo'; - - @override - String get repeat_playlist => 'Ripeti playlist'; - - @override - String get queue => 'Coda'; - - @override - String get alternative_track_sources => 'Sorgenti traccia alternative'; - - @override - String get download_track => 'Scarica traccia'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks tracce in coda'; - } - - @override - String get clear_all => 'Cancella tutto'; - - @override - String get show_hide_ui_on_hover => 'Mostra/Nascondi UI al passaggio'; - - @override - String get always_on_top => 'Sempre in cima'; - - @override - String get exit_mini_player => 'Esci da Mini player'; - - @override - String get download_location => 'Cartella di scarico'; - - @override - String get local_library => 'Biblioteca locale'; - - @override - String get add_library_location => 'Aggiungi alla biblioteca'; - - @override - String get remove_library_location => 'Rimuovi dalla biblioteca'; - - @override - String get account => 'Account'; - - @override - String get logout => 'Esci'; - - @override - String get logout_of_this_account => 'Esci da questo account'; - - @override - String get language_region => 'Lingua & Regione'; - - @override - String get language => 'Lingua'; - - @override - String get system_default => 'Default sistema'; - - @override - String get market_place_region => 'Regione del mercato'; - - @override - String get recommendation_country => 'Paese Raccomandato'; - - @override - String get appearance => 'Aspetto'; - - @override - String get layout_mode => 'Modalità Layout'; - - @override - String get override_layout_settings => - 'Sovrascrivi le impostazioni del layout responsivo'; - - @override - String get adaptive => 'Adattiva'; - - @override - String get compact => 'Compatta'; - - @override - String get extended => 'Estesa'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Scuro'; - - @override - String get light => 'Chiaro'; - - @override - String get system => 'Sistema'; - - @override - String get accent_color => 'Colore accento'; - - @override - String get sync_album_color => 'Syncronizza colore album'; - - @override - String get sync_album_color_description => - 'Usa il colore dominante della copertina dell\'album come colore accento'; - - @override - String get playback => 'Riproduzione'; - - @override - String get audio_quality => 'Qualità Audio'; - - @override - String get high => 'Alta'; - - @override - String get low => 'Bassa'; - - @override - String get pre_download_play => 'Pre-scarica e riproduci'; - - @override - String get pre_download_play_description => - 'Anzi che effettuare lo stream dell\'audio, scarica invece i byte e li riproduce (raccomandato per gli utenti con banda più alta)'; - - @override - String get skip_non_music => 'Salta i segmenti non di musica (SponsorBlock)'; - - @override - String get blacklist_description => 'Tracce e artisti in blacklist'; - - @override - String get wait_for_download_to_finish => - 'Prego attendere che lo scaricamento corrente finisca'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Comportamento Chiusura'; - - @override - String get close => 'Chiudi'; - - @override - String get minimize_to_tray => 'Minimizza in tray'; - - @override - String get show_tray_icon => 'Mostra icona in tray di sistema'; - - @override - String get about => 'A proposito di'; - - @override - String get u_love_spotube => 'Sappiamo che ami Spotube'; - - @override - String get check_for_updates => 'Controlla aggiornamenti'; - - @override - String get about_spotube => 'A proposito di Spotube'; - - @override - String get blacklist => 'Blacklist'; - - @override - String get please_sponsor => 'Per favore sponsorizza/dona'; - - @override - String get spotube_description => - 'Spotube, un client spotify gratis per tutti, multipiattaforma e leggero'; - - @override - String get version => 'Versione'; - - @override - String get build_number => 'Numero Build'; - - @override - String get founder => 'Fondatore'; - - @override - String get repository => 'Repository'; - - @override - String get bug_issues => 'Bug+Problemi'; - - @override - String get made_with => 'Fatto con ❤️ in Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licenza'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Non ti preoccupare, le tue credenziali non saranno inviate o condivise con nessuno'; - - @override - String get know_how_to_login => 'Non sai come farlo?'; - - @override - String get follow_step_by_step_guide => 'Segui la guida passo-passo'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Inserire tutti i campi'; - - @override - String get submit => 'Invia'; - - @override - String get exit => 'Esci'; - - @override - String get previous => 'Precedente'; - - @override - String get next => 'Prossimo'; - - @override - String get done => 'Finito'; - - @override - String get step_1 => 'Passo 1'; - - @override - String get first_go_to => 'Prim, vai a'; - - @override - String get something_went_wrong => 'Qualcosa è andato storto'; - - @override - String get piped_instance => 'Istanza Server Piped'; - - @override - String get piped_description => - 'L\'istanza server Piped da usare per il match della tracccia'; - - @override - String get piped_warning => - 'Alcune di queste non funzioneranno benen. Usa quindi a tuo rischio'; - - @override - String get invidious_instance => 'Istanza del server Invidious'; - - @override - String get invidious_description => - 'L\'istanza del server Invidious da utilizzare per il matching delle tracce'; - - @override - String get invidious_warning => - 'Alcuni potrebbero non funzionare bene. Usali a tuo rischio'; - - @override - String get generate => 'Genera'; - - @override - String track_exists(Object track) { - return 'La traccia $track esiste già'; - } - - @override - String get replace_downloaded_tracks => - 'Sostituisci tutte le tracce scaricate'; - - @override - String get skip_download_tracks => - 'Salta lo scaricamento di tutte le tracce scaricate'; - - @override - String get do_you_want_to_replace => - 'Vuoi sovrascrivere la traccia esistente??'; - - @override - String get replace => 'Sovrascrivi'; - - @override - String get skip => 'Salta'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Seleziona fino a $count $type'; - } - - @override - String get select_genres => 'Seleziona Generi'; - - @override - String get add_genres => 'Aggiungi Generi'; - - @override - String get country => 'Paese'; - - @override - String get number_of_tracks_generate => 'Nnumero di tracce da generare'; - - @override - String get acousticness => 'Acustica'; - - @override - String get danceability => 'Ballabilità'; - - @override - String get energy => 'Energia'; - - @override - String get instrumentalness => 'Strumentalità'; - - @override - String get liveness => 'Vitalità'; - - @override - String get loudness => 'Sonorità'; - - @override - String get speechiness => 'Loquacità'; - - @override - String get valence => 'Valenza'; - - @override - String get popularity => 'Popolarità'; - - @override - String get key => 'Chiave'; - - @override - String get duration => 'Durata (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Modo'; - - @override - String get time_signature => 'Indicazione di tempo'; - - @override - String get short => 'Corta'; - - @override - String get medium => 'Media'; - - @override - String get long => 'Lunga'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Obiettivo'; - - @override - String get moderate => 'Moderato'; - - @override - String get deselect_all => 'Deseleziona Tutto'; - - @override - String get select_all => 'Seleziona Tutto'; - - @override - String get are_you_sure => 'Sei certo?'; - - @override - String get generating_playlist => 'Generazione delle tue playlist custom...'; - - @override - String selected_count_tracks(Object count) { - return '$count tracce selezionate'; - } - - @override - String get download_warning => - 'Se scarichi tutte le Tracce in massa stai chiaramente piratando Musica e causando un danno alla società creativa della Musica. Spero che tu sia cosciente di questo. Cerca di rispettare e supportare sempre il duro lavoro degli Artisti'; - - @override - String get download_ip_ban_warning => - 'A proposito, il tuo IP può essere bloccato da YouTube per il numero di richieste di download eccessive rispetto la norma. Il blocco IP significa che non puoi usare YoutTube (anche hai effettuato l\'accesso) per almeno 2-3 mesi dal dispositivo con questo IP. Spotube non ha responsabilità se questo dovesse accadere'; - - @override - String get by_clicking_accept_terms => - 'Cliccando su \'accetta\' concordi con i seguenti termini:'; - - @override - String get download_agreement_1 => - 'So che sto piratando Musica. Sono cattivo'; - - @override - String get download_agreement_2 => - 'Supporterò l\'Artista come potrò e sto facendo questo solo perchè non ho denaro per acquistare il suo prodotto dell\'ingegno'; - - @override - String get download_agreement_3 => - 'Sono completamente cosciente che il mio IP può essere bloccato da YouTube & non riterrò responsabili Spotube o i suoi autori/contributori per ogni inconveniente causato dalla mia azione corrente'; - - @override - String get decline => 'Declino'; - - @override - String get accept => 'Accetto'; - - @override - String get details => 'Dettagli'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Canale'; - - @override - String get likes => 'Mi Piace'; - - @override - String get dislikes => 'Non Mi Piace'; - - @override - String get views => 'Viste'; - - @override - String get streamUrl => 'URL dello streaming'; - - @override - String get stop => 'Stop'; - - @override - String get sort_newest => 'Ordina per nuovi aggiunti'; - - @override - String get sort_oldest => 'Ordina per aggiunta più vecchia'; - - @override - String get sleep_timer => 'Timer Dormire'; - - @override - String mins(Object minutes) { - return '$minutes Minuti'; - } - - @override - String hours(Object hours) { - return '$hours Ore'; - } - - @override - String hour(Object hours) { - return '$hours Ora'; - } - - @override - String get custom_hours => 'Orari Personalizzati'; - - @override - String get logs => 'Log'; - - @override - String get developers => 'Sviluppatori'; - - @override - String get not_logged_in => 'Non hai effettuato l\'accesso'; - - @override - String get search_mode => 'Modalità Ricerca'; - - @override - String get audio_source => 'Fonte audio'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Criptazione fallita'; - - @override - String get encryption_failed_warning => - 'Spotube usa la criptazione per memorizzare in modo sicuro i dati. Ma ha fallito a farlo. Passerà quindi in ripiego alla memorizzazione non siscura\nSe stai usando Linux assicurati di avere un servizio di segretezza installato (gnome-keyring, kde-wallet, keepassxc etc)'; - - @override - String get querying_info => 'Richiesta informazioni...'; - - @override - String get piped_api_down => 'Le Piped API non funzionano'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'L\'istanza di Piped $pipedInstance è correntemente offline\n\nCambia istanza o cambia \'Tipo API\' alle API ufficiali YouTube\n\nAssicurati di riavviare l\'app dopo il cambio'; - } - - @override - String get you_are_offline => 'Sei correntemente offline'; - - @override - String get connection_restored => 'Connessione ad internet ripristinata'; - - @override - String get use_system_title_bar => 'Usa la barra del titolo di sistema'; - - @override - String get crunching_results => 'Elaborazione risultati...'; - - @override - String get search_to_get_results => 'Cerca per ottenere risultati'; - - @override - String get use_amoled_mode => 'Usa modalità AMOLED'; - - @override - String get pitch_dark_theme => 'Tema nero profondo'; - - @override - String get normalize_audio => 'Normalizza audio'; - - @override - String get change_cover => 'Cambia copertina'; - - @override - String get add_cover => 'Aggiungi copertina'; - - @override - String get restore_defaults => 'Ripristina default'; - - @override - String get download_music_format => 'Formato download musica'; - - @override - String get streaming_music_format => 'Formato streaming musica'; - - @override - String get download_music_quality => 'Qualità download musica'; - - @override - String get streaming_music_quality => 'Qualità streaming musica'; - - @override - String get login_with_lastfm => 'Accesso a Last.fm'; - - @override - String get connect => 'Connetti'; - - @override - String get disconnect_lastfm => 'Disconnetti Last.fm'; - - @override - String get disconnect => 'Disconnetti'; - - @override - String get username => 'Nome utente'; - - @override - String get password => 'Password'; - - @override - String get login => 'Accesso'; - - @override - String get login_with_your_lastfm => 'Accedi con il tuo account Last.fm'; - - @override - String get scrobble_to_lastfm => 'Invia a Last.fm'; - - @override - String get go_to_album => 'Vai all\'album'; - - @override - String get discord_rich_presence => 'Presenza ricca di Discord'; - - @override - String get browse_all => 'Esplora tutto'; - - @override - String get genres => 'Generi'; - - @override - String get explore_genres => 'Esplora generi'; - - @override - String get friends => 'Amici'; - - @override - String get no_lyrics_available => - 'Spiacente, impossibile trovare il testo di questa traccia'; - - @override - String get start_a_radio => 'Avvia una Radio'; - - @override - String get how_to_start_radio => 'Come vuoi avviare la radio?'; - - @override - String get replace_queue_question => - 'Vuoi sostituire la coda attuale o aggiungerla?'; - - @override - String get endless_playback => 'Riproduzione Infinita'; - - @override - String get delete_playlist => 'Elimina Playlist'; - - @override - String get delete_playlist_confirmation => - 'Sei sicuro di voler eliminare questa playlist?'; - - @override - String get local_tracks => 'Tracce Locali'; - - @override - String get local_tab => 'Locale'; - - @override - String get song_link => 'Link della Canzone'; - - @override - String get skip_this_nonsense => 'Salta questa sciocchezza'; - - @override - String get freedom_of_music => '“Libertà della Musica”'; - - @override - String get freedom_of_music_palm => - '“Libertà della Musica nel palmo della tua mano”'; - - @override - String get get_started => 'Cominciamo'; - - @override - String get youtube_source_description => 'Consigliato e funziona meglio.'; - - @override - String get piped_source_description => - 'Ti senti libero? Come YouTube ma molto più gratuito.'; - - @override - String get jiosaavn_source_description => - 'Il migliore per la regione dell\'Asia meridionale.'; - - @override - String get invidious_source_description => - 'Simile a Piped ma con maggiore disponibilità.'; - - @override - String highest_quality(Object quality) { - return 'Massima Qualità: $quality'; - } - - @override - String get select_audio_source => 'Seleziona Sorgente Audio'; - - @override - String get endless_playback_description => - 'Aggiungi automaticamente nuove canzoni alla fine della coda'; - - @override - String get choose_your_region => 'Scegli la tua regione'; - - @override - String get choose_your_region_description => - 'Questo aiuterà Spotube a mostrarti il contenuto giusto per la tua posizione.'; - - @override - String get choose_your_language => 'Scegli la tua lingua'; - - @override - String get help_project_grow => 'Aiuta questo progetto a crescere'; - - @override - String get help_project_grow_description => - 'Spotube è un progetto open-source. Puoi aiutare questo progetto a crescere contribuendo al progetto, segnalando bug o suggerendo nuove funzionalità.'; - - @override - String get contribute_on_github => 'Contribuisci su GitHub'; - - @override - String get donate_on_open_collective => 'Dona su Open Collective'; - - @override - String get browse_anonymously => 'Naviga in modo anonimo'; - - @override - String get enable_connect => 'Abilita connessione'; - - @override - String get enable_connect_description => - 'Controlla Spotube da altri dispositivi'; - - @override - String get devices => 'Dispositivi'; - - @override - String get select => 'Seleziona'; - - @override - String connect_client_alert(Object client) { - return 'Stai venendo controllato da $client'; - } - - @override - String get this_device => 'Questo dispositivo'; - - @override - String get remote => 'Remoto'; - - @override - String get stats => 'Statistiche'; - - @override - String and_n_more(Object count) { - return 'e $count in più'; - } - - @override - String get recently_played => 'Riprodotti di recente'; - - @override - String get browse_more => 'Esplora di più'; - - @override - String get no_title => 'Nessun titolo'; - - @override - String get not_playing => 'Non in riproduzione'; - - @override - String get epic_failure => 'Fallimento epico!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Aggiunti $tracks_length brani alla coda'; - } - - @override - String get spotube_has_an_update => 'Spotube ha un aggiornamento'; - - @override - String get download_now => 'Scarica ora'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum è stato rilasciato'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version è stato rilasciato'; - } - - @override - String get read_the_latest => 'Leggi l\'ultimo '; - - @override - String get release_notes => 'note di rilascio'; - - @override - String get pick_color_scheme => 'Scegli uno schema di colori'; - - @override - String get save => 'Salva'; - - @override - String get choose_the_device => 'Scegli il dispositivo:'; - - @override - String get multiple_device_connected => - 'Sono collegati più dispositivi.\nScegli il dispositivo su cui vuoi che venga eseguita questa azione'; - - @override - String get nothing_found => 'Nessun risultato'; - - @override - String get the_box_is_empty => 'La scatola è vuota'; - - @override - String get top_artists => 'Artisti Top'; - - @override - String get top_albums => 'Album Top'; - - @override - String get this_week => 'Questa settimana'; - - @override - String get this_month => 'Questo mese'; - - @override - String get last_6_months => 'Ultimi 6 mesi'; - - @override - String get this_year => 'Quest\'anno'; - - @override - String get last_2_years => 'Ultimi 2 anni'; - - @override - String get all_time => 'Di tutti i tempi'; - - @override - String powered_by_provider(Object providerName) { - return 'Sostenuto da $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Follower'; - - @override - String get birthday => 'Compleanno'; - - @override - String get subscription => 'Abbonamento'; - - @override - String get not_born => 'Non nato'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profilo'; - - @override - String get no_name => 'Nessun nome'; - - @override - String get edit => 'Modifica'; - - @override - String get user_profile => 'Profilo utente'; - - @override - String count_plays(Object count) { - return '$count riproduzioni'; - } - - @override - String get streaming_fees_hypothetical => 'Spese di streaming (ipotetico)'; - - @override - String get minutes_listened => 'Minuti ascoltati'; - - @override - String get streamed_songs => 'Brani in streaming'; - - @override - String count_streams(Object count) { - return '$count streaming'; - } - - @override - String get owned_by_you => 'Di tua proprietà'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'Copiato $shareUrl negli appunti'; - } - - @override - String get hipotetical_calculation => - '*Questo è calcolato in base al pagamento medio per stream delle piattaforme di streaming musicale online, che va da \$0.003 a \$0.005. Si tratta di un calcolo ipotetico per dare all\'utente un\'idea di quanto avrebbe pagato agli artisti se avesse ascoltato la loro canzone su diverse piattaforme di streaming musicale.'; - - @override - String count_mins(Object minutes) { - return '$minutes min'; - } - - @override - String get summary_minutes => 'minuti'; - - @override - String get summary_listened_to_music => 'Musica ascoltata'; - - @override - String get summary_songs => 'brani'; - - @override - String get summary_streamed_overall => 'Streaming complessivo'; - - @override - String get summary_owed_to_artists => 'Dovuto agli artisti\nquesto mese'; - - @override - String get summary_artists => 'dell\'artista'; - - @override - String get summary_music_reached_you => 'La musica ti ha raggiunto'; - - @override - String get summary_full_albums => 'album completi'; - - @override - String get summary_got_your_love => 'Ha ricevuto il tuo amore'; - - @override - String get summary_playlists => 'playlist'; - - @override - String get summary_were_on_repeat => 'Erano in ripetizione'; - - @override - String total_money(Object money) { - return 'Totale $money'; - } - - @override - String get webview_not_found => 'Webview non trovato'; - - @override - String get webview_not_found_description => - 'Nessun runtime Webview installato nel tuo dispositivo.\nSe è installato, assicurati che sia nel environment PATH\n\nDopo l\'installazione, riavvia l\'app'; - - @override - String get unsupported_platform => 'Piattaforma non supportata'; - - @override - String get cache_music => 'Cache musica'; - - @override - String get open => 'Apri'; - - @override - String get cache_folder => 'Cartella cache'; - - @override - String get export => 'Esporta'; - - @override - String get clear_cache => 'Cancella cache'; - - @override - String get clear_cache_confirmation => 'Vuoi cancellare la cache?'; - - @override - String get export_cache_files => 'Esporta file nella cache'; - - @override - String found_n_files(Object count) { - return 'Trovati $count file'; - } - - @override - String get export_cache_confirmation => 'Vuoi esportare questi file su'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Esportati $filesExported su $files file'; - } - - @override - String get undo => 'Annulla'; - - @override - String get download_all => 'Scarica tutto'; - - @override - String get add_all_to_playlist => 'Aggiungi tutto alla playlist'; - - @override - String get add_all_to_queue => 'Aggiungi tutto alla coda'; - - @override - String get play_all_next => 'Riproduci tutto dopo'; - - @override - String get pause => 'Pausa'; - - @override - String get view_all => 'Vedi tutto'; - - @override - String get no_tracks_added_yet => - 'Sembra che non hai ancora aggiunto nessun brano'; - - @override - String get no_tracks => 'Sembra che non ci siano brani qui'; - - @override - String get no_tracks_listened_yet => - 'Sembra che non hai ascoltato nulla ancora'; - - @override - String get not_following_artists => 'Non stai seguendo alcun artista'; - - @override - String get no_favorite_albums_yet => - 'Sembra che non hai ancora aggiunto album ai tuoi preferiti'; - - @override - String get no_logs_found => 'Nessun registro trovato'; - - @override - String get youtube_engine => 'Motore YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine non è installato'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine non è installato nel tuo sistema.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Assicurati che sia disponibile nella variabile PATH o\nimposta il percorso assoluto all\'eseguibile $engine qui sotto'; - } - - @override - String get youtube_engine_unix_issue_message => - 'In macOS/Linux/os simili a unix, impostare il percorso su .zshrc/.bashrc/.bash_profile ecc. non funzionerà.\nDevi impostare il percorso nel file di configurazione della shell'; - - @override - String get download => 'Scarica'; - - @override - String get file_not_found => 'File non trovato'; - - @override - String get custom => 'Personalizzato'; - - @override - String get add_custom_url => 'Aggiungi URL personalizzato'; - - @override - String get edit_port => 'Modifica porta'; - - @override - String get port_helper_msg => - 'Il valore predefinito è -1, che indica un numero casuale. Se hai configurato un firewall, si consiglia di impostarlo.'; - - @override - String connect_request(Object client) { - return 'Consentire a $client di connettersi?'; - } - - @override - String get connection_request_denied => - 'Connessione negata. L\'utente ha negato l\'accesso.'; - - @override - String get an_error_occurred => 'Si è verificato un errore'; - - @override - String get copy_to_clipboard => 'Copia negli appunti'; - - @override - String get view_logs => 'Visualizza log'; - - @override - String get retry => 'Riprova'; - - @override - String get no_default_metadata_provider_selected => - 'Non hai impostato alcun provider di metadati predefinito'; - - @override - String get manage_metadata_providers => 'Gestisci provider di metadati'; - - @override - String get open_link_in_browser => 'Aprire il link nel browser?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Vuoi aprire il seguente link'; - - @override - String get unsafe_url_warning => - 'Potrebbe essere pericoloso aprire link da fonti non attendibili. Sii cauto!\nPuoi anche copiare il link negli appunti.'; - - @override - String get copy_link => 'Copia link'; - - @override - String get building_your_timeline => - 'Creazione della tua cronologia in base ai tuoi ascolti...'; - - @override - String get official => 'Ufficiale'; - - @override - String author_name(Object author) { - return 'Autore: $author'; - } - - @override - String get third_party => 'Terze parti'; - - @override - String get plugin_requires_authentication => - 'Il plugin richiede l\'autenticazione'; - - @override - String get update_available => 'Aggiornamento disponibile'; - - @override - String get supports_scrobbling => 'Supporta lo scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Questo plugin scrobbla la tua musica per generare la tua cronologia di ascolti.'; - - @override - String get default_metadata_source => 'Fonte metadati predefinita'; - - @override - String get set_default_metadata_source => - 'Imposta fonte metadati predefinita'; - - @override - String get default_audio_source => 'Fonte audio predefinita'; - - @override - String get set_default_audio_source => 'Imposta fonte audio predefinita'; - - @override - String get set_default => 'Imposta come predefinito'; - - @override - String get support => 'Supporto'; - - @override - String get support_plugin_development => 'Sostieni lo sviluppo del plugin'; - - @override - String can_access_name_api(Object name) { - return '- Può accedere all\'API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Vuoi installare questo plugin?'; - - @override - String get third_party_plugin_warning => - 'Questo plugin proviene da un repository di terze parti. Assicurati di fidarti della fonte prima di installarlo.'; - - @override - String get author => 'Autore'; - - @override - String get this_plugin_can_do_following => - 'Questo plugin può fare quanto segue'; - - @override - String get install => 'Installa'; - - @override - String get install_a_metadata_provider => 'Installa un provider di metadati'; - - @override - String get no_tracks_playing => 'Nessun brano in riproduzione al momento'; - - @override - String get synced_lyrics_not_available => - 'Testi sincronizzati non disponibili per questa canzone. Si prega di utilizzare la scheda'; - - @override - String get plain_lyrics => 'Testi semplici'; - - @override - String get tab_instead => 'invece.'; - - @override - String get disclaimer => 'Disclaimer'; - - @override - String get third_party_plugin_dmca_notice => - 'Il team di Spotube non si assume alcuna responsabilità (anche legale) per i plugin di \"terze parti\".\nUsali a tuo rischio e pericolo. Per eventuali bug/problemi, segnalali al repository del plugin.\n\nSe un plugin di \"terze parti\" sta violando i ToS/DMCA di un servizio/entità legale, per favore chiedi all\'autore del plugin \"terzo\" o alla piattaforma di hosting, ad esempio GitHub/Codeberg, di agire. Quelli elencati sopra (etichettati come \"terze parti\") sono tutti plugin pubblici/mantenuti dalla comunità. Non li curiamo, quindi non possiamo intraprendere alcuna azione su di essi.\n\n'; - - @override - String get input_does_not_match_format => - 'L\'input non corrisponde al formato richiesto'; - - @override - String get plugins => 'Plugin'; - - @override - String get paste_plugin_download_url => - 'Incolla l\'URL di download o l\'URL del repository GitHub/Codeberg o il link diretto al file .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Scarica e installa il plugin da URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Impossibile aggiungere il plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'Carica plugin da file'; - - @override - String get installed => 'Installato'; - - @override - String get available_plugins => 'Plugin disponibili'; - - @override - String get configure_plugins => - 'Configura i tuoi plugin per fornitore metadati e fonte audio'; - - @override - String get audio_scrobblers => 'Scrobbler audio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Fonte: '; - - @override - String get uncompressed => 'Non compresso'; - - @override - String get dab_music_source_description => - 'Per audiophile. Fornisce flussi audio di alta qualità/senza perdita. Abbinamento traccia accurato basato su ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_ja.dart b/lib/l10n/generated/app_localizations_ja.dart deleted file mode 100644 index 2505f68a..00000000 --- a/lib/l10n/generated/app_localizations_ja.dart +++ /dev/null @@ -1,1534 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Japanese (`ja`). -class AppLocalizationsJa extends AppLocalizations { - AppLocalizationsJa([String locale = 'ja']) : super(locale); - - @override - String get guest => 'ゲスト'; - - @override - String get browse => '閲覧'; - - @override - String get search => '検索'; - - @override - String get library => 'ライブラリ'; - - @override - String get lyrics => '歌詞'; - - @override - String get settings => '設定'; - - @override - String get genre_categories_filter => 'カテゴリーやジャンルを絞り込み...'; - - @override - String get genre => 'ジャンル'; - - @override - String get personalized => 'あなたにおすすめ'; - - @override - String get featured => '注目'; - - @override - String get new_releases => '新着'; - - @override - String get songs => '曲'; - - @override - String playing_track(Object track) { - return '$track を再生'; - } - - @override - String queue_clear_alert(Object track_length) { - return '現在のキューを消去します。$track_length 曲を消去します。\n続行しますか?'; - } - - @override - String get load_more => 'もっと読み込む'; - - @override - String get playlists => '再生リスト'; - - @override - String get artists => 'アーティスト'; - - @override - String get albums => 'アルバム'; - - @override - String get tracks => '曲'; - - @override - String get downloads => 'ダウンロード'; - - @override - String get filter_playlists => 'あなたの再生リストを絞り込み...'; - - @override - String get liked_tracks => 'いいねした曲'; - - @override - String get liked_tracks_description => 'いいねしたすべての曲'; - - @override - String get playlist => '再生リスト'; - - @override - String get create_a_playlist => '再生リストの作成'; - - @override - String get update_playlist => '再生リストを更新'; - - @override - String get create => '作成'; - - @override - String get cancel => 'キャンセル'; - - @override - String get update => '更新'; - - @override - String get playlist_name => '再生リスト名'; - - @override - String get name_of_playlist => '再生リストの名前'; - - @override - String get description => '説明'; - - @override - String get public => '公開'; - - @override - String get collaborative => 'コラボ'; - - @override - String get search_local_tracks => '端末内の曲を検索...'; - - @override - String get play => '再生'; - - @override - String get delete => '削除'; - - @override - String get none => 'なし'; - - @override - String get sort_a_z => 'A-Z 順に並び替え'; - - @override - String get sort_z_a => 'Z-A 順に並び替え'; - - @override - String get sort_artist => 'アーティスト順に並び替え'; - - @override - String get sort_album => 'アルバム順に並び替え'; - - @override - String get sort_duration => '長さ順に並べ替え'; - - @override - String get sort_tracks => '曲の並び替え'; - - @override - String currently_downloading(Object tracks_length) { - return 'ダウンロード中 ($tracks_length) 曲'; - } - - @override - String get cancel_all => 'すべてキャンセル'; - - @override - String get filter_artist => 'アーティストを絞り込み...'; - - @override - String followers(Object followers) { - return '$followers フォロワー'; - } - - @override - String get add_artist_to_blacklist => 'このアーティストをブラックリストに追加'; - - @override - String get top_tracks => '人気の曲'; - - @override - String get fans_also_like => 'ファンの間で人気'; - - @override - String get loading => '読み込み中...'; - - @override - String get artist => 'アーティスト'; - - @override - String get blacklisted => 'ブラックリスト'; - - @override - String get following => 'フォロー中'; - - @override - String get follow => 'フォローする'; - - @override - String get artist_url_copied => 'アーティストの URL をクリップボードにコピーしました'; - - @override - String added_to_queue(Object tracks) { - return '$tracks をキューに追加しました'; - } - - @override - String get filter_albums => 'アルバムを絞り込み...'; - - @override - String get synced => '同期する'; - - @override - String get plain => 'そのまま'; - - @override - String get shuffle => 'シャッフル'; - - @override - String get search_tracks => '曲を検索...'; - - @override - String get released => 'リリース日'; - - @override - String error(Object error) { - return 'エラー $error'; - } - - @override - String get title => 'タイトル'; - - @override - String get time => '長さ'; - - @override - String get more_actions => 'ほかの操作'; - - @override - String download_count(Object count) { - return 'ダウンロード ($count) 曲'; - } - - @override - String add_count_to_playlist(Object count) { - return '再生リストに ($count) 曲を追加'; - } - - @override - String add_count_to_queue(Object count) { - return 'キューに ($count) 曲を追加'; - } - - @override - String play_count_next(Object count) { - return '次に ($count) 曲を再生'; - } - - @override - String get album => 'アルバム'; - - @override - String copied_to_clipboard(Object data) { - return '$data をクリップボードにコピーしました'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track をこの再生リストに追加'; - } - - @override - String get add => '追加'; - - @override - String added_track_to_queue(Object track) { - return 'キューに $track を追加しました'; - } - - @override - String get add_to_queue => 'キューに追加'; - - @override - String track_will_play_next(Object track) { - return '$track を次に再生'; - } - - @override - String get play_next => '次に再生'; - - @override - String removed_track_from_queue(Object track) { - return 'キューから $track を除去しました'; - } - - @override - String get remove_from_queue => 'キューから除去'; - - @override - String get remove_from_favorites => 'お気に入りから除去'; - - @override - String get save_as_favorite => 'お気に入りに保存'; - - @override - String get add_to_playlist => '再生リストに追加'; - - @override - String get remove_from_playlist => '再生リストから除去'; - - @override - String get add_to_blacklist => 'ブラックリストに追加'; - - @override - String get remove_from_blacklist => 'ブラックリストから除去'; - - @override - String get share => '共有'; - - @override - String get mini_player => 'ミニプレイヤー'; - - @override - String get slide_to_seek => '前後にスライドしてシーク'; - - @override - String get shuffle_playlist => '再生リストをシャッフル'; - - @override - String get unshuffle_playlist => '再生リストのシャッフル解除'; - - @override - String get previous_track => '前の曲'; - - @override - String get next_track => '次の曲'; - - @override - String get pause_playback => '再生を停止'; - - @override - String get resume_playback => '再生を再開'; - - @override - String get loop_track => '曲をループ'; - - @override - String get no_loop => 'ループなし'; - - @override - String get repeat_playlist => '再生リストをリピート'; - - @override - String get queue => '再生キュー'; - - @override - String get alternative_track_sources => 'この曲の別の音源を選ぶ'; - - @override - String get download_track => '曲のダウンロード'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks曲の再生キュー'; - } - - @override - String get clear_all => 'すべて消去l'; - - @override - String get show_hide_ui_on_hover => 'マウスを乗せてUIを表示/隠す'; - - @override - String get always_on_top => '常に手前に表示'; - - @override - String get exit_mini_player => 'ミニプレイヤーを終了'; - - @override - String get download_location => 'ダウンロード先'; - - @override - String get local_library => '端末内ライブラリ'; - - @override - String get add_library_location => 'ライブラリに追加'; - - @override - String get remove_library_location => 'ライブラリから削除'; - - @override - String get account => 'アカウント'; - - @override - String get logout => 'ログアウト'; - - @override - String get logout_of_this_account => 'このアカウントからログアウト'; - - @override - String get language_region => '言語 & 地域'; - - @override - String get language => '言語'; - - @override - String get system_default => 'システムの既定値'; - - @override - String get market_place_region => '音楽市場の地域'; - - @override - String get recommendation_country => 'おすすめの国'; - - @override - String get appearance => '外観'; - - @override - String get layout_mode => 'レイアウトの種類'; - - @override - String get override_layout_settings => 'レスポンシブなレイアウトの種類の設定を上書きする'; - - @override - String get adaptive => '適応的'; - - @override - String get compact => 'コンパクト'; - - @override - String get extended => '幅広'; - - @override - String get theme => 'テーマ'; - - @override - String get dark => 'ダーク'; - - @override - String get light => 'ライト'; - - @override - String get system => 'システムに従う'; - - @override - String get accent_color => 'アクセントカラー'; - - @override - String get sync_album_color => 'アルバムの色に合わせる'; - - @override - String get sync_album_color_description => 'アルバムアートの主張色をアクセントカラーとして使用'; - - @override - String get playback => '再生'; - - @override - String get audio_quality => '音声品質'; - - @override - String get high => '高'; - - @override - String get low => '低'; - - @override - String get pre_download_play => '事前ダウンロードと再生'; - - @override - String get pre_download_play_description => - '音声をストリーミングする代わりに、データをバイト単位でダウンロードして再生 (回線速度が早いユーザーにおすすめ)'; - - @override - String get skip_non_music => '音楽でない部分をスキップ (SponsorBlock)'; - - @override - String get blacklist_description => '曲とアーティストのブラックリスト'; - - @override - String get wait_for_download_to_finish => '現在のダウンロードが完了するまでお待ちください'; - - @override - String get desktop => 'デスクトップ'; - - @override - String get close_behavior => '閉じた時の動作'; - - @override - String get close => '閉じる'; - - @override - String get minimize_to_tray => 'トレイに最小化'; - - @override - String get show_tray_icon => 'システムトレイにアイコンを表示'; - - @override - String get about => 'このアプリについて'; - - @override - String get u_love_spotube => 'Spotube が好きだと知っていますよ'; - - @override - String get check_for_updates => 'アップデートの確認'; - - @override - String get about_spotube => 'Spotube について'; - - @override - String get blacklist => 'ブラックリスト'; - - @override - String get please_sponsor => '出資/寄付もお待ちします'; - - @override - String get spotube_description => - 'Spotube は、軽量でクロスプラットフォームな、すべて無料の spotify クライアント'; - - @override - String get version => 'バージョン'; - - @override - String get build_number => 'ビルド番号'; - - @override - String get founder => '創始者'; - - @override - String get repository => 'リポジトリ'; - - @override - String get bug_issues => 'バグや問題'; - - @override - String get made_with => '❤️ を込めてバングラディシュ🇧🇩で開発'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'ライセンス'; - - @override - String get credentials_will_not_be_shared_disclaimer => - '心配ありません。個人情報を収集したり、共有されることはありません'; - - @override - String get know_how_to_login => 'やり方が分からないですか?'; - - @override - String get follow_step_by_step_guide => 'やり方の説明を見る'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookies'; - } - - @override - String get fill_in_all_fields => 'すべての欄に入力してください'; - - @override - String get submit => '送信'; - - @override - String get exit => '終了'; - - @override - String get previous => '前へ'; - - @override - String get next => '次へ'; - - @override - String get done => '完了'; - - @override - String get step_1 => 'ステップ 1'; - - @override - String get first_go_to => '最初にここを開き'; - - @override - String get something_went_wrong => '何か誤りがあります'; - - @override - String get piped_instance => 'Piped サーバーのインスタンス'; - - @override - String get piped_description => '曲の一致に使う Piped サーバーのインスタンス'; - - @override - String get piped_warning => 'それらの一部ではうまく動作しないこともあります。自己責任で使用してください'; - - @override - String get invidious_instance => 'Invidiousサーバーインスタンス'; - - @override - String get invidious_description => '曲の一致に使用するInvidiousサーバーインスタンス'; - - @override - String get invidious_warning => '一部はうまく機能しない可能性があります。自己責任で使用してください'; - - @override - String get generate => '生成'; - - @override - String track_exists(Object track) { - return '曲 $track は既に存在します'; - } - - @override - String get replace_downloaded_tracks => 'すべてのダウンロード済みの曲を置換'; - - @override - String get skip_download_tracks => 'すべてのダウンロード済みの曲をスキップ'; - - @override - String get do_you_want_to_replace => '既存の曲と置換しますか?'; - - @override - String get replace => '置換する'; - - @override - String get skip => 'スキップ'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '$typeを最大$count 個まで選択'; - } - - @override - String get select_genres => 'ジャンルを選択'; - - @override - String get add_genres => 'ジャンルを追加'; - - @override - String get country => '国'; - - @override - String get number_of_tracks_generate => '生成する曲数'; - - @override - String get acousticness => 'アコースティック感'; - - @override - String get danceability => 'ダンス感'; - - @override - String get energy => 'エネルギー'; - - @override - String get instrumentalness => 'インストゥルメンタル'; - - @override - String get liveness => 'ライブ感'; - - @override - String get loudness => 'ラウドネス'; - - @override - String get speechiness => '会話感'; - - @override - String get valence => '多幸性'; - - @override - String get popularity => '人気度'; - - @override - String get key => 'キー'; - - @override - String get duration => '長さ (秒)'; - - @override - String get tempo => 'テンポ (BPM)'; - - @override - String get mode => '長調'; - - @override - String get time_signature => '拍子記号'; - - @override - String get short => '短'; - - @override - String get medium => '中'; - - @override - String get long => '長'; - - @override - String get min => '最小'; - - @override - String get max => '最大'; - - @override - String get target => '目標'; - - @override - String get moderate => '中'; - - @override - String get deselect_all => 'すべて選択解除'; - - @override - String get select_all => 'すべて選択'; - - @override - String get are_you_sure => 'よろしいですか?'; - - @override - String get generating_playlist => 'カスタムの再生リストを生成中...'; - - @override - String selected_count_tracks(Object count) { - return '$count 曲が選ばれました'; - } - - @override - String get download_warning => - '全曲の一括ダウンロードは明らかに音楽への海賊行為であり、音楽を生み出す共同体に損害を与えるでしょう。気づいてほしい。アーティストの多大な努力に敬意を払い、支援するようにしてください'; - - @override - String get download_ip_ban_warning => - 'また、通常よりも過剰なダウンロード要求があれば、YouTubeはあなたのIPをブロックします。つまりそのIPの端末からは、少なくとも2-3か月の間、(ログインしても)YouTubeを利用できなくなりす。そうなっても Spotube は一切の責任を負いません'; - - @override - String get by_clicking_accept_terms => '「同意する」のクリックにより、以下への同意となります:'; - - @override - String get download_agreement_1 => 'ええ、音楽への海賊行為だ。私はよくない'; - - @override - String get download_agreement_2 => '芸術作品を買うお金がないのでそうするしかないが、アーティストをできる限り支援する'; - - @override - String get download_agreement_3 => - '私のIPがYouTubeにブロックされることがあると完全に把握した。私のこの行動により起きたどんな事故も、Spotube やその所有者/貢献者に責任はありません。'; - - @override - String get decline => '同意しない'; - - @override - String get accept => '同意する'; - - @override - String get details => '詳細'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'チャンネル'; - - @override - String get likes => '高評価'; - - @override - String get dislikes => '低評価'; - - @override - String get views => '視聴回数'; - - @override - String get streamUrl => '動画の URL'; - - @override - String get stop => '中止'; - - @override - String get sort_newest => '追加日の新しい順に並び替え'; - - @override - String get sort_oldest => '追加日の古い順に並び替え'; - - @override - String get sleep_timer => 'スリープタイマー'; - - @override - String mins(Object minutes) { - return '$minutes 分'; - } - - @override - String hours(Object hours) { - return '$hours 時間'; - } - - @override - String hour(Object hours) { - return '$hours 時間'; - } - - @override - String get custom_hours => '時間を指定'; - - @override - String get logs => 'ログ'; - - @override - String get developers => '開発'; - - @override - String get not_logged_in => 'ログインしていません'; - - @override - String get search_mode => '検索モード'; - - @override - String get audio_source => '音声の提供元'; - - @override - String get ok => 'OK'; - - @override - String get failed_to_encrypt => '暗号化に失敗しました'; - - @override - String get encryption_failed_warning => - 'SpoTubeはデータを安全に保存するために暗号化を用いますが、暗号化に失敗しました。このため、安全でない保存領域への保存に切り替えます\nOSがLinuxなら、gnome-keyring、kde-wallet、keepassxcなどの管理ツールがインストールされていることを確認してください'; - - @override - String get querying_info => '情報を取得中...'; - - @override - String get piped_api_down => 'Piped APIがダウンしています'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Pipedインスタンス $pipedInstance は現在ダウンしています\n\nインスタンスを変更するか、「APIの種類」を公式のYouTube APIに変更してください\n\n変更後にアプリを再起動してください'; - } - - @override - String get you_are_offline => '現在、オフラインです'; - - @override - String get connection_restored => 'インターネット接続が復旧しました'; - - @override - String get use_system_title_bar => 'システムのタイトルバーを使う'; - - @override - String get crunching_results => '結果を処理中...'; - - @override - String get search_to_get_results => '結果を取得するために検索'; - - @override - String get use_amoled_mode => 'AMOLEDモードを使用'; - - @override - String get pitch_dark_theme => 'ピッチブラック ダークテーマ'; - - @override - String get normalize_audio => '音声を正規化'; - - @override - String get change_cover => 'カバーを変更'; - - @override - String get add_cover => 'カバーを追加'; - - @override - String get restore_defaults => '設定を初期化'; - - @override - String get download_music_format => '音楽ダウンロード形式'; - - @override - String get streaming_music_format => '音楽ストリーミング形式'; - - @override - String get download_music_quality => '音楽ダウンロード品質'; - - @override - String get streaming_music_quality => '音楽ストリーミング品質'; - - @override - String get login_with_lastfm => 'Last.fmでログイン'; - - @override - String get connect => '接続'; - - @override - String get disconnect_lastfm => 'Last.fmから切断'; - - @override - String get disconnect => '切断'; - - @override - String get username => 'ユーザー名'; - - @override - String get password => 'パスワード'; - - @override - String get login => 'ログイン'; - - @override - String get login_with_your_lastfm => 'Last.fmアカウントでログイン'; - - @override - String get scrobble_to_lastfm => 'Last.fmにスクロブルする'; - - @override - String get go_to_album => 'アルバムに移動'; - - @override - String get discord_rich_presence => 'Discord リッチプレゼンス'; - - @override - String get browse_all => 'すべてを閲覧'; - - @override - String get genres => 'ジャンル'; - - @override - String get explore_genres => 'ジャンルを探索'; - - @override - String get friends => '友達'; - - @override - String get no_lyrics_available => 'すみません、この曲の歌詞が見つかりません'; - - @override - String get start_a_radio => 'ラジオを開始'; - - @override - String get how_to_start_radio => 'ラジオをどのように開始しますか?'; - - @override - String get replace_queue_question => '現在のキューを置き換えるか、追加しますか?'; - - @override - String get endless_playback => 'エンドレス再生'; - - @override - String get delete_playlist => '再生リストを削除'; - - @override - String get delete_playlist_confirmation => 'この再生リストを削除しますか?'; - - @override - String get local_tracks => '端末内の曲'; - - @override - String get local_tab => '端末内'; - - @override - String get song_link => '曲のリンク'; - - @override - String get skip_this_nonsense => 'こんなことはスキップ'; - - @override - String get freedom_of_music => '“音楽の自由”'; - - @override - String get freedom_of_music_palm => '“音楽の自由を思いのままに”'; - - @override - String get get_started => 'さあ始めましょう'; - - @override - String get youtube_source_description => '推奨され、最適に機能します。'; - - @override - String get piped_source_description => '自由を感じる?YouTubeと同じだけど、はるかに自由です。'; - - @override - String get jiosaavn_source_description => '南アジア地域では最適です。'; - - @override - String get invidious_source_description => 'Pipedに似ていますが、より利用性があります。'; - - @override - String highest_quality(Object quality) { - return '最高品質:$quality'; - } - - @override - String get select_audio_source => '音声の提供元を選択'; - - @override - String get endless_playback_description => 'キューの最後に新しい曲を自動で追加'; - - @override - String get choose_your_region => '地域を選択'; - - @override - String get choose_your_region_description => 'Spotubeがあなたの地域に適したコンテンツを表示します。'; - - @override - String get choose_your_language => '言語を選択してください'; - - @override - String get help_project_grow => 'プロジェクトの成長を支援する'; - - @override - String get help_project_grow_description => - 'SpoTubeはオープンソースプロジェクトです。貢献したり、バグ報告したり、新機能を提案することで、プロジェクトの成長に貢献できます。'; - - @override - String get contribute_on_github => 'GitHubで貢献'; - - @override - String get donate_on_open_collective => 'Open Collectiveで寄付'; - - @override - String get browse_anonymously => '匿名で閲覧する'; - - @override - String get enable_connect => '接続する'; - - @override - String get enable_connect_description => '他の端末からSpotubeを制御する'; - - @override - String get devices => '機器'; - - @override - String get select => '選択'; - - @override - String connect_client_alert(Object client) { - return '$client から操作されています'; - } - - @override - String get this_device => 'この端末'; - - @override - String get remote => 'リモート'; - - @override - String get stats => '統計'; - - @override - String and_n_more(Object count) { - return 'さらに $count 項目'; - } - - @override - String get recently_played => '最近聴いた曲'; - - @override - String get browse_more => 'もっと表示'; - - @override - String get no_title => 'タイトルなし'; - - @override - String get not_playing => '再生なし'; - - @override - String get epic_failure => '壮大なエラー!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length 曲をキューに追加しました'; - } - - @override - String get spotube_has_an_update => 'Spotube の最新版あり'; - - @override - String get download_now => '今すぐダウンロード'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum がリリースされました'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version がリリースされました'; - } - - @override - String get read_the_latest => '最新の '; - - @override - String get release_notes => '更新情報を読む'; - - @override - String get pick_color_scheme => 'カラーテーマを選択'; - - @override - String get save => '保存'; - - @override - String get choose_the_device => '端末を選択:'; - - @override - String get multiple_device_connected => '複数の端末が接続されています。\nこの操作を実行する端末を選択'; - - @override - String get nothing_found => '何も見つかりませんでした'; - - @override - String get the_box_is_empty => 'ボックスは空です'; - - @override - String get top_artists => 'トップアーティスト'; - - @override - String get top_albums => 'トップアルバム'; - - @override - String get this_week => '今週'; - - @override - String get this_month => '今月'; - - @override - String get last_6_months => '過去6か月'; - - @override - String get this_year => '今年'; - - @override - String get last_2_years => '過去2年間'; - - @override - String get all_time => '全期間'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName 提供'; - } - - @override - String get email => 'メール'; - - @override - String get profile_followers => 'フォロワー'; - - @override - String get birthday => '誕生日'; - - @override - String get subscription => '登録'; - - @override - String get not_born => '未出生'; - - @override - String get hacker => 'ハッカー'; - - @override - String get profile => 'プロフィール'; - - @override - String get no_name => '名前なし'; - - @override - String get edit => '編集'; - - @override - String get user_profile => 'ユーザープロフィール'; - - @override - String count_plays(Object count) { - return '$count 回再生'; - } - - @override - String get streaming_fees_hypothetical => 'ストリーミング料金 (概算)'; - - @override - String get minutes_listened => '視聴時間'; - - @override - String get streamed_songs => 'ストリーミングされた曲'; - - @override - String count_streams(Object count) { - return '$count 回のストリーム'; - } - - @override - String get owned_by_you => 'あなたが所有'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl をクリップボードにコピーしました'; - } - - @override - String get hipotetical_calculation => - '*これは、オンライン音楽ストリーミングプラットフォームの1ストリームあたりの平均支払い額である\$0.003〜\$0.005に基づいて計算されています。これは、ユーザーが異なる音楽ストリーミングプラットフォームで曲を聴いた場合に、アーティストにどれだけ支払ったかを把握するための仮説的な計算です。'; - - @override - String count_mins(Object minutes) { - return '$minutes 分'; - } - - @override - String get summary_minutes => '分'; - - @override - String get summary_listened_to_music => '音楽を聴いた'; - - @override - String get summary_songs => '曲'; - - @override - String get summary_streamed_overall => 'まるごと聴いた'; - - @override - String get summary_owed_to_artists => '今月アーティストに払う\nべき額'; - - @override - String get summary_artists => 'アーティスト'; - - @override - String get summary_music_reached_you => 'の音楽が届いた'; - - @override - String get summary_full_albums => 'フルアルバム'; - - @override - String get summary_got_your_love => 'があなたの愛を受け取った'; - - @override - String get summary_playlists => '再生リスト'; - - @override - String get summary_were_on_repeat => 'をリピートしました'; - - @override - String total_money(Object money) { - return '計 $money'; - } - - @override - String get webview_not_found => 'Webviewが見つかりません'; - - @override - String get webview_not_found_description => - '端末にWebviewランタイムがインストールされていません。\nインストールされている場合は、環境変数のパスにあるか確認してください\n\nインストール後、アプリを再起動してください'; - - @override - String get unsupported_platform => '未対応のプラットフォーム'; - - @override - String get cache_music => '音楽をキャッシュ'; - - @override - String get open => '開く'; - - @override - String get cache_folder => 'キャッシュフォルダー'; - - @override - String get export => 'エクスポート'; - - @override - String get clear_cache => 'キャッシュをクリア'; - - @override - String get clear_cache_confirmation => 'キャッシュをクリアしますか?'; - - @override - String get export_cache_files => 'キャッシュされたファイルをエクスポート'; - - @override - String found_n_files(Object count) { - return '$countファイルが見つかりました'; - } - - @override - String get export_cache_confirmation => 'これらのファイルをエクスポートしますか'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported / $filesファイルがエクスポートされました'; - } - - @override - String get undo => '元に戻す'; - - @override - String get download_all => 'すべてダウンロード'; - - @override - String get add_all_to_playlist => 'すべて再生リストに追加'; - - @override - String get add_all_to_queue => 'すべてキューに追加'; - - @override - String get play_all_next => 'すべてを次に再生'; - - @override - String get pause => '一時停止'; - - @override - String get view_all => 'すべて表示'; - - @override - String get no_tracks_added_yet => 'まだ曲を追加していないようです'; - - @override - String get no_tracks => 'ここには曲がないようです'; - - @override - String get no_tracks_listened_yet => 'まだ何も聞いていないようです'; - - @override - String get not_following_artists => 'アーティストをフォローしていません'; - - @override - String get no_favorite_albums_yet => 'まだお気に入りのアルバムを追加していないようです'; - - @override - String get no_logs_found => 'ログなし'; - - @override - String get youtube_engine => 'YouTubeエンジン'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engineはインストールされていません'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engineはシステムにインストールされていません。'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'PATH変数に設定されていることを確認するか\n$engine実行ファイルの絶対パスを下記に設定してください'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/Unix系OSでは、.zshrc/.bashrc/.bash_profileなどでパスを設定しても動作しません。\nシェルの設定ファイルにパスを設定する必要があります'; - - @override - String get download => 'ダウンロード'; - - @override - String get file_not_found => 'ファイルが見つかりません'; - - @override - String get custom => '独自'; - - @override - String get add_custom_url => '独自にURLを追加'; - - @override - String get edit_port => 'ポートを編集'; - - @override - String get port_helper_msg => - '初期設定は-1で、ランダムな番号を示します。ファイアウォールを設定している場合に設定することを推奨します。'; - - @override - String connect_request(Object client) { - return '$clientの接続を許可しますか?'; - } - - @override - String get connection_request_denied => '接続が拒否されました。ユーザーがアクセスを拒否しました。'; - - @override - String get an_error_occurred => 'エラーが発生しました'; - - @override - String get copy_to_clipboard => 'クリップボードにコピー'; - - @override - String get view_logs => 'ログを表示'; - - @override - String get retry => '再試行'; - - @override - String get no_default_metadata_provider_selected => - 'デフォルトのメタデータプロバイダーが設定されていません'; - - @override - String get manage_metadata_providers => 'メタデータプロバイダーを管理'; - - @override - String get open_link_in_browser => 'リンクをブラウザで開きますか?'; - - @override - String get do_you_want_to_open_the_following_link => '次のリンクを開きますか'; - - @override - String get unsafe_url_warning => - '信頼できないソースからのリンクを開くのは安全ではない場合があります。注意してください!\nリンクをクリップボードにコピーすることもできます。'; - - @override - String get copy_link => 'リンクをコピー'; - - @override - String get building_your_timeline => 'あなたの視聴履歴に基づいてタイムラインを作成しています...'; - - @override - String get official => '公式'; - - @override - String author_name(Object author) { - return '作者: $author'; - } - - @override - String get third_party => 'サードパーティ'; - - @override - String get plugin_requires_authentication => 'プラグインには認証が必要です'; - - @override - String get update_available => 'アップデートが利用可能です'; - - @override - String get supports_scrobbling => 'scrobblingに対応'; - - @override - String get plugin_scrobbling_info => 'このプラグインは、あなたの音楽をscrobbleして視聴履歴を生成します。'; - - @override - String get default_metadata_source => 'デフォルトメタデータソース'; - - @override - String get set_default_metadata_source => 'デフォルトメタデータソースを設定'; - - @override - String get default_audio_source => 'デフォルトオーディオソース'; - - @override - String get set_default_audio_source => 'デフォルトオーディオソースを設定'; - - @override - String get set_default => 'デフォルトに設定'; - - @override - String get support => 'サポート'; - - @override - String get support_plugin_development => 'プラグイン開発をサポート'; - - @override - String can_access_name_api(Object name) { - return '- **$name** APIにアクセスできます'; - } - - @override - String get do_you_want_to_install_this_plugin => 'このプラグインをインストールしますか?'; - - @override - String get third_party_plugin_warning => - 'このプラグインはサードパーティのリポジトリからのものです。インストールする前にソースを信頼できるか確認してください。'; - - @override - String get author => '作者'; - - @override - String get this_plugin_can_do_following => 'このプラグインは以下のことができます'; - - @override - String get install => 'インストール'; - - @override - String get install_a_metadata_provider => 'メタデータプロバイダーをインストール'; - - @override - String get no_tracks_playing => '現在再生中のトラックはありません'; - - @override - String get synced_lyrics_not_available => 'この曲の同期歌詞は利用できません。代わりに'; - - @override - String get plain_lyrics => 'シンプルな歌詞'; - - @override - String get tab_instead => 'タブを使用してください。'; - - @override - String get disclaimer => '免責事項'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotubeチームは、いかなる「サードパーティ」プラグインについても責任(法的責任を含む)を負いません。\nご自身の責任でご使用ください。バグや問題については、プラグインリポジトリに報告してください。\n\n「サードパーティ」プラグインが何らかのサービス/法人のToS/DMCAを侵害している場合、その「サードパーティ」プラグインの作者またはホスティングプラットフォーム(例:GitHub/Codeberg)に措置を講じるよう依頼してください。上記に記載されている(「サードパーティ」とラベル付けされた)ものはすべて、パブリック/コミュニティによって維持されているプラグインです。私たちはそれらをキュレーションしていないため、それらに対して措置を講じることはできません。\n\n'; - - @override - String get input_does_not_match_format => '入力が必須フォーマットと一致しません'; - - @override - String get plugins => 'プラグイン'; - - @override - String get paste_plugin_download_url => - 'ダウンロードURL、GitHub/CodebergリポジトリURL、または.smplugファイルへの直接リンクを貼り付けます'; - - @override - String get download_and_install_plugin_from_url => - 'URLからプラグインをダウンロードしてインストール'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'プラグインの追加に失敗しました: $error'; - } - - @override - String get upload_plugin_from_file => 'ファイルからプラグインをアップロード'; - - @override - String get installed => 'インストール済み'; - - @override - String get available_plugins => '利用可能なプラグイン'; - - @override - String get configure_plugins => '独自のメタデータプロバイダーとオーディオソースプラグインを設定'; - - @override - String get audio_scrobblers => 'オーディオスクロッブラー'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'ソース: '; - - @override - String get uncompressed => '非圧縮'; - - @override - String get dab_music_source_description => - 'オーディオファイル向け。高品質/ロスレスオーディオストリームを提供。正確なISRCベースのトラックマッチング。'; -} diff --git a/lib/l10n/generated/app_localizations_ka.dart b/lib/l10n/generated/app_localizations_ka.dart deleted file mode 100644 index c8557037..00000000 --- a/lib/l10n/generated/app_localizations_ka.dart +++ /dev/null @@ -1,1573 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Georgian (`ka`). -class AppLocalizationsKa extends AppLocalizations { - AppLocalizationsKa([String locale = 'ka']) : super(locale); - - @override - String get guest => 'სტუმარი'; - - @override - String get browse => 'ნახვა'; - - @override - String get search => 'ძებნა'; - - @override - String get library => 'ბიბლიოთეკა'; - - @override - String get lyrics => 'ტექსტები'; - - @override - String get settings => 'კონფიგურაციები'; - - @override - String get genre_categories_filter => 'კატეგორიების ან ჟანრების ფილტრი...'; - - @override - String get genre => 'ჟანრი'; - - @override - String get personalized => 'პეერსონალიზებული'; - - @override - String get featured => 'გამორჩეული'; - - @override - String get new_releases => 'ახალი გამოცემები'; - - @override - String get songs => 'სიმღერები'; - - @override - String playing_track(Object track) { - return 'უკრავს $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'ეს გაასუფთავებს მიმდინარე რიგს. $track_length ტრეკი წაიშლება\nᲒინდა გააგრძელო?'; - } - - @override - String get load_more => 'მეტის ჩატვირთვა'; - - @override - String get playlists => 'ფლეილისტები'; - - @override - String get artists => 'არტისტები'; - - @override - String get albums => 'ალბომები'; - - @override - String get tracks => 'ტრეკები'; - - @override - String get downloads => 'ჩამოტვირთვები'; - - @override - String get filter_playlists => 'ფლეილისტების გაფილტვრა...'; - - @override - String get liked_tracks => 'მოწონებული ტრეკები'; - - @override - String get liked_tracks_description => 'ყველა შენი მოწონებული ტრეკი'; - - @override - String get playlist => 'პლეისთი'; - - @override - String get create_a_playlist => 'ფლეილისტის შექმნა'; - - @override - String get update_playlist => 'ფლეილისტის განახლება'; - - @override - String get create => 'შექმნა'; - - @override - String get cancel => 'გაუქმება'; - - @override - String get update => 'განახლება'; - - @override - String get playlist_name => 'ფლეილისტის სახელი'; - - @override - String get name_of_playlist => 'ფლეილისტის სახელი'; - - @override - String get description => 'აღწერა'; - - @override - String get public => 'საჯარო'; - - @override - String get collaborative => 'კოლაბორაციული'; - - @override - String get search_local_tracks => 'ლოცალური ტრეკების ძებნა...'; - - @override - String get play => 'დაკვრა'; - - @override - String get delete => 'წაშლა'; - - @override - String get none => 'არცერთი'; - - @override - String get sort_a_z => 'დალაგება A-Z-ს მიხედვით'; - - @override - String get sort_z_a => 'დალაგება Z-A-ს მიხედვით'; - - @override - String get sort_artist => 'დალაგება არტისტის მიხედვით'; - - @override - String get sort_album => 'დალაგება ალბომის მიხედვით'; - - @override - String get sort_duration => 'დალაგება ხანგრძლივობის მიხედვით'; - - @override - String get sort_tracks => 'ტრეკების დალაგება'; - - @override - String currently_downloading(Object tracks_length) { - return 'მიმდინარეობს ჩამოტვირთვა ($tracks_length)'; - } - - @override - String get cancel_all => 'ყველას გაუქმება'; - - @override - String get filter_artist => 'არტისტების ფილტრი...'; - - @override - String followers(Object followers) { - return '$followers ფოლოვერები'; - } - - @override - String get add_artist_to_blacklist => 'არტისტის შავ სიაში დამატება'; - - @override - String get top_tracks => 'ტოპ ტრეკები'; - - @override - String get fans_also_like => 'ფანებს ასევე მოსწონთ'; - - @override - String get loading => 'იტვირთება...'; - - @override - String get artist => 'არტისტი'; - - @override - String get blacklisted => 'შავ სიაში მყოფი'; - - @override - String get following => 'ფოლოვინგი'; - - @override - String get follow => 'დაფოლოვება'; - - @override - String get artist_url_copied => 'არტისტის ლინკი დაკოპირებულია'; - - @override - String added_to_queue(Object tracks) { - return '$tracks ტრეკი დაემატა რიგში'; - } - - @override - String get filter_albums => 'ალბომების გაფილტვრა...'; - - @override - String get synced => 'სინქრონიზებული'; - - @override - String get plain => 'Plain'; - - @override - String get shuffle => 'რიგის არევა'; - - @override - String get search_tracks => 'ტრეკების ძებნა...'; - - @override - String get released => 'გამოშვებული'; - - @override - String error(Object error) { - return 'შეცდომა $error'; - } - - @override - String get title => 'სათაური'; - - @override - String get time => 'დრო'; - - @override - String get more_actions => 'მეტი მოქმედებები'; - - @override - String download_count(Object count) { - return 'გადმოწერა ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'ფლეილისტში ($count)-ის დამატება'; - } - - @override - String add_count_to_queue(Object count) { - return 'რიგში ($count)-ის დამატება'; - } - - @override - String play_count_next(Object count) { - return 'შემდეგი ($count)-ის დაკვრა'; - } - - @override - String get album => 'ალბომი'; - - @override - String copied_to_clipboard(Object data) { - return '$data დაკოპირებულია'; - } - - @override - String add_to_following_playlists(Object track) { - return 'დაამატე $track ამ ფლეილისტებში'; - } - - @override - String get add => 'დამატება'; - - @override - String added_track_to_queue(Object track) { - return 'რიგში დაემატა $track'; - } - - @override - String get add_to_queue => 'რიგში დამატება'; - - @override - String track_will_play_next(Object track) { - return '$track დაუკრავს შემდეგს'; - } - - @override - String get play_next => 'შემდეგის დაკვრა'; - - @override - String removed_track_from_queue(Object track) { - return 'რიგიდან წაიშალა $track'; - } - - @override - String get remove_from_queue => 'რიგიდან წაშლა'; - - @override - String get remove_from_favorites => 'ფავორიტებიდან წაშლა'; - - @override - String get save_as_favorite => 'ფავორიტებში დამატება'; - - @override - String get add_to_playlist => 'ფლეილისტში დამატება'; - - @override - String get remove_from_playlist => 'ფლეილისტიდან წაშლა'; - - @override - String get add_to_blacklist => 'შავ სიაში დამატება'; - - @override - String get remove_from_blacklist => 'შავი სიიდან წაშლა'; - - @override - String get share => 'გაზიარება'; - - @override - String get mini_player => 'მინი დამკვრელი'; - - @override - String get slide_to_seek => 'გადახვევისთვის გაასრიალეთ წინ ან უკან'; - - @override - String get shuffle_playlist => 'ფლეილისტის არევა'; - - @override - String get unshuffle_playlist => 'ფლეილისტის დალაგება'; - - @override - String get previous_track => 'წინა ტრეკი'; - - @override - String get next_track => 'შემდეგი ტრეკი'; - - @override - String get pause_playback => 'დაკვრის გაჩერება'; - - @override - String get resume_playback => 'დაკვრის გაგრძელება'; - - @override - String get loop_track => 'ტრეკის ლუპზე დაკვრა'; - - @override - String get no_loop => 'არ არის ციკლი'; - - @override - String get repeat_playlist => 'ფლეილისტის გამეორება'; - - @override - String get queue => 'რიგი'; - - @override - String get alternative_track_sources => 'ალტერნატიული ტრეკების წყაროები'; - - @override - String get download_track => 'გადმოწერე ტრეკი'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks ტრეკი რიგში'; - } - - @override - String get clear_all => 'ყველას წაშლა'; - - @override - String get show_hide_ui_on_hover => 'UI-ის ჩვენება/დამალვა ჰოვერზე'; - - @override - String get always_on_top => 'ტოველთვის ზემოდან'; - - @override - String get exit_mini_player => 'მინი დამკვრელიდან გამოსვლა'; - - @override - String get download_location => 'ჩამოტვირთვის მდებარეობა'; - - @override - String get local_library => 'ადგილობრივი ბიბლიოთეკა'; - - @override - String get add_library_location => 'ბიბლიოთეკაში დამატება'; - - @override - String get remove_library_location => 'ბიბლიოთეკიდან წაშლა'; - - @override - String get account => 'ანგარიში'; - - @override - String get logout => 'გასვლა'; - - @override - String get logout_of_this_account => 'ანგარიშიდან გასვლა'; - - @override - String get language_region => 'ენა და რეგიონი'; - - @override - String get language => 'ენა'; - - @override - String get system_default => 'სისტემის ნაგულისხმევი'; - - @override - String get market_place_region => 'მარკეტფლეისის რეგიონი'; - - @override - String get recommendation_country => 'რეკომენდირებული ქვეყანა'; - - @override - String get appearance => 'გარეგნობა'; - - @override - String get layout_mode => 'განლაგების რეჟიმი'; - - @override - String get override_layout_settings => - 'რესფონსივ განლაგების რეჟიმის კონფიგურაციაზე გადაწერა'; - - @override - String get adaptive => 'ადაპტირებული'; - - @override - String get compact => 'კომპაქტური'; - - @override - String get extended => 'გაფართოებული'; - - @override - String get theme => 'თემა'; - - @override - String get dark => 'ბნელი'; - - @override - String get light => 'ღია'; - - @override - String get system => 'სისტემის'; - - @override - String get accent_color => 'აქცენტის ფერი'; - - @override - String get sync_album_color => 'ალბომის ფერის სინქრონიზაცია'; - - @override - String get sync_album_color_description => - 'დომინანტური ალბომის ფერის აქცენტის ფერად გამოყენება'; - - @override - String get playback => 'დაკვრა'; - - @override - String get audio_quality => 'აუდიოს ხარისხი'; - - @override - String get high => 'მაღალი'; - - @override - String get low => 'დაბალი'; - - @override - String get pre_download_play => 'წინასწარ ჩამოტვირთვა და დაკვრა'; - - @override - String get pre_download_play_description => - 'აუდიოს სტრიმინგის ნაცვლად, ბაიტების ჩამოტვირთვა და დაკვრა (რეკომენდებულია უფრო მაღალი გამტარუნარიანობის მომხმარებლებისთვის)'; - - @override - String get skip_non_music => - 'არა მუსიკალური ნაწილის გამოტოვება (სპონსორის ბლოკი)'; - - @override - String get blacklist_description => 'შავ სიაში მყოფი არტისტები და ტრეკები'; - - @override - String get wait_for_download_to_finish => - 'გთხოვთ, დაელოდოთ მიმდინარე ჩამოტვირთვის დასრულებას'; - - @override - String get desktop => 'დესკტოპი'; - - @override - String get close_behavior => 'დახურვის ქცევა'; - - @override - String get close => 'დახურვა'; - - @override - String get minimize_to_tray => 'მინიმიზაცია'; - - @override - String get show_tray_icon => 'სისტემის აიკონის ჩვენება'; - - @override - String get about => 'ჩვენს შესახებ'; - - @override - String get u_love_spotube => 'We know you love Spotube'; - - @override - String get check_for_updates => 'განახლებების შემოწმება'; - - @override - String get about_spotube => 'Spotube-ს შესახებ'; - - @override - String get blacklist => 'შავი სია'; - - @override - String get please_sponsor => 'გთხოვთ დაგვასპონსოროთ'; - - @override - String get spotube_description => - 'Spotube, a lightweight, cross-platform, free-for-all spotify client'; - - @override - String get version => 'ვერსია'; - - @override - String get build_number => 'Build Number'; - - @override - String get founder => 'დამფუძნებელი'; - - @override - String get repository => 'რეპოზიტორია'; - - @override - String get bug_issues => 'Bug+Issues'; - - @override - String get made_with => 'Made with ❤️ in Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'ლიცენზია'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'არ ინერვიულოთ, თქვენი მონაცემები არ იქნება შეგროვებული ან გაზიარებული ვინმესთან'; - - @override - String get know_how_to_login => 'არ იცით როგორ გააკეთოთ ეს?'; - - @override - String get follow_step_by_step_guide => - 'მიჰყევით ნაბიჯ-ნაბიჯ სახელმძღვანელოს'; - - @override - String cookie_name_cookie(Object name) { - return '$name ქუქი'; - } - - @override - String get fill_in_all_fields => 'გთხოვთ შეავსოთ ყველა ველი'; - - @override - String get submit => 'გაგზავნა'; - - @override - String get exit => 'გამოსვლა'; - - @override - String get previous => 'წინა'; - - @override - String get next => 'შემდეგი'; - - @override - String get done => 'მზადაა'; - - @override - String get step_1 => 'ნაბიჯი 1'; - - @override - String get first_go_to => 'პირველი, გადადით'; - - @override - String get something_went_wrong => 'Რაღაც არასწორად წავიდა'; - - @override - String get piped_instance => 'Piped Server Instance'; - - @override - String get piped_description => - 'The Piped server instance to use for track matching'; - - @override - String get piped_warning => 'ზოგიერთი მათგანმა შეიძლება კარგად არ იმუშაოს. '; - - @override - String get invidious_instance => 'Invidious სერვერის ინსტანცია'; - - @override - String get invidious_description => - 'Invidious სერვერის ინსტანცია, რომელიც გამოიყენება ტრეკის შესატყვისად'; - - @override - String get invidious_warning => - 'ზოგიერთი შეიძლება კარგად არ მუშაობდეს. გამოიყენეთ თქვენს პასუხისმგებლობაზე'; - - @override - String get generate => 'გააგენერირეთ'; - - @override - String track_exists(Object track) { - return 'ტრეკი $track უკვე არსებობს'; - } - - @override - String get replace_downloaded_tracks => 'ყველა ჩამოტვირთული ტრეკის შეცვლა'; - - @override - String get skip_download_tracks => 'ყველა ჩამოტვირთული ტრეკის გამოტოვება'; - - @override - String get do_you_want_to_replace => 'გსურთ შეცვალოთ არსებული ტრეკი??'; - - @override - String get replace => 'შეცვლა'; - - @override - String get skip => 'გამოტოვება'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'აირჩიე $count-მდე $type'; - } - - @override - String get select_genres => 'ჟანრების არჩევა'; - - @override - String get add_genres => 'ჟანრების დამატება'; - - @override - String get country => 'ქვეყანა'; - - @override - String get number_of_tracks_generate => 'დასაგენერირებელი ტრეკების რაოდენობა'; - - @override - String get acousticness => 'Acousticness'; - - @override - String get danceability => 'Danceability'; - - @override - String get energy => 'Energy'; - - @override - String get instrumentalness => 'Instrumentalness'; - - @override - String get liveness => 'Liveness'; - - @override - String get loudness => 'Loudness'; - - @override - String get speechiness => 'Speechiness'; - - @override - String get valence => 'Valence'; - - @override - String get popularity => 'Popularity'; - - @override - String get key => 'Key'; - - @override - String get duration => 'Duration (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'Time Signature'; - - @override - String get short => 'Short'; - - @override - String get medium => 'საშუალო'; - - @override - String get long => 'გრძელი'; - - @override - String get min => 'მინიმალური'; - - @override - String get max => 'მაქსიმალური'; - - @override - String get target => 'სამიზნე'; - - @override - String get moderate => 'საშუალო'; - - @override - String get deselect_all => 'ყველა მონიშვნის გაუქმება'; - - @override - String get select_all => 'ყველას მონიშვნა'; - - @override - String get are_you_sure => 'Დარწმუნებული ხართ?'; - - @override - String get generating_playlist => - 'მიმდინარეობს თქვენი მორგებული ფლეილისტის გენერირება...'; - - @override - String selected_count_tracks(Object count) { - return 'არჩეულია $count ტრეკი'; - } - - @override - String get download_warning => - 'If you download all Tracks at bulk you\'re clearly pirating Music & causing damage to the creative society of Music. I hope you are aware of this. Always, try respecting & supporting Artist\'s hard work'; - - @override - String get download_ip_ban_warning => - 'BTW, your IP can get blocked on YouTube due excessive download requests than usual. IP block means you can\'t use YouTube (even if you\'re logged in) for at least 2-3 months from that IP device. And Spotube doesn\'t hold any responsibility if this ever happens'; - - @override - String get by_clicking_accept_terms => - 'By clicking \'accept\' you agree to following terms:'; - - @override - String get download_agreement_1 => 'I know I\'m pirating Music. I\'m bad'; - - @override - String get download_agreement_2 => - 'I\'ll support the Artist wherever I can and I\'m only doing this because I don\'t have money to buy their art'; - - @override - String get download_agreement_3 => - 'I\'m completely aware that my IP can get blocked on YouTube & I don\'t hold Spotube or his owners/contributors responsible for any accidents caused by my current action'; - - @override - String get decline => 'უარყოფა'; - - @override - String get accept => 'დათანხმება'; - - @override - String get details => 'დეტალები'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Channel'; - - @override - String get likes => 'მოწონებები'; - - @override - String get dislikes => 'არ მოწონებები'; - - @override - String get views => 'ნახვები'; - - @override - String get streamUrl => 'სტრიმის ლინკი'; - - @override - String get stop => 'გაჩერება'; - - @override - String get sort_newest => 'ფალაგება სიახლის მიხედიტ'; - - @override - String get sort_oldest => 'დალაგება სიძველის მიხედვით'; - - @override - String get sleep_timer => 'ძილის ტაიმერი'; - - @override - String mins(Object minutes) { - return '$minutes წუთი'; - } - - @override - String hours(Object hours) { - return '$hours საათი'; - } - - @override - String hour(Object hours) { - return '$hours საათი'; - } - - @override - String get custom_hours => 'მორგებული საათები'; - - @override - String get logs => 'ლოგები'; - - @override - String get developers => 'დეველოპერები'; - - @override - String get not_logged_in => 'არ ხარ დალოგინებული'; - - @override - String get search_mode => 'ძებნის რეჟიმი'; - - @override - String get audio_source => 'აუდიოს წყარო'; - - @override - String get ok => 'ოკ'; - - @override - String get failed_to_encrypt => 'დაშიფვრა ვერ მოხერხდა'; - - @override - String get encryption_failed_warning => - 'Spotube uses encryption to securely store your data. But failed to do so. So it\'ll fallback to insecure storage\nIf you\'re using linux, please make sure you\'ve any secret-service (gnome-keyring, kde-wallet, keepassxc etc) installed'; - - @override - String get querying_info => 'Querying info...'; - - @override - String get piped_api_down => 'Piped API is down'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'The Piped instance $pipedInstance is currently down\n\nEither change the instance or change the \'API type\' to official YouTube API\n\nMake sure to restart the app after change'; - } - - @override - String get you_are_offline => 'ამჟამად ხაზგარეშე ხართ'; - - @override - String get connection_restored => 'თქვენი ინტერნეტ კავშირი აღდგა'; - - @override - String get use_system_title_bar => 'სისტემის სათაურის ზოლის გამოყენება'; - - @override - String get crunching_results => 'იტვირთება შედეგები...'; - - @override - String get search_to_get_results => 'მოძებნეთ შედეგების მისაღებად'; - - @override - String get use_amoled_mode => 'Pitch black dark theme'; - - @override - String get pitch_dark_theme => 'AMOLED Mode'; - - @override - String get normalize_audio => 'აუდიოს ნორმალიზება'; - - @override - String get change_cover => 'Ქავერის შეცვლა'; - - @override - String get add_cover => 'Ქავერის ფოტოს დამატება'; - - @override - String get restore_defaults => 'ნაგულისხმევი პარამეტრების აღდგენა'; - - @override - String get download_music_format => 'მუსიკის ჩამოტვირთვის ფორმატი'; - - @override - String get streaming_music_format => 'სტრიმინგის მუსიკის ფორმატი'; - - @override - String get download_music_quality => 'ჩამოტვირთვის ხარისხი'; - - @override - String get streaming_music_quality => 'სტრიმინგის ხარისხი'; - - @override - String get login_with_lastfm => 'Last.fm-ით შესვლა'; - - @override - String get connect => 'დაკავშირება'; - - @override - String get disconnect_lastfm => 'Last.fm-იდან გამოსვლა'; - - @override - String get disconnect => 'გამოსვლა'; - - @override - String get username => 'მომხმარებელი'; - - @override - String get password => 'პაროლი'; - - @override - String get login => 'შესვლა'; - - @override - String get login_with_your_lastfm => 'Last.fm ანგარიშით შესვლა'; - - @override - String get scrobble_to_lastfm => 'Scrobble to Last.fm'; - - @override - String get go_to_album => 'ალბომზე გადასვლა'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'ყველას ნახვა'; - - @override - String get genres => 'ჟანრები'; - - @override - String get explore_genres => 'შეისწავლეთ ჟანრები'; - - @override - String get friends => 'მეგობრები'; - - @override - String get no_lyrics_available => - 'უკაცრავად, ამ ტრეკისთვის ტექსტის პოვნა შეუძლებელია'; - - @override - String get start_a_radio => 'რადიოს ჩართვა'; - - @override - String get how_to_start_radio => 'როგორ გნებავთ რადიოს ჩართვა?'; - - @override - String get replace_queue_question => - 'გნებავთ ჩაანაცვლოთ არსებული რიგი თუ დაამატოთ მასზე?'; - - @override - String get endless_playback => 'დაუსრულებელი დაკვრა'; - - @override - String get delete_playlist => 'ფლეილისტის წაშლა'; - - @override - String get delete_playlist_confirmation => - 'დარწმუნებული ხართ რომ გნებავთ ფლეილისტის წაშლა?'; - - @override - String get local_tracks => 'ლოკალური ტრეკები'; - - @override - String get local_tab => 'ადგილობრივი'; - - @override - String get song_link => 'ტრეკის ლინკი'; - - @override - String get skip_this_nonsense => 'ამ სისულელის გამოტოვება'; - - @override - String get freedom_of_music => '“მუსიკის თავისუფლება”'; - - @override - String get freedom_of_music_palm => '“მუსიკის თავისუფლება შენს ხელის გულზე”'; - - @override - String get get_started => 'დავიწყოთ'; - - @override - String get youtube_source_description => - 'რეკომენდებულია და მუშაობს საუკეთესოდ.'; - - @override - String get piped_source_description => - 'თავისუფლად გრძნობთ თავს? იგივეა, რაც YouTube, მაგრამ ბევრი თავისუფალი.'; - - @override - String get jiosaavn_source_description => - 'საუკეთესოა სამხრეთ აზიის რეგიონისთვის.'; - - @override - String get invidious_source_description => - 'მსგავსია Piped-ის, მაგრამ მაღალი ხელმისაწვდომობით.'; - - @override - String highest_quality(Object quality) { - return 'საუკეთესო ხარისხი: $quality'; - } - - @override - String get select_audio_source => 'აუდიოს წყაროს არჩევა'; - - @override - String get endless_playback_description => - 'ახალი სიმთერების ავტომატურად რიგის ბოლოში დამატება'; - - @override - String get choose_your_region => 'აირჩიე შენი რეგიონი'; - - @override - String get choose_your_region_description => - 'This will help Spotube show you the right content\nfor your location.'; - - @override - String get choose_your_language => 'აირჩიე ენა'; - - @override - String get help_project_grow => 'დაეხმარეთ ამ პროექტს განვითარებაში'; - - @override - String get help_project_grow_description => - 'Spotube is an open-source project. You can help this project grow by contributing to the project, reporting bugs, or suggesting new features.'; - - @override - String get contribute_on_github => 'GitHub-ზე კონტრიბუცია'; - - @override - String get donate_on_open_collective => 'Open Collective-ზე დონაცია'; - - @override - String get browse_anonymously => 'ანონიმურად ნახვა'; - - @override - String get enable_connect => 'დაკავშირების ჩართვა'; - - @override - String get enable_connect_description => - 'აკონტროლე Spotube სხვა მოწყობილობებიდან'; - - @override - String get devices => 'მოწყობილობები'; - - @override - String get select => 'არჩევა'; - - @override - String connect_client_alert(Object client) { - return 'თქვენ კონტროლირებული ხართ $client მოწყობილობით'; - } - - @override - String get this_device => 'ეს მოწყობილობა'; - - @override - String get remote => 'დისტანციური'; - - @override - String get stats => 'სტატისტიკა'; - - @override - String and_n_more(Object count) { - return 'და $count მეტი'; - } - - @override - String get recently_played => 'მიუწვდელი'; - - @override - String get browse_more => 'დაიცალეთ მეტი'; - - @override - String get no_title => 'არ აქვს სათაური'; - - @override - String get not_playing => 'არ ერთვის'; - - @override - String get epic_failure => 'ეპიკური მარცხი!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'დამატებული $tracks_length ტრეკი რიგში'; - } - - @override - String get spotube_has_an_update => 'Spotube-ს აქვს განახლება'; - - @override - String get download_now => 'ჩამოტვირთეთ ახლავე'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum გამოშვებულია'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version გამოშვებულია'; - } - - @override - String get read_the_latest => 'წაიკითხეთ უახლესი '; - - @override - String get release_notes => 'გამოშვების შენიშვნები'; - - @override - String get pick_color_scheme => 'აირჩიეთ ფერის სქემა'; - - @override - String get save => 'შეინახეთ'; - - @override - String get choose_the_device => 'აირჩიეთ მოწყობილობა:'; - - @override - String get multiple_device_connected => - 'დაკავშირებულია რამდენიმე მოწყობილობა.\nაირჩიეთ მოწყობილობა, რომელზეც უნდა განხორციელდეს ეს მოქმედება'; - - @override - String get nothing_found => 'არაფერი მოიძებნა'; - - @override - String get the_box_is_empty => 'კვადრატია ცარიელი'; - - @override - String get top_artists => 'ტოპ არტისტები'; - - @override - String get top_albums => 'ტოპ ალბომები'; - - @override - String get this_week => 'ამ კვირას'; - - @override - String get this_month => 'ამ თვეში'; - - @override - String get last_6_months => 'ბოლო 6 თვე'; - - @override - String get this_year => 'ამ წელს'; - - @override - String get last_2_years => 'ბოლო 2 წელი'; - - @override - String get all_time => 'ყველა დრო'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName-ით გაწვდილი'; - } - - @override - String get email => 'ელ. ფოსტა'; - - @override - String get profile_followers => 'გამყვანები'; - - @override - String get birthday => 'დაბადების დღე'; - - @override - String get subscription => 'გამოწერა'; - - @override - String get not_born => 'არ დაბადებულა'; - - @override - String get hacker => 'ჰაკერი'; - - @override - String get profile => 'პროფილი'; - - @override - String get no_name => 'არ არის სახელი'; - - @override - String get edit => 'რედაქტირება'; - - @override - String get user_profile => 'მომხმარებლის პროფილი'; - - @override - String count_plays(Object count) { - return '$count გაწვდვა'; - } - - @override - String get streaming_fees_hypothetical => - '*ეს рассчитывается на основе выплат за поток от Spotify\nот \$0.003 до \$0.005. ეს ჰიპოთეტური გამოთვლა იძლევა მომხმარებელს წარმოდგენას იმაზე, რამდენად\nგადახდილი იქნებოდა არტისტებისთვის, თუ მათ მოუსმინოს Spotify-ს ტრეკებს.'; - - @override - String get minutes_listened => 'წუთები მოუსმინეს'; - - @override - String get streamed_songs => 'სტრიმირებული სიმღერები'; - - @override - String count_streams(Object count) { - return '$count სტრიმი'; - } - - @override - String get owned_by_you => 'შენ მიერ საკუთრებული'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl აიღო კლიპბორდზე'; - } - - @override - String get hipotetical_calculation => - '*ეს გამოითვლება ონლაინ მუსიკალური სტრიმინგის პლატფორმების საშუალო ანაზღაურების საფუძველზე, რომელიც შეადგენს \$0.003-დან \$0.005-მდე. ეს არის ჰიპოთეტური გაანგარიშება, რომელიც მომხმარებელს აძლევს წარმოდგენას, თუ რამდენს გადაუხდიდნენ ისინი არტისტებს, თუ მათ სიმღერებს მოუსმენდნენ სხვადასხვა მუსიკალურ სტრიმინგ პლატფორმაზე.'; - - @override - String count_mins(Object minutes) { - return '$minutes წუთი'; - } - - @override - String get summary_minutes => 'წუთები'; - - @override - String get summary_listened_to_music => 'მუსიკა გაწვდილი'; - - @override - String get summary_songs => 'მელოდია'; - - @override - String get summary_streamed_overall => 'გაწვდილი საერთო'; - - @override - String get summary_owed_to_artists => 'გადასახადი არტისტებს\nამ თვეში'; - - @override - String get summary_artists => 'არტისტების'; - - @override - String get summary_music_reached_you => 'მუსიკა ჩაგივარდა'; - - @override - String get summary_full_albums => 'სრული ალბომები'; - - @override - String get summary_got_your_love => 'მოსულა თქვენი სიყვარული'; - - @override - String get summary_playlists => 'პლეილისტები'; - - @override - String get summary_were_on_repeat => 'გადაწვდილი იყო'; - - @override - String total_money(Object money) { - return 'მთლიანი $money'; - } - - @override - String get webview_not_found => 'ვებვიუ ვერ მოიძებნა'; - - @override - String get webview_not_found_description => - 'თქვენს მოწყობილობაზე ვებვიუის შესრულების დრო არ არის დაყენებული.\nთუ დაყენებულია, დარწმუნდით, რომ ის environment PATH-შია\n\nდაყენების შემდეგ, გადატვირთეთ აპი'; - - @override - String get unsupported_platform => 'მოუხერხებელი პლატფორმა'; - - @override - String get cache_music => 'მუსიკის ქეში'; - - @override - String get open => 'გახსენით'; - - @override - String get cache_folder => 'ქეშის საქაღალდე'; - - @override - String get export => 'ექსპორტი'; - - @override - String get clear_cache => 'ქეშის გასუფთავება'; - - @override - String get clear_cache_confirmation => 'გსურთ ქეშის გასუფთავება?'; - - @override - String get export_cache_files => 'ქეშირებული ფაილების ექსპორტი'; - - @override - String found_n_files(Object count) { - return 'ნაპოვნია $count ფაილი'; - } - - @override - String get export_cache_confirmation => 'გსურთ ამ ფაილების ექსპორტი'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported ფაილი $files-დან ექსპორტირებულია'; - } - - @override - String get undo => 'დაბრუნება'; - - @override - String get download_all => 'ყველას ჩამოტვირთვა'; - - @override - String get add_all_to_playlist => 'ყველა დაამატეთ პლეისთში'; - - @override - String get add_all_to_queue => 'ყველა დაამატეთ რიგში'; - - @override - String get play_all_next => 'ყველა შემდეგ ითამაშე'; - - @override - String get pause => 'შეჩერება'; - - @override - String get view_all => 'ყველა ნახვა'; - - @override - String get no_tracks_added_yet => - 'გაჩნდება რომ ჯერ არ გაქვთ დამატებული ტრეკები'; - - @override - String get no_tracks => 'გავლებული არ ჩანს არ არსებობს ტრეკები'; - - @override - String get no_tracks_listened_yet => - 'გქონდეთ გრძნობა, რომ ჯერ არაფერი უსმენია'; - - @override - String get not_following_artists => 'არ მიჰყვებით რომელიმე არტისტს'; - - @override - String get no_favorite_albums_yet => - 'გაჩნდება რომ ჯერ არ გაქვთ დამატებული ალბომები თქვენს ფავორიტებში'; - - @override - String get no_logs_found => 'ჩაწერები ვერ მოიძებნა'; - - @override - String get youtube_engine => 'YouTube ძრავა'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine არ არის ინსტალირებული'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine არ არის ინსტალირებული თქვენს სისტემაში.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'დარწმუნდით, რომ ის ხელმისაწვდომია PATH ცვლადში ან\nდაუყავით $engine პროგრამის ფაილის სრული გზა'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/Unix მსგავსი ოპერაციული სისტემებში, .zshrc/.bashrc/.bash_profile-ით პათის დაყენება ვერ იმუშავებს.\nთქვენ უნდა დააყენოთ პათი შელ ფაილში'; - - @override - String get download => 'ჩამოტვირთვა'; - - @override - String get file_not_found => 'ფაილი ვერ მოიძებნა'; - - @override - String get custom => 'პერსონალიზირებული'; - - @override - String get add_custom_url => 'დამატება პერსონალური URL'; - - @override - String get edit_port => 'პორტის რედაქტირება'; - - @override - String get port_helper_msg => - 'ნაგულისხმევი არის -1, რაც შემთხვევითი ნომრის მითითებას ნიშნავს. თუ لديك firewall настроен, рекомендуется установить это.'; - - @override - String connect_request(Object client) { - return '$client-ის დაკავშირების ნებართვა?'; - } - - @override - String get connection_request_denied => - 'კავშირი უარყოფილია. მომხმარებელმა უარყო წვდომა.'; - - @override - String get an_error_occurred => 'მოხდა შეცდომა'; - - @override - String get copy_to_clipboard => 'კოპირება ბუფერში'; - - @override - String get view_logs => 'იხილეთ ჟურნალები'; - - @override - String get retry => 'ხელახლა ცდა'; - - @override - String get no_default_metadata_provider_selected => - 'თქვენ არ გაქვთ დაყენებული ნაგულისხმევი მეტამონაცემების პროვაიდერი'; - - @override - String get manage_metadata_providers => - 'მეტამონაცემების პროვაიდერების მართვა'; - - @override - String get open_link_in_browser => 'ბმულის გახსნა ბრაუზერში?'; - - @override - String get do_you_want_to_open_the_following_link => - 'გსურთ გახსნათ შემდეგი ბმული'; - - @override - String get unsafe_url_warning => - 'შეიძლება სახიფათო იყოს ბმულების გახსნა უნდობელი წყაროებიდან. იყავით ფრთხილად!\nასევე შეგიძლიათ დააკოპიროთ ბმული თქვენს ბუფერში.'; - - @override - String get copy_link => 'ბმულის კოპირება'; - - @override - String get building_your_timeline => - 'თქვენი დროის ხაზის აგება თქვენი მოსმენების საფუძველზე...'; - - @override - String get official => 'ოფიციალური'; - - @override - String author_name(Object author) { - return 'ავტორი: $author'; - } - - @override - String get third_party => 'მესამე მხარის'; - - @override - String get plugin_requires_authentication => - 'პლაგინი საჭიროებს ავთენტიფიკაციას'; - - @override - String get update_available => 'განახლება ხელმისაწვდომია'; - - @override - String get supports_scrobbling => 'მხარს უჭერს სქრობლინგს'; - - @override - String get plugin_scrobbling_info => - 'ეს პლაგინი აწარმოებს თქვენი მუსიკის სქრობლინგს, რათა შექმნას თქვენი მოსმენის ისტორია.'; - - @override - String get default_metadata_source => 'ნაგულისხმევი მეტამონაცემების წყარო'; - - @override - String get set_default_metadata_source => - 'ნაგულისხმევი მეტამონაცემების წყაროს დაყენება'; - - @override - String get default_audio_source => 'ნაგულისხმევი აუდიო წყარო'; - - @override - String get set_default_audio_source => 'ნაგულისხმევი აუდიო წყაროს დაყენება'; - - @override - String get set_default => 'ნაგულისხმევად დაყენება'; - - @override - String get support => 'მხარდაჭერა'; - - @override - String get support_plugin_development => 'პლაგინის განვითარების მხარდაჭერა'; - - @override - String can_access_name_api(Object name) { - return '- შეუძლია წვდომა **$name** API-ზე'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'გსურთ ამ პლაგინის დაყენება?'; - - @override - String get third_party_plugin_warning => - 'ეს პლაგინი არის მესამე მხარის საცავიდან. გთხოვთ, დარწმუნდეთ, რომ ენდობით წყაროს დაყენებამდე.'; - - @override - String get author => 'ავტორი'; - - @override - String get this_plugin_can_do_following => - 'ამ პლაგინს შეუძლია შემდეგის გაკეთება'; - - @override - String get install => 'დაყენება'; - - @override - String get install_a_metadata_provider => - 'დააყენეთ მეტამონაცემების პროვაიდერი'; - - @override - String get no_tracks_playing => 'ამჟამად არ უკრავს არცერთი ტრეკი'; - - @override - String get synced_lyrics_not_available => - 'ამ სიმღერისთვის სინქრონიზებული ტექსტები არ არის ხელმისაწვდომი. გთხოვთ, გამოიყენოთ'; - - @override - String get plain_lyrics => 'მარტივი ტექსტები'; - - @override - String get tab_instead => 'ჩანართი, სანაცვლოდ.'; - - @override - String get disclaimer => 'პასუხისმგებლობის უარყოფა'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube-ის გუნდი არ იღებს პასუხისმგებლობას (მათ შორის, იურიდიულს) არცერთ \"მესამე მხარის\" პლაგინზე.\nგთხოვთ, გამოიყენოთ ისინი თქვენი რისკის ქვეშ. ნებისმიერი ხარვეზის/პრობლემის შესახებ შეატყობინეთ პლაგინის საცავს.\n\nთუ რომელიმე \"მესამე მხარის\" პლაგინი არღვევს რაიმე სერვისის/იურიდიული პირის ToS/DMCA-ს, გთხოვთ, სთხოვეთ \"მესამე მხარის\" პლაგინის ავტორს ან ჰოსტინგის პლატფორმას, მაგალითად GitHub/Codeberg, მიიღოს ზომები. ზემოთ ჩამოთვლილი (\"მესამე მხარის\" ეტიკეტის მქონე) ყველა არის საჯარო/საზოგადოების მიერ შენარჩუნებული პლაგინები. ჩვენ მათ არ ვაკონტროლებთ, ამიტომ არ შეგვიძლია მათზე რაიმე ზომების მიღება.\n\n'; - - @override - String get input_does_not_match_format => - 'შეყვანა არ ემთხვევა საჭირო ფორმატს'; - - @override - String get plugins => 'პლაგინები'; - - @override - String get paste_plugin_download_url => - 'ჩასვით ჩამოტვირთვის url ან GitHub/Codeberg-ის რეპოს url ან პირდაპირი ბმული .smplug ფაილზე'; - - @override - String get download_and_install_plugin_from_url => - 'პლაგინის ჩამოტვირთვა და დაყენება url-დან'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'პლაგინის დამატება ვერ მოხერხდა: $error'; - } - - @override - String get upload_plugin_from_file => 'პლაგინის ატვირთვა ფაილიდან'; - - @override - String get installed => 'დაინსტალირებული'; - - @override - String get available_plugins => 'ხელმისაწვდომი პლაგინები'; - - @override - String get configure_plugins => - 'თქვენი საკუთარი მეტამონაცემებისა და აუდიო წყაროს პლაგინების კონფიგურაცია'; - - @override - String get audio_scrobblers => 'აუდიო სქრობლერები'; - - @override - String get scrobbling => 'სქრობლინგი'; - - @override - String get source => 'წყარო: '; - - @override - String get uncompressed => 'შეუკუმშავი'; - - @override - String get dab_music_source_description => - 'აუდიოფილებისთვის. უზრუნველყოფს მაღალი ხარისხის/უკომპრესო აუდიო სტრიმებს. ზუსტი შესაბამისობა ISRC-ის მიხედვით.'; -} diff --git a/lib/l10n/generated/app_localizations_ko.dart b/lib/l10n/generated/app_localizations_ko.dart deleted file mode 100644 index 42ea337a..00000000 --- a/lib/l10n/generated/app_localizations_ko.dart +++ /dev/null @@ -1,1538 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Korean (`ko`). -class AppLocalizationsKo extends AppLocalizations { - AppLocalizationsKo([String locale = 'ko']) : super(locale); - - @override - String get guest => '게스트'; - - @override - String get browse => '찾아보기'; - - @override - String get search => '검색'; - - @override - String get library => '라이브러리'; - - @override - String get lyrics => '가사'; - - @override - String get settings => '설정'; - - @override - String get genre_categories_filter => '카테고리 혹은 장르별로 불러오기'; - - @override - String get genre => '장르'; - - @override - String get personalized => '맞춤 추천'; - - @override - String get featured => '인기'; - - @override - String get new_releases => '신곡'; - - @override - String get songs => '노래'; - - @override - String playing_track(Object track) { - return '$track 을 재생'; - } - - @override - String queue_clear_alert(Object track_length) { - return '현재 재생 대기열을 없앱니다。$track_length 곡이 제거됩니다。\n계속 진행할까요?'; - } - - @override - String get load_more => '더 불러오기'; - - @override - String get playlists => '플레이리스트'; - - @override - String get artists => '아티스트'; - - @override - String get albums => '앨범'; - - @override - String get tracks => '곡'; - - @override - String get downloads => '다운로드한 곡'; - - @override - String get filter_playlists => '플레이리스트를 필터링'; - - @override - String get liked_tracks => '좋아하는 곡'; - - @override - String get liked_tracks_description => '좋아요를 남긴 곡들'; - - @override - String get playlist => '재생 목록'; - - @override - String get create_a_playlist => '플레이리스트를 생성'; - - @override - String get update_playlist => '플레이리스트를 업데이트'; - - @override - String get create => '생성'; - - @override - String get cancel => '취소'; - - @override - String get update => '업데이트'; - - @override - String get playlist_name => '플레이리스트명'; - - @override - String get name_of_playlist => '플레이리스트의 이름'; - - @override - String get description => '설명'; - - @override - String get public => '공개'; - - @override - String get collaborative => '공유 플레이리스트'; - - @override - String get search_local_tracks => '기기에 저장된 곡을 검색하기'; - - @override - String get play => '재생'; - - @override - String get delete => '삭제'; - - @override - String get none => '없음'; - - @override - String get sort_a_z => 'A-Z 순으로 정렬'; - - @override - String get sort_z_a => 'Z-A 순으로 정렬'; - - @override - String get sort_artist => '아티스트 순으로 정렬'; - - @override - String get sort_album => '앨범 순으로 정렬'; - - @override - String get sort_duration => '시간순 정렬'; - - @override - String get sort_tracks => '곡명 순으로 정렬'; - - @override - String currently_downloading(Object tracks_length) { - return '현재 ($tracks_length) 곡 다운로드 중'; - } - - @override - String get cancel_all => '모두 취소'; - - @override - String get filter_artist => '아티스트 필터링'; - - @override - String followers(Object followers) { - return '$followers 팔로워'; - } - - @override - String get add_artist_to_blacklist => '이 아티스트를 블랙리스트에 추가'; - - @override - String get top_tracks => '인기곡'; - - @override - String get fans_also_like => '애청자들이 좋아하는 곡'; - - @override - String get loading => '불러오는 중...'; - - @override - String get artist => '아티스트'; - - @override - String get blacklisted => '블랙리스트'; - - @override - String get following => '팔로우 중'; - - @override - String get follow => '팔로우하기'; - - @override - String get artist_url_copied => '아티스트의 URL 주소를 클립보드에 복사함'; - - @override - String added_to_queue(Object tracks) { - return '$tracks 곡을 대기열에 추가함'; - } - - @override - String get filter_albums => '앨범 필터링'; - - @override - String get synced => '동기화됨'; - - @override - String get plain => '그대로'; - - @override - String get shuffle => '셔플'; - - @override - String get search_tracks => '곡 검색하기'; - - @override - String get released => '공개일'; - - @override - String error(Object error) { - return '에러'; - } - - @override - String get title => '타이틀'; - - @override - String get time => '길이'; - - @override - String get more_actions => '다른 작업'; - - @override - String download_count(Object count) { - return '($count) 곡 다운로드'; - } - - @override - String add_count_to_playlist(Object count) { - return '플레이리스트에 ($count) 곡을 추가'; - } - - @override - String add_count_to_queue(Object count) { - return '대기열에 ($count) 곡을 추가'; - } - - @override - String play_count_next(Object count) { - return '이 다음에 ($count) 곡을 재생'; - } - - @override - String get album => '앨범'; - - @override - String copied_to_clipboard(Object data) { - return '$data 를 클립보드에 복사함'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track 을 이 플레이리스트에 추가'; - } - - @override - String get add => '추가'; - - @override - String added_track_to_queue(Object track) { - return '대기열에 $track 을 추가함'; - } - - @override - String get add_to_queue => '대기열에 추가'; - - @override - String track_will_play_next(Object track) { - return '$track 을 이 다음에 재생'; - } - - @override - String get play_next => '이 다음에 재생'; - - @override - String removed_track_from_queue(Object track) { - return '대기열에서 $track 를 제거함'; - } - - @override - String get remove_from_queue => '대기열에서 제거'; - - @override - String get remove_from_favorites => '즐겨찾기에서 제거'; - - @override - String get save_as_favorite => '즐겨찾기에 추가'; - - @override - String get add_to_playlist => '플레이리스트에 추가'; - - @override - String get remove_from_playlist => '플레이리스트에서 제거'; - - @override - String get add_to_blacklist => '블랙리스트에 추가'; - - @override - String get remove_from_blacklist => '블랙리스트에서 제거'; - - @override - String get share => '공유'; - - @override - String get mini_player => '미니 플레이어'; - - @override - String get slide_to_seek => '앞뒤로 슬라이드하여 탐색'; - - @override - String get shuffle_playlist => '플레이리스트를 섞기'; - - @override - String get unshuffle_playlist => '플레이리스트를 섞지 않기'; - - @override - String get previous_track => '이전 곡'; - - @override - String get next_track => '다음 곡'; - - @override - String get pause_playback => '일시정지'; - - @override - String get resume_playback => '재개'; - - @override - String get loop_track => '반복 재생'; - - @override - String get no_loop => '반복 없음'; - - @override - String get repeat_playlist => '플레이리스트 반복'; - - @override - String get queue => '재생 대기열'; - - @override - String get alternative_track_sources => '대체가능한 음악 서버'; - - @override - String get download_track => '곡 다운로드'; - - @override - String tracks_in_queue(Object tracks) { - return '대기열에 $tracks 곡이 있음'; - } - - @override - String get clear_all => '모두 제거'; - - @override - String get show_hide_ui_on_hover => '마우스를 올리면 UI를 표시/숨김'; - - @override - String get always_on_top => '항상 위에 표시'; - - @override - String get exit_mini_player => '미니 플레이어 닫기'; - - @override - String get download_location => '다운로드 경로'; - - @override - String get local_library => '로컬 도서관'; - - @override - String get add_library_location => '도서관에 추가'; - - @override - String get remove_library_location => '도서관에서 제거'; - - @override - String get account => '계정'; - - @override - String get logout => '로그아웃'; - - @override - String get logout_of_this_account => '이 계정에서 로그아웃'; - - @override - String get language_region => '언어 & 지역'; - - @override - String get language => '언어'; - - @override - String get system_default => '시스템 기본설정'; - - @override - String get market_place_region => '마켓플레이스 지역'; - - @override - String get recommendation_country => '추천 국가'; - - @override - String get appearance => '디자인'; - - @override - String get layout_mode => '레이아웃 모드'; - - @override - String get override_layout_settings => '반응형 레이아웃 모드 설정 덮어씌우기'; - - @override - String get adaptive => '적응형'; - - @override - String get compact => '컴팩트'; - - @override - String get extended => '확장'; - - @override - String get theme => '테마'; - - @override - String get dark => '다크'; - - @override - String get light => '라이트'; - - @override - String get system => '시스템과 동일'; - - @override - String get accent_color => '보조색'; - - @override - String get sync_album_color => '앨범 색상'; - - @override - String get sync_album_color_description => '앨범아트의 주요 색상을 보조색으로 사용'; - - @override - String get playback => '재생'; - - @override - String get audio_quality => '음질'; - - @override - String get high => '높음'; - - @override - String get low => '낮음'; - - @override - String get pre_download_play => '재생할 곡을 미리 다운로드'; - - @override - String get pre_download_play_description => - '스트리밍 방식을 쓰는 대신 파일 단위로 다운로드 받고 재생 (인터넷 대역폭이 높은 환경에서 추천)'; - - @override - String get skip_non_music => '음악이 아닌 부분을 스킵 (SponsorBlock)'; - - @override - String get blacklist_description => '블랙리스트에 추가된 곡과 아티스트'; - - @override - String get wait_for_download_to_finish => '현재 진행중인 다운로드가 끝날 때까지 기다려주세요'; - - @override - String get desktop => '데스크톱'; - - @override - String get close_behavior => '닫을 때의 동작'; - - @override - String get close => '닫기'; - - @override - String get minimize_to_tray => '트레이로 최소화'; - - @override - String get show_tray_icon => '시스템 트레이 아이콘 표시'; - - @override - String get about => '앱 정보'; - - @override - String get u_love_spotube => 'Spotube... 사랑하시죠?'; - - @override - String get check_for_updates => '업데이트 확인'; - - @override - String get about_spotube => 'Spotube에 관해'; - - @override - String get blacklist => '블랙리스트'; - - @override - String get please_sponsor => '후원해주시면 감사하겠습니다.'; - - @override - String get spotube_description => - 'Spotube는, 경량에 크로스플랫폼인데다 무료이기까지한 스포티파이 클라이언트입니다'; - - @override - String get version => '버전'; - - @override - String get build_number => '빌드 번호'; - - @override - String get founder => '창시자'; - - @override - String get repository => '리포지토리'; - - @override - String get bug_issues => '버그 및 이슈'; - - @override - String get made_with => '❤️을 담아 방글라데시에서 만듦'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => '라이선스'; - - @override - String get credentials_will_not_be_shared_disclaimer => - '걱정마세요. 개인정보를 수집하거나 공유하지 않습니다.'; - - @override - String get know_how_to_login => '어떻게 하는건지 모르겠나요?'; - - @override - String get follow_step_by_step_guide => '사용법 확인하기'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookies'; - } - - @override - String get fill_in_all_fields => '모든 필드에 정보를 입력해주세요'; - - @override - String get submit => '제출'; - - @override - String get exit => '종료'; - - @override - String get previous => '이전으로'; - - @override - String get next => '다음으로'; - - @override - String get done => '완료'; - - @override - String get step_1 => '1단계'; - - @override - String get first_go_to => '가장 먼저 먼저 들어갈 곳은 '; - - @override - String get something_went_wrong => '알 수 없는 이유로 동작에 실패했습니다.'; - - @override - String get piped_instance => 'Piped 서버의 인스턴스'; - - @override - String get piped_description => '곡 탐색에 사용할 Piped 서버 인스턴스'; - - @override - String get piped_warning => '몇몇 서버는 제대로 동작하지 않을 수 있습니다. 본인 책임 하에 이용해주세요.'; - - @override - String get invidious_instance => 'Invidious 서버 인스턴스'; - - @override - String get invidious_description => '트랙 매칭에 사용할 Invidious 서버 인스턴스'; - - @override - String get invidious_warning => '일부는 제대로 작동하지 않을 수 있습니다. 자신의 책임 하에 사용하세요'; - - @override - String get generate => '생성'; - - @override - String track_exists(Object track) { - return '곡 $track 은 이미 리스트에 있습니다'; - } - - @override - String get replace_downloaded_tracks => '다운로드한 모든 곡을 교체'; - - @override - String get skip_download_tracks => '다운로드가 끝난 곡을 모두 건너뛰기'; - - @override - String get do_you_want_to_replace => '현재 곡을 교체하시겠습니까?'; - - @override - String get replace => '교체'; - - @override - String get skip => '건너뛰기'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '$type을 $count개까지 선택'; - } - - @override - String get select_genres => '장르 선택'; - - @override - String get add_genres => '장르 추가'; - - @override - String get country => '국가'; - - @override - String get number_of_tracks_generate => '생성할 곡 수'; - - @override - String get acousticness => '반주 구간 (Acousticness)'; - - @override - String get danceability => '흥겨운 정도 (Danceability)'; - - @override - String get energy => '에너지 (Energy)'; - - @override - String get instrumentalness => '기악성 (Instrumentalness)'; - - @override - String get liveness => '생동감 (Liveness)'; - - @override - String get loudness => '라우드니스 (Loudness)'; - - @override - String get speechiness => '회화성 (Speechniss)'; - - @override - String get valence => '감정가 (Valence)'; - - @override - String get popularity => '인기도 (Popularity)'; - - @override - String get key => '조성 (키)'; - - @override - String get duration => '길이 (초)'; - - @override - String get tempo => '템포 (BPM)'; - - @override - String get mode => '장조'; - - @override - String get time_signature => '박자'; - - @override - String get short => '짧음'; - - @override - String get medium => '중간'; - - @override - String get long => '긺'; - - @override - String get min => '최소'; - - @override - String get max => '최대'; - - @override - String get target => '목표'; - - @override - String get moderate => '보통'; - - @override - String get deselect_all => '모두 선택해제'; - - @override - String get select_all => '모두 선택'; - - @override - String get are_you_sure => '괜찮겠습니까?'; - - @override - String get generating_playlist => '커스텀 플레이리스트를 생성하는 중...'; - - @override - String selected_count_tracks(Object count) { - return '$count 곡이 선택되었습니다.'; - } - - @override - String get download_warning => - '모든 트랙을 대량으로 다운로드하는 것은 명백한 불법 복제이며 음악 창작 사회에 피해를 입히는 행위입니다. 이 점을 알아주셨으면 합니다. 항상 아티스트의 노력을 존중하고 응원해 주세요.'; - - @override - String get download_ip_ban_warning => - '참고로, 평소보다 과도한 다운로드 요청으로 인해 YouTube에서 IP가 차단될 수 있습니다. IP 차단은 해당 IP 기기에서 최소 2~3개월 동안 (로그인한 상태에서도) YouTube를 사용할 수 없음을 의미합니다. 그리고 이런 일이 발생하더라도 스포튜브는 어떠한 책임도 지지 않습니다.'; - - @override - String get by_clicking_accept_terms => '\'동의\'를 클릭하면 다음 약관에 동의하는 것입니다:'; - - @override - String get download_agreement_1 => '알고 있습니다. 전 나쁜 사람입니다.'; - - @override - String get download_agreement_2 => - '제가 할 수 있는 모든 곳에서 아티스트를 지원할 것이며, 저는 그들의 작품을 살 돈이 없기 때문에 이렇게 하는 것뿐입니다.'; - - @override - String get download_agreement_3 => - '본인은 YouTube에서 내 IP가 차단될 수 있음을 완전히 알고 있으며, 현재 내 행동으로 인해 발생하는 사고에 대해 Spotube 또는 그 소유자/기여자에게 책임을 묻지 않습니다.'; - - @override - String get decline => '거절'; - - @override - String get accept => '동의'; - - @override - String get details => '상세'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => '채널'; - - @override - String get likes => '좋아요'; - - @override - String get dislikes => '싫어요'; - - @override - String get views => '조회수'; - - @override - String get streamUrl => '스트림 URL'; - - @override - String get stop => '중지'; - - @override - String get sort_newest => '최근에 추가된 순으로 정렬'; - - @override - String get sort_oldest => '예전에 추가된 순으로 정렬'; - - @override - String get sleep_timer => '취침 타이머'; - - @override - String mins(Object minutes) { - return '$minutes 분'; - } - - @override - String hours(Object hours) { - return '$hours 시간'; - } - - @override - String hour(Object hours) { - return '$hours 시간'; - } - - @override - String get custom_hours => '시간 설정'; - - @override - String get logs => '로그'; - - @override - String get developers => '개발'; - - @override - String get not_logged_in => '로그인하지 않았습니다'; - - @override - String get search_mode => '검색 모드'; - - @override - String get audio_source => '오디오 출처'; - - @override - String get ok => '알겠습니다'; - - @override - String get failed_to_encrypt => '암호화에 실패했습니다'; - - @override - String get encryption_failed_warning => - 'Spotube는 암호화를 사용하여 데이터를 안전하게 저장합니다. 하지만 그렇게 하지 못했습니다. 따라서 안전하지 않은 저장소로 대체됩니다.\n리눅스를 사용하는 경우, 비밀 서비스(gnome-keyring, kde-wallet, keepassxc 등)가 설치되어 있는지 확인하세요.'; - - @override - String get querying_info => '정보를 얻는 중...'; - - @override - String get piped_api_down => 'Piped API가 응답하지 않습니다'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Piped 인스턴스 $pipedInstance가 현재 다운되었습니다.\n\n인스턴스를 변경하거나 \'API 유형\'을 공식 YouTube API로 변경하세요.\n\n변경 후 앱을 다시 시작해야 합니다.'; - } - - @override - String get you_are_offline => '현재 오프라인입니다'; - - @override - String get connection_restored => '인터넷에 다시 연결되었습니다'; - - @override - String get use_system_title_bar => '시스템 타이틀바를 사용'; - - @override - String get crunching_results => '결과를 처리하는 중...'; - - @override - String get search_to_get_results => '결과를 얻으려면 검색해주세요'; - - @override - String get use_amoled_mode => 'AMOLED모드를 사용'; - - @override - String get pitch_dark_theme => '검정색 기반의 어두운 테마'; - - @override - String get normalize_audio => '오디오 노멀라이즈'; - - @override - String get change_cover => '커버 변경'; - - @override - String get add_cover => '커버 추가'; - - @override - String get restore_defaults => '기본값으로 복원'; - - @override - String get download_music_format => '다운로드 음악 포맷'; - - @override - String get streaming_music_format => '스트리밍 음악 포맷'; - - @override - String get download_music_quality => '다운로드 음질'; - - @override - String get streaming_music_quality => '스트리밍 음질'; - - @override - String get login_with_lastfm => 'Last.fm에 로그인'; - - @override - String get connect => '연결'; - - @override - String get disconnect_lastfm => 'Last.fm에서 연결 해제'; - - @override - String get disconnect => '연결 해제'; - - @override - String get username => '사용자명'; - - @override - String get password => '비밀번호'; - - @override - String get login => '로그인'; - - @override - String get login_with_your_lastfm => '내 Last.fm 계정으로로그인'; - - @override - String get scrobble_to_lastfm => 'Scrobble to Last.fm'; - - @override - String get go_to_album => '앨범으로 이동'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => '모두 탐색'; - - @override - String get genres => '장르'; - - @override - String get explore_genres => '장르 탐색'; - - @override - String get friends => '친구'; - - @override - String get no_lyrics_available => '죄송하지만 이 곡의 가사를 찾지 못했습니다'; - - @override - String get start_a_radio => '라디오 시작'; - - @override - String get how_to_start_radio => '라디오를 어떻게 시작하시겠습니까?'; - - @override - String get replace_queue_question => '현재 큐를 대체하시겠습니까 아니면 추가하시겠습니까?'; - - @override - String get endless_playback => '끝없는 재생'; - - @override - String get delete_playlist => '재생 목록 삭제'; - - @override - String get delete_playlist_confirmation => '이 재생 목록을 삭제하시겠습니까?'; - - @override - String get local_tracks => '로컬 트랙'; - - @override - String get local_tab => '로컬'; - - @override - String get song_link => '곡 링크'; - - @override - String get skip_this_nonsense => '이 허튼소리 건너뛰기'; - - @override - String get freedom_of_music => '“음악의 자유”'; - - @override - String get freedom_of_music_palm => '“손바닥 안의 음악의 자유”'; - - @override - String get get_started => '시작합시다'; - - @override - String get youtube_source_description => '추천되며 가장 잘 작동합니다.'; - - @override - String get piped_source_description => - '자유로운 기분이 듭니까? YouTube와 같지만 훨씬 더 무료합니다.'; - - @override - String get jiosaavn_source_description => '남아시아 지역에 최적입니다.'; - - @override - String get invidious_source_description => 'Piped와 비슷하지만 가용성이 높습니다.'; - - @override - String highest_quality(Object quality) { - return '최고 품질: $quality'; - } - - @override - String get select_audio_source => '오디오 소스 선택'; - - @override - String get endless_playback_description => '자동으로 새로운 노래를 대기열의 끝에 추가'; - - @override - String get choose_your_region => '지역 선택'; - - @override - String get choose_your_region_description => - '이것은 Spotube가 위치에 맞는 콘텐츠를 표시하는 데 도움이 됩니다.'; - - @override - String get choose_your_language => '언어 선택'; - - @override - String get help_project_grow => '이 프로젝트 성장에 도움을 주세요'; - - @override - String get help_project_grow_description => - 'Spotube는 오픈 소스 프로젝트입니다. 프로젝트에 기여하거나 버그를 보고하거나 새로운 기능을 제안하여이 프로젝트의 성장에 도움을 줄 수 있습니다.'; - - @override - String get contribute_on_github => 'GitHub에서 기여하기'; - - @override - String get donate_on_open_collective => 'Open Collective에 기부하기'; - - @override - String get browse_anonymously => '익명으로 둘러보기'; - - @override - String get enable_connect => '연결 활성화'; - - @override - String get enable_connect_description => '다른 장치에서 Spotube 제어'; - - @override - String get devices => '장치'; - - @override - String get select => '선택'; - - @override - String connect_client_alert(Object client) { - return '$client님에 의해 제어되고 있습니다'; - } - - @override - String get this_device => '이 장치'; - - @override - String get remote => '원격'; - - @override - String get stats => '통계'; - - @override - String and_n_more(Object count) { - return '그리고 $count개 더'; - } - - @override - String get recently_played => '최근 재생'; - - @override - String get browse_more => '더 보기'; - - @override - String get no_title => '제목 없음'; - - @override - String get not_playing => '재생 중이 아님'; - - @override - String get epic_failure => '서사적 실패!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length 곡을 대기열에 추가했습니다'; - } - - @override - String get spotube_has_an_update => 'Spotube에 업데이트가 있습니다'; - - @override - String get download_now => '지금 다운로드'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum이 출시되었습니다'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version이 출시되었습니다'; - } - - @override - String get read_the_latest => '최신 '; - - @override - String get release_notes => '릴리스 노트'; - - @override - String get pick_color_scheme => '색상 테마 선택'; - - @override - String get save => '저장'; - - @override - String get choose_the_device => '디바이스 선택:'; - - @override - String get multiple_device_connected => - '여러 디바이스가 연결되어 있습니다.\n이 작업을 실행할 디바이스를 선택하세요'; - - @override - String get nothing_found => '찾을 수 없음'; - - @override - String get the_box_is_empty => '상자가 비어 있습니다'; - - @override - String get top_artists => '톱 아티스트'; - - @override - String get top_albums => '톱 앨범'; - - @override - String get this_week => '이번 주'; - - @override - String get this_month => '이번 달'; - - @override - String get last_6_months => '지난 6개월'; - - @override - String get this_year => '올해'; - - @override - String get last_2_years => '지난 2년'; - - @override - String get all_time => '모든 시간'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName 제공'; - } - - @override - String get email => '이메일'; - - @override - String get profile_followers => '팔로워'; - - @override - String get birthday => '생일'; - - @override - String get subscription => '구독'; - - @override - String get not_born => '태어나지 않음'; - - @override - String get hacker => '해커'; - - @override - String get profile => '프로필'; - - @override - String get no_name => '이름 없음'; - - @override - String get edit => '편집'; - - @override - String get user_profile => '사용자 프로필'; - - @override - String count_plays(Object count) { - return '$count 재생'; - } - - @override - String get streaming_fees_hypothetical => - '*이것은 Spotify의 스트림당 지급액\n\$0.003에서 \$0.005를 기준으로 계산된 것입니다.\n이것은 사용자가 Spotify에서 곡을 들었을 때\n아티스트에게 지불했을 금액에 대한 통찰을 제공하기 위한\n가상의 계산입니다.'; - - @override - String get minutes_listened => '청취한 시간'; - - @override - String get streamed_songs => '스트리밍된 곡'; - - @override - String count_streams(Object count) { - return '$count 스트림'; - } - - @override - String get owned_by_you => '당신이 소유'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl를 클립보드에 복사했습니다'; - } - - @override - String get hipotetical_calculation => - '*이것은 온라인 음악 스트리밍 플랫폼의 스트림당 평균 지불액인 \$0.003에서 \$0.005를 기준으로 계산됩니다. 이것은 사용자가 다른 음악 스트리밍 플랫폼에서 노래를 들었다면 아티스트에게 얼마를 지불했을지에 대한 통찰력을 제공하기 위한 가상 계산입니다.'; - - @override - String count_mins(Object minutes) { - return '$minutes 분'; - } - - @override - String get summary_minutes => '분'; - - @override - String get summary_listened_to_music => '듣는 음악'; - - @override - String get summary_songs => '곡'; - - @override - String get summary_streamed_overall => '전체 스트리밍'; - - @override - String get summary_owed_to_artists => '이번 달 아티스트에게 지급해야 할 금액'; - - @override - String get summary_artists => '아티스트의'; - - @override - String get summary_music_reached_you => '음악이 도달함'; - - @override - String get summary_full_albums => '전체 앨범'; - - @override - String get summary_got_your_love => '당신의 사랑을 받음'; - - @override - String get summary_playlists => '플레이리스트'; - - @override - String get summary_were_on_repeat => '반복 재생됨'; - - @override - String total_money(Object money) { - return '총 $money'; - } - - @override - String get webview_not_found => '웹뷰를 찾을 수 없음'; - - @override - String get webview_not_found_description => - '기기에 웹뷰 런타임이 설치되지 않았습니다.\n설치되어 있으면 environment PATH에 있는지 확인하십시오\n\n설치 후 앱을 다시 시작하세요'; - - @override - String get unsupported_platform => '지원되지 않는 플랫폼'; - - @override - String get cache_music => '음악 캐시'; - - @override - String get open => '열기'; - - @override - String get cache_folder => '캐시 폴더'; - - @override - String get export => '내보내기'; - - @override - String get clear_cache => '캐시 지우기'; - - @override - String get clear_cache_confirmation => '캐시를 지우시겠습니까?'; - - @override - String get export_cache_files => '캐시된 파일 내보내기'; - - @override - String found_n_files(Object count) { - return '$count개의 파일을 찾았습니다'; - } - - @override - String get export_cache_confirmation => '이 파일들을 내보내시겠습니까'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$files개 중 $filesExported개 파일을 내보냈습니다'; - } - - @override - String get undo => '실행 취소'; - - @override - String get download_all => '모두 다운로드'; - - @override - String get add_all_to_playlist => '모두 재생 목록에 추가'; - - @override - String get add_all_to_queue => '모두 큐에 추가'; - - @override - String get play_all_next => '모두 다음에 재생'; - - @override - String get pause => '일시 정지'; - - @override - String get view_all => '모두 보기'; - - @override - String get no_tracks_added_yet => '아직 트랙을 추가하지 않은 것 같습니다'; - - @override - String get no_tracks => '여기에 트랙이 없는 것 같습니다'; - - @override - String get no_tracks_listened_yet => '아직 아무 것도 듣지 않은 것 같습니다'; - - @override - String get not_following_artists => '아티스트를 팔로우하지 않고 있습니다'; - - @override - String get no_favorite_albums_yet => '아직 즐겨찾기 앨범을 추가하지 않은 것 같습니다'; - - @override - String get no_logs_found => '로그를 찾을 수 없습니다'; - - @override - String get youtube_engine => 'YouTube 엔진'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine가 설치되지 않았습니다'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine가 시스템에 설치되지 않았습니다.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'PATH 변수에서 사용할 수 있는지 확인하거나\n아래에 $engine 실행 파일의 절대 경로를 설정하세요'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/unix와 같은 운영 체제에서는 .zshrc/.bashrc/.bash_profile 등에 경로 설정이 작동하지 않습니다.\n셸 구성 파일에 경로를 설정해야 합니다'; - - @override - String get download => '다운로드'; - - @override - String get file_not_found => '파일을 찾을 수 없습니다'; - - @override - String get custom => '사용자 정의'; - - @override - String get add_custom_url => '사용자 정의 URL 추가'; - - @override - String get edit_port => '포트 편집'; - - @override - String get port_helper_msg => - '기본값은 -1로 무작위 숫자를 나타냅니다. 방화벽이 구성된 경우 이를 설정하는 것이 좋습니다.'; - - @override - String connect_request(Object client) { - return '$client의 연결을 허용하시겠습니까?'; - } - - @override - String get connection_request_denied => '연결이 거부되었습니다. 사용자가 액세스를 거부했습니다.'; - - @override - String get an_error_occurred => '오류가 발생했습니다'; - - @override - String get copy_to_clipboard => '클립보드에 복사'; - - @override - String get view_logs => '로그 보기'; - - @override - String get retry => '다시 시도'; - - @override - String get no_default_metadata_provider_selected => - '기본 메타데이터 제공자가 설정되지 않았습니다'; - - @override - String get manage_metadata_providers => '메타데이터 제공자 관리'; - - @override - String get open_link_in_browser => '브라우저에서 링크를 여시겠습니까?'; - - @override - String get do_you_want_to_open_the_following_link => '다음 링크를 여시겠습니까'; - - @override - String get unsafe_url_warning => - '신뢰할 수 없는 출처의 링크를 여는 것은 안전하지 않을 수 있습니다. 주의하세요!\n링크를 클립보드에 복사할 수도 있습니다.'; - - @override - String get copy_link => '링크 복사'; - - @override - String get building_your_timeline => '청취 기록을 기반으로 타임라인을 구축하고 있습니다...'; - - @override - String get official => '공식'; - - @override - String author_name(Object author) { - return '저자: $author'; - } - - @override - String get third_party => '타사'; - - @override - String get plugin_requires_authentication => '플러그인에 인증이 필요합니다'; - - @override - String get update_available => '업데이트 사용 가능'; - - @override - String get supports_scrobbling => '스크로블링 지원'; - - @override - String get plugin_scrobbling_info => '이 플러그인은 음악을 스크로블하여 청취 기록을 생성합니다.'; - - @override - String get default_metadata_source => '기본 메타데이터 소스'; - - @override - String get set_default_metadata_source => '기본 메타데이터 소스 설정'; - - @override - String get default_audio_source => '기본 오디오 소스'; - - @override - String get set_default_audio_source => '기본 오디오 소스 설정'; - - @override - String get set_default => '기본값으로 설정'; - - @override - String get support => '지원'; - - @override - String get support_plugin_development => '플러그인 개발 지원'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API에 액세스할 수 있습니다'; - } - - @override - String get do_you_want_to_install_this_plugin => '이 플러그인을 설치하시겠습니까?'; - - @override - String get third_party_plugin_warning => - '이 플러그인은 타사 리포지토리에서 제공됩니다. 설치하기 전에 출처를 신뢰하는지 확인하세요.'; - - @override - String get author => '저자'; - - @override - String get this_plugin_can_do_following => '이 플러그인은 다음을 수행할 수 있습니다'; - - @override - String get install => '설치'; - - @override - String get install_a_metadata_provider => '메타데이터 제공자 설치'; - - @override - String get no_tracks_playing => '현재 재생 중인 트랙이 없습니다'; - - @override - String get synced_lyrics_not_available => '이 노래에 대한 동기화된 가사를 사용할 수 없습니다. 대신'; - - @override - String get plain_lyrics => '일반 가사'; - - @override - String get tab_instead => '탭을 사용하세요.'; - - @override - String get disclaimer => '면책 조항'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube 팀은 어떠한 \"타사\" 플러그인에 대해서도 (법적 포함) 어떠한 책임도 지지 않습니다.\n사용자 자신의 책임하에 사용하시기 바랍니다. 버그/문제에 대해서는 플러그인 리포지토리에 보고해 주세요.\n\n만약 \"타사\" 플러그인이 서비스/법인의 ToS/DMCA를 위반하는 경우, \"타사\" 플러그인 저자 또는 호스팅 플랫폼(예: GitHub/Codeberg)에 조치를 취하도록 요청해 주세요. 위에 나열된 (\"타사\"로 표시된) 플러그인은 모두 공개/커뮤니티에서 유지 관리하는 플러그인입니다. 저희는 이를 큐레이션하지 않으므로 어떠한 조치도 취할 수 없습니다.\n\n'; - - @override - String get input_does_not_match_format => '입력이 필요한 형식과 일치하지 않습니다'; - - @override - String get plugins => '플러그인'; - - @override - String get paste_plugin_download_url => - '다운로드 URL, GitHub/Codeberg 리포지토리 URL 또는 .smplug 파일에 대한 직접 링크를 붙여넣으세요'; - - @override - String get download_and_install_plugin_from_url => 'URL에서 플러그인 다운로드 및 설치'; - - @override - String failed_to_add_plugin_error(Object error) { - return '플러그인 추가 실패: $error'; - } - - @override - String get upload_plugin_from_file => '파일에서 플러그인 업로드'; - - @override - String get installed => '설치됨'; - - @override - String get available_plugins => '사용 가능한 플러그인'; - - @override - String get configure_plugins => '직접 메타데이터 제공자와 오디오 소스 플러그인을 구성하세요'; - - @override - String get audio_scrobblers => '오디오 스크로블러'; - - @override - String get scrobbling => '스크로블링'; - - @override - String get source => '출처: '; - - @override - String get uncompressed => '비압축'; - - @override - String get dab_music_source_description => - '오디오파일을 위한 소스입니다. 고음질/무손실 오디오 스트림을 제공하며 ISRC 기반으로 정확한 트랙 매칭을 지원합니다.'; -} diff --git a/lib/l10n/generated/app_localizations_ne.dart b/lib/l10n/generated/app_localizations_ne.dart deleted file mode 100644 index 8f881b51..00000000 --- a/lib/l10n/generated/app_localizations_ne.dart +++ /dev/null @@ -1,1578 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Nepali (`ne`). -class AppLocalizationsNe extends AppLocalizations { - AppLocalizationsNe([String locale = 'ne']) : super(locale); - - @override - String get guest => 'अतिथि'; - - @override - String get browse => 'ब्राउज़ गर्नुहोस्'; - - @override - String get search => 'खोजी गर्नुहोस्'; - - @override - String get library => 'पुस्तकालय'; - - @override - String get lyrics => 'गीतको शब्द'; - - @override - String get settings => 'सेटिङ'; - - @override - String get genre_categories_filter => 'शैली वा शैलीहरू फिल्टर गर्नुहोस्...'; - - @override - String get genre => 'शैली'; - - @override - String get personalized => 'व्यक्तिगत'; - - @override - String get featured => 'विशेष'; - - @override - String get new_releases => 'नयाँ रिलिज'; - - @override - String get songs => 'गीतहरू'; - - @override - String playing_track(Object track) { - return '$track बज्यो'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'यो हालको कतारलाई हटाउँछ। $track_length ट्र्याकहरू हटाईन्छ\nके तपाईं जारी राख्न चाहनुहुन्छ?'; - } - - @override - String get load_more => 'थप लोड गर्नुहोस्'; - - @override - String get playlists => 'प्लेलिस्टहरू'; - - @override - String get artists => 'कलाकारहरू'; - - @override - String get albums => 'आल्बमहरू'; - - @override - String get tracks => 'ट्र्याकहरू'; - - @override - String get downloads => 'डाउनलोडहरू'; - - @override - String get filter_playlists => 'तपाईंको प्लेलिस्टहरू फिल्टर गर्नुहोस्...'; - - @override - String get liked_tracks => 'मन परेका ट्र्याकहरू'; - - @override - String get liked_tracks_description => 'तपाईंको मन परेका सबै ट्र्याकहरू'; - - @override - String get playlist => 'प्लेलिस्ट'; - - @override - String get create_a_playlist => 'प्लेलिस्ट बनाउनुहोस्'; - - @override - String get update_playlist => 'प्लेलिस्ट अपडेट गर्नुहोस्'; - - @override - String get create => 'बनाउनुहोस्'; - - @override - String get cancel => 'रद्द गर्नुहोस्'; - - @override - String get update => 'अपडेट गर्नुहोस्'; - - @override - String get playlist_name => 'प्लेलिस्टको नाम'; - - @override - String get name_of_playlist => 'प्लेलिस्टको नाम'; - - @override - String get description => 'विवरण'; - - @override - String get public => 'सार्वजनिक'; - - @override - String get collaborative => 'सहकारी'; - - @override - String get search_local_tracks => 'स्थानीय ट्र्याकहरू खोजी गर्नुहोस्...'; - - @override - String get play => 'बजाउनुहोस्'; - - @override - String get delete => 'मेटाउनुहोस्'; - - @override - String get none => 'कुनै पनि होइन'; - - @override - String get sort_a_z => 'A-Zमा क्रमबद्ध गर्नुहोस्'; - - @override - String get sort_z_a => 'Z-Aमा क्रमबद्ध गर्नुहोस्'; - - @override - String get sort_artist => 'कलाकारबाट क्रमबद्ध गर्नुहोस्'; - - @override - String get sort_album => 'आल्बमबाट क्रमबद्ध गर्नुहोस्'; - - @override - String get sort_duration => 'अवधिको अनुसार क्रमबद्ध गर्नुहोस्'; - - @override - String get sort_tracks => 'ट्र्याकहरूलाई क्रमबद्ध गर्नुहोस्'; - - @override - String currently_downloading(Object tracks_length) { - return 'हाल डाउनलोड गर्दैछ ($tracks_length)'; - } - - @override - String get cancel_all => 'सब रद्द गर्नुहोस्'; - - @override - String get filter_artist => 'कलाकारहरूलाई फिल्टर गर्नुहोस्...'; - - @override - String followers(Object followers) { - return '$followers अनुयायीहरू'; - } - - @override - String get add_artist_to_blacklist => 'कलाकारलाई कालोसूचीमा थप्नुहोस्'; - - @override - String get top_tracks => 'शीर्ष ट्र्याकहरू'; - - @override - String get fans_also_like => 'अनुयायीहरू पनि लाइक गर्छन्'; - - @override - String get loading => 'लोड हुँदैछ...'; - - @override - String get artist => 'कलाकार'; - - @override - String get blacklisted => 'कालोसूचीमा'; - - @override - String get following => 'फल्लो गर्दै'; - - @override - String get follow => 'फल्लो गर्नुहोस्'; - - @override - String get artist_url_copied => 'कलाकार URL क्लिपबोर्डमा प्रतिलिपि गरिएको छ'; - - @override - String added_to_queue(Object tracks) { - return '$tracks ट्र्याकहरूलाई कतारमा थपिएको छ'; - } - - @override - String get filter_albums => 'आल्बमहरूलाई फिल्टर गर्नुहोस्...'; - - @override - String get synced => 'सिङ्क गरिएको'; - - @override - String get plain => 'साधा'; - - @override - String get shuffle => 'शफल'; - - @override - String get search_tracks => 'ट्र्याकहरू खोजी गर्नुहोस्...'; - - @override - String get released => 'रिलिज गरिएको'; - - @override - String error(Object error) { - return 'त्रुटि $error'; - } - - @override - String get title => 'शीर्षक'; - - @override - String get time => 'समय'; - - @override - String get more_actions => 'थप कार्यहरू'; - - @override - String download_count(Object count) { - return 'डाउनलोड ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'प्लेलिस्टमा थप्नुहोस् ($count)'; - } - - @override - String add_count_to_queue(Object count) { - return 'कतारमा थप्नुहोस् ($count)'; - } - - @override - String play_count_next(Object count) { - return 'प्लेगरी गर्नुहोस् ($count)'; - } - - @override - String get album => 'आल्बम'; - - @override - String copied_to_clipboard(Object data) { - return '$data क्लिपबोर्डमा प्रतिलिपि गरिएको छ'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track लाई तलका प्लेलिस्टमा थप्नुहोस्'; - } - - @override - String get add => 'थप्नुहोस्'; - - @override - String added_track_to_queue(Object track) { - return '$track लाई कतारमा थपिएको छ'; - } - - @override - String get add_to_queue => 'कतारमा थप्नुहोस्'; - - @override - String track_will_play_next(Object track) { - return '$track अरूलाई पहिलोमा बज्नेछ'; - } - - @override - String get play_next => 'पछिबजाउनुहोस्'; - - @override - String removed_track_from_queue(Object track) { - return '$track लाई कतारबाट हटाइएको छ'; - } - - @override - String get remove_from_queue => 'कतारबाट हटाउनुहोस्'; - - @override - String get remove_from_favorites => 'पसन्दीदामा बाट हटाउनुहोस्'; - - @override - String get save_as_favorite => 'पसन्दीदा बनाउनुहोस्'; - - @override - String get add_to_playlist => 'प्लेलिस्टमा थप्नुहोस्'; - - @override - String get remove_from_playlist => 'प्लेलिस्टबाट हटाउनुहोस्'; - - @override - String get add_to_blacklist => 'कालोसूचीमा थप्नुहोस्'; - - @override - String get remove_from_blacklist => 'कालोसूचीबाट हटाउनुहोस्'; - - @override - String get share => 'साझा गर्नुहोस्'; - - @override - String get mini_player => 'मिनि प्लेयर'; - - @override - String get slide_to_seek => - 'अगाडि वा पछाडि खोजी गर्नका लागि स्लाइड गर्नुहोस्'; - - @override - String get shuffle_playlist => 'प्लेलिस्ट शफल गर्नुहोस्'; - - @override - String get unshuffle_playlist => 'प्लेलिस्ट शफल नगर्नुहोस्'; - - @override - String get previous_track => 'पूर्व ट्र्याक'; - - @override - String get next_track => 'अरू ट्र्याक'; - - @override - String get pause_playback => 'प्लेब्याक रोक्नुहोस्'; - - @override - String get resume_playback => 'प्लेब्याक पुनः सुरु गर्नुहोस्'; - - @override - String get loop_track => 'ट्र्याकलाई दोहोरोपट्टी बजाउनुहोस्'; - - @override - String get no_loop => 'कोई लूप नहीं'; - - @override - String get repeat_playlist => 'प्लेलिस्ट पुनः बजाउनुहोस्'; - - @override - String get queue => 'कतार'; - - @override - String get alternative_track_sources => 'वैकल्पिक ट्र्याक स्रोतहरू'; - - @override - String get download_track => 'ट्र्याक डाउनलोड गर्नुहोस्'; - - @override - String tracks_in_queue(Object tracks) { - return 'कतारमा $tracks ट्र्याकहरू'; - } - - @override - String get clear_all => 'सब मेटाउनुहोस्'; - - @override - String get show_hide_ui_on_hover => 'हवर गरेपछि UI देखाउनुहोस्/लुकाउनुहोस्'; - - @override - String get always_on_top => 'सधैं टपमा राख्नुहोस्'; - - @override - String get exit_mini_player => 'मिनि प्लेयर बाट बाहिर निस्कनुहोस्'; - - @override - String get download_location => 'डाउनलोड स्थान'; - - @override - String get local_library => 'स्थानिय पुस्तकालय'; - - @override - String get add_library_location => 'पुस्तकालयमा थप्नुहोस्'; - - @override - String get remove_library_location => 'पुस्तकालयबाट हटाउनुहोस्'; - - @override - String get account => 'खाता'; - - @override - String get logout => 'बाहिर निस्कनुहोस्'; - - @override - String get logout_of_this_account => 'यो खाताबाट बाहिर निस्कनुहोस्'; - - @override - String get language_region => 'भाषा र क्षेत्र'; - - @override - String get language => 'भाषा'; - - @override - String get system_default => 'सिस्टम पूर्वनिर्धारित'; - - @override - String get market_place_region => 'बजार स्थान'; - - @override - String get recommendation_country => 'सिफारिस गरिएको देश'; - - @override - String get appearance => 'दृष्टिकोण'; - - @override - String get layout_mode => 'लेआउट मोड'; - - @override - String get override_layout_settings => - 'अनुकूलित प्रतिकृयात्मक लेआउट मोड सेटिङ्गहरू'; - - @override - String get adaptive => 'अनुकूलित'; - - @override - String get compact => 'संकुचित'; - - @override - String get extended => 'बढाइएको'; - - @override - String get theme => 'थिम'; - - @override - String get dark => 'गाढा'; - - @override - String get light => 'प्रकाश'; - - @override - String get system => 'सिस्टम'; - - @override - String get accent_color => 'एक्सेन्ट रङ्ग'; - - @override - String get sync_album_color => 'एल्बम रङ्ग सिङ्क गर्नुहोस्'; - - @override - String get sync_album_color_description => - 'एल्बम कला को प्रमुख रङ्गलाई एक्सेन्ट रङ्गको रूपमा प्रयोग गर्दछ'; - - @override - String get playback => 'प्लेब्याक'; - - @override - String get audio_quality => 'आडियो गुणस्तर'; - - @override - String get high => 'उच्च'; - - @override - String get low => 'न्यून'; - - @override - String get pre_download_play => 'पूर्व-डाउनलोड र प्ले गर्नुहोस्'; - - @override - String get pre_download_play_description => - 'आडियो स्ट्रिम गर्नु नगरी बाइटहरू डाउनलोड गरी बजाउँछ (उच्च ब्यान्डविथ उपयोगकर्ताहरूको लागि सिफारिस गरिएको)'; - - @override - String get skip_non_music => - 'गीतहरू बाहेक कुनै अनुष्ठान छोड्नुहोस् (स्पन्सरब्लक)'; - - @override - String get blacklist_description => 'कालोसूची गीत र कलाकारहरू'; - - @override - String get wait_for_download_to_finish => - 'कृपया हालको डाउनलोड समाप्त हुन लागि पर्खनुहोस्'; - - @override - String get desktop => 'डेस्कटप'; - - @override - String get close_behavior => 'बन्द व्यवहार'; - - @override - String get close => 'बन्द गर्नुहोस्'; - - @override - String get minimize_to_tray => 'ट्रेमा कम गर्नुहोस्'; - - @override - String get show_tray_icon => 'सिस्टम ट्रे आइकन देखाउनुहोस्'; - - @override - String get about => 'बारेमा'; - - @override - String get u_love_spotube => - 'हामीले थाहा पारेका छौं तपाईंलाई Spotube मन पर्छ'; - - @override - String get check_for_updates => 'अपडेटहरूको लागि जाँच गर्नुहोस्'; - - @override - String get about_spotube => 'Spotube को बारेमा'; - - @override - String get blacklist => 'कालोसूची'; - - @override - String get please_sponsor => 'कृपया स्पन्सर/डोनेट गर्नुहोस्'; - - @override - String get spotube_description => - 'Spotube, एक हल्का, समृद्ध, स्वतन्त्र Spotify क्लाइयन'; - - @override - String get version => 'संस्करण'; - - @override - String get build_number => 'निर्माण नम्बर'; - - @override - String get founder => 'संस्थापक'; - - @override - String get repository => 'पुनरावलोकन स्थल'; - - @override - String get bug_issues => 'त्रुटि + समस्याहरू'; - - @override - String get made_with => '❤️ 2021-2024 बाट बनाइएको'; - - @override - String get kingkor_roy_tirtho => 'किङ्कोर राय तिर्थो'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year किङ्कोर राय तिर्थो'; - } - - @override - String get license => 'लाइसेन्स'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'चिन्ता नगर्नुहोस्, तपाईंको कुनै पनि क्रेडेन्शियलहरूले कसैले संग्रह वा साझा गर्नेछैन'; - - @override - String get know_how_to_login => 'कसरी लगिन गर्ने भन्ने थाहा छैन?'; - - @override - String get follow_step_by_step_guide => - 'चरणबद्ध मार्गदर्शनमा साथी बनाउनुहोस्'; - - @override - String cookie_name_cookie(Object name) { - return '$name कुकी'; - } - - @override - String get fill_in_all_fields => 'कृपया सबै क्षेत्रहरू भर्नुहोस्'; - - @override - String get submit => 'पेश गर्नुहोस्'; - - @override - String get exit => 'बाहिर निस्कनुहोस्'; - - @override - String get previous => 'पूर्ववत'; - - @override - String get next => 'अरू'; - - @override - String get done => 'गरिएको'; - - @override - String get step_1 => 'कदम 1'; - - @override - String get first_go_to => 'पहिलो, जानुहोस्'; - - @override - String get something_went_wrong => 'केहि गल्ति भएको छ'; - - @override - String get piped_instance => 'पाइपड सर्भर इन्स्ट्यान्स'; - - @override - String get piped_description => - 'गीत मिलाउको लागि प्रयोग गर्ने पाइपड सर्भर इन्स्ट्यान्स'; - - @override - String get piped_warning => - 'तिनीहरूमध्ये केहि ठिक गर्न सक्छ। यसलाई आफ्नो जोखिममा प्रयोग गर्नुहोस्'; - - @override - String get invidious_instance => 'Invidious सर्भर इन्स्टेन्स'; - - @override - String get invidious_description => - 'ट्र्याक मिलाउनका लागि प्रयोग हुने Invidious सर्भर इन्स्टेन्स'; - - @override - String get invidious_warning => - 'केहीले राम्रोसँग काम नगर्न सक्छ। आफ्नो जोखिममा प्रयोग गर्नुहोस्'; - - @override - String get generate => 'जनरेट'; - - @override - String track_exists(Object track) { - return 'ट्र्याक $track पहिले नै छ'; - } - - @override - String get replace_downloaded_tracks => - 'सबै डाउनलोड गरिएका ट्र्याकहरूलाई परिवर्तन गर्नुहोस्'; - - @override - String get skip_download_tracks => - 'सबै डाउनलोड गरिएका ट्र्याकहरूलाई छोड्नुहोस्'; - - @override - String get do_you_want_to_replace => - 'के तपाईंले वर्तमान ट्र्याकलाई परिवर्तन गर्न चाहनुहुन्छ?'; - - @override - String get replace => 'परिवर्तन गर्नुहोस्'; - - @override - String get skip => 'छोड्नुहोस्'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '$count $type सम्म चयन गर्नुहोस्'; - } - - @override - String get select_genres => 'जनरहरू चयन गर्नुहोस्'; - - @override - String get add_genres => 'जनरहरू थप्नुहोस्'; - - @override - String get country => 'देश'; - - @override - String get number_of_tracks_generate => 'बनाउनका लागि ट्र्याकहरूको संख्या'; - - @override - String get acousticness => 'एकोस्टिकनेस'; - - @override - String get danceability => 'नृत्यक्षमता'; - - @override - String get energy => 'ऊर्जा'; - - @override - String get instrumentalness => 'साजा रहेकोता'; - - @override - String get liveness => 'प्राणिकता'; - - @override - String get loudness => 'शोर'; - - @override - String get speechiness => 'भाषण'; - - @override - String get valence => 'मानसिक स्वभाव'; - - @override - String get popularity => 'लोकप्रियता'; - - @override - String get key => 'कुञ्जी'; - - @override - String get duration => 'अवधि (सेकेण्ड)'; - - @override - String get tempo => 'गति (बीपीएम)'; - - @override - String get mode => 'मोड'; - - @override - String get time_signature => 'समय हस्ताक्षर'; - - @override - String get short => 'सानो'; - - @override - String get medium => 'मध्यम'; - - @override - String get long => 'लामो'; - - @override - String get min => 'न्यून'; - - @override - String get max => 'अधिक'; - - @override - String get target => 'लक्ष्य'; - - @override - String get moderate => 'मध्यस्थ'; - - @override - String get deselect_all => 'सबै छान्नुहोस्'; - - @override - String get select_all => 'सबै चयन गर्नुहोस्'; - - @override - String get are_you_sure => 'के तपाईं सुनिश्चित हुनुहुन्छ?'; - - @override - String get generating_playlist => 'तपाईंको विशेष प्लेलिस्ट बनाइएको छ...'; - - @override - String selected_count_tracks(Object count) { - return '$count ट्र्याकहरू छन् चयन गरिएका'; - } - - @override - String get download_warning => - 'यदि तपाईं सबै ट्र्याकहरूलाई बल्कमा डाउनलोड गर्छनु हो भने तपाईं स्पष्ट रूपमा साङ्गीत चोरी गरिरहेका छन् र यो साङ्गीतको रचनात्मक समाजलाई क्षति पनि पुर्याउँछ। उमेराइएको छ कि तपाईं यसको बारेमा जागरूक छिनुहुन्छ। सधैं, कला गर्दै र कलाकारको कडा परम्परा समर्थन गर्दै आइन्छ।'; - - @override - String get download_ip_ban_warning => - 'बितिएका डाउनलोड अनुरोधहरूका कारण तपाईंको आइपीले YouTube मा ब्लक हुन सक्छ। आइपी ब्लक भनेको कम्तीमा 2-3 महिनासम्म तपाईं त्यस आइपी यन्त्रबाट YouTube प्रयोग गर्न सक्नुहुन्छ। र यदि यो हुँदैछ भने स्पट्यूबले यसलाई कसैले गरेको बारेमा कुनै दायित्व लिन्छैन।'; - - @override - String get by_clicking_accept_terms => - '\'स्वीकृत\' गरेर तपाईं निम्नलिखित निर्वाचन गर्दैछिन्:'; - - @override - String get download_agreement_1 => - 'म मन्ने छु कि म साङ्गीत चोरी गरिरहेको छु। म बुरो हुँ'; - - @override - String get download_agreement_2 => - 'म कहिल्यै कहिल्यै तिनीहरूलाई समर्थन गर्नेछु र म यो तिनीहरूको कला किन्ने पैसा छैन भने मा मात्र यो गरेको छु'; - - @override - String get download_agreement_3 => - 'म पूरा रूपमा जान्छु कि मेरो आइपी YouTube मा ब्लक हुन सक्छ र म मन्छेहरूले मेरो चासोबाट भएको कुनै दुर्घटनामा स्पट्यूब वा तिनीहरूको मालिकहरू/सहयोगीहरूलाई दायित्वी ठान्छुँभन्ने पूर्ण जानकारी छैन'; - - @override - String get decline => 'अस्वीकृत'; - - @override - String get accept => 'स्वीकृत'; - - @override - String get details => 'विवरण'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'च्यानल'; - - @override - String get likes => 'लाइकहरू'; - - @override - String get dislikes => 'असुनुहरू'; - - @override - String get views => 'हेरिएको'; - - @override - String get streamUrl => 'स्ट्रिम यूआरएल'; - - @override - String get stop => 'रोक्नुहोस्'; - - @override - String get sort_newest => 'नयाँ थपिएकोमा क्रमबद्ध गर्नुहोस्'; - - @override - String get sort_oldest => 'पुरानो थपिएकोमा क्रमबद्ध गर्नुहोस्'; - - @override - String get sleep_timer => 'सुत्ने टाइमर'; - - @override - String mins(Object minutes) { - return '$minutes मिनेटहरू'; - } - - @override - String hours(Object hours) { - return '$hours घण्टाहरू'; - } - - @override - String hour(Object hours) { - return '$hours घण्टा'; - } - - @override - String get custom_hours => 'कस्टम घण्टाहरू'; - - @override - String get logs => 'लगहरू'; - - @override - String get developers => 'डेभेलपर्स'; - - @override - String get not_logged_in => 'तपाईंले लगइन गरेका छैनौं'; - - @override - String get search_mode => 'खोज मोड'; - - @override - String get audio_source => 'अडियो स्रोत'; - - @override - String get ok => 'ठिक छ'; - - @override - String get failed_to_encrypt => 'एन्क्रिप्ट गर्न सकिएन'; - - @override - String get encryption_failed_warning => - 'स्पट्यूबले तपाईंको डेटा सुरक्षित रूपमा स्टोर गर्नका लागि एन्क्रिप्ट गर्न खोजेको छ। तर यसले गरेको छैन। यसले असुरक्षित स्टोरेजमा फल्लब्याक गर्दछ\nयदि तपाईंले लिनक्स प्रयोग गरिरहेका छन् भने कृपया सुनिश्चित गर्नुहोस् कि तपाईंले कुनै सीक्रेट-सर्भिस (गोनोम-किरिङ, केडीइ-वालेट, किपासेक्ससि इत्यादि) इन्स्टल गरेका छौं'; - - @override - String get querying_info => 'जानकारी हेर्दै...'; - - @override - String get piped_api_down => 'पाइपड एपीआई डाउन छ'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'पाइपड इन्स्ट्यान्स $pipedInstance हाल डाउन छ\n\nजीसनै इन्स्ट्यान्स परिवर्तन गर्नुहोस् वा \'एपीआई प्रकार\' लाइ YouTube आफिसियल एपीआईमा परिवर्तन गर्नुहोस्\n\nपरिवर्तनपछि एप्लिकेसन पुन: सुरु गर्नुहोस्'; - } - - @override - String get you_are_offline => 'तपाईं वर्तमान अफलाइन हुनुहुन्छ'; - - @override - String get connection_restored => - 'तपाईंको इन्टरनेट कनेक्सन पुन: स्थापित भएको छ'; - - @override - String get use_system_title_bar => 'सिस्टम शीर्षक पट्टी प्रयोग गर्नुहोस्'; - - @override - String get crunching_results => 'परिणामहरू कपालबाट पीस्दै...'; - - @override - String get search_to_get_results => - 'परिणामहरू प्राप्त गर्नका लागि खोज्नुहोस्'; - - @override - String get use_amoled_mode => 'कृष्ण ब्ल्याक गाढा थिम प्रयोग गर्नुहोस्'; - - @override - String get pitch_dark_theme => 'एमोलेड मोड'; - - @override - String get normalize_audio => 'अडियो सामान्य गर्नुहोस्'; - - @override - String get change_cover => 'कवर परिवर्तन गर्नुहोस्'; - - @override - String get add_cover => 'कवर थप्नुहोस्'; - - @override - String get restore_defaults => 'पूर्वनिर्धारितहरू पुनः स्थापित गर्नुहोस्'; - - @override - String get download_music_format => 'सङ्गीत डाउनलोड ढाँचा'; - - @override - String get streaming_music_format => 'स्ट्रिमिङ सङ्गीत ढाँचा'; - - @override - String get download_music_quality => 'डाउनलोड गुणस्तर'; - - @override - String get streaming_music_quality => 'स्ट्रिमिङ गुणस्तर'; - - @override - String get login_with_lastfm => 'लास्ट.एफ.एम सँग लगइन गर्नुहोस्'; - - @override - String get connect => 'जडान गर्नुहोस्'; - - @override - String get disconnect_lastfm => 'लास्ट.एफ.एम डिसकनेक्ट गर्नुहोस्'; - - @override - String get disconnect => 'डिसकनेक्ट'; - - @override - String get username => 'प्रयोगकर्ता नाम'; - - @override - String get password => 'पासवर्ड'; - - @override - String get login => 'लगइन'; - - @override - String get login_with_your_lastfm => - 'तपाईंको लास्ट.एफ.एम खातामा लगइन गर्नुहोस्'; - - @override - String get scrobble_to_lastfm => 'लास्ट.एफ.एम मा स्क्रबल गर्नुहोस्'; - - @override - String get go_to_album => 'आल्बममा जानुहोस्'; - - @override - String get discord_rich_presence => 'डिस्कर्ड धनी उपस्थिति'; - - @override - String get browse_all => 'सबै हेर्नुहोस्'; - - @override - String get genres => 'शैलीहरू'; - - @override - String get explore_genres => 'शैलीहरू अन्वेषण गर्नुहोस्'; - - @override - String get friends => 'साथीहरू'; - - @override - String get no_lyrics_available => - 'क्षमा गर्दैछौं, यस ट्र्याकका लागि गीतका शब्दहरू फेला परेन'; - - @override - String get start_a_radio => 'रेडियो सुरु गर्नुहोस्'; - - @override - String get how_to_start_radio => 'तपाईं रेडियो कसरी सुरु गर्न चाहानुहुन्छ?'; - - @override - String get replace_queue_question => - 'के तपाईं वर्तमान कताक्ष कोट बदल्न चाहानुहुन्छ वा यसलाई थप्नुहुन्छ?'; - - @override - String get endless_playback => 'अनन्त प्लेब्याक'; - - @override - String get delete_playlist => 'प्लेलिस्ट मेटाउनुहोस्'; - - @override - String get delete_playlist_confirmation => - 'के तपाईं यो प्लेलिस्ट मेटाउन निश्चित हुनुहुन्छ?'; - - @override - String get local_tracks => 'स्थानिय ट्र्याकहरू'; - - @override - String get local_tab => 'स्थानिय'; - - @override - String get song_link => 'गीत लिंक'; - - @override - String get skip_this_nonsense => 'यस अबश्यकता छोड्नुहोस्'; - - @override - String get freedom_of_music => '“संगीतको स्वतन्त्रता”'; - - @override - String get freedom_of_music_palm => '“तपाईंको हातमा संगीतको स्वतन्त्रता”'; - - @override - String get get_started => 'आइयाँ प्रारम्भ गरौं'; - - @override - String get youtube_source_description => 'सिफारिस गरिएको र बेस्ट काम गर्दछ।'; - - @override - String get piped_source_description => - 'मुक्त सुस्त? YouTube जस्तै तर धेरै मुक्त।'; - - @override - String get jiosaavn_source_description => - 'दक्षिण एशियाली क्षेत्रको लागि सर्वोत्तम।'; - - @override - String get invidious_source_description => 'Piped जस्तै तर उच्च उपलब्धतासँग।'; - - @override - String highest_quality(Object quality) { - return 'उच्चतम गुणस्तर: $quality'; - } - - @override - String get select_audio_source => 'आडियो स्रोत चयन गर्नुहोस्'; - - @override - String get endless_playback_description => - 'नयाँ गीतहरूलाई स्वचालित रूपमा कताक्षको अन्तमा जोड्नुहोस्'; - - @override - String get choose_your_region => 'तपाईंको क्षेत्र छनौट गर्नुहोस्'; - - @override - String get choose_your_region_description => - 'यो Spotubeलाई तपाईंको स्थानका लागि सहि सामग्री देखाउने मद्दत गर्नेछ।'; - - @override - String get choose_your_language => 'तपाईंको भाषा छनौट गर्नुहोस्'; - - @override - String get help_project_grow => 'यस परियोजनामा वृद्धि गराउनुहोस्'; - - @override - String get help_project_grow_description => - 'Spotube एक खुला स्रोतको परियोजना हो। तपाईं परियोजनामा योगदान गरेर, त्रुटिहरू सूचिकै, वा नयाँ सुविधाहरू सुझाव दिएर यस परियोजनामा वृद्धि गर्न सक्नुहुन्छ।'; - - @override - String get contribute_on_github => 'GitHubमा योगदान गर्नुहोस्'; - - @override - String get donate_on_open_collective => 'खुला संगठनमा दान गर्नुहोस्'; - - @override - String get browse_anonymously => 'अनामित रूपमा ब्राउज़ गर्नुहोस्'; - - @override - String get enable_connect => 'कनेक्ट सक्रिय गर्नुहोस्'; - - @override - String get enable_connect_description => - 'अन्य उपकरणहरूबाट Spotube कन्ट्रोल गर्नुहोस्'; - - @override - String get devices => 'उपकरणहरू'; - - @override - String get select => 'चयन गर्नुहोस्'; - - @override - String connect_client_alert(Object client) { - return 'तपाईंलाई $client द्वारा नियन्त्रित गरिएको छ'; - } - - @override - String get this_device => 'यो उपकरण'; - - @override - String get remote => 'दूरसंचार'; - - @override - String get stats => 'तथ्याङ्क'; - - @override - String and_n_more(Object count) { - return 'राम्रो $count थप'; - } - - @override - String get recently_played => 'हालै खेलेको'; - - @override - String get browse_more => 'थप हेर्नुहोस्'; - - @override - String get no_title => 'शीर्षक छैन'; - - @override - String get not_playing => 'खेलिरहेको छैन'; - - @override - String get epic_failure => 'महाकवि असफलता!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length ट्र्याकहरू तालिकामा थपिएका छन्'; - } - - @override - String get spotube_has_an_update => 'Spotube मा अपडेट छ'; - - @override - String get download_now => 'अहिले डाउनलोड गर्नुहोस्'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum रिलिज गरिएको छ'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version रिलिज गरिएको छ'; - } - - @override - String get read_the_latest => 'अर्को '; - - @override - String get release_notes => 'रिलिज नोटहरू'; - - @override - String get pick_color_scheme => 'रंग योजना चयन गर्नुहोस्'; - - @override - String get save => 'सुरक्षित गर्नुहोस्'; - - @override - String get choose_the_device => 'उपकरण चयन गर्नुहोस्:'; - - @override - String get multiple_device_connected => - 'धेरै उपकरण जडान गरिएको छ।\nयो क्रियाकलाप गर्ने उपकरण चयन गर्नुहोस्'; - - @override - String get nothing_found => 'केही फेला परेन'; - - @override - String get the_box_is_empty => 'बक्स खाली छ'; - - @override - String get top_artists => 'शीर्ष कलाकारहरू'; - - @override - String get top_albums => 'शीर्ष एल्बमहरू'; - - @override - String get this_week => 'यो हप्ता'; - - @override - String get this_month => 'यो महिना'; - - @override - String get last_6_months => 'पछिल्लो ६ महिना'; - - @override - String get this_year => 'यो वर्ष'; - - @override - String get last_2_years => 'पछिल्लो २ वर्ष'; - - @override - String get all_time => 'सबै समय'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName द्वारा शक्ति प्राप्त'; - } - - @override - String get email => 'ईमेल'; - - @override - String get profile_followers => 'अनुयायीहरू'; - - @override - String get birthday => 'जन्मदिन'; - - @override - String get subscription => 'सदस्यता'; - - @override - String get not_born => 'जन्मिएको छैन'; - - @override - String get hacker => 'ह्याकर'; - - @override - String get profile => 'प्रोफाइल'; - - @override - String get no_name => 'नाम छैन'; - - @override - String get edit => 'सम्पादन गर्नुहोस्'; - - @override - String get user_profile => 'प्रयोगकर्ता प्रोफाइल'; - - @override - String count_plays(Object count) { - return '$count खेलाइन्छ'; - } - - @override - String get streaming_fees_hypothetical => - '*यो Spotify को प्रति स्ट्रिमको आधारमा गणना गरिएको छ\n\$0.003 देखि \$0.005 बीचको भुक्तानी। यो एक काल्पनिक गणना हो\nउपयोगकर्तालाई यो थाहा दिनको लागि कि उनीहरूले अर्टिस्टहरूलाई\nSpotify मा गीत सुनेको भए कति भुक्तानी गर्ने थिए।'; - - @override - String get minutes_listened => 'सुनिएका मिनेटहरू'; - - @override - String get streamed_songs => 'स्ट्रीम गरिएका गीतहरू'; - - @override - String count_streams(Object count) { - return '$count स्ट्रिम'; - } - - @override - String get owned_by_you => 'तपाईंले स्वामित्व गरेको'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl क्लिपबोर्डमा कपी गरियो'; - } - - @override - String get hipotetical_calculation => - '*यो अनलाइन संगीत स्ट्रिमिङ प्लेटफर्मको प्रति स्ट्रिम भुक्तानी \$0.003 देखि \$0.005 को औसतमा आधारित छ। यो एक काल्पनिक गणना हो जुन प्रयोगकर्तालाई उनीहरूले विभिन्न संगीत स्ट्रिमिङ प्लेटफर्ममा आफ्ना गीतहरू सुनेमा कलाकारहरूलाई कति भुक्तानी गर्ने थिए भन्ने बारेमा अन्तरदृष्टि दिनको लागि हो।'; - - @override - String count_mins(Object minutes) { - return '$minutes मिनेट'; - } - - @override - String get summary_minutes => 'मिनेट'; - - @override - String get summary_listened_to_music => 'सङ्गीत सुन्नु'; - - @override - String get summary_songs => 'गीतहरू'; - - @override - String get summary_streamed_overall => 'सामान्य रूपले स्ट्रीम गरिएको'; - - @override - String get summary_owed_to_artists => 'यस महिना कलाकारहरूलाई देन'; - - @override - String get summary_artists => 'कलाकारको'; - - @override - String get summary_music_reached_you => 'सङ्गीत तपाईंलाई पुग्यो'; - - @override - String get summary_full_albums => 'पूर्ण एल्बमहरू'; - - @override - String get summary_got_your_love => 'तपाईंको माया प्राप्त गरियो'; - - @override - String get summary_playlists => 'प्लेइस्ट'; - - @override - String get summary_were_on_repeat => 'पुनरावृत्ति गरियो'; - - @override - String total_money(Object money) { - return 'कुल $money'; - } - - @override - String get webview_not_found => 'वेबभ्यू फेला परेन'; - - @override - String get webview_not_found_description => - 'तपाईंको उपकरणमा कुनै वेबभ्यू रनटाइम स्थापना गरिएको छैन।\nयदि स्थापना गरिएको छ भने, environment PATH मा छ कि छैन भनेर सुनिश्चित गर्नुहोस्\n\nस्थापना पछि, अनुप्रयोग पुनः सुरु गर्नुहोस्'; - - @override - String get unsupported_platform => 'असमर्थित प्लेटफार्म'; - - @override - String get cache_music => 'सङ्गीत क्यास गर्नुहोस्'; - - @override - String get open => 'खोल्नुहोस्'; - - @override - String get cache_folder => 'क्यास फोल्डर'; - - @override - String get export => 'निर्यात गर्नुहोस्'; - - @override - String get clear_cache => 'क्यास खाली गर्नुहोस्'; - - @override - String get clear_cache_confirmation => 'के तपाई क्यास खाली गर्न चाहनुहुन्छ?'; - - @override - String get export_cache_files => 'क्यास फाइलहरू निर्यात गर्नुहोस्'; - - @override - String found_n_files(Object count) { - return '$count फाइलहरू फेला परे'; - } - - @override - String get export_cache_confirmation => 'यी फाइलहरू निर्यात गर्न चाहनुहुन्छ'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported मध्ये $files फाइलहरू निर्यात गरियो'; - } - - @override - String get undo => 'पूर्ववत'; - - @override - String get download_all => 'सभी डाउनलोड करें'; - - @override - String get add_all_to_playlist => 'सभी को प्लेलिस्ट में जोड़ें'; - - @override - String get add_all_to_queue => 'सभी को कतार में जोड़ें'; - - @override - String get play_all_next => 'सभी को अगला प्ले करें'; - - @override - String get pause => 'विराम'; - - @override - String get view_all => 'सभी देखें'; - - @override - String get no_tracks_added_yet => - 'लगता है आपने अभी तक कोई ट्रैक नहीं जोड़ा है'; - - @override - String get no_tracks => 'यहाँ कोई ट्रैक नहीं दिख रहे हैं'; - - @override - String get no_tracks_listened_yet => - 'आपने अभी तक कुछ नहीं सुना है ऐसा लगता है'; - - @override - String get not_following_artists => 'आप किसी कलाकार को फॉलो नहीं कर रहे हैं'; - - @override - String get no_favorite_albums_yet => - 'लगता है आपने अभी तक कोई एल्बम पसंदीदा में नहीं जोड़ा है'; - - @override - String get no_logs_found => 'कोई लॉग नहीं मिला'; - - @override - String get youtube_engine => 'YouTube इंजन'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine इंस्टॉल नहीं है'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine आपके सिस्टम में इंस्टॉल नहीं है।'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'सुनिश्चित करें कि यह PATH वेरिएबल में उपलब्ध है या\nनीचे $engine एक्जीक्यूटेबल का पूर्ण पथ सेट करें'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/unix जैसे ऑपरेटिंग सिस्टम में, .zshrc/.bashrc/.bash_profile आदि में पथ सेट करना काम नहीं करेगा।\nआपको शेल कॉन्फ़िगरेशन फ़ाइल में पथ सेट करना होगा'; - - @override - String get download => 'डाउनलोड'; - - @override - String get file_not_found => 'फ़ाइल नहीं मिली'; - - @override - String get custom => 'कस्टम'; - - @override - String get add_custom_url => 'कस्टम URL जोड़ें'; - - @override - String get edit_port => 'पोर्ट सम्पादन गर्नुहोस्'; - - @override - String get port_helper_msg => - 'डिफ़ॉल्ट -1 हो जुन यादृच्छिक संख्या जनाउँछ। यदि तपाईंले फायरवाल कन्फिगर गर्नुभएको छ भने, यसलाई सेट गर्न सिफारिस गरिन्छ।'; - - @override - String connect_request(Object client) { - return '$client लाई जडान गर्न अनुमति दिनुहोस्?'; - } - - @override - String get connection_request_denied => - 'जडान अस्वीकृत। प्रयोगकर्ताले पहुँच अस्वीकृत गर्यो।'; - - @override - String get an_error_occurred => 'त्रुटि भयो'; - - @override - String get copy_to_clipboard => 'क्लिपबोर्डमा प्रतिलिपि गर्नुहोस्'; - - @override - String get view_logs => 'लगहरू हेर्नुहोस्'; - - @override - String get retry => 'पुनः प्रयास गर्नुहोस्'; - - @override - String get no_default_metadata_provider_selected => - 'तपाईंले कुनै पूर्वनिर्धारित मेटाडेटा प्रदायक सेट गर्नुभएको छैन'; - - @override - String get manage_metadata_providers => - 'मेटाडेटा प्रदायकहरू प्रबन्ध गर्नुहोस्'; - - @override - String get open_link_in_browser => 'ब्राउजरमा लिङ्क खोल्ने?'; - - @override - String get do_you_want_to_open_the_following_link => - 'के तपाईं निम्न लिङ्क खोल्न चाहनुहुन्छ'; - - @override - String get unsafe_url_warning => - 'अविश्वसनीय स्रोतहरूबाट लिङ्कहरू खोल्नु असुरक्षित हुन सक्छ। सावधान रहनुहोस्!\nतपाईं लिङ्कलाई आफ्नो क्लिपबोर्डमा पनि प्रतिलिपि गर्न सक्नुहुन्छ।'; - - @override - String get copy_link => 'लिङ्क प्रतिलिपि गर्नुहोस्'; - - @override - String get building_your_timeline => - 'तपाईंको सुन्ने आधारमा तपाईंको समयरेखा निर्माण गर्दै...'; - - @override - String get official => 'आधिकारिक'; - - @override - String author_name(Object author) { - return 'लेखक: $author'; - } - - @override - String get third_party => 'तेस्रो-पक्ष'; - - @override - String get plugin_requires_authentication => 'प्लगइनलाई प्रमाणीकरण चाहिन्छ'; - - @override - String get update_available => 'अपडेट उपलब्ध छ'; - - @override - String get supports_scrobbling => 'स्क्रब्बलिंगलाई समर्थन गर्दछ'; - - @override - String get plugin_scrobbling_info => - 'यो प्लगइनले तपाईंको सुन्ने इतिहास उत्पन्न गर्न तपाईंको संगीतलाई स्क्रब्बल गर्दछ।'; - - @override - String get default_metadata_source => 'पूर्वनिर्धारित मेटाडाटा स्रोत'; - - @override - String get set_default_metadata_source => - 'पूर्वनिर्धारित मेटाडाटा स्रोत सेट गर्नुहोस्'; - - @override - String get default_audio_source => 'पूर्वनिर्धारित अडियो स्रोत'; - - @override - String get set_default_audio_source => - 'पूर्वनिर्धारित अडियो स्रोत सेट गर्नुहोस्'; - - @override - String get set_default => 'पूर्वनिर्धारित सेट गर्नुहोस्'; - - @override - String get support => 'समर्थन'; - - @override - String get support_plugin_development => 'प्लगइन विकासलाई समर्थन गर्नुहोस्'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API मा पहुँच गर्न सक्छ'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'के तपाईं यो प्लगइन स्थापना गर्न चाहनुहुन्छ?'; - - @override - String get third_party_plugin_warning => - 'यो प्लगइन तेस्रो-पक्ष रिपोसिटरीबाट हो। कृपया स्थापना गर्नु अघि तपाईंले स्रोतमा विश्वास गर्नुहुन्छ भनी सुनिश्चित गर्नुहोस्।'; - - @override - String get author => 'लेखक'; - - @override - String get this_plugin_can_do_following => 'यो प्लगइनले निम्न गर्न सक्छ'; - - @override - String get install => 'स्थापना गर्नुहोस्'; - - @override - String get install_a_metadata_provider => - 'मेटाडेटा प्रदायक स्थापना गर्नुहोस्'; - - @override - String get no_tracks_playing => 'हाल कुनै ट्र्याक बजिरहेको छैन'; - - @override - String get synced_lyrics_not_available => - 'यो गीतको लागि सिङ्क गरिएका बोलहरू उपलब्ध छैनन्। कृपया यसको सट्टा'; - - @override - String get plain_lyrics => 'सादा बोलहरू'; - - @override - String get tab_instead => 'ट्याब प्रयोग गर्नुहोस्।'; - - @override - String get disclaimer => 'अस्वीकरण'; - - @override - String get third_party_plugin_dmca_notice => - 'स्पोट्यूब टोलीले कुनै पनि \"तेस्रो-पक्ष\" प्लगइनहरूको लागि कुनै जिम्मेवारी (कानुनी सहित) लिँदैन।\nकृपया तिनीहरूलाई आफ्नो जोखिममा प्रयोग गर्नुहोस्। कुनै पनि बग/समस्याहरूको लागि, कृपया तिनीहरूलाई प्लगइन रिपोसिटरीमा रिपोर्ट गर्नुहोस्।\n\nयदि कुनै \"तेस्रो-पक्ष\" प्लगइनले कुनै सेवा/कानुनी संस्थाको ToS/DMCA तोडिरहेको छ भने, कृपया \"तेस्रो-पक्ष\" प्लगइन लेखक वा होस्टिङ प्लेटफर्म e.g. GitHub/Codeberg लाई कारबाही गर्न अनुरोध गर्नुहोस्। माथि सूचीबद्ध (\"तेस्रो-पक्ष\" लेबल गरिएका) सबै सार्वजनिक/सामुदायिक रूपमा राखिएका प्लगइनहरू हुन्। हामी तिनीहरूलाई क्युरेट गरिरहेका छैनौं, त्यसैले हामी तिनीहरूमा कुनै कारबाही गर्न सक्दैनौं।\n\n'; - - @override - String get input_does_not_match_format => 'इनपुट आवश्यक ढाँचासँग मेल खाँदैन'; - - @override - String get plugins => 'प्लगइनहरू'; - - @override - String get paste_plugin_download_url => - 'डाउनलोड url वा GitHub/Codeberg repo url वा .smplug फाइलमा सिधा लिङ्क टाँस्नुहोस्'; - - @override - String get download_and_install_plugin_from_url => - 'url बाट प्लगइन डाउनलोड र स्थापना गर्नुहोस्'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'प्लगइन थप्न असफल: $error'; - } - - @override - String get upload_plugin_from_file => 'फाइलबाट प्लगइन अपलोड गर्नुहोस्'; - - @override - String get installed => 'स्थापित'; - - @override - String get available_plugins => 'उपलब्ध प्लगइनहरू'; - - @override - String get configure_plugins => - 'आफ्नै मेटाडाटा प्रदायक र अडियो स्रोत प्लगइनहरू कन्फिगर गर्नुहोस्'; - - @override - String get audio_scrobblers => 'अडियो स्क्रब्बलरहरू'; - - @override - String get scrobbling => 'स्क्रब्बलिंग'; - - @override - String get source => 'स्रोत: '; - - @override - String get uncompressed => 'असंक्षिप्त'; - - @override - String get dab_music_source_description => - 'अडियोप्रेमीहरूका लागि। उच्च गुणस्तर/लसलेस अडियो स्ट्रिमहरू उपलब्ध गराउँछ। ISRC-मा आधारित सटीक ट्र्याक मिलान।'; -} diff --git a/lib/l10n/generated/app_localizations_nl.dart b/lib/l10n/generated/app_localizations_nl.dart deleted file mode 100644 index 0a73c640..00000000 --- a/lib/l10n/generated/app_localizations_nl.dart +++ /dev/null @@ -1,1570 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Dutch Flemish (`nl`). -class AppLocalizationsNl extends AppLocalizations { - AppLocalizationsNl([String locale = 'nl']) : super(locale); - - @override - String get guest => 'Gast'; - - @override - String get browse => 'Bladeren'; - - @override - String get search => 'Zoeken'; - - @override - String get library => 'Bibliotheek'; - - @override - String get lyrics => 'Teksten'; - - @override - String get settings => 'Instellingen'; - - @override - String get genre_categories_filter => 'Categorieën of genres filteren…'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Gepersonaliseerd'; - - @override - String get featured => 'Aanbevolen'; - - @override - String get new_releases => 'Nieuwe uitgaven'; - - @override - String get songs => 'Liedjes'; - - @override - String playing_track(Object track) { - return '$track afspelen'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Dit zal de huidige wachtrij wissen. $track_length nummers worden verwijderd\nWil je doorgaan?'; - } - - @override - String get load_more => 'Meer laden'; - - @override - String get playlists => 'Afspeellijsten'; - - @override - String get artists => 'Artiesten'; - - @override - String get albums => 'Albums'; - - @override - String get tracks => 'Nummers'; - - @override - String get downloads => 'Downloads'; - - @override - String get filter_playlists => 'Afspeellijsten filteren…'; - - @override - String get liked_tracks => 'Geliefde tracks'; - - @override - String get liked_tracks_description => 'Al je favoriete nummers'; - - @override - String get playlist => 'Afspeellijst'; - - @override - String get create_a_playlist => 'Een afspeellijst aanmaken'; - - @override - String get update_playlist => 'Afspeellijst bijwerken'; - - @override - String get create => 'Aanmaken'; - - @override - String get cancel => 'Annuleren'; - - @override - String get update => 'Bijwerken'; - - @override - String get playlist_name => 'Naam afspeellijst'; - - @override - String get name_of_playlist => 'Naam van de afspeellijst'; - - @override - String get description => 'Beschrijving'; - - @override - String get public => 'Openbaar'; - - @override - String get collaborative => 'Samenwerkend'; - - @override - String get search_local_tracks => 'Lokale nummers zoeken…'; - - @override - String get play => 'Afspelen'; - - @override - String get delete => 'Wissen'; - - @override - String get none => 'Geen'; - - @override - String get sort_a_z => 'Sorteren op A-Z'; - - @override - String get sort_z_a => 'Sorteren op Z-A'; - - @override - String get sort_artist => 'Sorteren op artiest'; - - @override - String get sort_album => 'Sorteren op album'; - - @override - String get sort_duration => 'Sorteren op lengte'; - - @override - String get sort_tracks => 'Nummers sorteren'; - - @override - String currently_downloading(Object tracks_length) { - return 'Momenteel aan het downloaden ($tracks_length)'; - } - - @override - String get cancel_all => 'Alles annuleren'; - - @override - String get filter_artist => 'Artiesten filteren…'; - - @override - String followers(Object followers) { - return '$followers volgers'; - } - - @override - String get add_artist_to_blacklist => 'Artiest toevoegen aan zwarte lijst'; - - @override - String get top_tracks => 'Topnummers'; - - @override - String get fans_also_like => 'Fans luisteren ook'; - - @override - String get loading => 'Laden…'; - - @override - String get artist => 'Artiest'; - - @override - String get blacklisted => 'Zwarte lijst'; - - @override - String get following => 'Volgen'; - - @override - String get follow => 'Volgen'; - - @override - String get artist_url_copied => 'URL artiest gekopieerd naar klembord'; - - @override - String added_to_queue(Object tracks) { - return '$tracks nummers toegevoegd aan wachtrij'; - } - - @override - String get filter_albums => 'Albums filteren…'; - - @override - String get synced => 'Gesynchroniseerd'; - - @override - String get plain => 'Eenvoudig'; - - @override - String get shuffle => 'Willekeurig'; - - @override - String get search_tracks => 'Nummers zoeken…'; - - @override - String get released => 'Uitgegeven'; - - @override - String error(Object error) { - return 'Fout $error'; - } - - @override - String get title => 'Titel'; - - @override - String get time => 'Tijd'; - - @override - String get more_actions => 'Meer acties'; - - @override - String download_count(Object count) { - return '($count) downloads'; - } - - @override - String add_count_to_playlist(Object count) { - return '($count) aan afspeellijst toevoegen'; - } - - @override - String add_count_to_queue(Object count) { - return '($count) aan wachtrij toevoegen'; - } - - @override - String play_count_next(Object count) { - return 'Volgende ($count) afspelen'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return '$data naar klembord gekopieerd'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track aan volgende afspeellijsten toevoegen'; - } - - @override - String get add => 'Toevoegen'; - - @override - String added_track_to_queue(Object track) { - return '$track aan wachtrij toegevoegd'; - } - - @override - String get add_to_queue => 'Toevoegen aan wachtrij'; - - @override - String track_will_play_next(Object track) { - return '$track wordt hierna afgespeeld'; - } - - @override - String get play_next => 'Volgende afspelen'; - - @override - String removed_track_from_queue(Object track) { - return '$track van wachtrij verwijderd'; - } - - @override - String get remove_from_queue => 'Van wachtrij verwijderen'; - - @override - String get remove_from_favorites => 'Van favorieten verwijderen'; - - @override - String get save_as_favorite => 'Opslaan als favoriet'; - - @override - String get add_to_playlist => 'Aan afspeellijst toevoegen'; - - @override - String get remove_from_playlist => 'Van afspeellijst verwijderen'; - - @override - String get add_to_blacklist => 'Aan zwarte lijst toevoegen'; - - @override - String get remove_from_blacklist => 'Van zwarte lijst verwijderen'; - - @override - String get share => 'Delen'; - - @override - String get mini_player => 'Minispeler'; - - @override - String get slide_to_seek => 'Schuiven om vooruit of achteruit te zoeken'; - - @override - String get shuffle_playlist => 'Afspeellijst willekeurig'; - - @override - String get unshuffle_playlist => 'Afspeellijst op volgorde'; - - @override - String get previous_track => 'Vorige nummer'; - - @override - String get next_track => 'Volgende nummer'; - - @override - String get pause_playback => 'Afspelen pauzeren'; - - @override - String get resume_playback => 'Afspelen hervatten'; - - @override - String get loop_track => 'Nummer herhalen'; - - @override - String get no_loop => 'Geen herhaling'; - - @override - String get repeat_playlist => 'Afspeellijst herhalen'; - - @override - String get queue => 'Wachtrij'; - - @override - String get alternative_track_sources => 'Alternatieve bronnen voor nummers'; - - @override - String get download_track => 'Nummer downloaden'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks nummers in wachtrij'; - } - - @override - String get clear_all => 'Alles wissen'; - - @override - String get show_hide_ui_on_hover => 'UI tonen/verbergen bij zweven'; - - @override - String get always_on_top => 'Altijd bovenaan'; - - @override - String get exit_mini_player => 'Minispeler afsluiten'; - - @override - String get download_location => 'Downloadlocatie'; - - @override - String get local_library => 'Lokale bibliotheek'; - - @override - String get add_library_location => 'Toevoegen aan bibliotheek'; - - @override - String get remove_library_location => 'Verwijderen uit bibliotheek'; - - @override - String get account => 'Account'; - - @override - String get logout => 'Afmelden'; - - @override - String get logout_of_this_account => 'Afmelden van dit account'; - - @override - String get language_region => 'Taal & regio'; - - @override - String get language => 'Taal'; - - @override - String get system_default => 'Systeemstandaard'; - - @override - String get market_place_region => 'Marktplaats-regio'; - - @override - String get recommendation_country => 'Aanbeveling Land'; - - @override - String get appearance => 'Uiterlijk'; - - @override - String get layout_mode => 'Opmaakmodus'; - - @override - String get override_layout_settings => - 'Instellingen voor responsieve opmaakmodus opheffen'; - - @override - String get adaptive => 'Adaptief'; - - @override - String get compact => 'Compact'; - - @override - String get extended => 'Uitgebreid'; - - @override - String get theme => 'Thema'; - - @override - String get dark => 'Donker'; - - @override - String get light => 'Licht'; - - @override - String get system => 'Systeem'; - - @override - String get accent_color => 'Accentkleur'; - - @override - String get sync_album_color => 'Albumkleur synchroniseren'; - - @override - String get sync_album_color_description => - 'Gebruikt de overheersende kleur van het album als accentkleur'; - - @override - String get playback => 'Weergave'; - - @override - String get audio_quality => 'Audiokwaliteit'; - - @override - String get high => 'Hoog'; - - @override - String get low => 'Laag'; - - @override - String get pre_download_play => 'Vooraf downloaden en afspelen'; - - @override - String get pre_download_play_description => - 'In plaats van audio te streamen, kun je bytes downloaden en afspelen (aanbevolen voor gebruikers met een hogere bandbreedte)'; - - @override - String get skip_non_music => 'Niet-muzieksegmenten overslaan (SponsorBlock)'; - - @override - String get blacklist_description => 'Nummers en artiesten op de zwarte lijst'; - - @override - String get wait_for_download_to_finish => - 'Wacht tot de huidige download is voltooid'; - - @override - String get desktop => 'Bureaublad'; - - @override - String get close_behavior => 'Sluitgedrag'; - - @override - String get close => 'Afsluiten'; - - @override - String get minimize_to_tray => 'Minimaliseren naar systeemvak'; - - @override - String get show_tray_icon => 'Systeemvakpictogram tonen'; - - @override - String get about => 'Over'; - - @override - String get u_love_spotube => 'We weten dat je van Spotube houd'; - - @override - String get check_for_updates => 'Controleren op updates'; - - @override - String get about_spotube => 'Over Spotube'; - - @override - String get blacklist => 'Zwarte lijst'; - - @override - String get please_sponsor => 'Sponsor/Doneer a.u.b.'; - - @override - String get spotube_description => - 'Spotube, een lichtgewicht, cross-platform, vrij-voor-alles Spotify-client'; - - @override - String get version => 'Versie'; - - @override - String get build_number => 'Bouwnummer'; - - @override - String get founder => 'Grondlegger'; - - @override - String get repository => 'Opslagplaats'; - - @override - String get bug_issues => 'Bug+problemen'; - - @override - String get made_with => 'Met ❤️ gemaakt in Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licentie'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Maak je geen zorgen, je gegevens worden niet verzameld of gedeeld met anderen.'; - - @override - String get know_how_to_login => 'Weet je niet hoe je dit moet doen?'; - - @override - String get follow_step_by_step_guide => 'Volg de stapsgewijze handleiding'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => 'Vul alle velden in a.u.b.'; - - @override - String get submit => 'Verzenden'; - - @override - String get exit => 'Afronden'; - - @override - String get previous => 'Vorige'; - - @override - String get next => 'Volgende'; - - @override - String get done => 'Klaar'; - - @override - String get step_1 => 'Stap 1'; - - @override - String get first_go_to => 'Ga eerst naar'; - - @override - String get something_went_wrong => 'Er ging iets mis'; - - @override - String get piped_instance => 'Piped-serverinstantie'; - - @override - String get piped_description => - 'De Piped-serverinstantie die moet worden gebruikt voor overeenkomstige nummers'; - - @override - String get piped_warning => - 'Sommige werken misschien niet goed. Dus gebruik ze op eigen risico'; - - @override - String get invidious_instance => 'Invidious-serverinstantie'; - - @override - String get invidious_description => - 'De Invidious-serverinstantie die gebruikt wordt voor trackmatching'; - - @override - String get invidious_warning => - 'Sommigen werken mogelijk niet goed. Gebruik op eigen risico'; - - @override - String get generate => 'Genereren'; - - @override - String track_exists(Object track) { - return 'Nummer $track bestaat al'; - } - - @override - String get replace_downloaded_tracks => 'Alle gedownloade nummers vervangen'; - - @override - String get skip_download_tracks => - 'Downloaden van alle gedownloade nummers overslaan'; - - @override - String get do_you_want_to_replace => 'Wil je het bestaande nummer vervangen?'; - - @override - String get replace => 'Vervangen'; - - @override - String get skip => 'Overslaan'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Selecteer tot $count $type'; - } - - @override - String get select_genres => 'Genres selecteren'; - - @override - String get add_genres => 'Genres toevoegen'; - - @override - String get country => 'Land'; - - @override - String get number_of_tracks_generate => 'Aantal nummers om te genereren'; - - @override - String get acousticness => 'Akoestiek'; - - @override - String get danceability => 'Dansbaarheid'; - - @override - String get energy => 'Energie'; - - @override - String get instrumentalness => 'Instrumentaliteit'; - - @override - String get liveness => 'Levendigheid'; - - @override - String get loudness => 'Luidheid'; - - @override - String get speechiness => 'Spraak'; - - @override - String get valence => 'Valentie'; - - @override - String get popularity => 'Populariteit'; - - @override - String get key => 'Sleutel'; - - @override - String get duration => 'Tijdsduur (s)'; - - @override - String get tempo => 'Tempo (SPM)'; - - @override - String get mode => 'Modus'; - - @override - String get time_signature => 'Tijdsnotatie'; - - @override - String get short => 'Kort'; - - @override - String get medium => 'Middel'; - - @override - String get long => 'Lang'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Doel'; - - @override - String get moderate => 'Matig'; - - @override - String get deselect_all => 'Selectie opheffen'; - - @override - String get select_all => 'Alles selecteren'; - - @override - String get are_you_sure => 'Weet je het zeker?'; - - @override - String get generating_playlist => 'Aangepaste afspeellijst genereren…'; - - @override - String selected_count_tracks(Object count) { - return '$count nummers geselecteerd'; - } - - @override - String get download_warning => - 'Als je alle nummers in bulk downloadt, ben je duidelijk bezig met muziekpiraterij en breng je schade toe aan de creatieve muziekmaatschappij. Ik hoop dat je je hiervan bewust bent. Probeer altijd het harde werk van artiesten te respecteren en te steunen.'; - - @override - String get download_ip_ban_warning => - 'BTW, je IP-adres kan worden geblokkeerd op YouTube als gevolg van buitensporige downloadverzoeken. IP-blokkering betekent dat je YouTube niet kunt gebruiken (zelfs als je ingelogd bent) voor tenminste 2-3 maanden vanaf dat IP-apparaat. Spotube is niet verantwoordelijk als dit ooit gebeurt.'; - - @override - String get by_clicking_accept_terms => - 'Door op \'accepteren\' te klikken ga je akkoord met de volgende voorwaarden:'; - - @override - String get download_agreement_1 => - 'Ik weet dat ik muziek illegaal donload. Ik ben slecht.'; - - @override - String get download_agreement_2 => - 'Ik steun de artiest waar ik kan en ik doe dit alleen omdat ik geen geld heb om hun kunst te kopen.'; - - @override - String get download_agreement_3 => - 'Ik ben me er volledig van bewust dat mijn IP geblokkeerd kan worden op YouTube & ik houd Spotube of zijn eigenaars/contributeurs niet verantwoordelijk voor ongelukken die veroorzaakt worden door mijn huidige actie.'; - - @override - String get decline => 'Weigeren'; - - @override - String get accept => 'Accepteren'; - - @override - String get details => 'Bijzonderheden'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanaal'; - - @override - String get likes => 'Liefs'; - - @override - String get dislikes => 'Hekels'; - - @override - String get views => 'Weergaven'; - - @override - String get streamUrl => 'Stream-URL'; - - @override - String get stop => 'Stoppen'; - - @override - String get sort_newest => 'Sorteren op recent toegevoegd'; - - @override - String get sort_oldest => 'Sorteren op langst toegevoegd'; - - @override - String get sleep_timer => 'Slaaptimer'; - - @override - String mins(Object minutes) { - return '$minutes minuten'; - } - - @override - String hours(Object hours) { - return '$hours uren'; - } - - @override - String hour(Object hours) { - return '$hours uur'; - } - - @override - String get custom_hours => 'Aangepaste uren'; - - @override - String get logs => 'Logboeken'; - - @override - String get developers => 'Ontwikkelaars'; - - @override - String get not_logged_in => 'Je bent niet aangemeld'; - - @override - String get search_mode => 'Zoekmodus'; - - @override - String get audio_source => 'Audiobron'; - - @override - String get ok => 'Oké'; - - @override - String get failed_to_encrypt => 'Versleuteling mislukt'; - - @override - String get encryption_failed_warning => - 'Spotube gebruikt versleuteling om je gegevens veilig op te slaan. Maar dat is niet gelukt. Dus zal het terugvallen op onveilige opslag.\nAls je linux gebruikt, zorg er dan voor dat je een geheim-dienst (gnome-keyring, kde-wallet, keepassxc etc) hebt geïnstalleerd.'; - - @override - String get querying_info => 'Info opvragen…'; - - @override - String get piped_api_down => 'Piped API is uit'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'De Piped-instantie $pipedInstance is momenteel uitgevallen\n\nVerander de instantie of verander het \'API-type\' naar de officiële YouTube API.\n\nZorg ervoor dat u de app herstart na de wijziging'; - } - - @override - String get you_are_offline => 'Je bent momenteel offline'; - - @override - String get connection_restored => 'Je internetverbinding is hersteld'; - - @override - String get use_system_title_bar => 'Systeemtitelbalk gebruiken'; - - @override - String get crunching_results => 'Resultaten verwerken…'; - - @override - String get search_to_get_results => 'Zoeken naar resultaten'; - - @override - String get use_amoled_mode => 'Pikzwart donkerthema'; - - @override - String get pitch_dark_theme => 'AMOLED-modus'; - - @override - String get normalize_audio => 'Audio normaliseren'; - - @override - String get change_cover => 'Hoes aanpassen'; - - @override - String get add_cover => 'Hoes toevoegen'; - - @override - String get restore_defaults => 'Standaardwaarden herstellen'; - - @override - String get download_music_format => 'Download muziekformaat'; - - @override - String get streaming_music_format => 'Streaming muziekformaat'; - - @override - String get download_music_quality => 'Downloadkwaliteit'; - - @override - String get streaming_music_quality => 'Streamingkwaliteit'; - - @override - String get login_with_lastfm => 'Inloggen met Last.fm'; - - @override - String get connect => 'Verbinden'; - - @override - String get disconnect_lastfm => 'Last.fm verbreken'; - - @override - String get disconnect => 'Verbeken'; - - @override - String get username => 'Gebruikersnaam'; - - @override - String get password => 'Wachtwoord'; - - @override - String get login => 'Inloggen'; - - @override - String get login_with_your_lastfm => 'Inloggen met je Last.fm account'; - - @override - String get scrobble_to_lastfm => 'Scrobbelen naar Last.fm'; - - @override - String get go_to_album => 'Ga naar album'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'Alles doorbladeren'; - - @override - String get genres => 'Genres'; - - @override - String get explore_genres => 'Genres verkennen'; - - @override - String get friends => 'Vrienden'; - - @override - String get no_lyrics_available => - 'Sorry, geen teksten gevonden voor dit nummer'; - - @override - String get start_a_radio => 'Een radio starten'; - - @override - String get how_to_start_radio => 'Hoe wil je de radio starten?'; - - @override - String get replace_queue_question => - 'Wil je de huidige wachtrij vervangen of eraan toevoegen?'; - - @override - String get endless_playback => 'Oneindig afspelen'; - - @override - String get delete_playlist => 'Afspeellijst verwijderen'; - - @override - String get delete_playlist_confirmation => - 'Weet je zeker dat je deze afspeellijst wilt verwijderen?'; - - @override - String get local_tracks => 'Lokale nummers'; - - @override - String get local_tab => 'Lokaal'; - - @override - String get song_link => 'Song-link'; - - @override - String get skip_this_nonsense => 'Deze onzin overslaan'; - - @override - String get freedom_of_music => '“Vrijheid van muziek”'; - - @override - String get freedom_of_music_palm => '“Vrijheid van muziek in je hand”'; - - @override - String get get_started => 'Laten we beginnen'; - - @override - String get youtube_source_description => 'Aangeraden en werkt het best.'; - - @override - String get piped_source_description => - 'Voel je je vrij? Net als YouTube, maar meer vrij.'; - - @override - String get jiosaavn_source_description => - 'Het beste voor de regio Zuid-Azië.'; - - @override - String get invidious_source_description => - 'Vergelijkbaar met Piped, maar met een hogere beschikbaarheid.'; - - @override - String highest_quality(Object quality) { - return 'Hoogste kwaliteit: $quality'; - } - - @override - String get select_audio_source => 'Audiobron kiezen'; - - @override - String get endless_playback_description => - 'Nieuwe nummers automatisch achteraan de wachtrij toevoegen'; - - @override - String get choose_your_region => 'Kies je regio'; - - @override - String get choose_your_region_description => - 'Dit helpt Spotube om de juiste inhoud\nvoor jouw locatie te tonen.'; - - @override - String get choose_your_language => 'Kies je taal'; - - @override - String get help_project_grow => 'Help dit project met groeien'; - - @override - String get help_project_grow_description => - 'Spotube is een open-source project. Je kunt dit project helpen groeien door eraan bij te dragen, problemen te melden of nieuwe functies voor te stellen.'; - - @override - String get contribute_on_github => 'Bijdragen on GitHub'; - - @override - String get donate_on_open_collective => 'Doneren on Open Collective'; - - @override - String get browse_anonymously => 'Anoniem browsen'; - - @override - String get enable_connect => 'Verbinding inschakelen'; - - @override - String get enable_connect_description => - 'Spotube bedienen vanaf andere apparaten'; - - @override - String get devices => 'Apparaten'; - - @override - String get select => 'Selecteren'; - - @override - String connect_client_alert(Object client) { - return 'Je wordt gecontroleerd door $client'; - } - - @override - String get this_device => 'Dit apparaat'; - - @override - String get remote => 'Afstandsbediening'; - - @override - String get stats => 'Statistieken'; - - @override - String and_n_more(Object count) { - return 'en $count meer'; - } - - @override - String get recently_played => 'Onlangs afgespeeld'; - - @override - String get browse_more => 'Meer bekijken'; - - @override - String get no_title => 'Geen titel'; - - @override - String get not_playing => 'Niet aan het afspelen'; - - @override - String get epic_failure => 'Epische mislukking!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length nummers aan de wachtrij toegevoegd'; - } - - @override - String get spotube_has_an_update => 'Spotube heeft een update'; - - @override - String get download_now => 'Nu downloaden'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum is uitgebracht'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version is uitgebracht'; - } - - @override - String get read_the_latest => 'Lees de nieuwste '; - - @override - String get release_notes => 'release-opmerkingen'; - - @override - String get pick_color_scheme => 'Kies kleurenschema'; - - @override - String get save => 'Opslaan'; - - @override - String get choose_the_device => 'Kies het apparaat:'; - - @override - String get multiple_device_connected => - 'Er zijn meerdere apparaten verbonden.\nKies het apparaat waarop je deze actie wilt uitvoeren'; - - @override - String get nothing_found => 'Niets gevonden'; - - @override - String get the_box_is_empty => 'De doos is leeg'; - - @override - String get top_artists => 'Topartiesten'; - - @override - String get top_albums => 'Topalbums'; - - @override - String get this_week => 'Deze week'; - - @override - String get this_month => 'Deze maand'; - - @override - String get last_6_months => 'Laatste 6 maanden'; - - @override - String get this_year => 'Dit jaar'; - - @override - String get last_2_years => 'Laatste 2 jaar'; - - @override - String get all_time => 'All time'; - - @override - String powered_by_provider(Object providerName) { - return 'Aangedreven door $providerName'; - } - - @override - String get email => 'E-mail'; - - @override - String get profile_followers => 'Volgers'; - - @override - String get birthday => 'Verjaardag'; - - @override - String get subscription => 'Abonnement'; - - @override - String get not_born => 'Niet geboren'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profiel'; - - @override - String get no_name => 'Geen naam'; - - @override - String get edit => 'Bewerken'; - - @override - String get user_profile => 'Gebruikersprofiel'; - - @override - String count_plays(Object count) { - return '$count afspeelbeurten'; - } - - @override - String get streaming_fees_hypothetical => - '*Dit is berekend op basis van Spotify\'s uitbetaling per stream\nvan \$0.003 tot \$0.005. Dit is een hypothetische\nberekening om gebruikers inzicht te geven in hoeveel ze\naan de artiesten zouden hebben betaald als ze hun lied op Spotify zouden hebben beluisterd.'; - - @override - String get minutes_listened => 'Luistertijd'; - - @override - String get streamed_songs => 'Gestreamde nummers'; - - @override - String count_streams(Object count) { - return '$count streams'; - } - - @override - String get owned_by_you => 'Bezit door jou'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl gekopieerd naar klembord'; - } - - @override - String get hipotetical_calculation => - '*Dit is berekend op basis van de gemiddelde uitbetaling per stream van online muziekstreamingplatforms van \$0,003 tot \$0,005. Dit is een hypothetische berekening om de gebruiker inzicht te geven in hoeveel ze aan de artiesten zouden hebben betaald als ze hun nummer op een ander muziekstreamingplatform zouden beluisteren.'; - - @override - String count_mins(Object minutes) { - return '$minutes min'; - } - - @override - String get summary_minutes => 'minuten'; - - @override - String get summary_listened_to_music => 'Beluisterde muziek'; - - @override - String get summary_songs => 'nummers'; - - @override - String get summary_streamed_overall => 'Totaal gestreamd'; - - @override - String get summary_owed_to_artists => 'Te betalen aan artiesten\ndeze maand'; - - @override - String get summary_artists => 'van de artiest'; - - @override - String get summary_music_reached_you => 'Muziek heeft je bereikt'; - - @override - String get summary_full_albums => 'volledige albums'; - - @override - String get summary_got_your_love => 'Kreeg je liefde'; - - @override - String get summary_playlists => 'afspeellijsten'; - - @override - String get summary_were_on_repeat => 'Was op herhaling'; - - @override - String total_money(Object money) { - return 'Totaal $money'; - } - - @override - String get webview_not_found => 'Webview niet gevonden'; - - @override - String get webview_not_found_description => - 'Er is geen Webview-runtime geïnstalleerd op uw apparaat.\nAls het is geïnstalleerd, zorg ervoor dat het in het environment PATH staat\n\nHerstart de app na installatie'; - - @override - String get unsupported_platform => 'Niet ondersteund platform'; - - @override - String get cache_music => 'Cache muziek'; - - @override - String get open => 'Open'; - - @override - String get cache_folder => 'Cachemap'; - - @override - String get export => 'Exporteren'; - - @override - String get clear_cache => 'Cache wissen'; - - @override - String get clear_cache_confirmation => 'Wilt u de cache wissen?'; - - @override - String get export_cache_files => 'Gecacheerde bestanden exporteren'; - - @override - String found_n_files(Object count) { - return '$count bestanden gevonden'; - } - - @override - String get export_cache_confirmation => - 'Wilt u deze bestanden exporteren naar'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported van de $files bestanden geëxporteerd'; - } - - @override - String get undo => 'Ongedaan maken'; - - @override - String get download_all => 'Alles downloaden'; - - @override - String get add_all_to_playlist => 'Voeg alles toe aan afspeellijst'; - - @override - String get add_all_to_queue => 'Voeg alles toe aan wachtrij'; - - @override - String get play_all_next => 'Speel alles volgende'; - - @override - String get pause => 'Pauzeren'; - - @override - String get view_all => 'Bekijk alles'; - - @override - String get no_tracks_added_yet => - 'Het lijkt erop dat je nog geen nummers hebt toegevoegd'; - - @override - String get no_tracks => 'Het lijkt erop dat er hier geen nummers zijn'; - - @override - String get no_tracks_listened_yet => - 'Het lijkt erop dat je nog niets hebt beluisterd'; - - @override - String get not_following_artists => 'Je volgt geen artiesten'; - - @override - String get no_favorite_albums_yet => - 'Het lijkt erop dat je nog geen albums aan je favorieten hebt toegevoegd'; - - @override - String get no_logs_found => 'Geen logbestanden gevonden'; - - @override - String get youtube_engine => 'YouTube Engine'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine is niet geïnstalleerd'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine is niet geïnstalleerd op je systeem.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Zorg ervoor dat het beschikbaar is in de PATH-variabele of\nstel het absolute pad naar de $engine uitvoerbare bestanden in'; - } - - @override - String get youtube_engine_unix_issue_message => - 'Op macOS/Linux/unix-achtige besturingssystemen werkt het instellen van paden in .zshrc/.bashrc/.bash_profile enz. niet.\nJe moet het pad instellen in het shell-configuratiebestand'; - - @override - String get download => 'Downloaden'; - - @override - String get file_not_found => 'Bestand niet gevonden'; - - @override - String get custom => 'Aangepast'; - - @override - String get add_custom_url => 'Voeg aangepaste URL toe'; - - @override - String get edit_port => 'Poort bewerken'; - - @override - String get port_helper_msg => - 'Standaard is -1, wat een willekeurig nummer aangeeft. Als je een firewall hebt geconfigureerd, wordt aanbevolen dit in te stellen.'; - - @override - String connect_request(Object client) { - return 'Toestaan dat $client verbinding maakt?'; - } - - @override - String get connection_request_denied => - 'Verbinding geweigerd. Gebruiker heeft toegang geweigerd.'; - - @override - String get an_error_occurred => 'Er is een fout opgetreden'; - - @override - String get copy_to_clipboard => 'Kopiëren naar klembord'; - - @override - String get view_logs => 'Logboeken bekijken'; - - @override - String get retry => 'Opnieuw proberen'; - - @override - String get no_default_metadata_provider_selected => - 'U heeft geen standaard metadata-aanbieder ingesteld'; - - @override - String get manage_metadata_providers => 'Metadata-aanbieders beheren'; - - @override - String get open_link_in_browser => 'Link openen in browser?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Wilt u de volgende link openen'; - - @override - String get unsafe_url_warning => - 'Het kan onveilig zijn om links van onbetrouwbare bronnen te openen. Wees voorzichtig!\nU kunt de link ook naar uw klembord kopiëren.'; - - @override - String get copy_link => 'Link kopiëren'; - - @override - String get building_your_timeline => - 'Uw tijdlijn wordt opgebouwd op basis van uw luistergedrag...'; - - @override - String get official => 'Officieel'; - - @override - String author_name(Object author) { - return 'Auteur: $author'; - } - - @override - String get third_party => 'Derden'; - - @override - String get plugin_requires_authentication => 'Plugin vereist authenticatie'; - - @override - String get update_available => 'Update beschikbaar'; - - @override - String get supports_scrobbling => 'Ondersteunt scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Deze plugin scrobblet uw muziek om uw luistergeschiedenis te genereren.'; - - @override - String get default_metadata_source => 'Standaard metadata-bron'; - - @override - String get set_default_metadata_source => 'Standaard metadata-bron instellen'; - - @override - String get default_audio_source => 'Standaard audiobron'; - - @override - String get set_default_audio_source => 'Standaard audiobron instellen'; - - @override - String get set_default => 'Instellen als standaard'; - - @override - String get support => 'Ondersteuning'; - - @override - String get support_plugin_development => 'Ondersteun plugin-ontwikkeling'; - - @override - String can_access_name_api(Object name) { - return '- Kan de **$name** API benaderen'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Wilt u deze plugin installeren?'; - - @override - String get third_party_plugin_warning => - 'Deze plugin is afkomstig van een repository van derden. Zorg ervoor dat u de bron vertrouwt voordat u installeert.'; - - @override - String get author => 'Auteur'; - - @override - String get this_plugin_can_do_following => - 'Deze plugin kan het volgende doen'; - - @override - String get install => 'Installeren'; - - @override - String get install_a_metadata_provider => - 'Een metadata-aanbieder installeren'; - - @override - String get no_tracks_playing => 'Er wordt momenteel geen nummer afgespeeld'; - - @override - String get synced_lyrics_not_available => - 'Gesynchroniseerde songteksten zijn niet beschikbaar voor dit nummer. Gebruik in plaats daarvan het tabblad'; - - @override - String get plain_lyrics => 'Eenvoudige songteksten'; - - @override - String get tab_instead => 'in plaats daarvan.'; - - @override - String get disclaimer => 'Disclaimer'; - - @override - String get third_party_plugin_dmca_notice => - 'Het Spotube-team draagt geen enkele verantwoordelijkheid (inclusief juridische) voor \"derden\" plugins.\nGebruik ze op eigen risico. Voor bugs/problemen kunt u deze melden bij de plugin-repository.\n\nAls een \"derden\" plugin de ToS/DMCA van een service/juridische entiteit schendt, vraag dan de auteur van de \"derden\" plugin of het hostingplatform, bijvoorbeeld GitHub/Codeberg, om actie te ondernemen. De hierboven vermelde (gelabelde \"derden\") plugins zijn allemaal openbare/door de gemeenschap onderhouden plugins. We beheren ze niet, dus we kunnen geen actie tegen ze ondernemen.\n\n'; - - @override - String get input_does_not_match_format => - 'Invoer komt niet overeen met het vereiste formaat'; - - @override - String get plugins => 'Plug-ins'; - - @override - String get paste_plugin_download_url => - 'Plak de download-URL of de URL van de GitHub/Codeberg-repository of een directe link naar het .smplug-bestand'; - - @override - String get download_and_install_plugin_from_url => - 'Download en installeer de plugin via URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Kon de plugin niet toevoegen: $error'; - } - - @override - String get upload_plugin_from_file => 'Plugin uploaden vanuit bestand'; - - @override - String get installed => 'Geïnstalleerd'; - - @override - String get available_plugins => 'Beschikbare plugins'; - - @override - String get configure_plugins => - 'Configureer je eigen metadata- en audiobron-plug-ins'; - - @override - String get audio_scrobblers => 'Audioscrobblers'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Bron: '; - - @override - String get uncompressed => 'Ongecomprimeerd'; - - @override - String get dab_music_source_description => - 'Voor audiofielen. Biedt hoge kwaliteit/lossless audiostreams. Nauwkeurige trackmatching op basis van ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_pl.dart b/lib/l10n/generated/app_localizations_pl.dart deleted file mode 100644 index 5e185035..00000000 --- a/lib/l10n/generated/app_localizations_pl.dart +++ /dev/null @@ -1,1572 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Polish (`pl`). -class AppLocalizationsPl extends AppLocalizations { - AppLocalizationsPl([String locale = 'pl']) : super(locale); - - @override - String get guest => 'Gość'; - - @override - String get browse => 'Przeglądaj'; - - @override - String get search => 'Szukaj'; - - @override - String get library => 'Biblioteka'; - - @override - String get lyrics => 'Tekst utworu'; - - @override - String get settings => 'Ustawienia'; - - @override - String get genre_categories_filter => 'Filtruj kategorie lub gatunki...'; - - @override - String get genre => 'Gatunki'; - - @override - String get personalized => 'Spersonalizowane'; - - @override - String get featured => 'Wyróżnione'; - - @override - String get new_releases => 'Nowo wydane'; - - @override - String get songs => 'Utwory'; - - @override - String playing_track(Object track) { - return 'Odtwarzanie $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'To spowoduje wyczyszczenie całej kolejki! $track_length pozycji zostanie usuniętych.\nCzy chcesz kontynuować?'; - } - - @override - String get load_more => 'Załaduj więcej'; - - @override - String get playlists => 'Playlisty'; - - @override - String get artists => 'Artyści'; - - @override - String get albums => 'Albumy'; - - @override - String get tracks => 'Utwory'; - - @override - String get downloads => 'Pobrane'; - - @override - String get filter_playlists => 'Filtruj swoje playlisty...'; - - @override - String get liked_tracks => 'Ulubione utwory'; - - @override - String get liked_tracks_description => 'Wszystkie twoje ulubione utwory'; - - @override - String get playlist => 'Playlista'; - - @override - String get create_a_playlist => 'Utwórz playlistę'; - - @override - String get update_playlist => 'Zaktualizuj playlistę'; - - @override - String get create => 'Utwórz'; - - @override - String get cancel => 'Anuluj'; - - @override - String get update => 'Aktualizuj'; - - @override - String get playlist_name => 'Nazwa playlisty'; - - @override - String get name_of_playlist => 'Nazwa playlisty'; - - @override - String get description => 'Opis'; - - @override - String get public => 'Publiczny'; - - @override - String get collaborative => 'Współpraca'; - - @override - String get search_local_tracks => 'Szukanie lokalnych utworów...'; - - @override - String get play => 'Odtwórz'; - - @override - String get delete => 'Usuń'; - - @override - String get none => 'Brak'; - - @override - String get sort_a_z => 'Sortuj od A do Z'; - - @override - String get sort_z_a => 'Sortuj od Z do A'; - - @override - String get sort_artist => 'Sortuj po Artyście'; - - @override - String get sort_album => 'Sortuj po Albumie'; - - @override - String get sort_duration => 'Sortuj według Czasu Trwania'; - - @override - String get sort_tracks => 'Sortuj Utwory'; - - @override - String currently_downloading(Object tracks_length) { - return 'Obecnie pobieram $tracks_length utworów.'; - } - - @override - String get cancel_all => 'Anuluj wszystkie'; - - @override - String get filter_artist => 'Filtruj artystów...'; - - @override - String followers(Object followers) { - return '$followers obserwujących'; - } - - @override - String get add_artist_to_blacklist => 'Dodaj artystę do czarnej listy'; - - @override - String get top_tracks => 'Popularne Utwory'; - - @override - String get fans_also_like => 'Fani lubią także'; - - @override - String get loading => 'Ładowanie...'; - - @override - String get artist => 'Artysta'; - - @override - String get blacklisted => 'Dodano do czarnej listy'; - - @override - String get following => 'Obserwujesz'; - - @override - String get follow => 'Zaobserwuj'; - - @override - String get artist_url_copied => 'Skopiowano URL artysty do schowka'; - - @override - String added_to_queue(Object tracks) { - return 'Dodano $tracks utworów do kolejki'; - } - - @override - String get filter_albums => 'Filtruj albumy...'; - - @override - String get synced => 'Zsynchronizowano'; - - @override - String get plain => 'Zwykły'; - - @override - String get shuffle => 'Losowe odtwarzanie'; - - @override - String get search_tracks => 'Szukam utworu...'; - - @override - String get released => 'Wydano'; - - @override - String error(Object error) { - return 'Błąd $error'; - } - - @override - String get title => 'Tytuł'; - - @override - String get time => 'Czas'; - - @override - String get more_actions => 'Więcej akcji'; - - @override - String download_count(Object count) { - return 'Pobrane ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Dodaj ($count) do Playlisty'; - } - - @override - String add_count_to_queue(Object count) { - return 'Dodaj ($count) do Kolejki'; - } - - @override - String play_count_next(Object count) { - return 'Odtwórz ($count) następne'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return 'Skopiowano $data do schowka'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Dodano $track do danych Playlist'; - } - - @override - String get add => 'Dodaj'; - - @override - String added_track_to_queue(Object track) { - return 'Dodano $track do kolejki'; - } - - @override - String get add_to_queue => 'Dodano do kolejki'; - - @override - String track_will_play_next(Object track) { - return '$track następny'; - } - - @override - String get play_next => 'Odtwórz następny'; - - @override - String removed_track_from_queue(Object track) { - return 'Usunięto $track z kolejki'; - } - - @override - String get remove_from_queue => 'Usunięto z kolejki'; - - @override - String get remove_from_favorites => 'Usunięto z ulubionych'; - - @override - String get save_as_favorite => 'Zapisz do ulubionych'; - - @override - String get add_to_playlist => 'Dodaj do playlisty'; - - @override - String get remove_from_playlist => 'Usuń z playlisty'; - - @override - String get add_to_blacklist => 'Dodaj do czarnej listy'; - - @override - String get remove_from_blacklist => 'Usuń z czarnej listy'; - - @override - String get share => 'Udostępnij'; - - @override - String get mini_player => 'Mały odwarzacz'; - - @override - String get slide_to_seek => 'Przesuń, aby przewinąć do przodu lub do tyłu.'; - - @override - String get shuffle_playlist => 'Odtwarzaj losowo z playlisty'; - - @override - String get unshuffle_playlist => 'Nie odtwarzaj losowo z playlisty'; - - @override - String get previous_track => 'Poprzedni utwór'; - - @override - String get next_track => 'Następny utwór'; - - @override - String get pause_playback => 'Zatrzymaj odwarzanie'; - - @override - String get resume_playback => 'Wznów odwarzanie'; - - @override - String get loop_track => 'Zapętl utwór'; - - @override - String get no_loop => 'Brak pętli'; - - @override - String get repeat_playlist => 'Powtarzaj playlistę'; - - @override - String get queue => 'Kolejka'; - - @override - String get alternative_track_sources => 'Alternatywne źródła utworów'; - - @override - String get download_track => 'Pobierz utwór'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks utworów w kolejce'; - } - - @override - String get clear_all => 'Wyczyść wszystko'; - - @override - String get show_hide_ui_on_hover => 'Pokaż/Ukryj unoszący się interfejs'; - - @override - String get always_on_top => 'Zawsze na wierzchu'; - - @override - String get exit_mini_player => 'Opuść Mały odtwarzacz'; - - @override - String get download_location => 'Zmień lokalizację'; - - @override - String get local_library => 'Biblioteka lokalna'; - - @override - String get add_library_location => 'Dodaj do biblioteki'; - - @override - String get remove_library_location => 'Usuń z biblioteki'; - - @override - String get account => 'Konto'; - - @override - String get logout => 'Wyloguj'; - - @override - String get logout_of_this_account => 'Wyloguj z tego konta'; - - @override - String get language_region => 'Język i Region'; - - @override - String get language => 'Język'; - - @override - String get system_default => 'Domyślny systemowy'; - - @override - String get market_place_region => 'Region Rynku'; - - @override - String get recommendation_country => 'Kraj rekomendacji'; - - @override - String get appearance => 'Wygląd'; - - @override - String get layout_mode => 'Tryb Układu'; - - @override - String get override_layout_settings => - 'Nadpisz responsywne ustawienia trybu układu'; - - @override - String get adaptive => 'Adaptacyjny'; - - @override - String get compact => 'Kompaktowy'; - - @override - String get extended => 'Rozszerzony'; - - @override - String get theme => 'Motyw'; - - @override - String get dark => 'Ciemny'; - - @override - String get light => 'Jasny'; - - @override - String get system => 'Systemowy'; - - @override - String get accent_color => 'Kolor Akcentu'; - - @override - String get sync_album_color => 'Synchronizuj kolor albumu'; - - @override - String get sync_album_color_description => - 'Używa dominującego koloru okładki albumu jako koloru akcentującego'; - - @override - String get playback => 'Odtwarzanie'; - - @override - String get audio_quality => 'Jakość dźwięku'; - - @override - String get high => 'Duża'; - - @override - String get low => 'Mała'; - - @override - String get pre_download_play => 'Wstępnie pobierz i odtwórz'; - - @override - String get pre_download_play_description => - 'Zamiast przesyłać strumieniowo dźwięk, pobiera odpowiedni bufor i odtwarza (zalecane dla użytkowników o większej przepustowości)'; - - @override - String get skip_non_music => 'Pomiń nie-muzyczne segmenty (SponsorBlock)'; - - @override - String get blacklist_description => 'Czarna lista utworów i artystów'; - - @override - String get wait_for_download_to_finish => - 'Proszę poczekać na zakończenie obecnego pobierania.'; - - @override - String get desktop => 'Pulpit'; - - @override - String get close_behavior => 'Zamknij'; - - @override - String get close => 'Zamknij'; - - @override - String get minimize_to_tray => 'Zminimalizuj do zasobnika'; - - @override - String get show_tray_icon => 'Pokazuj ikonę w zasobniku'; - - @override - String get about => 'O projekcie'; - - @override - String get u_love_spotube => 'Wiemy jak kochacie Spotube'; - - @override - String get check_for_updates => 'Sprawdź aktualizacje'; - - @override - String get about_spotube => 'O Spotube'; - - @override - String get blacklist => 'Czarna lista'; - - @override - String get please_sponsor => 'Proszę wesprzyj projekt'; - - @override - String get spotube_description => - 'Spotube, lekki, wieloplatformowy, darmowy dla wszystkich klient Spotify'; - - @override - String get version => 'Wersja'; - - @override - String get build_number => 'Numer Build\'a'; - - @override - String get founder => 'Twórca Założyciel'; - - @override - String get repository => 'Repozytorium'; - - @override - String get bug_issues => 'Błędy i propozycje'; - - @override - String get made_with => 'Stworzono z ❤️ w Bangladesh\'u 🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licencja'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Nie martw się, żadne dane logowania nie są zbierane ani udostępniane nikomu'; - - @override - String get know_how_to_login => 'Nie wiesz, jak się zalogować?'; - - @override - String get follow_step_by_step_guide => - 'Postępuj zgodnie z poradnikiem krok po kroku'; - - @override - String cookie_name_cookie(Object name) { - return '$name Ciasteczko'; - } - - @override - String get fill_in_all_fields => 'Proszę wypełnić wszystkie pola'; - - @override - String get submit => 'Zatwierdź'; - - @override - String get exit => 'Zamknij'; - - @override - String get previous => 'Poprzedni'; - - @override - String get next => 'Następny'; - - @override - String get done => 'Gotowe 🙂'; - - @override - String get step_1 => 'Krok 1'; - - @override - String get first_go_to => 'Po pierwsze przejdź do'; - - @override - String get something_went_wrong => 'Coś poszło nie tak 🙁'; - - @override - String get piped_instance => 'Instancja serwera Piped'; - - @override - String get piped_description => - 'Instancja serwera Piped używana jest do dopasowania utworów.'; - - @override - String get piped_warning => - 'Niektóre z nich mogą nie działać. Używasz na własną odpowiedzialność!'; - - @override - String get invidious_instance => 'Instancja serwera Invidious'; - - @override - String get invidious_description => - 'Instancja serwera Invidious do dopasowywania utworów'; - - @override - String get invidious_warning => - 'Niektóre z nich mogą nie działać dobrze. Używaj na własne ryzyko'; - - @override - String get generate => 'Generuj'; - - @override - String track_exists(Object track) { - return 'Utwór $track już istnieje'; - } - - @override - String get replace_downloaded_tracks => 'Zamień wszystkie pobrane utwory'; - - @override - String get skip_download_tracks => - 'Pomiń pobieranie wszystkich pobranych utworów'; - - @override - String get do_you_want_to_replace => 'Chcesz zamienić istniejący utwór ??'; - - @override - String get replace => 'Zamień'; - - @override - String get skip => 'Pomiń'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Wybierz do $count $type'; - } - - @override - String get select_genres => 'Wybierz Gatunki'; - - @override - String get add_genres => 'Dodaj Gatunki'; - - @override - String get country => 'Kraj'; - - @override - String get number_of_tracks_generate => 'Liczba utworów do wygenerowania'; - - @override - String get acousticness => 'Akustyczna'; - - @override - String get danceability => 'Taneczna'; - - @override - String get energy => 'Energiczna'; - - @override - String get instrumentalness => 'Instrumentalna'; - - @override - String get liveness => 'Żywa'; - - @override - String get loudness => 'Głośna'; - - @override - String get speechiness => 'Wymowna'; - - @override - String get valence => 'Wartościowa'; - - @override - String get popularity => 'Popularność'; - - @override - String get key => 'Kluczowa'; - - @override - String get duration => 'Długość (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Tryb'; - - @override - String get time_signature => 'Sygnatura Czasowa'; - - @override - String get short => 'Krótka'; - - @override - String get medium => 'Średnia'; - - @override - String get long => 'Długa'; - - @override - String get min => 'Minimalnie'; - - @override - String get max => 'Maksymalnie'; - - @override - String get target => 'Cel'; - - @override - String get moderate => 'Umiarkowanie'; - - @override - String get deselect_all => 'Odznacz wszystkie'; - - @override - String get select_all => 'Zaznacz wszystkie'; - - @override - String get are_you_sure => 'Jesteś pewny?'; - - @override - String get generating_playlist => 'Generowanie twojej własnej playlisty...'; - - @override - String selected_count_tracks(Object count) { - return 'Wybrano $count utworów'; - } - - @override - String get download_warning => - 'Jeśli hurtowo pobierasz wszystkie utwory, wyraźnie piracisz muzykę i wyrządzasz szkody kreatywnej społeczności muzycznej. Mam nadzieję, że jesteś tego świadomy. Zawsze staraj się szanować i wspierać ciężką pracę Artysty'; - - @override - String get download_ip_ban_warning => - 'Przy okazji, Twój adres IP może zostać zablokowany w YouTube z powodu nadmiernych żądań pobierania niż zwykle. Blokada IP oznacza, że nie możesz korzystać z YouTube (nawet jeśli jesteś zalogowany) przez co najmniej 2-3 miesiące z IP tego urządzenia. Spotube nie ponosi żadnej odpowiedzialności, jeśli tak się stanie'; - - @override - String get by_clicking_accept_terms => - 'Klikając \'Akceptuj\' zgadzasz się z następującymi warunkami:'; - - @override - String get download_agreement_1 => 'Wiem, że piracę muzykę. Jestem zły.'; - - @override - String get download_agreement_2 => - 'Będę wspierał artystę i robię to tylko dlatego, że nie mam pieniędzy na albumy wykonawcy. '; - - @override - String get download_agreement_3 => - 'Jestem całkowicie świadomy, że moje IP może zostać zablokowane w YouTube i nie pociągam Spotube ani jego właścicieli/współtwórców do odpowiedzialności za jakiekolwiek wypadki spowodowane moimi obecnymi działaniami'; - - @override - String get decline => 'Odrzuć'; - - @override - String get accept => 'Akceptuj'; - - @override - String get details => 'Szczegóły'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanał'; - - @override - String get likes => 'Polubienia'; - - @override - String get dislikes => 'Nie lubi'; - - @override - String get views => 'Wyświetlenia'; - - @override - String get streamUrl => 'URL strumienia'; - - @override - String get stop => 'Stop'; - - @override - String get sort_newest => 'Sortuj według ostatnio dodanych'; - - @override - String get sort_oldest => 'Sortuj według najstarszych dodanych'; - - @override - String get sleep_timer => 'Minutnik'; - - @override - String mins(Object minutes) { - return '$minutes Minuty'; - } - - @override - String hours(Object hours) { - return '$hours Godziny'; - } - - @override - String hour(Object hours) { - return '$hours Godzina'; - } - - @override - String get custom_hours => 'Własne godziny'; - - @override - String get logs => 'Logi'; - - @override - String get developers => 'Developerzy'; - - @override - String get not_logged_in => 'Nie jesteś zalogowany'; - - @override - String get search_mode => 'Tryb szukania'; - - @override - String get audio_source => 'Źródło dźwięku'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Nie można zaszyfrować :('; - - @override - String get encryption_failed_warning => - 'Spotube używa szyfrowania do bezpiecznego przechowywania danych. Ale nie udało się tego zrobić. Więc powróci do niezabezpieczonego przechowywania\nJeśli używasz Linuksa, upewnij się, że masz zainstalowane jakieś usługi do szyfrowania (gnome-keyring, kde-wallet, keepassxc itp.)'; - - @override - String get querying_info => 'Szukam informacji...'; - - @override - String get piped_api_down => 'API Piped jest niedostępne'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Instancja Piped $pipedInstance jest obecnie niedostępna\n\nZmień instancję lub zmień \'Rodzaj API\' na oficjalne API YouTube\n\nUpewnij się, że po zmianie zrestartujesz aplikację'; - } - - @override - String get you_are_offline => 'Obecnie jesteś offline'; - - @override - String get connection_restored => - 'Twoje połączenie z internetem zostało przywrócone'; - - @override - String get use_system_title_bar => 'Użyj paska tytułu systemu'; - - @override - String get crunching_results => 'Przetwarzanie wyników...'; - - @override - String get search_to_get_results => 'Szukaj, aby uzyskać wyniki'; - - @override - String get use_amoled_mode => 'Tryb AMOLED'; - - @override - String get pitch_dark_theme => 'Ciemny motyw'; - - @override - String get normalize_audio => 'Normalizuj dźwięk'; - - @override - String get change_cover => 'Zmień okładkę'; - - @override - String get add_cover => 'Dodaj okładkę'; - - @override - String get restore_defaults => 'Przywróć domyślne'; - - @override - String get download_music_format => 'Format pobierania muzyki'; - - @override - String get streaming_music_format => 'Format strumieniowania muzyki'; - - @override - String get download_music_quality => 'Jakość pobierania'; - - @override - String get streaming_music_quality => 'Jakość strumieniowania'; - - @override - String get login_with_lastfm => 'Zaloguj się z Last.fm'; - - @override - String get connect => 'Połącz'; - - @override - String get disconnect_lastfm => 'Rozłącz z Last.fm'; - - @override - String get disconnect => 'Rozłącz'; - - @override - String get username => 'Nazwa użytkownika'; - - @override - String get password => 'Hasło'; - - @override - String get login => 'Zaloguj'; - - @override - String get login_with_your_lastfm => 'Zaloguj się na swoje konto Last.fm'; - - @override - String get scrobble_to_lastfm => 'Scrobbluj do Last.fm'; - - @override - String get go_to_album => 'Przejdź do albumu'; - - @override - String get discord_rich_presence => 'Obecność na Discordzie'; - - @override - String get browse_all => 'Przeglądaj wszystko'; - - @override - String get genres => 'Gatunki muzyczne'; - - @override - String get explore_genres => 'Eksploruj gatunki'; - - @override - String get friends => 'Przyjaciele'; - - @override - String get no_lyrics_available => - 'Przepraszamy, nie można znaleźć tekstu dla tego utworu'; - - @override - String get start_a_radio => 'Uruchom radio'; - - @override - String get how_to_start_radio => 'Jak chcesz uruchomić radio?'; - - @override - String get replace_queue_question => - 'Czy chcesz zastąpić bieżącą kolejkę czy dodać do niej?'; - - @override - String get endless_playback => 'Nieskończona Odtwarzanie'; - - @override - String get delete_playlist => 'Usuń Playlistę'; - - @override - String get delete_playlist_confirmation => - 'Czy na pewno chcesz usunąć tę listę odtwarzania?'; - - @override - String get local_tracks => 'Lokalne Utwory'; - - @override - String get local_tab => 'Lokalny'; - - @override - String get song_link => 'Link do Utworu'; - - @override - String get skip_this_nonsense => 'Pomiń tę bzdurę'; - - @override - String get freedom_of_music => '“Wolność Muzyki”'; - - @override - String get freedom_of_music_palm => '“Wolność Muzyki w Twojej dłoni”'; - - @override - String get get_started => 'Zacznijmy'; - - @override - String get youtube_source_description => 'Polecane i działa najlepiej.'; - - @override - String get piped_source_description => - 'Czujesz się wolny? To samo co YouTube, ale dużo za darmo.'; - - @override - String get jiosaavn_source_description => - 'Najlepszy dla regionu Azji Południowej.'; - - @override - String get invidious_source_description => - 'Podobne do Piped, ale o wyższej dostępności.'; - - @override - String highest_quality(Object quality) { - return 'Najwyższa Jakość: $quality'; - } - - @override - String get select_audio_source => 'Wybierz Źródło Audio'; - - @override - String get endless_playback_description => - 'Automatycznie dodaj nowe utwory na koniec kolejki'; - - @override - String get choose_your_region => 'Wybierz swoją region'; - - @override - String get choose_your_region_description => - 'To pomoże Spotube pokazać Ci odpowiednią treść dla Twojej lokalizacji.'; - - @override - String get choose_your_language => 'Wybierz swój język'; - - @override - String get help_project_grow => 'Pomóż temu projektowi rosnąć'; - - @override - String get help_project_grow_description => - 'Spotube to projekt open-source. Możesz pomóc temu projektowi rosnąć, przyczyniając się do projektu, zgłaszając błędy lub sugerując nowe funkcje.'; - - @override - String get contribute_on_github => 'Przyczyniaj się na GitHubie'; - - @override - String get donate_on_open_collective => 'Dotuj na Open Collective'; - - @override - String get browse_anonymously => 'Przeglądaj Anonimowo'; - - @override - String get enable_connect => 'Włącz połączenie'; - - @override - String get enable_connect_description => - 'Kontroluj Spotube z innych urządzeń'; - - @override - String get devices => 'Urządzenia'; - - @override - String get select => 'Wybierz'; - - @override - String connect_client_alert(Object client) { - return 'Jesteś sterowany przez $client'; - } - - @override - String get this_device => 'To urządzenie'; - - @override - String get remote => 'Zdalny'; - - @override - String get stats => 'Statystyki'; - - @override - String and_n_more(Object count) { - return 'i $count więcej'; - } - - @override - String get recently_played => 'Ostatnio odtwarzane'; - - @override - String get browse_more => 'Zobacz więcej'; - - @override - String get no_title => 'Brak tytułu'; - - @override - String get not_playing => 'Nie odtwarzane'; - - @override - String get epic_failure => 'Epicka porażka!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Dodano $tracks_length utworów do kolejki'; - } - - @override - String get spotube_has_an_update => 'Spotube ma aktualizację'; - - @override - String get download_now => 'Pobierz teraz'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum został wydany'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version został wydany'; - } - - @override - String get read_the_latest => 'Przeczytaj najnowsze '; - - @override - String get release_notes => 'notatki o wersji'; - - @override - String get pick_color_scheme => 'Wybierz schemat kolorów'; - - @override - String get save => 'Zapisz'; - - @override - String get choose_the_device => 'Wybierz urządzenie:'; - - @override - String get multiple_device_connected => - 'Jest wiele urządzeń podłączonych.\nWybierz urządzenie, na którym chcesz wykonać tę akcję'; - - @override - String get nothing_found => 'Nic nie znaleziono'; - - @override - String get the_box_is_empty => 'Pudełko jest puste'; - - @override - String get top_artists => 'Najlepsi artyści'; - - @override - String get top_albums => 'Najlepsze albumy'; - - @override - String get this_week => 'W tym tygodniu'; - - @override - String get this_month => 'W tym miesiącu'; - - @override - String get last_6_months => 'Ostatnie 6 miesięcy'; - - @override - String get this_year => 'W tym roku'; - - @override - String get last_2_years => 'Ostatnie 2 lata'; - - @override - String get all_time => 'Wszystkie czasy'; - - @override - String powered_by_provider(Object providerName) { - return 'Napędzane przez $providerName'; - } - - @override - String get email => 'E-mail'; - - @override - String get profile_followers => 'Obserwujący'; - - @override - String get birthday => 'Data urodzenia'; - - @override - String get subscription => 'Subskrypcja'; - - @override - String get not_born => 'Nie urodzony'; - - @override - String get hacker => 'Haker'; - - @override - String get profile => 'Profil'; - - @override - String get no_name => 'Brak nazwy'; - - @override - String get edit => 'Edytuj'; - - @override - String get user_profile => 'Profil użytkownika'; - - @override - String count_plays(Object count) { - return '$count odtworzeń'; - } - - @override - String get streaming_fees_hypothetical => - '*Obliczone na podstawie wypłaty Spotify za stream\nod \$0.003 do \$0.005. Jest to hipotetyczne\nobliczenie, które ma na celu pokazanie, ile\nużytkownik zapłaciłby artystom, gdyby odsłuchał\ntych utworów na Spotify.'; - - @override - String get minutes_listened => 'Minuty odsłuchane'; - - @override - String get streamed_songs => 'Strumieniowane utwory'; - - @override - String count_streams(Object count) { - return '$count strumieni'; - } - - @override - String get owned_by_you => 'Własność Twoja'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl skopiowano do schowka'; - } - - @override - String get hipotetical_calculation => - '*Jest to obliczone na podstawie średniej wypłaty z internetowych platform streamingowych za jeden stream w wysokości 0,003 do 0,005 USD. Jest to hipotetyczne obliczenie, które ma na celu dać użytkownikowi wgląd w to, ile zapłaciłby artystom, gdyby słuchał ich piosenek na różnych platformach streamingowych.'; - - @override - String count_mins(Object minutes) { - return '$minutes min'; - } - - @override - String get summary_minutes => 'minuty'; - - @override - String get summary_listened_to_music => 'Słuchana muzyka'; - - @override - String get summary_songs => 'utwory'; - - @override - String get summary_streamed_overall => 'Ogółem streamowane'; - - @override - String get summary_owed_to_artists => 'Do zapłaty artystom\nw tym miesiącu'; - - @override - String get summary_artists => 'artystów'; - - @override - String get summary_music_reached_you => 'Muzyka dotarła do Ciebie'; - - @override - String get summary_full_albums => 'pełne albumy'; - - @override - String get summary_got_your_love => 'Otrzymał Twoją miłość'; - - @override - String get summary_playlists => 'playlisty'; - - @override - String get summary_were_on_repeat => 'Były na powtarzaniu'; - - @override - String total_money(Object money) { - return 'Łącznie $money'; - } - - @override - String get webview_not_found => 'Nie znaleziono Webview'; - - @override - String get webview_not_found_description => - 'Na twoim urządzeniu nie zainstalowano środowiska uruchomieniowego Webview.\nJeśli jest zainstalowany, upewnij się, że jest w environment PATH\n\nPo instalacji uruchom ponownie aplikację'; - - @override - String get unsupported_platform => 'Nieobsługiwana platforma'; - - @override - String get cache_music => 'Pamięć podręczna muzyki'; - - @override - String get open => 'Otwórz'; - - @override - String get cache_folder => 'Folder pamięci podręcznej'; - - @override - String get export => 'Eksportuj'; - - @override - String get clear_cache => 'Wyczyść pamięć podręczną'; - - @override - String get clear_cache_confirmation => - 'Czy chcesz wyczyścić pamięć podręczną?'; - - @override - String get export_cache_files => 'Eksportuj pliki z pamięci podręcznej'; - - @override - String found_n_files(Object count) { - return 'Znaleziono $count plików'; - } - - @override - String get export_cache_confirmation => - 'Czy chcesz wyeksportować te pliki do'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Wyeksportowano $filesExported z $files plików'; - } - - @override - String get undo => 'Cofnij'; - - @override - String get download_all => 'Pobierz wszystko'; - - @override - String get add_all_to_playlist => 'Dodaj wszystko do playlisty'; - - @override - String get add_all_to_queue => 'Dodaj wszystko do kolejki'; - - @override - String get play_all_next => 'Odtwórz wszystko następnie'; - - @override - String get pause => 'Pauza'; - - @override - String get view_all => 'Zobacz wszystko'; - - @override - String get no_tracks_added_yet => - 'Wygląda na to, że jeszcze nie dodałeś żadnych utworów'; - - @override - String get no_tracks => 'Wygląda na to, że tutaj nie ma żadnych utworów'; - - @override - String get no_tracks_listened_yet => - 'Wygląda na to, że jeszcze nic nie słuchałeś'; - - @override - String get not_following_artists => 'Nie obserwujesz żadnych artystów'; - - @override - String get no_favorite_albums_yet => - 'Wygląda na to, że jeszcze nie dodałeś żadnych albumów do ulubionych'; - - @override - String get no_logs_found => 'Nie znaleziono żadnych logów'; - - @override - String get youtube_engine => 'Silnik YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine nie jest zainstalowany'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine nie jest zainstalowany w systemie.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Upewnij się, że jest dostępny w zmiennej PATH lub\nustaw absolutną ścieżkę do pliku wykonywalnego $engine poniżej'; - } - - @override - String get youtube_engine_unix_issue_message => - 'W systemach macOS/Linux/unix, ustawianie ścieżki w .zshrc/.bashrc/.bash_profile itp. nie będzie działać.\nMusisz ustawić ścieżkę w pliku konfiguracyjnym powłoki'; - - @override - String get download => 'Pobierz'; - - @override - String get file_not_found => 'Plik nie znaleziony'; - - @override - String get custom => 'Niestandardowy'; - - @override - String get add_custom_url => 'Dodaj niestandardowy URL'; - - @override - String get edit_port => 'Edytuj port'; - - @override - String get port_helper_msg => - 'Domyślna wartość to -1, co oznacza losową liczbę. Jeśli masz skonfigurowany zaporę, zaleca się jej ustawienie.'; - - @override - String connect_request(Object client) { - return 'Zezwolić $client na połączenie?'; - } - - @override - String get connection_request_denied => - 'Połączenie odrzucone. Użytkownik odmówił dostępu.'; - - @override - String get an_error_occurred => 'Wystąpił błąd'; - - @override - String get copy_to_clipboard => 'Kopiuj do schowka'; - - @override - String get view_logs => 'Wyświetl logi'; - - @override - String get retry => 'Ponów'; - - @override - String get no_default_metadata_provider_selected => - 'Nie masz ustawionego domyślnego dostawcy metadanych'; - - @override - String get manage_metadata_providers => 'Zarządzaj dostawcami metadanych'; - - @override - String get open_link_in_browser => 'Otworzyć link w przeglądarce?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Czy chcesz otworzyć następujący link'; - - @override - String get unsafe_url_warning => - 'Otwieranie linków z niezaufanych źródeł może być niebezpieczne. Zachowaj ostrożność!\nMożesz również skopiować link do schowka.'; - - @override - String get copy_link => 'Kopiuj link'; - - @override - String get building_your_timeline => - 'Budowanie Twojej osi czasu na podstawie Twoich odsłuchań...'; - - @override - String get official => 'Oficjalny'; - - @override - String author_name(Object author) { - return 'Autor: $author'; - } - - @override - String get third_party => 'Zewnętrzny'; - - @override - String get plugin_requires_authentication => - 'Wtyczka wymaga uwierzytelnienia'; - - @override - String get update_available => 'Dostępna aktualizacja'; - - @override - String get supports_scrobbling => 'Obsługuje scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Ta wtyczka scrobbluje Twoją muzykę, aby wygenerować historię odsłuchań.'; - - @override - String get default_metadata_source => 'Domyślne źródło metadanych'; - - @override - String get set_default_metadata_source => 'Ustaw domyślne źródło metadanych'; - - @override - String get default_audio_source => 'Domyślne źródło audio'; - - @override - String get set_default_audio_source => 'Ustaw domyślne źródło audio'; - - @override - String get set_default => 'Ustaw jako domyślną'; - - @override - String get support => 'Wsparcie'; - - @override - String get support_plugin_development => 'Wspieraj rozwój wtyczki'; - - @override - String can_access_name_api(Object name) { - return '- Może uzyskać dostęp do API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Czy chcesz zainstalować tę wtyczkę?'; - - @override - String get third_party_plugin_warning => - 'Ta wtyczka pochodzi z zewnętrznego repozytorium. Upewnij się, że ufasz źródłu przed instalacją.'; - - @override - String get author => 'Autor'; - - @override - String get this_plugin_can_do_following => - 'Ta wtyczka może wykonywać następujące czynności'; - - @override - String get install => 'Instaluj'; - - @override - String get install_a_metadata_provider => 'Zainstaluj dostawcę metadanych'; - - @override - String get no_tracks_playing => 'Obecnie nie odtwarzany jest żaden utwór'; - - @override - String get synced_lyrics_not_available => - 'Zsynchronizowane teksty nie są dostępne dla tego utworu. Zamiast tego użyj zakładki'; - - @override - String get plain_lyrics => 'Zwykłe teksty'; - - @override - String get tab_instead => 'zamiast tego.'; - - @override - String get disclaimer => 'Zastrzeżenie'; - - @override - String get third_party_plugin_dmca_notice => - 'Zespół Spotube nie ponosi żadnej odpowiedzialności (w tym prawnej) za żadne wtyczki \"zewnętrzne\".\nUżywaj ich na własne ryzyko. Wszelkie błędy/problemy prosimy zgłaszać w repozytorium wtyczki.\n\nJeśli jakakolwiek wtyczka \"zewnętrzna\" narusza ToS/DMCA jakiejkolwiek usługi/podmiotu prawnego, prosimy o kontakt z autorem wtyczki \"zewnętrznej\" lub platformą hostingową, np. GitHub/Codeberg, w celu podjęcia działań. Wymienione powyżej (oznaczone jako \"zewnętrzne\") są publicznymi wtyczkami utrzymywanymi przez społeczność. Nie kuratujemy ich, więc nie możemy podjąć żadnych działań w ich sprawie.\n\n'; - - @override - String get input_does_not_match_format => - 'Wprowadzony tekst nie pasuje do wymaganego formatu'; - - @override - String get plugins => 'Wtyczki'; - - @override - String get paste_plugin_download_url => - 'Wklej adres URL do pobrania lub adres URL repozytorium GitHub/Codeberg lub bezpośredni link do pliku .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Pobierz i zainstaluj wtyczkę z adresu URL'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Nie udało się dodać wtyczki: $error'; - } - - @override - String get upload_plugin_from_file => 'Prześlij wtyczkę z pliku'; - - @override - String get installed => 'Zainstalowane'; - - @override - String get available_plugins => 'Dostępne wtyczki'; - - @override - String get configure_plugins => - 'Skonfiguruj własne wtyczki dostawców metadanych i źródeł audio'; - - @override - String get audio_scrobblers => 'Scrobblery audio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Źródło: '; - - @override - String get uncompressed => 'Nieskompresowany'; - - @override - String get dab_music_source_description => - 'Dla audiofilów. Oferuje strumienie audio wysokiej jakości/lossless. Precyzyjne dopasowanie utworów na podstawie ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_pt.dart b/lib/l10n/generated/app_localizations_pt.dart deleted file mode 100644 index 8d2eabe7..00000000 --- a/lib/l10n/generated/app_localizations_pt.dart +++ /dev/null @@ -1,1569 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Portuguese (`pt`). -class AppLocalizationsPt extends AppLocalizations { - AppLocalizationsPt([String locale = 'pt']) : super(locale); - - @override - String get guest => 'Visitante'; - - @override - String get browse => 'Explorar'; - - @override - String get search => 'Buscar'; - - @override - String get library => 'Biblioteca'; - - @override - String get lyrics => 'Letras'; - - @override - String get settings => 'Configurações'; - - @override - String get genre_categories_filter => 'Filtrar categorias ou gêneros...'; - - @override - String get genre => 'Gênero'; - - @override - String get personalized => 'Personalizado'; - - @override - String get featured => 'Destaque'; - - @override - String get new_releases => 'Novos Lançamentos'; - - @override - String get songs => 'Músicas'; - - @override - String playing_track(Object track) { - return 'Tocando $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Isso irá limpar a fila atual. $track_length músicas serão removidas.\nDeseja continuar?'; - } - - @override - String get load_more => 'Carregar mais'; - - @override - String get playlists => 'Playlists'; - - @override - String get artists => 'Artistas'; - - @override - String get albums => 'Álbuns'; - - @override - String get tracks => 'Faixas'; - - @override - String get downloads => 'Downloads'; - - @override - String get filter_playlists => 'Filtrar suas playlists...'; - - @override - String get liked_tracks => 'Músicas Curtidas'; - - @override - String get liked_tracks_description => 'Todas as suas músicas curtidas'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Criar uma playlist'; - - @override - String get update_playlist => 'Atualizar lista de reprodução'; - - @override - String get create => 'Criar'; - - @override - String get cancel => 'Cancelar'; - - @override - String get update => 'Atualizar'; - - @override - String get playlist_name => 'Nome da Playlist'; - - @override - String get name_of_playlist => 'Nome da playlist'; - - @override - String get description => 'Descrição'; - - @override - String get public => 'Pública'; - - @override - String get collaborative => 'Colaborativa'; - - @override - String get search_local_tracks => 'Buscar músicas locais...'; - - @override - String get play => 'Reproduzir'; - - @override - String get delete => 'Excluir'; - - @override - String get none => 'Nenhum'; - - @override - String get sort_a_z => 'Ordenar de A-Z'; - - @override - String get sort_z_a => 'Ordenar de Z-A'; - - @override - String get sort_artist => 'Ordenar por Artista'; - - @override - String get sort_album => 'Ordenar por Álbum'; - - @override - String get sort_duration => 'Ordenar por Duração'; - - @override - String get sort_tracks => 'Ordenar Faixas'; - - @override - String currently_downloading(Object tracks_length) { - return 'Baixando no momento ($tracks_length)'; - } - - @override - String get cancel_all => 'Cancelar Tudo'; - - @override - String get filter_artist => 'Filtrar artistas...'; - - @override - String followers(Object followers) { - return '$followers Seguidores'; - } - - @override - String get add_artist_to_blacklist => 'Adicionar artista à lista negra'; - - @override - String get top_tracks => 'Principais Músicas'; - - @override - String get fans_also_like => 'Fãs também curtiram'; - - @override - String get loading => 'Carregando...'; - - @override - String get artist => 'Artista'; - - @override - String get blacklisted => 'Na Lista Negra'; - - @override - String get following => 'Seguindo'; - - @override - String get follow => 'Seguir'; - - @override - String get artist_url_copied => - 'URL do artista copiada para a área de transferência'; - - @override - String added_to_queue(Object tracks) { - return 'Adicionadas $tracks músicas à fila'; - } - - @override - String get filter_albums => 'Filtrar álbuns...'; - - @override - String get synced => 'Sincronizado'; - - @override - String get plain => 'Simples'; - - @override - String get shuffle => 'Aleatório'; - - @override - String get search_tracks => 'Buscar músicas...'; - - @override - String get released => 'Lançado'; - - @override - String error(Object error) { - return 'Erro $error'; - } - - @override - String get title => 'Título'; - - @override - String get time => 'Tempo'; - - @override - String get more_actions => 'Mais ações'; - - @override - String download_count(Object count) { - return 'Baixar ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Adicionar ($count) à Playlist'; - } - - @override - String add_count_to_queue(Object count) { - return 'Adicionar ($count) à Fila'; - } - - @override - String play_count_next(Object count) { - return 'Reproduzir ($count) em seguida'; - } - - @override - String get album => 'Álbum'; - - @override - String copied_to_clipboard(Object data) { - return '$data copiado para a área de transferência'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Adicionar $track às Playlists Seguintes'; - } - - @override - String get add => 'Adicionar'; - - @override - String added_track_to_queue(Object track) { - return 'Adicionada $track à fila'; - } - - @override - String get add_to_queue => 'Adicionar à fila'; - - @override - String track_will_play_next(Object track) { - return '$track será reproduzida em seguida'; - } - - @override - String get play_next => 'Reproduzir em seguida'; - - @override - String removed_track_from_queue(Object track) { - return '$track removida da fila'; - } - - @override - String get remove_from_queue => 'Remover da fila'; - - @override - String get remove_from_favorites => 'Remover dos favoritos'; - - @override - String get save_as_favorite => 'Salvar como favorita'; - - @override - String get add_to_playlist => 'Adicionar à playlist'; - - @override - String get remove_from_playlist => 'Remover da playlist'; - - @override - String get add_to_blacklist => 'Adicionar à lista negra'; - - @override - String get remove_from_blacklist => 'Remover da lista negra'; - - @override - String get share => 'Compartilhar'; - - @override - String get mini_player => 'Mini Player'; - - @override - String get slide_to_seek => 'Arraste para avançar ou retroceder'; - - @override - String get shuffle_playlist => 'Embaralhar playlist'; - - @override - String get unshuffle_playlist => 'Desembaralhar playlist'; - - @override - String get previous_track => 'Faixa anterior'; - - @override - String get next_track => 'Próxima faixa'; - - @override - String get pause_playback => 'Pausar Reprodução'; - - @override - String get resume_playback => 'Continuar Reprodução'; - - @override - String get loop_track => 'Repetir faixa'; - - @override - String get no_loop => 'Sem loop'; - - @override - String get repeat_playlist => 'Repetir playlist'; - - @override - String get queue => 'Fila'; - - @override - String get alternative_track_sources => 'Fontes alternativas de faixas'; - - @override - String get download_track => 'Baixar faixa'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks músicas na fila'; - } - - @override - String get clear_all => 'Limpar tudo'; - - @override - String get show_hide_ui_on_hover => 'Mostrar/Ocultar UI ao passar o mouse'; - - @override - String get always_on_top => 'Sempre no topo'; - - @override - String get exit_mini_player => 'Sair do Mini player'; - - @override - String get download_location => 'Local de download'; - - @override - String get local_library => 'Biblioteca local'; - - @override - String get add_library_location => 'Adicionar à biblioteca'; - - @override - String get remove_library_location => 'Remover da biblioteca'; - - @override - String get account => 'Conta'; - - @override - String get logout => 'Sair'; - - @override - String get logout_of_this_account => 'Sair desta conta'; - - @override - String get language_region => 'Idioma e Região'; - - @override - String get language => 'Idioma'; - - @override - String get system_default => 'Padrão do Sistema'; - - @override - String get market_place_region => 'Região da Loja'; - - @override - String get recommendation_country => 'País de Recomendação'; - - @override - String get appearance => 'Aparência'; - - @override - String get layout_mode => 'Modo de Layout'; - - @override - String get override_layout_settings => - 'Substituir configurações do modo de layout responsivo'; - - @override - String get adaptive => 'Adaptável'; - - @override - String get compact => 'Compacto'; - - @override - String get extended => 'Estendido'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Escuro'; - - @override - String get light => 'Claro'; - - @override - String get system => 'Sistema'; - - @override - String get accent_color => 'Cor de Destaque'; - - @override - String get sync_album_color => 'Sincronizar cor do álbum'; - - @override - String get sync_album_color_description => - 'Usa a cor predominante da capa do álbum como cor de destaque'; - - @override - String get playback => 'Reprodução'; - - @override - String get audio_quality => 'Qualidade do Áudio'; - - @override - String get high => 'Alta'; - - @override - String get low => 'Baixa'; - - @override - String get pre_download_play => 'Pré-download e reprodução'; - - @override - String get pre_download_play_description => - 'Em vez de transmitir áudio, baixar bytes e reproduzir (recomendado para usuários com maior largura de banda)'; - - @override - String get skip_non_music => 'Pular segmentos não musicais (SponsorBlock)'; - - @override - String get blacklist_description => 'Faixas e artistas na lista negra'; - - @override - String get wait_for_download_to_finish => - 'Aguarde o download atual ser concluído'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Comportamento de Fechamento'; - - @override - String get close => 'Fechar'; - - @override - String get minimize_to_tray => 'Minimizar para a bandeja'; - - @override - String get show_tray_icon => 'Mostrar ícone na bandeja do sistema'; - - @override - String get about => 'Sobre'; - - @override - String get u_love_spotube => 'Sabemos que você adora o Spotube'; - - @override - String get check_for_updates => 'Verificar atualizações'; - - @override - String get about_spotube => 'Sobre o Spotube'; - - @override - String get blacklist => 'Lista Negra'; - - @override - String get please_sponsor => 'Por favor, patrocine/doe'; - - @override - String get spotube_description => - 'Spotube, um cliente leve, multiplataforma e gratuito para o Spotify'; - - @override - String get version => 'Versão'; - - @override - String get build_number => 'Número de Build'; - - @override - String get founder => 'Fundador'; - - @override - String get repository => 'Repositório'; - - @override - String get bug_issues => 'Bugs/Problemas'; - - @override - String get made_with => 'Feito com ❤️ em Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Licença'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Não se preocupe, suas credenciais não serão coletadas nem compartilhadas com ninguém'; - - @override - String get know_how_to_login => 'Não sabe como fazer isso?'; - - @override - String get follow_step_by_step_guide => 'Siga o guia passo a passo'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Preencha todos os campos, por favor'; - - @override - String get submit => 'Enviar'; - - @override - String get exit => 'Sair'; - - @override - String get previous => 'Anterior'; - - @override - String get next => 'Próximo'; - - @override - String get done => 'Concluído'; - - @override - String get step_1 => 'Passo 1'; - - @override - String get first_go_to => 'Primeiro, vá para'; - - @override - String get something_went_wrong => 'Algo deu errado'; - - @override - String get piped_instance => 'Instância do Servidor Piped'; - - @override - String get piped_description => - 'A instância do servidor Piped a ser usada para correspondência de faixas'; - - @override - String get piped_warning => - 'Algumas delas podem não funcionar bem. Use por sua conta e risco'; - - @override - String get invidious_instance => 'Instância do Servidor Invidious'; - - @override - String get invidious_description => - 'A instância do servidor Invidious a ser usada para correspondência de faixas'; - - @override - String get invidious_warning => - 'Alguns podem não funcionar bem. Use por sua conta e risco'; - - @override - String get generate => 'Gerar'; - - @override - String track_exists(Object track) { - return 'A faixa $track já existe'; - } - - @override - String get replace_downloaded_tracks => 'Substituir todas as faixas baixadas'; - - @override - String get skip_download_tracks => - 'Pular o download de todas as faixas baixadas'; - - @override - String get do_you_want_to_replace => 'Deseja substituir a faixa existente?'; - - @override - String get replace => 'Substituir'; - - @override - String get skip => 'Pular'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Selecione até $count $type'; - } - - @override - String get select_genres => 'Selecionar Gêneros'; - - @override - String get add_genres => 'Adicionar Gêneros'; - - @override - String get country => 'País'; - - @override - String get number_of_tracks_generate => 'Número de faixas a gerar'; - - @override - String get acousticness => 'Acústica'; - - @override - String get danceability => 'Dançabilidade'; - - @override - String get energy => 'Energia'; - - @override - String get instrumentalness => 'Instrumentalidade'; - - @override - String get liveness => 'Vivacidade'; - - @override - String get loudness => 'Volume'; - - @override - String get speechiness => 'Discurso'; - - @override - String get valence => 'Valência'; - - @override - String get popularity => 'Popularidade'; - - @override - String get key => 'Tonalidade'; - - @override - String get duration => 'Duração (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Modo'; - - @override - String get time_signature => 'Assinatura de tempo'; - - @override - String get short => 'Curto'; - - @override - String get medium => 'Médio'; - - @override - String get long => 'Longo'; - - @override - String get min => 'Min'; - - @override - String get max => 'Máx'; - - @override - String get target => 'Alvo'; - - @override - String get moderate => 'Moderado'; - - @override - String get deselect_all => 'Desmarcar Todos'; - - @override - String get select_all => 'Selecionar Todos'; - - @override - String get are_you_sure => 'Tem certeza?'; - - @override - String get generating_playlist => 'Gerando sua playlist personalizada...'; - - @override - String selected_count_tracks(Object count) { - return '$count faixas selecionadas'; - } - - @override - String get download_warning => - 'Se você baixar todas as faixas em massa, estará claramente pirateando música e causando danos à sociedade criativa da música. Espero que você esteja ciente disso. Sempre tente respeitar e apoiar o trabalho árduo dos artistas'; - - @override - String get download_ip_ban_warning => - 'Além disso, seu IP pode ser bloqueado no YouTube devido a solicitações de download excessivas. O bloqueio de IP significa que você não poderá usar o YouTube (mesmo se estiver conectado) por pelo menos 2-3 meses a partir do dispositivo IP. E o Spotube não se responsabiliza se isso acontecer'; - - @override - String get by_clicking_accept_terms => - 'Ao clicar em \'aceitar\', você concorda com os seguintes termos:'; - - @override - String get download_agreement_1 => - 'Eu sei que estou pirateando música. Sou mau'; - - @override - String get download_agreement_2 => - 'Vou apoiar o artista onde puder e estou fazendo isso porque não tenho dinheiro para comprar sua arte'; - - @override - String get download_agreement_3 => - 'Estou completamente ciente de que meu IP pode ser bloqueado no YouTube e não responsabilizo o Spotube ou seus proprietários/colaboradores por quaisquer acidentes causados pela minha ação atual'; - - @override - String get decline => 'Recusar'; - - @override - String get accept => 'Aceitar'; - - @override - String get details => 'Detalhes'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Canal'; - - @override - String get likes => 'Curtidas'; - - @override - String get dislikes => 'Descurtidas'; - - @override - String get views => 'Visualizações'; - - @override - String get streamUrl => 'URL do Stream'; - - @override - String get stop => 'Parar'; - - @override - String get sort_newest => 'Ordenar por mais recente adicionado'; - - @override - String get sort_oldest => 'Ordenar por mais antigo adicionado'; - - @override - String get sleep_timer => 'Temporizador de Sono'; - - @override - String mins(Object minutes) { - return '$minutes Minutos'; - } - - @override - String hours(Object hours) { - return '$hours Horas'; - } - - @override - String hour(Object hours) { - return '$hours Hora'; - } - - @override - String get custom_hours => 'Horas Personalizadas'; - - @override - String get logs => 'Registros'; - - @override - String get developers => 'Desenvolvedores'; - - @override - String get not_logged_in => 'Você não está logado'; - - @override - String get search_mode => 'Modo de Busca'; - - @override - String get audio_source => 'Fonte de Áudio'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Falha ao criptografar'; - - @override - String get encryption_failed_warning => - 'O Spotube usa criptografia para armazenar seus dados com segurança, mas falhou em fazê-lo. Portanto, ele voltará para o armazenamento não seguro.\nSe você estiver usando o Linux, certifique-se de ter algum serviço secreto (gnome-keyring, kde-wallet, keepassxc, etc.) instalado'; - - @override - String get querying_info => 'Consultando informações...'; - - @override - String get piped_api_down => 'A API do Piped está indisponível'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'A instância do Piped $pipedInstance está atualmente indisponível\n\nMude a instância ou mude o \'Tipo de API\' para a API oficial do YouTube\n\nCertifique-se de reiniciar o aplicativo após a alteração'; - } - - @override - String get you_are_offline => 'Você está offline no momento'; - - @override - String get connection_restored => 'Sua conexão com a internet foi restaurada'; - - @override - String get use_system_title_bar => 'Usar a barra de título do sistema'; - - @override - String get crunching_results => 'Processando resultados...'; - - @override - String get search_to_get_results => 'Pesquisar para obter resultados'; - - @override - String get use_amoled_mode => 'Modo AMOLED'; - - @override - String get pitch_dark_theme => 'Tema escuro'; - - @override - String get normalize_audio => 'Normalizar áudio'; - - @override - String get change_cover => 'Alterar capa'; - - @override - String get add_cover => 'Adicionar capa'; - - @override - String get restore_defaults => 'Restaurar padrões'; - - @override - String get download_music_format => 'Formato de download de música'; - - @override - String get streaming_music_format => 'Formato de streaming de música'; - - @override - String get download_music_quality => 'Qualidade de download'; - - @override - String get streaming_music_quality => 'Qualidade de streaming'; - - @override - String get login_with_lastfm => 'Iniciar sessão com o Last.fm'; - - @override - String get connect => 'Ligar'; - - @override - String get disconnect_lastfm => 'Desligar do Last.fm'; - - @override - String get disconnect => 'Desligar'; - - @override - String get username => 'Nome de utilizador'; - - @override - String get password => 'Palavra-passe'; - - @override - String get login => 'Iniciar sessão'; - - @override - String get login_with_your_lastfm => 'Inicie sessão na sua conta Last.fm'; - - @override - String get scrobble_to_lastfm => 'Scrobble para o Last.fm'; - - @override - String get go_to_album => 'Ir para o álbum'; - - @override - String get discord_rich_presence => 'Presença rica no Discord'; - - @override - String get browse_all => 'Navegar por tudo'; - - @override - String get genres => 'Gêneros'; - - @override - String get explore_genres => 'Explorar gêneros'; - - @override - String get friends => 'Amigos'; - - @override - String get no_lyrics_available => - 'Desculpe, não foi possível encontrar a letra desta faixa'; - - @override - String get start_a_radio => 'Iniciar uma Rádio'; - - @override - String get how_to_start_radio => 'Como você deseja iniciar a rádio?'; - - @override - String get replace_queue_question => - 'Você deseja substituir a fila atual ou acrescentar a ela?'; - - @override - String get endless_playback => 'Reprodução sem fim'; - - @override - String get delete_playlist => 'Excluir Lista de Reprodução'; - - @override - String get delete_playlist_confirmation => - 'Tem certeza de que deseja excluir esta lista de reprodução?'; - - @override - String get local_tracks => 'Faixas Locais'; - - @override - String get local_tab => 'Local'; - - @override - String get song_link => 'Link da Música'; - - @override - String get skip_this_nonsense => 'Pular essa bobagem'; - - @override - String get freedom_of_music => '“Liberdade da Música”'; - - @override - String get freedom_of_music_palm => - '“Liberdade da Música na palma da sua mão”'; - - @override - String get get_started => 'Vamos começar'; - - @override - String get youtube_source_description => 'Recomendado e funciona melhor.'; - - @override - String get piped_source_description => - 'Sentindo-se livre? Igual ao YouTube, mas muito mais grátis.'; - - @override - String get jiosaavn_source_description => - 'Melhor para a região da Ásia do Sul.'; - - @override - String get invidious_source_description => - 'Semelhante ao Piped, mas com maior disponibilidade.'; - - @override - String highest_quality(Object quality) { - return 'Melhor Qualidade: $quality'; - } - - @override - String get select_audio_source => 'Selecionar Fonte de Áudio'; - - @override - String get endless_playback_description => - 'Adicionar automaticamente novas músicas\nao final da fila'; - - @override - String get choose_your_region => 'Escolha sua região'; - - @override - String get choose_your_region_description => - 'Isso ajudará o Spotube a mostrar o conteúdo certo\npara sua localização.'; - - @override - String get choose_your_language => 'Escolha seu idioma'; - - @override - String get help_project_grow => 'Ajude este projeto a crescer'; - - @override - String get help_project_grow_description => - 'Spotube é um projeto de código aberto. Você pode ajudar este projeto a crescer contribuindo para o projeto, relatando bugs ou sugerindo novos recursos.'; - - @override - String get contribute_on_github => 'Contribuir no GitHub'; - - @override - String get donate_on_open_collective => 'Doar no Open Collective'; - - @override - String get browse_anonymously => 'Navegar Anonimamente'; - - @override - String get enable_connect => 'Ativar conexão'; - - @override - String get enable_connect_description => - 'Controle o Spotube a partir de outros dispositivos'; - - @override - String get devices => 'Dispositivos'; - - @override - String get select => 'Selecionar'; - - @override - String connect_client_alert(Object client) { - return 'Você está sendo controlado por $client'; - } - - @override - String get this_device => 'Este dispositivo'; - - @override - String get remote => 'Remoto'; - - @override - String get stats => 'Estatísticas'; - - @override - String and_n_more(Object count) { - return 'e $count mais'; - } - - @override - String get recently_played => 'Reproduzido Recentemente'; - - @override - String get browse_more => 'Ver Mais'; - - @override - String get no_title => 'Sem Título'; - - @override - String get not_playing => 'Não está a reproduzir'; - - @override - String get epic_failure => 'Fracasso épico!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Adicionados $tracks_length faixas à fila'; - } - - @override - String get spotube_has_an_update => 'Spotube tem uma atualização'; - - @override - String get download_now => 'Baixar Agora'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum foi lançado'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version foi lançado'; - } - - @override - String get read_the_latest => 'Leia o mais recente '; - - @override - String get release_notes => 'notas de versão'; - - @override - String get pick_color_scheme => 'Escolha o esquema de cores'; - - @override - String get save => 'Salvar'; - - @override - String get choose_the_device => 'Escolha o dispositivo:'; - - @override - String get multiple_device_connected => - 'Há vários dispositivos conectados.\nEscolha o dispositivo no qual deseja executar esta ação'; - - @override - String get nothing_found => 'Nada encontrado'; - - @override - String get the_box_is_empty => 'A caixa está vazia'; - - @override - String get top_artists => 'Principais Artistas'; - - @override - String get top_albums => 'Principais Álbuns'; - - @override - String get this_week => 'Esta semana'; - - @override - String get this_month => 'Este mês'; - - @override - String get last_6_months => 'Últimos 6 meses'; - - @override - String get this_year => 'Este ano'; - - @override - String get last_2_years => 'Últimos 2 anos'; - - @override - String get all_time => 'De todos os tempos'; - - @override - String powered_by_provider(Object providerName) { - return 'Desenvolvido por $providerName'; - } - - @override - String get email => 'E-mail'; - - @override - String get profile_followers => 'Seguidores'; - - @override - String get birthday => 'Aniversário'; - - @override - String get subscription => 'Assinatura'; - - @override - String get not_born => 'Não nascido'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Perfil'; - - @override - String get no_name => 'Sem Nome'; - - @override - String get edit => 'Editar'; - - @override - String get user_profile => 'Perfil do Usuário'; - - @override - String count_plays(Object count) { - return '$count reproduzidos'; - } - - @override - String get streaming_fees_hypothetical => - '*Calculado com base no pagamento por stream do Spotify\nque varia de \$0.003 a \$0.005. Isso é um cálculo hipotético\npara fornecer uma visão ao usuário sobre quanto eles\nteriam pago aos artistas se estivessem ouvindo\no seu som no Spotify.'; - - @override - String get minutes_listened => 'Minutos ouvidos'; - - @override - String get streamed_songs => 'Músicas transmitidas'; - - @override - String count_streams(Object count) { - return '$count streams'; - } - - @override - String get owned_by_you => 'De sua propriedade'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl copiado para a área de transferência'; - } - - @override - String get hipotetical_calculation => - '*Isso é calculado com base no pagamento médio por stream de plataformas de streaming de música online de US\$ 0,003 a US\$ 0,005. Esta é uma estimativa hipotética para dar ao usuário uma ideia de quanto ele teria pago aos artistas se ouvisse sua música em diferentes plataformas de streaming de música.'; - - @override - String count_mins(Object minutes) { - return '$minutes min'; - } - - @override - String get summary_minutes => 'minutos'; - - @override - String get summary_listened_to_music => 'Música ouvida'; - - @override - String get summary_songs => 'faixas'; - - @override - String get summary_streamed_overall => 'Total de streams'; - - @override - String get summary_owed_to_artists => 'Devido aos artistas\neste mês'; - - @override - String get summary_artists => 'artista'; - - @override - String get summary_music_reached_you => 'A música chegou até você'; - - @override - String get summary_full_albums => 'álbuns completos'; - - @override - String get summary_got_your_love => 'Recebeu seu amor'; - - @override - String get summary_playlists => 'playlists'; - - @override - String get summary_were_on_repeat => 'Estavam em repetição'; - - @override - String total_money(Object money) { - return 'Total $money'; - } - - @override - String get webview_not_found => 'Webview não encontrado'; - - @override - String get webview_not_found_description => - 'Nenhum runtime Webview está instalado no seu dispositivo.\nSe estiver instalado, certifique-se de que está no environment PATH\n\nApós a instalação, reinicie o aplicativo'; - - @override - String get unsupported_platform => 'Plataforma não suportada'; - - @override - String get cache_music => 'Música em cache'; - - @override - String get open => 'Abrir'; - - @override - String get cache_folder => 'Pasta de cache'; - - @override - String get export => 'Exportar'; - - @override - String get clear_cache => 'Limpar cache'; - - @override - String get clear_cache_confirmation => 'Deseja limpar o cache?'; - - @override - String get export_cache_files => 'Exportar Arquivos em Cache'; - - @override - String found_n_files(Object count) { - return 'Encontrados $count arquivos'; - } - - @override - String get export_cache_confirmation => 'Deseja exportar estes arquivos para'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Exportados $filesExported de $files arquivos'; - } - - @override - String get undo => 'Desfazer'; - - @override - String get download_all => 'Baixar tudo'; - - @override - String get add_all_to_playlist => 'Adicionar tudo à playlist'; - - @override - String get add_all_to_queue => 'Adicionar tudo à fila'; - - @override - String get play_all_next => 'Reproduzir tudo a seguir'; - - @override - String get pause => 'Pausar'; - - @override - String get view_all => 'Ver tudo'; - - @override - String get no_tracks_added_yet => - 'Parece que você ainda não adicionou nenhuma faixa'; - - @override - String get no_tracks => 'Parece que não há faixas aqui'; - - @override - String get no_tracks_listened_yet => 'Parece que você ainda não ouviu nada'; - - @override - String get not_following_artists => 'Você não está seguindo nenhum artista'; - - @override - String get no_favorite_albums_yet => - 'Parece que você ainda não adicionou nenhum álbum aos favoritos'; - - @override - String get no_logs_found => 'Nenhum log encontrado'; - - @override - String get youtube_engine => 'Motor YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine não está instalado'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine não está instalado no seu sistema.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Certifique-se de que está disponível na variável PATH ou\ndefina o caminho absoluto para o executável $engine abaixo'; - } - - @override - String get youtube_engine_unix_issue_message => - 'Em sistemas macOS/Linux/unix, definir o caminho no .zshrc/.bashrc/.bash_profile etc. não funcionará.\nVocê precisa definir o caminho no arquivo de configuração do shell'; - - @override - String get download => 'Baixar'; - - @override - String get file_not_found => 'Arquivo não encontrado'; - - @override - String get custom => 'Personalizado'; - - @override - String get add_custom_url => 'Adicionar URL personalizada'; - - @override - String get edit_port => 'Editar porta'; - - @override - String get port_helper_msg => - 'O padrão é -1, que indica um número aleatório. Se você tiver um firewall configurado, é recomendável definir isso.'; - - @override - String connect_request(Object client) { - return 'Permitir que $client se conecte?'; - } - - @override - String get connection_request_denied => - 'Conexão negada. O usuário negou o acesso .'; - - @override - String get an_error_occurred => 'Ocorreu um erro'; - - @override - String get copy_to_clipboard => 'Copiar para a área de transferência'; - - @override - String get view_logs => 'Ver logs'; - - @override - String get retry => 'Tentar novamente'; - - @override - String get no_default_metadata_provider_selected => - 'Você não tem um provedor de metadados padrão definido'; - - @override - String get manage_metadata_providers => 'Gerenciar provedores de metadados'; - - @override - String get open_link_in_browser => 'Abrir link no navegador?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Você deseja abrir o seguinte link'; - - @override - String get unsafe_url_warning => - 'Pode ser inseguro abrir links de fontes não confiáveis. Tenha cautela!\nVocê também pode copiar o link para sua área de transferência.'; - - @override - String get copy_link => 'Copiar link'; - - @override - String get building_your_timeline => - 'Construindo sua linha do tempo com base em suas audições...'; - - @override - String get official => 'Oficial'; - - @override - String author_name(Object author) { - return 'Autor: $author'; - } - - @override - String get third_party => 'Terceiros'; - - @override - String get plugin_requires_authentication => 'Plugin requer autenticação'; - - @override - String get update_available => 'Atualização disponível'; - - @override - String get supports_scrobbling => 'Suporta scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Este plugin faz o scrobbling de sua música para gerar seu histórico de audição.'; - - @override - String get default_metadata_source => 'Fonte padrão de metadados'; - - @override - String get set_default_metadata_source => 'Definir fonte padrão de metadados'; - - @override - String get default_audio_source => 'Fonte de áudio padrão'; - - @override - String get set_default_audio_source => 'Definir fonte de áudio padrão'; - - @override - String get set_default => 'Definir como padrão'; - - @override - String get support => 'Suporte'; - - @override - String get support_plugin_development => 'Apoiar o desenvolvimento do plugin'; - - @override - String can_access_name_api(Object name) { - return '- Pode acessar a API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Você deseja instalar este plugin?'; - - @override - String get third_party_plugin_warning => - 'Este plugin é de um repositório de terceiros. Certifique-se de que você confia na fonte antes de instalá-lo.'; - - @override - String get author => 'Autor'; - - @override - String get this_plugin_can_do_following => - 'Este plugin pode fazer o seguinte'; - - @override - String get install => 'Instalar'; - - @override - String get install_a_metadata_provider => 'Instalar um provedor de metadados'; - - @override - String get no_tracks_playing => 'Nenhuma música sendo reproduzida no momento'; - - @override - String get synced_lyrics_not_available => - 'As letras sincronizadas não estão disponíveis para esta música. Por favor, use a aba'; - - @override - String get plain_lyrics => 'Letras simples'; - - @override - String get tab_instead => 'em vez disso.'; - - @override - String get disclaimer => 'Aviso'; - - @override - String get third_party_plugin_dmca_notice => - 'A equipe Spotube não se responsabiliza (incluindo legalmente) por quaisquer plugins de \"terceiros\".\nUse-os por sua conta e risco. Para quaisquer bugs/problemas, por favor, relate-os ao repositório do plugin.\n\nSe algum plugin de \"terceiros\" estiver violando os Termos de Serviço/DMCA de qualquer serviço/entidade legal, por favor, peça ao autor do plugin \"terceiro\" ou à plataforma de hospedagem, por exemplo, GitHub/Codeberg, para tomar medidas. Os plugins listados acima (rotulados como \"terceiros\") são todos plugins públicos/mantidos pela comunidade. Não os estamos curando, então não podemos tomar nenhuma medida sobre eles.\n\n'; - - @override - String get input_does_not_match_format => - 'A entrada não corresponde ao formato exigido'; - - @override - String get plugins => 'Plugins'; - - @override - String get paste_plugin_download_url => - 'Cole a url de download ou a url do repositório GitHub/Codeberg ou o link direto para o arquivo .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Baixar e instalar o plugin a partir da url'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Falha ao adicionar plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'Carregar plugin a partir de arquivo'; - - @override - String get installed => 'Instalado'; - - @override - String get available_plugins => 'Plugins disponíveis'; - - @override - String get configure_plugins => - 'Configure seus próprios plugins de provedores de metadados e fontes de áudio'; - - @override - String get audio_scrobblers => 'Scrobblers de áudio'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Fonte: '; - - @override - String get uncompressed => 'Não comprimido'; - - @override - String get dab_music_source_description => - 'Para audiófilos. Fornece streams de áudio de alta qualidade/sem perdas. Correspondência precisa de faixas baseada em ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_ru.dart b/lib/l10n/generated/app_localizations_ru.dart deleted file mode 100644 index 31be6a7b..00000000 --- a/lib/l10n/generated/app_localizations_ru.dart +++ /dev/null @@ -1,1573 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Russian (`ru`). -class AppLocalizationsRu extends AppLocalizations { - AppLocalizationsRu([String locale = 'ru']) : super(locale); - - @override - String get guest => 'Гость'; - - @override - String get browse => 'Обзор'; - - @override - String get search => 'Поиск'; - - @override - String get library => 'Библиотека'; - - @override - String get lyrics => 'Текст'; - - @override - String get settings => 'Настройки'; - - @override - String get genre_categories_filter => 'Фильтр по категориям или жанрам...'; - - @override - String get genre => 'Жанр'; - - @override - String get personalized => 'Персонализированный'; - - @override - String get featured => 'Популярное'; - - @override - String get new_releases => 'Новое'; - - @override - String get songs => 'Треки'; - - @override - String playing_track(Object track) { - return 'Играет $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Это удалит текущую очередь. $track_length треков будет удалено. Вы хотите продолжить?'; - } - - @override - String get load_more => 'Загрузить больше'; - - @override - String get playlists => 'Плейлисты'; - - @override - String get artists => 'Исполнители'; - - @override - String get albums => 'Альбомы'; - - @override - String get tracks => 'Треки'; - - @override - String get downloads => 'Загрузки'; - - @override - String get filter_playlists => 'Применить фильтры к вашим плейлистам...'; - - @override - String get liked_tracks => 'Понравившиеся треки'; - - @override - String get liked_tracks_description => 'Все понравившиеся треки'; - - @override - String get playlist => 'Плейлист'; - - @override - String get create_a_playlist => 'Создать плейлист'; - - @override - String get update_playlist => 'Обновить плейлист'; - - @override - String get create => 'Создать'; - - @override - String get cancel => 'Отмена'; - - @override - String get update => 'Обновить'; - - @override - String get playlist_name => 'Назвать плейлист'; - - @override - String get name_of_playlist => 'Название плейлиста'; - - @override - String get description => 'Описание'; - - @override - String get public => 'Публичный'; - - @override - String get collaborative => 'Совместный'; - - @override - String get search_local_tracks => 'Поиск песен на вашем устройстве...'; - - @override - String get play => 'Играть'; - - @override - String get delete => 'Удалить'; - - @override - String get none => 'Пусто'; - - @override - String get sort_a_z => 'Сортировка по алфавиту'; - - @override - String get sort_z_a => 'Сортировка по алфавиту в обратную сторону'; - - @override - String get sort_artist => 'Сортировать по исполнителю'; - - @override - String get sort_album => 'Сортировать по альбомам'; - - @override - String get sort_duration => 'Сортировать по длительности'; - - @override - String get sort_tracks => 'Сортировать треки'; - - @override - String currently_downloading(Object tracks_length) { - return 'Загружается ($tracks_length)'; - } - - @override - String get cancel_all => 'Отменить все'; - - @override - String get filter_artist => 'Фильтровать по исполнителю...'; - - @override - String followers(Object followers) { - return '$followers Подписчики'; - } - - @override - String get add_artist_to_blacklist => 'Добавить исполнителя в черный список'; - - @override - String get top_tracks => 'Чарт'; - - @override - String get fans_also_like => 'Поклонникам также нравится'; - - @override - String get loading => 'Загрузка...'; - - @override - String get artist => 'Исполнитель'; - - @override - String get blacklisted => 'Внесен в черный список'; - - @override - String get following => 'Подписаны'; - - @override - String get follow => 'Подписаться'; - - @override - String get artist_url_copied => - 'URL-адрес исполнителя скопирован в буфер обмена'; - - @override - String added_to_queue(Object tracks) { - return 'Добавлено $tracks треков в очередь'; - } - - @override - String get filter_albums => 'Фильтровать альбомы...'; - - @override - String get synced => 'Синхронизировано'; - - @override - String get plain => 'Обычный'; - - @override - String get shuffle => 'Перемешать'; - - @override - String get search_tracks => 'Поиск треков...'; - - @override - String get released => 'Дата выхода'; - - @override - String error(Object error) { - return 'Ошибка $error'; - } - - @override - String get title => 'Заголовок'; - - @override - String get time => 'Время'; - - @override - String get more_actions => 'Больше действий'; - - @override - String download_count(Object count) { - return 'Скачать ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Добавить ($count) в плейлист'; - } - - @override - String add_count_to_queue(Object count) { - return 'Добавить ($count) в очередь'; - } - - @override - String play_count_next(Object count) { - return 'Воспроизвести ($count) следующий'; - } - - @override - String get album => 'Альбом'; - - @override - String copied_to_clipboard(Object data) { - return 'Скопировано $data в буфер обмена'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Добавить $track в этот плейлист'; - } - - @override - String get add => 'Добавить'; - - @override - String added_track_to_queue(Object track) { - return 'Добавлен $track в очередь'; - } - - @override - String get add_to_queue => 'Добавить в очередь'; - - @override - String track_will_play_next(Object track) { - return '$track будет воспроизведен следующим'; - } - - @override - String get play_next => 'Воспроизвести следующий'; - - @override - String removed_track_from_queue(Object track) { - return '$track удален из очереди'; - } - - @override - String get remove_from_queue => 'Удалить из очереди'; - - @override - String get remove_from_favorites => 'Удалить из избранного'; - - @override - String get save_as_favorite => 'Сохранить в избранное'; - - @override - String get add_to_playlist => 'Добавить в плейлист'; - - @override - String get remove_from_playlist => 'Удалить из плейлиста'; - - @override - String get add_to_blacklist => 'Добавить в черный список'; - - @override - String get remove_from_blacklist => 'Удалить из черного списка'; - - @override - String get share => 'Поделиться'; - - @override - String get mini_player => 'Мини-плеер'; - - @override - String get slide_to_seek => 'Потяните для перемотки вперед или назад'; - - @override - String get shuffle_playlist => 'Перемешать плейлист'; - - @override - String get unshuffle_playlist => 'Снять перемешивание плейлиста'; - - @override - String get previous_track => 'Предыдущий трек'; - - @override - String get next_track => 'Следующий трек'; - - @override - String get pause_playback => 'Пауза воспроизведения'; - - @override - String get resume_playback => 'Возобновить воспроизведение'; - - @override - String get loop_track => 'Циклический трек'; - - @override - String get no_loop => 'Без повтора'; - - @override - String get repeat_playlist => 'Повторите плейлист'; - - @override - String get queue => 'Очередь'; - - @override - String get alternative_track_sources => 'Альтернативные источники треков'; - - @override - String get download_track => 'Скачать трек'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks треков в очереди'; - } - - @override - String get clear_all => 'Очистить все'; - - @override - String get show_hide_ui_on_hover => 'Показать/Скрыть интерфейс при наведении'; - - @override - String get always_on_top => 'Всегда сверху'; - - @override - String get exit_mini_player => 'Выйти из мини-плеера'; - - @override - String get download_location => 'Место загрузки'; - - @override - String get local_library => 'Локальная библиотека'; - - @override - String get add_library_location => 'Добавить в библиотеку'; - - @override - String get remove_library_location => 'Удалить из библиотеки'; - - @override - String get account => 'Аккаунт'; - - @override - String get logout => 'Выйти'; - - @override - String get logout_of_this_account => 'Выйдите из этого аккаунта'; - - @override - String get language_region => 'Язык и регион'; - - @override - String get language => 'Язык'; - - @override - String get system_default => 'Системное значение по умолчанию'; - - @override - String get market_place_region => 'Региональное пространство'; - - @override - String get recommendation_country => 'Страна рекомендаций'; - - @override - String get appearance => 'Внешний вид'; - - @override - String get layout_mode => 'Режим компоновки'; - - @override - String get override_layout_settings => - 'Изменить настройки режима адаптивной компоновки'; - - @override - String get adaptive => 'Адаптивный'; - - @override - String get compact => 'Компактный'; - - @override - String get extended => 'Расширенный'; - - @override - String get theme => 'Тема'; - - @override - String get dark => 'Тёмная'; - - @override - String get light => 'Светлая'; - - @override - String get system => 'Системная'; - - @override - String get accent_color => 'Акцентный цвет'; - - @override - String get sync_album_color => 'Синхронизировать цвет альбома'; - - @override - String get sync_album_color_description => - 'Использует основной цвет обложки альбома как цвет акцента'; - - @override - String get playback => 'Воспроизведение'; - - @override - String get audio_quality => 'Качество звука'; - - @override - String get high => 'Высокое'; - - @override - String get low => 'Низкое'; - - @override - String get pre_download_play => 'Предварительная загрузка и воспроизведение'; - - @override - String get pre_download_play_description => - 'Вместо потоковой передачи аудио используйте загруженные байты и воспроизводьте их (рекомендуется для пользователей с высокой пропускной способностью)'; - - @override - String get skip_non_music => - 'Пропускать немузыкальные сегменты (SponsorBlock)'; - - @override - String get blacklist_description => 'Черный список треков и артистов'; - - @override - String get wait_for_download_to_finish => - 'Пожалуйста, дождитесь завершения текущей загрузки'; - - @override - String get desktop => 'Компьютер'; - - @override - String get close_behavior => 'Поведение при закрытии'; - - @override - String get close => 'Закрыть'; - - @override - String get minimize_to_tray => 'Свернуть'; - - @override - String get show_tray_icon => 'Показать значок на панели задач'; - - @override - String get about => 'О нас'; - - @override - String get u_love_spotube => 'Мы знаем что вам нравится Spotube'; - - @override - String get check_for_updates => 'Проверьте наличие обновлений'; - - @override - String get about_spotube => 'О Spotube'; - - @override - String get blacklist => 'Чёрный список'; - - @override - String get please_sponsor => 'Стать спосором/поддержать'; - - @override - String get spotube_description => - 'Spotube – это легкий, кросс-платформенный клиент Spotify, предоставляющий бесплатный доступ для всех пользователей'; - - @override - String get version => 'Версия'; - - @override - String get build_number => 'Номер сборки'; - - @override - String get founder => 'Создатель'; - - @override - String get repository => 'Репозиторий'; - - @override - String get bug_issues => 'Ошибки и проблемы'; - - @override - String get made_with => 'Сделано Bangladesh🇧🇩 с ❤️'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Лицензия'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Не беспокойся, никакая личная информация не собирается и не передается'; - - @override - String get know_how_to_login => 'Не знаете, как это сделать?'; - - @override - String get follow_step_by_step_guide => 'Следуйте пошаговому руководству'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => 'Пожалуйста, заполните все поля'; - - @override - String get submit => 'Отправить'; - - @override - String get exit => 'Выйти'; - - @override - String get previous => 'Предыдущий'; - - @override - String get next => 'Следующий'; - - @override - String get done => 'Готово'; - - @override - String get step_1 => 'Шаг 1'; - - @override - String get first_go_to => 'Сначала перейдите в'; - - @override - String get something_went_wrong => 'Что-то пошло не так'; - - @override - String get piped_instance => 'Экземпляр сервера Piped'; - - @override - String get piped_description => - 'Серверный экземпляр Piped для сопоставления треков'; - - @override - String get piped_warning => - 'Некоторые из них могут работать неправильно, поэтому используйте на свой страх и риск'; - - @override - String get invidious_instance => 'Экземпляр сервера Invidious'; - - @override - String get invidious_description => - 'Экземпляр сервера Invidious для сопоставления треков'; - - @override - String get invidious_warning => - 'Некоторые могут работать не очень хорошо. Используйте на свой страх и риск'; - - @override - String get generate => 'Генерировать'; - - @override - String track_exists(Object track) { - return 'Трек $track уже существует'; - } - - @override - String get replace_downloaded_tracks => 'Заменить все ранее скачанные треки'; - - @override - String get skip_download_tracks => - 'Пропустить загрузку всех ранее скачанных треков'; - - @override - String get do_you_want_to_replace => 'Хотите заменить существующий трек??'; - - @override - String get replace => 'Заменить'; - - @override - String get skip => 'Пропустить'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Выберите до $count $type'; - } - - @override - String get select_genres => 'Выберите жанр'; - - @override - String get add_genres => 'Добавить жанр'; - - @override - String get country => 'Страна'; - - @override - String get number_of_tracks_generate => 'Количество треков для создания'; - - @override - String get acousticness => 'Акустичность'; - - @override - String get danceability => 'Ритмичность'; - - @override - String get energy => 'Энергичность'; - - @override - String get instrumentalness => 'Инструментальность'; - - @override - String get liveness => 'Живость'; - - @override - String get loudness => 'Громкость'; - - @override - String get speechiness => 'Речевой характер'; - - @override - String get valence => 'Значимость'; - - @override - String get popularity => 'Популярность'; - - @override - String get key => 'Ключ'; - - @override - String get duration => 'Продолжительность (с)'; - - @override - String get tempo => 'Темп (BPM)'; - - @override - String get mode => 'Режим'; - - @override - String get time_signature => 'Тактовый размер'; - - @override - String get short => 'Короткий'; - - @override - String get medium => 'Средний'; - - @override - String get long => 'Длинный'; - - @override - String get min => 'Минимум'; - - @override - String get max => 'Максимум'; - - @override - String get target => 'Цель'; - - @override - String get moderate => 'Отобрать'; - - @override - String get deselect_all => 'Убрать выделение со всех'; - - @override - String get select_all => 'Выделить все'; - - @override - String get are_you_sure => 'Вы уверены?'; - - @override - String get generating_playlist => 'Создание собственного плейлиста...'; - - @override - String selected_count_tracks(Object count) { - return 'Выбрано $count треков'; - } - - @override - String get download_warning => - 'При скачивании всех треков пакетом вы фактически занимаетесь пиратством и наносите ущерб творческому обществу музыки. Надеюсь, что вы осознаете это. Всегда старайтесь уважать и поддерживать усилия исполнителей, вложенные в их творчество'; - - @override - String get download_ip_ban_warning => - 'Кроме того, стоит учитывать, что из-за чрезмерного количества запросов на скачивание ваш IP-адрес может быть заблокирован на YouTube. Блокировка IP означает, что вы не сможете использовать YouTube (даже если вы вошли в свою учетную запись) в течение, как минимум, 2-3 месяцев с того устройства, с которого были сделаны эти запросы. Важно заметить, что Spotube не несет ответственности за такие события'; - - @override - String get by_clicking_accept_terms => - 'Нажимая \'принять\', вы соглашаетесь с следующими условиями:'; - - @override - String get download_agreement_1 => - 'Я осознаю, что я использую музыку незаконно. Это плохо.'; - - @override - String get download_agreement_2 => - 'Я бы поддержал исполнителей, где только смог, и делаю это, так как не имею средств на приобретение их творчества'; - - @override - String get download_agreement_3 => - 'Я полностью осознаю, что мой IP-адрес может быть заблокирован на YouTube, и я не считаю Spotube или его владельцев/соавторов ответственными за какие-либо неприятности, вызванные моими текущими действиями'; - - @override - String get decline => 'Отклонить'; - - @override - String get accept => 'Принять'; - - @override - String get details => 'Детали'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Канал'; - - @override - String get likes => 'Нравится'; - - @override - String get dislikes => 'Не нравится'; - - @override - String get views => 'Просмотров'; - - @override - String get streamUrl => 'URL-адрес потока'; - - @override - String get stop => 'Остановить'; - - @override - String get sort_newest => 'Сортировать по самым новым добавленным'; - - @override - String get sort_oldest => 'Сортировать по самым старым добавленным'; - - @override - String get sleep_timer => 'Таймер сна'; - - @override - String mins(Object minutes) { - return '$minutes Минут'; - } - - @override - String hours(Object hours) { - return '$hours Часы'; - } - - @override - String hour(Object hours) { - return '$hours Час'; - } - - @override - String get custom_hours => 'Пользовательские часы'; - - @override - String get logs => 'Журналы'; - - @override - String get developers => 'Разработчики'; - - @override - String get not_logged_in => 'Вы не выполнили вход'; - - @override - String get search_mode => 'Режим поиска'; - - @override - String get audio_source => 'Источник аудио'; - - @override - String get ok => 'Ок'; - - @override - String get failed_to_encrypt => 'Не удалось зашифровать'; - - @override - String get encryption_failed_warning => - 'Spotube использует шифрование для безопасного хранения ваших данных. Однако в этом случае произошла ошибка. Поэтому будет использовано небезопасное хранилище.\nЕсли вы используете Linux, убедитесь, что у вас установлен какой-либо инструмент для работы с секретами (gnome-keyring, kde-wallet, keepassxc и т.д.)'; - - @override - String get querying_info => 'Запрос информации...'; - - @override - String get piped_api_down => 'Piped API не отвечает'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Экземпляр Piped $pipedInstance в данный момент недоступен.\n\nВы можете либо изменить экземпляр, либо переключиться на использование официального API YouTube.\n\nНе забудьте перезапустить приложение после внесенных изменений'; - } - - @override - String get you_are_offline => 'Нет доступа к сети'; - - @override - String get connection_restored => 'Ваше интернет-соединение восстановлено'; - - @override - String get use_system_title_bar => 'Использовать системную панель заголовка'; - - @override - String get crunching_results => 'Обработка результатов...'; - - @override - String get search_to_get_results => 'Поиск для получения результатов'; - - @override - String get use_amoled_mode => 'Режим AMOLED'; - - @override - String get pitch_dark_theme => 'Темная тема'; - - @override - String get normalize_audio => 'Нормализовать звук'; - - @override - String get change_cover => 'Изменить обложку'; - - @override - String get add_cover => 'Добавить обложку'; - - @override - String get restore_defaults => 'Восстановить настройки по умолчанию'; - - @override - String get download_music_format => 'Формат загрузки музыки'; - - @override - String get streaming_music_format => 'Формат потоковой музыки'; - - @override - String get download_music_quality => 'Качество загрузки'; - - @override - String get streaming_music_quality => 'Качество стриминга'; - - @override - String get login_with_lastfm => 'Войти с помощью Last.fm'; - - @override - String get connect => 'Подключить'; - - @override - String get disconnect_lastfm => 'Отключиться от Last.fm'; - - @override - String get disconnect => 'Отключить'; - - @override - String get username => 'Имя пользователя'; - - @override - String get password => 'Пароль'; - - @override - String get login => 'Войти'; - - @override - String get login_with_your_lastfm => 'Войти в свою учетную запись Last.fm'; - - @override - String get scrobble_to_lastfm => 'Скробблинг на Last.fm'; - - @override - String get go_to_album => 'Перейти к альбому'; - - @override - String get discord_rich_presence => 'Богатое присутствие в Discord'; - - @override - String get browse_all => 'Просмотреть все'; - - @override - String get genres => 'Жанры'; - - @override - String get explore_genres => 'Исследовать жанры'; - - @override - String get friends => 'Друзья'; - - @override - String get no_lyrics_available => - 'Извините, не удается найти текст для этого трека'; - - @override - String get start_a_radio => 'Запустить радио'; - - @override - String get how_to_start_radio => 'Как вы хотите запустить радио?'; - - @override - String get replace_queue_question => - 'Хотите заменить текущую очередь или добавить к ней?'; - - @override - String get endless_playback => 'Бесконечное воспроизведение'; - - @override - String get delete_playlist => 'Удалить плейлист'; - - @override - String get delete_playlist_confirmation => - 'Вы уверены, что хотите удалить этот плейлист?'; - - @override - String get local_tracks => 'Локальные треки'; - - @override - String get local_tab => 'Локальное'; - - @override - String get song_link => 'Ссылка на песню'; - - @override - String get skip_this_nonsense => 'Пропустить этот бред'; - - @override - String get freedom_of_music => '“Свобода музыки”'; - - @override - String get freedom_of_music_palm => '“Свобода музыки в вашей ладони”'; - - @override - String get get_started => 'Начнем'; - - @override - String get youtube_source_description => - 'Рекомендуется и лучше всего работает.'; - - @override - String get piped_source_description => - 'Чувствуете себя свободно? То же самое, что и YouTube, но намного бесплатно.'; - - @override - String get jiosaavn_source_description => - 'Лучший для Южно-Азиатского региона.'; - - @override - String get invidious_source_description => - 'Похож на Piped, но с более высокой доступностью.'; - - @override - String highest_quality(Object quality) { - return 'Наивысшее качество: $quality'; - } - - @override - String get select_audio_source => 'Выберите аудиоисточник'; - - @override - String get endless_playback_description => - 'Автоматически добавляйте новые песни\nв конец очереди'; - - @override - String get choose_your_region => 'Выберите ваш регион'; - - @override - String get choose_your_region_description => - 'Это поможет Spotube показать вам правильный контент\nдля вашего местоположения.'; - - @override - String get choose_your_language => 'Выберите ваш язык'; - - @override - String get help_project_grow => 'Помогите этому проекту расти'; - - @override - String get help_project_grow_description => - 'Spotube - это проект с открытым исходным кодом. Вы можете помочь этому проекту развиваться, внося вклад в проект, сообщая ошибках или предлагая новые функции.'; - - @override - String get contribute_on_github => 'Внести вклад на GitHub'; - - @override - String get donate_on_open_collective => 'Пожертвовать на Open Collective'; - - @override - String get browse_anonymously => 'Анонимно просматривать'; - - @override - String get enable_connect => 'Включить подключение'; - - @override - String get enable_connect_description => - 'Управление Spotube с других устройств'; - - @override - String get devices => 'Устройства'; - - @override - String get select => 'Выбрать'; - - @override - String connect_client_alert(Object client) { - return 'Вас контролирует $client'; - } - - @override - String get this_device => 'Это устройство'; - - @override - String get remote => 'Дистанционное управление'; - - @override - String get stats => 'Статистика'; - - @override - String and_n_more(Object count) { - return 'и $count еще'; - } - - @override - String get recently_played => 'Недавно воспроизведено'; - - @override - String get browse_more => 'Посмотреть больше'; - - @override - String get no_title => 'Без названия'; - - @override - String get not_playing => 'Не воспроизводится'; - - @override - String get epic_failure => 'Эпическое фиаско!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Добавлено $tracks_length треков в очередь'; - } - - @override - String get spotube_has_an_update => 'В Spotube доступно обновление'; - - @override - String get download_now => 'Скачать сейчас'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum выпущен'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version выпущен'; - } - - @override - String get read_the_latest => 'Читать последние '; - - @override - String get release_notes => 'заметки о версии'; - - @override - String get pick_color_scheme => 'Выберите цветовую схему'; - - @override - String get save => 'Сохранить'; - - @override - String get choose_the_device => 'Выберите устройство:'; - - @override - String get multiple_device_connected => - 'Подключено несколько устройств.\nВыберите устройство, на котором вы хотите выполнить это действие'; - - @override - String get nothing_found => 'Ничего не найдено'; - - @override - String get the_box_is_empty => 'Коробка пуста'; - - @override - String get top_artists => 'Лучшие артисты'; - - @override - String get top_albums => 'Лучшие альбомы'; - - @override - String get this_week => 'На этой неделе'; - - @override - String get this_month => 'В этом месяце'; - - @override - String get last_6_months => 'Последние 6 месяцев'; - - @override - String get this_year => 'В этом году'; - - @override - String get last_2_years => 'Последние 2 года'; - - @override - String get all_time => 'Все время'; - - @override - String powered_by_provider(Object providerName) { - return 'При поддержке $providerName'; - } - - @override - String get email => 'Электронная почта'; - - @override - String get profile_followers => 'Подписчики'; - - @override - String get birthday => 'День рождения'; - - @override - String get subscription => 'Подписка'; - - @override - String get not_born => 'Не рожден'; - - @override - String get hacker => 'Хакер'; - - @override - String get profile => 'Профиль'; - - @override - String get no_name => 'Без имени'; - - @override - String get edit => 'Редактировать'; - - @override - String get user_profile => 'Профиль пользователя'; - - @override - String count_plays(Object count) { - return '$count воспроизведений'; - } - - @override - String get streaming_fees_hypothetical => - '*Рассчитано на основе выплат Spotify за стрим\nот \$0.003 до \$0.005. Это гипотетический\nрасчет, чтобы показать пользователю, сколько бы он\nзаплатил артистам, если бы слушал их песни на Spotify.'; - - @override - String get minutes_listened => 'Минут прослушивания'; - - @override - String get streamed_songs => 'Стримленные песни'; - - @override - String count_streams(Object count) { - return '$count стримов'; - } - - @override - String get owned_by_you => 'Ваша собственность'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl скопировано в буфер обмена'; - } - - @override - String get hipotetical_calculation => - '*Это рассчитано на основе средней выплаты за прослушивание на онлайн-платформах для потоковой передачи музыки в размере от 0,003 до 0,005 долларов США. Это гипотетический расчет, чтобы дать пользователю представление о том, сколько бы они заплатили артистам, если бы слушали их песни на разных музыкальных стриминговых платформах.'; - - @override - String count_mins(Object minutes) { - return '$minutes мин'; - } - - @override - String get summary_minutes => 'минуты'; - - @override - String get summary_listened_to_music => 'Слушанная музыка'; - - @override - String get summary_songs => 'песни'; - - @override - String get summary_streamed_overall => 'Всего стримов'; - - @override - String get summary_owed_to_artists => 'К выплате артистам\nв этом месяце'; - - @override - String get summary_artists => 'артиста'; - - @override - String get summary_music_reached_you => 'Музыка дошла до вас'; - - @override - String get summary_full_albums => 'полные альбомы'; - - @override - String get summary_got_your_love => 'Получил вашу любовь'; - - @override - String get summary_playlists => 'плейлисты'; - - @override - String get summary_were_on_repeat => 'Были на повторе'; - - @override - String total_money(Object money) { - return 'Всего $money'; - } - - @override - String get webview_not_found => 'Webview не найден'; - - @override - String get webview_not_found_description => - 'На вашем устройстве не установлена среда выполнения Webview.\nЕсли он установлен, убедитесь, что он находится в environment PATH\n\nПосле установки перезапустите приложение'; - - @override - String get unsupported_platform => 'Платформа не поддерживается'; - - @override - String get cache_music => 'Кэшировать музыку'; - - @override - String get open => 'Открыть'; - - @override - String get cache_folder => 'Папка кэша'; - - @override - String get export => 'Экспорт'; - - @override - String get clear_cache => 'Очистить кэш'; - - @override - String get clear_cache_confirmation => 'Вы хотите очистить кэш?'; - - @override - String get export_cache_files => 'Экспортировать кэшированные файлы'; - - @override - String found_n_files(Object count) { - return 'Найдено $count файлов'; - } - - @override - String get export_cache_confirmation => - 'Вы хотите экспортировать эти файлы в'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Экспортировано $filesExported из $files файлов'; - } - - @override - String get undo => 'Отменить'; - - @override - String get download_all => 'Скачать все'; - - @override - String get add_all_to_playlist => 'Добавить все в плейлист'; - - @override - String get add_all_to_queue => 'Добавить все в очередь'; - - @override - String get play_all_next => 'Воспроизвести все следующее'; - - @override - String get pause => 'Пауза'; - - @override - String get view_all => 'Просмотреть все'; - - @override - String get no_tracks_added_yet => - 'Похоже, вы ещё не добавили ни одного трека'; - - @override - String get no_tracks => 'Похоже, здесь нет треков'; - - @override - String get no_tracks_listened_yet => 'Похоже, вы ещё ничего не слушали'; - - @override - String get not_following_artists => 'Вы не подписаны на художников'; - - @override - String get no_favorite_albums_yet => - 'Похоже, вы ещё не добавили ни одного альбома в избранное'; - - @override - String get no_logs_found => 'Логи не найдены'; - - @override - String get youtube_engine => 'YouTube Движок'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine не установлен'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine не установлен в вашей системе.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Убедитесь, что он доступен в переменной PATH или\nустановите абсолютный путь к исполнимому файлу $engine ниже'; - } - - @override - String get youtube_engine_unix_issue_message => - 'В macOS/Linux/Unix-подобных ОС, установка пути в .zshrc/.bashrc/.bash_profile и т.д. не будет работать.\nВы должны установить путь в файле конфигурации оболочки'; - - @override - String get download => 'Скачать'; - - @override - String get file_not_found => 'Файл не найден'; - - @override - String get custom => 'Пользовательский'; - - @override - String get add_custom_url => 'Добавить пользовательский URL'; - - @override - String get edit_port => 'Редактировать порт'; - - @override - String get port_helper_msg => - 'По умолчанию -1, что означает случайное число. Если у вас настроен брандмауэр, рекомендуется установить это.'; - - @override - String connect_request(Object client) { - return 'Разрешить $client подключение?'; - } - - @override - String get connection_request_denied => - 'Подключение отклонено. Пользователь отказал в доступе.'; - - @override - String get an_error_occurred => 'Произошла ошибка'; - - @override - String get copy_to_clipboard => 'Скопировать в буфер обмена'; - - @override - String get view_logs => 'Просмотреть журналы'; - - @override - String get retry => 'Повторить'; - - @override - String get no_default_metadata_provider_selected => - 'Вы не выбрали поставщика метаданных по умолчанию'; - - @override - String get manage_metadata_providers => 'Управление поставщиками метаданных'; - - @override - String get open_link_in_browser => 'Открыть ссылку в браузере?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Вы хотите открыть следующую ссылку'; - - @override - String get unsafe_url_warning => - 'Открытие ссылок из ненадежных источников может быть небезопасным. Будьте осторожны!\nВы также можете скопировать ссылку в буфер обмена.'; - - @override - String get copy_link => 'Копировать ссылку'; - - @override - String get building_your_timeline => - 'Создание вашей временной шкалы на основе ваших прослушиваний...'; - - @override - String get official => 'Официальный'; - - @override - String author_name(Object author) { - return 'Автор: $author'; - } - - @override - String get third_party => 'Сторонний'; - - @override - String get plugin_requires_authentication => 'Плагин требует аутентификации'; - - @override - String get update_available => 'Доступно обновление'; - - @override - String get supports_scrobbling => 'Поддерживает скробблинг'; - - @override - String get plugin_scrobbling_info => - 'Этот плагин скробблит вашу музыку для создания вашей истории прослушиваний.'; - - @override - String get default_metadata_source => 'Источник метаданных по умолчанию'; - - @override - String get set_default_metadata_source => - 'Задать источник метаданных по умолчанию'; - - @override - String get default_audio_source => 'Источник аудио по умолчанию'; - - @override - String get set_default_audio_source => 'Задать источник аудио по умолчанию'; - - @override - String get set_default => 'Установить по умолчанию'; - - @override - String get support => 'Поддержка'; - - @override - String get support_plugin_development => 'Поддержать разработку плагина'; - - @override - String can_access_name_api(Object name) { - return '- Может получить доступ к API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Вы хотите установить этот плагин?'; - - @override - String get third_party_plugin_warning => - 'Этот плагин из стороннего репозитория. Пожалуйста, убедитесь, что вы доверяете источнику перед установкой.'; - - @override - String get author => 'Автор'; - - @override - String get this_plugin_can_do_following => - 'Этот плагин может выполнять следующее'; - - @override - String get install => 'Установить'; - - @override - String get install_a_metadata_provider => 'Установить поставщика метаданных'; - - @override - String get no_tracks_playing => - 'В настоящее время не воспроизводится ни один трек'; - - @override - String get synced_lyrics_not_available => - 'Синхронизированные тексты недоступны для этой песни. Пожалуйста, используйте вкладку'; - - @override - String get plain_lyrics => 'Простые тексты'; - - @override - String get tab_instead => 'вместо этого.'; - - @override - String get disclaimer => 'Отказ от ответственности'; - - @override - String get third_party_plugin_dmca_notice => - 'Команда Spotube не несет никакой ответственности (в том числе юридической) за какие-либо \"сторонние\" плагины.\nПожалуйста, используйте их на свой страх и риск. О любых ошибках/проблемах сообщайте в репозиторий плагина.\n\nЕсли какой-либо \"сторонний\" плагин нарушает ToS/DMCA какого-либо сервиса/юридического лица, пожалуйста, попросите автора плагина \"стороннего\" или хостинговую платформу, например, GitHub/Codeberg, принять меры. Перечисленные выше (помеченные как \"сторонние\") являются общедоступными/поддерживаемыми сообществом плагинами. Мы не курируем их, поэтому не можем принимать по ним никаких мер.\n\n'; - - @override - String get input_does_not_match_format => - 'Введенные данные не соответствуют требуемому формату'; - - @override - String get plugins => 'Плагины'; - - @override - String get paste_plugin_download_url => - 'Вставьте URL-адрес для загрузки или URL-адрес репозитория GitHub/Codeberg или прямую ссылку на файл .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Загрузить и установить плагин по URL-адресу'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Не удалось добавить плагин: $error'; - } - - @override - String get upload_plugin_from_file => 'Загрузить плагин из файла'; - - @override - String get installed => 'Установлено'; - - @override - String get available_plugins => 'Доступные плагины'; - - @override - String get configure_plugins => - 'Настройте собственные плагины провайдеров метаданных и источников аудио'; - - @override - String get audio_scrobblers => 'Аудио скробблеры'; - - @override - String get scrobbling => 'Скробблинг'; - - @override - String get source => 'Источник: '; - - @override - String get uncompressed => 'Несжатый'; - - @override - String get dab_music_source_description => - 'Для аудиофилов. Предоставляет высококачественные/lossless аудиопотоки. Точное совпадение треков по ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_ta.dart b/lib/l10n/generated/app_localizations_ta.dart deleted file mode 100644 index 062a99dc..00000000 --- a/lib/l10n/generated/app_localizations_ta.dart +++ /dev/null @@ -1,1579 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Tamil (`ta`). -class AppLocalizationsTa extends AppLocalizations { - AppLocalizationsTa([String locale = 'ta']) : super(locale); - - @override - String get guest => 'விருந்தினர்'; - - @override - String get browse => 'உலாவு'; - - @override - String get search => 'தேடுக'; - - @override - String get library => 'நூலகம்'; - - @override - String get lyrics => 'பாடல் வரிகள்'; - - @override - String get settings => 'அமைப்புகள்'; - - @override - String get genre_categories_filter => 'வகைகள் அல்லது பாணிகளை வடிகட்டுக...'; - - @override - String get genre => 'பாணி'; - - @override - String get personalized => 'தனிப்பயனாக்கப்பட்ட'; - - @override - String get featured => 'சிறப்பிடம் பெற்ற'; - - @override - String get new_releases => 'புதிய வெளியீடுகள்'; - - @override - String get songs => 'பாடல்கள்'; - - @override - String playing_track(Object track) { - return '$track இயங்குகிறது'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'இது தற்போதைய வரிசையை அழிக்கும். $track_length பாடல்கள் நீக்கப்படும்\nதொடர விரும்புகிறீர்களா?'; - } - - @override - String get load_more => 'மேலும் ஏற்றுக'; - - @override - String get playlists => 'பாடல் பட்டியல்கள்'; - - @override - String get artists => 'கலைஞர்கள்'; - - @override - String get albums => 'ஆல்பங்கள்'; - - @override - String get tracks => 'பாடல்கள்'; - - @override - String get downloads => 'பதிவிறக்கங்கள்'; - - @override - String get filter_playlists => 'உங்கள் பாடல் பட்டியல்களை வடிகட்டுக...'; - - @override - String get liked_tracks => 'விரும்பிய பாடல்கள்'; - - @override - String get liked_tracks_description => 'உங்கள் விரும்பிய பாடல்கள் அனைத்தும்'; - - @override - String get playlist => 'பாடல் பட்டியல்'; - - @override - String get create_a_playlist => 'பாடல் பட்டியலை உருவாக்குக'; - - @override - String get update_playlist => 'பாடல் பட்டியலைப் புதுப்பிக்க'; - - @override - String get create => 'உருவாக்கு'; - - @override - String get cancel => 'ரத்து செய்'; - - @override - String get update => 'புதுப்பி'; - - @override - String get playlist_name => 'பாடல் பட்டியல் பெயர்'; - - @override - String get name_of_playlist => 'பாடல் பட்டியலின் பெயர்'; - - @override - String get description => 'விளக்கம்'; - - @override - String get public => 'பொது'; - - @override - String get collaborative => 'கூட்டு'; - - @override - String get search_local_tracks => 'உள்ளூர் பாடல்களைத் தேடுக...'; - - @override - String get play => 'இயக்கு'; - - @override - String get delete => 'அழி'; - - @override - String get none => 'எதுவுமில்லை'; - - @override - String get sort_a_z => 'A-Z வரிசைப்படுத்து'; - - @override - String get sort_z_a => 'Z-A வரிசைப்படுத்து'; - - @override - String get sort_artist => 'கலைஞர் மூலம் வரிசைப்படுத்து'; - - @override - String get sort_album => 'ஆல்பம் மூலம் வரிசைப்படுத்து'; - - @override - String get sort_duration => 'கால அளவு மூலம் வரிசைப்படுத்து'; - - @override - String get sort_tracks => 'பாடல்களை வரிசைப்படுத்து'; - - @override - String currently_downloading(Object tracks_length) { - return 'தற்போது பதிவிறக்குகிறது ($tracks_length)'; - } - - @override - String get cancel_all => 'அனைத்தையும் ரத்து செய்'; - - @override - String get filter_artist => 'கலைஞர்களை வடிகட்டுக...'; - - @override - String followers(Object followers) { - return '$followers பின்தொடர்பவர்கள்'; - } - - @override - String get add_artist_to_blacklist => 'கலைஞரை தடைப்பட்டியலில் சேர்க்க'; - - @override - String get top_tracks => 'சிறந்த பாடல்கள்'; - - @override - String get fans_also_like => 'ரசிகர்கள் விரும்புவது'; - - @override - String get loading => 'ஏற்றுகிறது...'; - - @override - String get artist => 'கலைஞர்'; - - @override - String get blacklisted => 'தடைப்பட்டியலில் உள்ளது'; - - @override - String get following => 'பின்தொடர்கிறது'; - - @override - String get follow => 'பின்தொடர்'; - - @override - String get artist_url_copied => - 'கலைஞர் URL கிளிப்போர்டுக்கு நகலெடுக்கப்பட்டது'; - - @override - String added_to_queue(Object tracks) { - return '$tracks பாடல்கள் வரிசையில் சேர்க்கப்பட்டன'; - } - - @override - String get filter_albums => 'ஆல்பங்களை வடிகட்டுக...'; - - @override - String get synced => 'ஒத்திசைக்கப்பட்டது'; - - @override - String get plain => 'சாதாரண'; - - @override - String get shuffle => 'கலக்கு'; - - @override - String get search_tracks => 'பாடல்களைத் தேடுக...'; - - @override - String get released => 'வெளியிடப்பட்டது'; - - @override - String error(Object error) { - return 'பிழை $error'; - } - - @override - String get title => 'தலைப்பு'; - - @override - String get time => 'நேரம்'; - - @override - String get more_actions => 'மேலும் செயல்கள்'; - - @override - String download_count(Object count) { - return 'பதிவிறக்கு ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return '($count) பாடல் பட்டியலில் சேர்'; - } - - @override - String add_count_to_queue(Object count) { - return '($count) வரிசையில் சேர்'; - } - - @override - String play_count_next(Object count) { - return '($count) அடுத்து இயக்கு'; - } - - @override - String get album => 'ஆல்பம்'; - - @override - String copied_to_clipboard(Object data) { - return '$data கிளிப்போர்டுக்கு நகலெடுக்கப்பட்டது'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track பின்வரும் பாடல் பட்டியல்களில் சேர்'; - } - - @override - String get add => 'சேர்'; - - @override - String added_track_to_queue(Object track) { - return '$track வரிசையில் சேர்க்கப்பட்டது'; - } - - @override - String get add_to_queue => 'வரிசையில் சேர்'; - - @override - String track_will_play_next(Object track) { - return '$track அடுத்து இயக்கப்படும்'; - } - - @override - String get play_next => 'அடுத்து இயக்கு'; - - @override - String removed_track_from_queue(Object track) { - return '$track வரிசையிலிருந்து நீக்கப்பட்டது'; - } - - @override - String get remove_from_queue => 'வரிசையிலிருந்து நீக்கு'; - - @override - String get remove_from_favorites => 'பிடித்தவையிலிருந்து நீக்கு'; - - @override - String get save_as_favorite => 'பிடித்தவையாக சேமி'; - - @override - String get add_to_playlist => 'பாடல் பட்டியலில் சேர்'; - - @override - String get remove_from_playlist => 'பாடல் பட்டியலிலிருந்து நீக்கு'; - - @override - String get add_to_blacklist => 'தடைப்பட்டியலில் சேர்'; - - @override - String get remove_from_blacklist => 'தடைப்பட்டியலிலிருந்து நீக்கு'; - - @override - String get share => 'பகிர்'; - - @override - String get mini_player => 'சிறிய இயக்கி'; - - @override - String get slide_to_seek => 'முன்னோக்கி அல்லது பின்னோக்கி செல்ல சறுக்கவும்'; - - @override - String get shuffle_playlist => 'பாடல் பட்டியலை கலக்கு'; - - @override - String get unshuffle_playlist => 'பாடல் பட்டியலை கலக்காதே'; - - @override - String get previous_track => 'முந்தைய பாடல்'; - - @override - String get next_track => 'அடுத்த பாடல்'; - - @override - String get pause_playback => 'இயக்கத்தை நிறுத்து'; - - @override - String get resume_playback => 'இயக்கத்தை தொடர்'; - - @override - String get loop_track => 'பாடலை சுழற்று'; - - @override - String get no_loop => 'சுழற்சி இல்லை'; - - @override - String get repeat_playlist => 'பாடல் பட்டியலை மீண்டும் இயக்கு'; - - @override - String get queue => 'வரிசை'; - - @override - String get alternative_track_sources => 'மாற்று பாடல் மூலங்கள்'; - - @override - String get download_track => 'பாடலைப் பதிவிறக்கு'; - - @override - String tracks_in_queue(Object tracks) { - return 'வரிசையில் $tracks பாடல்கள்'; - } - - @override - String get clear_all => 'அனைத்தையும் அழி'; - - @override - String get show_hide_ui_on_hover => 'மேலே வரும்போது UI ஐக் காட்டு/மறை'; - - @override - String get always_on_top => 'எப்போதும் மேலே'; - - @override - String get exit_mini_player => 'சிறிய இயக்கியிலிருந்து வெளியேறு'; - - @override - String get download_location => 'பதிவிறக்க இடம்'; - - @override - String get local_library => 'உள்ளூர் நூலகம்'; - - @override - String get add_library_location => 'நூலகத்தில் சேர்'; - - @override - String get remove_library_location => 'நூலகத்திலிருந்து நீக்கு'; - - @override - String get account => 'கணக்கு'; - - @override - String get logout => 'வெளியேறு'; - - @override - String get logout_of_this_account => 'இந்த கணக்கிலிருந்து வெளியேறு'; - - @override - String get language_region => 'மொழி & பிராந்தியம்'; - - @override - String get language => 'மொழி'; - - @override - String get system_default => 'கணினி இயல்புநிலை'; - - @override - String get market_place_region => 'சந்தை பிராந்தியம்'; - - @override - String get recommendation_country => 'பரிந்துரை நாடு'; - - @override - String get appearance => 'தோற்றம்'; - - @override - String get layout_mode => 'அமைப்பு முறை'; - - @override - String get override_layout_settings => 'தளவமைப்பு அமைப்புகளை மாற்றியமை'; - - @override - String get adaptive => 'தகவமைப்பு'; - - @override - String get compact => 'சுருக்கமான'; - - @override - String get extended => 'விரிவான'; - - @override - String get theme => 'தீம்'; - - @override - String get dark => 'இருள்'; - - @override - String get light => 'வெளிர்'; - - @override - String get system => 'கணினி வழி'; - - @override - String get accent_color => 'அழுத்த நிறம்'; - - @override - String get sync_album_color => 'ஆல்பம் நிறத்தை ஒத்திசை'; - - @override - String get sync_album_color_description => - 'ஆல்பம் படத்தின் முக்கிய நிறத்தை அழுத்த நிறமாகப் பயன்படுத்துகிறது'; - - @override - String get playback => 'பின்னணி'; - - @override - String get audio_quality => 'ஒலி தரம்'; - - @override - String get high => 'உயர்'; - - @override - String get low => 'குறைந்த'; - - @override - String get pre_download_play => 'முன்பதிவிறக்கம் மற்றும் இயக்கம்'; - - @override - String get pre_download_play_description => - 'ஒலியை ஸ்ட்ரீம் செய்வதற்குப் பதிலாக, பைட்டுகளைப் பதிவிறக்கி இயக்கவும் (அதிக பேண்ட்விட்த் பயனர்களுக்கு பரிந்துரைக்கப்படுகிறது)'; - - @override - String get skip_non_music => 'இசையல்லாத பகுதிகளைத் தவிர் (SponsorBlock)'; - - @override - String get blacklist_description => - 'தடைசெய்யப்பட்ட பாடல்கள் மற்றும் கலைஞர்கள்'; - - @override - String get wait_for_download_to_finish => - 'தற்போதைய பதிவிறக்கம் முடியும் வரை காத்திருக்கவும்'; - - @override - String get desktop => 'கணினி'; - - @override - String get close_behavior => 'மூடும் நடத்தை'; - - @override - String get close => 'மூடு'; - - @override - String get minimize_to_tray => 'ட்ரேயை குறைக்கவும்'; - - @override - String get show_tray_icon => 'ட்ரே ஐகானைக் காட்டு'; - - @override - String get about => 'பற்றி'; - - @override - String get u_love_spotube => - 'நீங்கள் Spotube ஐ நேசிக்கிறீர்கள் என்பது எங்களுக்குத் தெரியும்'; - - @override - String get check_for_updates => 'புதுப்பிப்புகளைச் சரிபார்'; - - @override - String get about_spotube => 'Spotube பற்றி'; - - @override - String get blacklist => 'தடைப்பட்டியல்'; - - @override - String get please_sponsor => 'தயவுசெய்து ஆதரவு/நன்கொடை அளியுங்கள்'; - - @override - String get spotube_description => - 'Spotube, ஒரு லேசான, பல தளங்களில் இயங்கும், அனைவருக்கும் இலவசமான spotify கிளையன்ட்'; - - @override - String get version => 'பதிப்பு'; - - @override - String get build_number => 'கட்டமைப்பு எண்'; - - @override - String get founder => 'நிறுவனர்'; - - @override - String get repository => 'களஞ்சியம்'; - - @override - String get bug_issues => 'பிழை_சிக்கல்கள்'; - - @override - String get made_with => 'வங்காளதேசத்திலிருந்து🇧🇩 ❤️ உருவாக்கப்பட்டது'; - - @override - String get kingkor_roy_tirtho => 'கிங்கர் ராய் திர்தோ'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year கிங்கர் ராய் திர்தோ'; - } - - @override - String get license => 'உரிமம்'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'கவலைப்பட வேண்டாம், உங்கள் சான்றுகள் எதுவும் சேகரிக்கப்படாது அல்லது யாருடனும் பகிரப்படாது'; - - @override - String get know_how_to_login => 'இதை எப்படி செய்வது என்று தெரியவில்லையா?'; - - @override - String get follow_step_by_step_guide => - 'படிப்படியான வழிகாட்டியைப் பின்பற்றவும்'; - - @override - String cookie_name_cookie(Object name) { - return '$name நட்புநிரல்'; - } - - @override - String get fill_in_all_fields => 'அனைத்து களங்களையும் நிரப்பவும்'; - - @override - String get submit => 'சமர்ப்பி'; - - @override - String get exit => 'வெளியேறு'; - - @override - String get previous => 'முந்தைய'; - - @override - String get next => 'அடுத்து'; - - @override - String get done => 'முடிந்தது'; - - @override - String get step_1 => 'முதல் படி'; - - @override - String get first_go_to => 'முதலில், செல்லவேண்டியது'; - - @override - String get something_went_wrong => 'ஏதோ தவறு நடந்துவிட்டது'; - - @override - String get piped_instance => 'Piped சேவையகம் நிகழ்வு'; - - @override - String get piped_description => - 'பாடல் பொருத்தத்திற்குப் பயன்படுத்த வேண்டிய Piped சேவையகம் நிகழ்வு'; - - @override - String get piped_warning => - 'அவற்றில் சில நன்றாக வேலை செய்யாமல் இருக்கலாம். எனவே உங்கள் சொந்த ஆபத்தில் பயன்படுத்தவும்'; - - @override - String get invidious_instance => 'Invidious சேவையக நிகழ்வு'; - - @override - String get invidious_description => - 'பாடல் பொருத்தத்திற்குப் பயன்படுத்த வேண்டிய Invidious சேவையக நிகழ்வு'; - - @override - String get invidious_warning => - 'அவற்றில் சில நன்றாக வேலை செய்யாமல் இருக்கலாம். எனவே உங்கள் சொந்த ஆபத்தில் பயன்படுத்தவும்'; - - @override - String get generate => 'உருவாக்கு'; - - @override - String track_exists(Object track) { - return 'பாடல் $track ஏற்கனவே உள்ளது'; - } - - @override - String get replace_downloaded_tracks => - 'பதிவிறக்கம் செய்யப்பட்ட அனைத்து பாடல்களையும் மாற்றவும்'; - - @override - String get skip_download_tracks => - 'பதிவிறக்கம் செய்யப்பட்ட அனைத்து பாடல்களையும் தவிர்க்கவும்'; - - @override - String get do_you_want_to_replace => - 'ஏற்கனவே உள்ள பாடலை மாற்ற விரும்புகிறீர்களா?'; - - @override - String get replace => 'மாற்று'; - - @override - String get skip => 'தவிர்'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '$count $type வரை தேர்ந்தெடுக்கவும்'; - } - - @override - String get select_genres => 'வகைகளைத் தேர்ந்தெடுக்கவும்'; - - @override - String get add_genres => 'வகைகளைச் சேர்க்கவும்'; - - @override - String get country => 'நாடு'; - - @override - String get number_of_tracks_generate => - 'உருவாக்க வேண்டிய பாடல்களின் எண்ணிக்கை'; - - @override - String get acousticness => 'அகவுஸ்டிக்னெஸ்'; - - @override - String get danceability => 'நடனத்தன்மை'; - - @override - String get energy => 'ஆற்றல்'; - - @override - String get instrumentalness => 'கருவித்தன்மை'; - - @override - String get liveness => 'உயிர்ப்புத்தன்மை'; - - @override - String get loudness => 'ஒலி அளவு'; - - @override - String get speechiness => 'பேச்சுத்தன்மை'; - - @override - String get valence => 'உணர்வு'; - - @override - String get popularity => 'பிரபலம்'; - - @override - String get key => 'இசை குறிப்பு'; - - @override - String get duration => 'கால அளவு (வினாடிகள்)'; - - @override - String get tempo => 'வேகம் (BPM)'; - - @override - String get mode => 'முறை'; - - @override - String get time_signature => 'நேர கையொப்பம்'; - - @override - String get short => 'குறுகிய'; - - @override - String get medium => 'நடுத்தர'; - - @override - String get long => 'நீண்ட'; - - @override - String get min => 'குறைந்தபட்சம்'; - - @override - String get max => 'அதிகபட்சம்'; - - @override - String get target => 'இலக்கு'; - - @override - String get moderate => 'மிதமான'; - - @override - String get deselect_all => 'அனைத்தையும் தேர்வுநீக்கு'; - - @override - String get select_all => 'அனைத்தையும் தேர்ந்தெடு'; - - @override - String get are_you_sure => 'உறுதியாக இருக்கிறீர்களா?'; - - @override - String get generating_playlist => - 'உங்கள் தனிப்பயன்பாட்டிற்கான பாடல் பட்டியலை உருவாக்குகிறது...'; - - @override - String selected_count_tracks(Object count) { - return '$count பாடல்கள் தேர்ந்தெடுக்கப்பட்டன'; - } - - @override - String get download_warning => - 'நீங்கள் அனைத்து பாடல்களையும் மொத்தமாக பதிவிறக்கினால், நீங்கள் தெளிவாக இசையைத் திருடுகிறீர்கள் மற்றும் இசையின் படைப்பாற்றல் சமூகத்திற்கு சேதம் விளைவிக்கிறீர்கள். நீங்கள் இதை அறிந்திருக்கிறீர்கள் என்று நம்புகிறேன். எப்போதும், கலைஞரின் கடின உழைப்பை மதித்து ஆதரிக்க முயற்சி செய்யுங்கள்'; - - @override - String get download_ip_ban_warning => - 'மேலும், அதிகப்படியான பதிவிறக்க கோரிக்கைகள் காரணமாக உங்கள் IP YouTube இல் தடைசெய்யப்படலாம். IP தடை என்பது குறைந்தது 2-3 மாதங்களுக்கு அந்த IP சாதனத்திலிருந்து YouTube ஐப் பயன்படுத்த முடியாது (நீங்கள் உள்நுழைந்திருந்தாலும் கூட). இது ஒருபோதும் நடந்தால் Spotube பொறுப்பேற்காது'; - - @override - String get by_clicking_accept_terms => - '\'ஏற்றுக்கொள்\' என்பதைக் கிளிக் செய்வதன் மூலம் பின்வரும் விதிமுறைகளுக்கு நீங்கள் ஒப்புக்கொள்கிறீர்கள்:'; - - @override - String get download_agreement_1 => - 'நான் இசையைத் திருடுகிறேன் என்பது எனக்குத் தெரியும். நான் கெட்டவன்'; - - @override - String get download_agreement_2 => - 'நான் கலைஞரை முடிந்தவரை ஆதரிப்பேன், அவர்களின் கலைக்கு பணம் செலுத்த எனக்கு பணம் இல்லாததால் மட்டுமே இதைச் செய்கிறேன்'; - - @override - String get download_agreement_3 => - 'என் IP YouTube இல் தடைசெய்யப்படலாம் என்பதை நான் முழுமையாக அறிவேன், மேலும் என் தற்போதைய செயலால் ஏற்படும் எந்த விபத்துகளுக்கும் Spotube அல்லது அதன் உரிமையாளர்கள்/பங்களிப்பாளர்களை பொறுப்பாக்க மாட்டேன்'; - - @override - String get decline => 'மறு'; - - @override - String get accept => 'ஏற்றுக்கொள்'; - - @override - String get details => 'விவரங்கள்'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'சேனல்'; - - @override - String get likes => 'விருப்பங்கள்'; - - @override - String get dislikes => 'விருப்பமில்லாதவை'; - - @override - String get views => 'பார்வைகள்'; - - @override - String get streamUrl => 'ஸ்ட்ரீம் URL'; - - @override - String get stop => 'நிறுத்து'; - - @override - String get sort_newest => 'புதிதாக சேர்க்கப்பட்டவற்றை வரிசைப்படுத்து'; - - @override - String get sort_oldest => 'பழமையானவற்றை வரிசைப்படுத்து'; - - @override - String get sleep_timer => 'உறக்க நேரம்'; - - @override - String mins(Object minutes) { - return '$minutes நிமிடங்கள்'; - } - - @override - String hours(Object hours) { - return '$hours மணிநேரங்கள்'; - } - - @override - String hour(Object hours) { - return '$hours மணிநேரம்'; - } - - @override - String get custom_hours => 'தனிப்பயன் மணிநேரங்கள்'; - - @override - String get logs => 'பதிவுகள்'; - - @override - String get developers => 'உருவாக்குநர்கள்'; - - @override - String get not_logged_in => 'நீங்கள் உள்நுழையவில்லை'; - - @override - String get search_mode => 'தேடல் முறை'; - - @override - String get audio_source => 'ஒலி மூலம்'; - - @override - String get ok => 'சரி'; - - @override - String get failed_to_encrypt => 'குறியாக்கம் தோல்வியடைந்தது'; - - @override - String get encryption_failed_warning => - 'Spotube உங்கள் தரவை பாதுகாப்பாக சேமிக்க குறியாக்கத்தைப் பயன்படுத்துகிறது. ஆனால் அவ்வாறு செய்ய முடியவில்லை. எனவே இது பாதுகாப்பற்ற சேமிப்பகத்திற்கு மாறும்\nநீங்கள் லினக்ஸ் பயன்படுத்துகிறீர்கள் என்றால், எந்த ரகசிய சேவையும் (gnome-keyring, kde-wallet, keepassxc போன்றவை) நிறுவப்பட்டுள்ளதா என்பதை உறுதிப்படுத்தவும்'; - - @override - String get querying_info => 'தகவலைக் கேட்கிறது...'; - - @override - String get piped_api_down => 'Piped API செயலிழந்துள்ளது'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Piped நிகழ்வு $pipedInstance தற்போது செயலிழந்துள்ளது\n\nநிகழ்வை மாற்றவும் அல்லது \'API வகை\'யை அதிகாரப்பூர்வ YouTube API க்கு மாற்றவும்\n\nமாற்றத்திற்குப் பிறகு பயன்பாட்டை மறுதொடக்கம் செய்வதை உறுதிப்படுத்தவும்'; - } - - @override - String get you_are_offline => 'நீங்கள் தற்போது ஆஃப்லைனில் உள்ளீர்கள்'; - - @override - String get connection_restored => 'உங்கள் இணைய இணைப்பு மீட்டெடுக்கப்பட்டது'; - - @override - String get use_system_title_bar => 'கணினி தலைப்புப் பட்டியைப் பயன்படுத்தவும்'; - - @override - String get crunching_results => 'முடிவுகளை செயலாக்குகிறது...'; - - @override - String get search_to_get_results => 'முடிவுகளைப் பெற தேடவும்'; - - @override - String get use_amoled_mode => 'கருமை நிற இருண்ட தீம்'; - - @override - String get pitch_dark_theme => 'AMOLED முறை'; - - @override - String get normalize_audio => 'ஒலியை சீரமை'; - - @override - String get change_cover => 'அட்டையை மாற்று'; - - @override - String get add_cover => 'அட்டையைச் சேர்'; - - @override - String get restore_defaults => 'இயல்புநிலைகளை மீட்டமை'; - - @override - String get download_music_format => 'இசை பதிவிறக்க வடிவம்'; - - @override - String get streaming_music_format => 'இசை ஸ்ட்ரீமிங் வடிவம்'; - - @override - String get download_music_quality => 'பதிவிறக்க தரம்'; - - @override - String get streaming_music_quality => 'ஸ்ட்ரீமிங் தரம்'; - - @override - String get login_with_lastfm => 'Last.fm உடன் உள்நுழைக'; - - @override - String get connect => 'இணை'; - - @override - String get disconnect_lastfm => 'Last.fm இலிருந்து துண்டி'; - - @override - String get disconnect => 'துண்டி'; - - @override - String get username => 'பயனர்பெயர்'; - - @override - String get password => 'கடவுச்சொல்'; - - @override - String get login => 'உள்நுழைக'; - - @override - String get login_with_your_lastfm => 'உங்கள் Last.fm கணக்குடன் உள்நுழைக'; - - @override - String get scrobble_to_lastfm => 'Last.fm க்கு ஸ்க்ரோபிள் செய்'; - - @override - String get go_to_album => 'ஆல்பத்திற்குச் செல்'; - - @override - String get discord_rich_presence => 'Discord செழுமையான தோற்றம்'; - - @override - String get browse_all => 'அனைத்தையும் உலாவு'; - - @override - String get genres => 'வகைகள்'; - - @override - String get explore_genres => 'வகைகளை ஆராயுங்கள்'; - - @override - String get friends => 'நண்பர்கள்'; - - @override - String get no_lyrics_available => - 'மன்னிக்கவும், இந்தப் பாடலுக்கான பாடல் வரிகளைக் கண்டுபிடிக்க முடியவில்லை'; - - @override - String get start_a_radio => 'வானொலியைத் தொடங்கு'; - - @override - String get how_to_start_radio => 'வானொலியை எவ்வாறு தொடங்க விரும்புகிறீர்கள்?'; - - @override - String get replace_queue_question => - 'தற்போதைய வரிசையை மாற்ற விரும்புகிறீர்களா அல்லது அதனுடன் சேர்க்க விரும்புகிறீர்களா?'; - - @override - String get endless_playback => 'முடிவற்ற இயக்கம்'; - - @override - String get delete_playlist => 'பாடல் பட்டியலை நீக்கு'; - - @override - String get delete_playlist_confirmation => - 'இந்த பாடல் பட்டியலை நீக்க விரும்புகிறீர்களா?'; - - @override - String get local_tracks => 'உள்ளூர் பாடல்கள்'; - - @override - String get local_tab => 'உள்ளூர்'; - - @override - String get song_link => 'பாடல் இணைப்பு'; - - @override - String get skip_this_nonsense => 'இந்த அர்த்தமற்றதைத் தவிர்'; - - @override - String get freedom_of_music => '\"இசையின் சுதந்திரம்\"'; - - @override - String get freedom_of_music_palm => '\"உங்கள் கைகளில் இசையின் சுதந்திரம்\"'; - - @override - String get get_started => 'தொடங்குவோம்'; - - @override - String get youtube_source_description => - 'பரிந்துரைக்கப்படுகிறது மற்றும் சிறப்பாக செயல்படுகிறது.'; - - @override - String get piped_source_description => - 'சுதந்திரமாக உணர்கிறீர்களா? YouTube போலவே ஆனால் மிகவும் சுதந்திரமானது.'; - - @override - String get jiosaavn_source_description => - 'தெற்காசியப் பிராந்தியத்திற்கு சிறந்தது.'; - - @override - String get invidious_source_description => - 'Piped ஐப் போன்றது ஆனால் அதிக கிடைக்கும் தன்மையுடன்.'; - - @override - String highest_quality(Object quality) { - return 'உயர்ந்த தரம்: $quality'; - } - - @override - String get select_audio_source => 'ஒலி மூலத்தைத் தேர்ந்தெடுக்கவும்'; - - @override - String get endless_playback_description => - 'வரிசையின் இறுதியில் புதிய பாடல்களை\nதானாகவே சேர்க்கவும்'; - - @override - String get choose_your_region => 'உங்கள் பிராந்தியத்தைத் தேர்ந்தெடுக்கவும்'; - - @override - String get choose_your_region_description => - 'இது உங்கள் இருப்பிடத்திற்கான சரியான உள்ளடக்கத்தை\nSpotube காட்ட உதவும்.'; - - @override - String get choose_your_language => 'உங்கள் மொழியைத் தேர்ந்தெடுக்கவும்'; - - @override - String get help_project_grow => 'இந்த திட்டம் வளர உதவுங்கள்'; - - @override - String get help_project_grow_description => - 'Spotube ஒரு திறந்த மூல திட்டம். திட்டத்திற்கு பங்களிப்பு செய்வதன் மூலம், பிழைகளைப் புகாரளிப்பதன் மூலம் அல்லது புதிய அம்சங்களைப் பரிந்துரைப்பதன் மூலம் இந்தத் திட்டம் வளர உதவலாம்.'; - - @override - String get contribute_on_github => 'GitHub இல் பங்களியுங்கள்'; - - @override - String get donate_on_open_collective => - 'Open Collective இல் நன்கொடை அளியுங்கள்'; - - @override - String get browse_anonymously => 'அநாமதேயமாக உலாவுக'; - - @override - String get enable_connect => 'இணைப்பை இயக்கு'; - - @override - String get enable_connect_description => - 'மற்ற சாதனங்களிலிருந்து Spotube ஐக் கட்டுப்படுத்தவும்'; - - @override - String get devices => 'சாதனங்கள்'; - - @override - String get select => 'தேர்ந்தெடு'; - - @override - String connect_client_alert(Object client) { - return 'நீங்கள் $client ஆல் கட்டுப்படுத்தப்படுகிறீர்கள்'; - } - - @override - String get this_device => 'இந்த சாதனம்'; - - @override - String get remote => 'தொலைநிலை'; - - @override - String get stats => 'புள்ளிவிவரங்கள்'; - - @override - String and_n_more(Object count) { - return 'மற்றும் $count கூடுதலாக'; - } - - @override - String get recently_played => 'சமீபத்தில் இயக்கியவை'; - - @override - String get browse_more => 'மேலும் உலாவு'; - - @override - String get no_title => 'தலைப்பு இல்லை'; - - @override - String get not_playing => 'இயக்கப்படவில்லை'; - - @override - String get epic_failure => 'மோசமான தோல்வி!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length பாடல்கள் வரிசையில் சேர்க்கப்பட்டன'; - } - - @override - String get spotube_has_an_update => 'Spotube க்கு ஒரு புதுப்பிப்பு உள்ளது'; - - @override - String get download_now => 'இப்போது பதிவிறக்கு'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum வெளியிடப்பட்டுள்ளது'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version வெளியிடப்பட்டுள்ளது'; - } - - @override - String get read_the_latest => 'சமீபத்திய '; - - @override - String get release_notes => 'வெளியீட்டு குறிப்புகளைப் படிக்கவும்'; - - @override - String get pick_color_scheme => 'வண்ணத் திட்டத்தைத் தேர்ந்தெடுக்கவும்'; - - @override - String get save => 'சேமி'; - - @override - String get choose_the_device => 'சாதனத்தைத் தேர்ந்தெடுக்கவும்:'; - - @override - String get multiple_device_connected => - 'பல சாதனங்கள் இணைக்கப்பட்டுள்ளன.\nஇந்த செயல் நடைபெற வேண்டிய சாதனத்தைத் தேர்ந்தெடுக்கவும்'; - - @override - String get nothing_found => 'எதுவும் கிடைக்கவில்லை'; - - @override - String get the_box_is_empty => 'பெட்டி காலியாக உள்ளது'; - - @override - String get top_artists => 'சிறந்த கலைஞர்கள்'; - - @override - String get top_albums => 'சிறந்த ஆல்பங்கள்'; - - @override - String get this_week => 'இந்த வாரம்'; - - @override - String get this_month => 'இந்த மாதம்'; - - @override - String get last_6_months => 'கடந்த 6 மாதங்கள்'; - - @override - String get this_year => 'இந்த ஆண்டு'; - - @override - String get last_2_years => 'கடந்த 2 ஆண்டுகள்'; - - @override - String get all_time => 'எல்லா நேரமும்'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName ஆல் இயக்கப்படுகிறது'; - } - - @override - String get email => 'மின்னஞ்சல்'; - - @override - String get profile_followers => 'பின்தொடர்பவர்கள்'; - - @override - String get birthday => 'பிறந்த நாள்'; - - @override - String get subscription => 'சந்தா'; - - @override - String get not_born => 'பிறக்கவில்லை'; - - @override - String get hacker => 'ஹேக்கர்'; - - @override - String get profile => 'சுயவிவரம்'; - - @override - String get no_name => 'பெயர் இல்லை'; - - @override - String get edit => 'திருத்து'; - - @override - String get user_profile => 'பயனர் சுயவிவரம்'; - - @override - String count_plays(Object count) { - return '$count முறை இசைக்கப்பட்டது'; - } - - @override - String get streaming_fees_hypothetical => 'ஸ்ட்ரீமிங் கட்டணங்கள் (கற்பனை)'; - - @override - String get minutes_listened => 'காலம் கேட்டது'; - - @override - String get streamed_songs => 'ஸ்ட்ரீமிங் செய்யப்பட்ட பாடல்கள்'; - - @override - String count_streams(Object count) { - return '$count ஸ்ட்ரீம்கள்'; - } - - @override - String get owned_by_you => 'உங்களால் கொண்டது'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'நகலெடுக்கப்பட்டது $shareUrl கிளிப்போர்டுக்காக'; - } - - @override - String get hipotetical_calculation => - '*இது சராசரி ஆன்லைன் இசை ஸ்ட்ரீமிங் தளத்தின் ஒரு ஸ்ட்ரீமிற்கான \$0.003 முதல் \$0.005 வரையிலான கட்டணத்தின் அடிப்படையில் கணக்கிடப்படுகிறது. இது ஒரு கற்பனையான கணக்கீடு ஆகும், இது பயனர்கள் வெவ்வேறு இசை ஸ்ட்ரீமிங் தளங்களில் தங்கள் பாடல்களைக் கேட்டால் கலைஞர்களுக்கு எவ்வளவு பணம் செலுத்தியிருப்பார்கள் என்பது குறித்த நுண்ணறிவை வழங்குகிறது.'; - - @override - String count_mins(Object minutes) { - return '$minutes நிமிடங்கள்'; - } - - @override - String get summary_minutes => 'நிமிடங்கள்'; - - @override - String get summary_listened_to_music => 'இசை கேட்டது'; - - @override - String get summary_songs => 'பாடல்கள்'; - - @override - String get summary_streamed_overall => 'மொத்தமாக ஸ்ட்ரீமிங்'; - - @override - String get summary_owed_to_artists => 'கலைஞர்களுக்கு\nஇந்த மாதம் சொந்தமானது'; - - @override - String get summary_artists => 'கலைஞர்கள்'; - - @override - String get summary_music_reached_you => 'இசை உங்களுக்கு வந்தது'; - - @override - String get summary_full_albums => 'முழு ஆல்பங்கள்'; - - @override - String get summary_got_your_love => 'உங்கள் அன்பை பெற்றுக்கொண்டேன்'; - - @override - String get summary_playlists => 'பாடல் பட்டியல்கள்'; - - @override - String get summary_were_on_repeat => 'மீண்டும் மீண்டும் இருந்தன'; - - @override - String total_money(Object money) { - return 'மொத்தம் $money'; - } - - @override - String get webview_not_found => 'வெப்வியூ கிடைக்கவில்லை'; - - @override - String get webview_not_found_description => - 'உங்கள் சாதனத்தில் எந்தவொரு வெப்வியூ இயக்கத்தை நிறுவவில்லை.\nஇது நிறுவப்பட்டிருந்தால், சுற்றுச்சூழல் பாதையில் PATH உள்ளது என்பதை உறுதிபடுத்தவும்\n\nநிறுவித்த பிறகு, செயலியை மறுதொடக்கம் செய்யவும்'; - - @override - String get unsupported_platform => 'அதிர்ஷ்டகாத உருப்படியை ஆதரிக்கவில்லை'; - - @override - String get cache_music => 'இசையை கேஷ் செய்'; - - @override - String get open => 'திறக்கவும்'; - - @override - String get cache_folder => 'கேஷ் அடைவு'; - - @override - String get export => 'ஏற்றுமதி'; - - @override - String get clear_cache => 'கேஷ் அழிக்கவும்'; - - @override - String get clear_cache_confirmation => 'கேஷைப் அழிக்க விரும்புகிறீர்களா?'; - - @override - String get export_cache_files => 'கேஷில் உள்ள கோப்புகளை ஏற்றுமதி செய்யவும்'; - - @override - String found_n_files(Object count) { - return '$count கோப்புகள் கிடைத்தன'; - } - - @override - String get export_cache_confirmation => - 'இந்த கோப்புகளை ஏற்றுமதி செய்ய விரும்புகிறீர்களா?'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported கோப்புகள் ஏற்றுமதி செய்யப்பட்டன, $files கோப்புகளில்'; - } - - @override - String get undo => 'செயல்தவிர்'; - - @override - String get download_all => 'அனைத்தையும் பதிவிறக்குக'; - - @override - String get add_all_to_playlist => 'அனைத்தையும் பாடல் பட்டியலில் சேர்க்கவும்'; - - @override - String get add_all_to_queue => 'அனைத்தையும் வரிசைப்படுத்து'; - - @override - String get play_all_next => 'அடுத்த உள்ள அனைத்தையும் இயக்கு'; - - @override - String get pause => 'நிறுத்து'; - - @override - String get view_all => 'அனைத்தையும் காண்க'; - - @override - String get no_tracks_added_yet => - 'உங்கள் பாடல்களை இன்னும் சேர்க்கவில்லை என்றால் தெரியாதே'; - - @override - String get no_tracks => 'இங்கு பாடல்கள் எதுவும் இல்லை'; - - @override - String get no_tracks_listened_yet => 'இன்னும் எதையும் கேள்வியில்லை'; - - @override - String get not_following_artists => 'நீங்கள் எந்த கலைஞரையும் பின்தொடரவில்லை'; - - @override - String get no_favorite_albums_yet => - 'நீங்கள் இன்னும் எந்த ஆல்பங்களையும் பிடித்தவையாகச் சேர்க்கவில்லை'; - - @override - String get no_logs_found => 'பதிவுகள் எதுவும் கிடைக்கவில்லை'; - - @override - String get youtube_engine => 'YouTube இயந்திரம்'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine நிறுவியதில்லை'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine உங்கள் கணினியில் நிறுவியதில்லை.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'PATH மாறியில் கிடைக்கிறதா என்பதை உறுதிப்படுத்தவும் அல்லது\n$engine செயல் செய்யக்கூடிய முறையை கீழே அமைக்கவும்'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/unix போல் OS இல், .zshrc/.bashrc/.bash_profile போன்றவை அமைப்பில் பாதையை PATH அமைப்பது இயலாது.\nநீங்கள்.shell configuration file இல் பாதையை அமைக்க வேண்டும்'; - - @override - String get download => 'பதிவிறக்கு'; - - @override - String get file_not_found => 'கோப்பு கிடைக்கவில்லை'; - - @override - String get custom => 'தனிப்பயன்'; - - @override - String get add_custom_url => 'தனிப்பயன் URL ஐச் சேர்க்கவும்'; - - @override - String get edit_port => 'போர்டு திருத்தவும்'; - - @override - String get port_helper_msg => - 'இயல்புநிலை -1 ஆகும், இது சீரற்ற எண்ணை குறிக்கிறது. நீங்கள் தீயணைப்பு அமைக்கப்பட்டிருந்தால், இதை அமைப்பது பரிந்துரைக்கப்படுகிறது.'; - - @override - String connect_request(Object client) { - return '$client க்கு இணைக்க அனுமதிக்கவா?'; - } - - @override - String get connection_request_denied => - 'இணைப்பு மறுக்கப்பட்டது. பயனர் அணுகலை மறுத்தார்.'; - - @override - String get an_error_occurred => 'ஒரு பிழை ஏற்பட்டது'; - - @override - String get copy_to_clipboard => 'கிளிப்போர்டுக்கு நகலெடுக்கவும்'; - - @override - String get view_logs => 'பதிவுகளைப் பார்க்கவும்'; - - @override - String get retry => 'மீண்டும் முயற்சிக்கவும்'; - - @override - String get no_default_metadata_provider_selected => - 'நீங்கள் எந்த இயல்புநிலை மெட்டாடேட்டா வழங்குநரையும் அமைக்கவில்லை'; - - @override - String get manage_metadata_providers => - 'மெட்டாடேட்டா வழங்குநர்களை நிர்வகிக்கவும்'; - - @override - String get open_link_in_browser => 'இணைப்பை உலாவியில் திறக்கவா?'; - - @override - String get do_you_want_to_open_the_following_link => - 'பின்வரும் இணைப்பை நீங்கள் திறக்க விரும்புகிறீர்களா'; - - @override - String get unsafe_url_warning => - 'நம்பத்தகாத மூலங்களிலிருந்து இணைப்புகளைத் திறப்பது பாதுகாப்பற்றதாக இருக்கலாம். எச்சரிக்கையாக இருங்கள்!\nநீங்கள் இணைப்பை உங்கள் கிளிப்போர்டுக்கு நகலெடுக்கலாம்.'; - - @override - String get copy_link => 'இணைப்பை நகலெடுக்கவும்'; - - @override - String get building_your_timeline => - 'உங்கள் கேட்டலின் அடிப்படையில் உங்கள் காலவரிசையை உருவாக்குகிறது...'; - - @override - String get official => 'அதிகாரபூர்வமானது'; - - @override - String author_name(Object author) { - return 'ஆசிரியர்: $author'; - } - - @override - String get third_party => 'மூன்றாம் தரப்பு'; - - @override - String get plugin_requires_authentication => - 'பிளகின் அங்கீகாரத்தைக் கோருகிறது'; - - @override - String get update_available => 'புதுப்பிப்பு உள்ளது'; - - @override - String get supports_scrobbling => 'ஸ்க்ரோப்ளிங்கை ஆதரிக்கிறது'; - - @override - String get plugin_scrobbling_info => - 'இந்த பிளகின் உங்கள் கேட்பதின் வரலாற்றை உருவாக்க உங்கள் இசையை ஸ்க்ரோப்ள் செய்கிறது.'; - - @override - String get default_metadata_source => 'இயல்புநிலை மெட்டாடேட்டா மூலம்'; - - @override - String get set_default_metadata_source => - 'இயல்புநிலை மெட்டாடேட்டா மூலத்தை அமை'; - - @override - String get default_audio_source => 'இயல்புநிலை ஆடியோ மூலம்'; - - @override - String get set_default_audio_source => 'இயல்புநிலை ஆடியோ மூலத்தை அமை'; - - @override - String get set_default => 'இயல்புநிலையாக அமைக்கவும்'; - - @override - String get support => 'ஆதரவு'; - - @override - String get support_plugin_development => 'பிளகின் வளர்ச்சிக்கு ஆதரவு'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API ஐ அணுக முடியும்'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'இந்த பிளகினை நீங்கள் நிறுவ விரும்புகிறீர்களா?'; - - @override - String get third_party_plugin_warning => - 'இந்த பிளகின் மூன்றாம் தரப்பு களஞ்சியத்திலிருந்து வருகிறது. நிறுவும் முன் மூலத்தை நீங்கள் நம்புகிறீர்கள் என்பதை உறுதிப்படுத்தவும்.'; - - @override - String get author => 'ஆசிரியர்'; - - @override - String get this_plugin_can_do_following => - 'இந்த பிளகின் பின்வருவனவற்றைச் செய்ய முடியும்'; - - @override - String get install => 'நிறுவவும்'; - - @override - String get install_a_metadata_provider => 'மெட்டாடேட்டா வழங்குநரை நிறுவவும்'; - - @override - String get no_tracks_playing => 'தற்போது எந்த பாடலும் இயங்கவில்லை'; - - @override - String get synced_lyrics_not_available => - 'இந்த பாடலுக்கு ஒத்திசைக்கப்பட்ட வரிகள் கிடைக்கவில்லை. தயவுசெய்து'; - - @override - String get plain_lyrics => 'சாதாரண வரிகள்'; - - @override - String get tab_instead => 'தாவலை அதற்கு பதிலாக பயன்படுத்தவும்.'; - - @override - String get disclaimer => 'துறப்பு'; - - @override - String get third_party_plugin_dmca_notice => - 'ஸ்பாட்யூப் குழு எந்த \"மூன்றாம் தரப்பு\" பிளகின்களுக்கும் எந்தப் பொறுப்பையும் (சட்டரீதியான உட்பட) ஏற்காது.\nதயவுசெய்து உங்கள் சொந்த ஆபத்தில் அவற்றைப் பயன்படுத்தவும். ஏதேனும் பிழைகள்/சிக்கல்களுக்கு, பிளகின் களஞ்சியத்தில் அவற்றைப் புகாரளிக்கவும்.\n\nஏதேனும் ஒரு \"மூன்றாம் தரப்பு\" பிளகின் ஒரு சேவை/சட்ட நிறுவனத்தின் ToS/DMCA ஐ மீறினால், தயவுசெய்து \"மூன்றாம் தரப்பு\" பிளகின் ஆசிரியரையோ அல்லது ஹோஸ்டிங் தளத்தையோ, எ.கா. GitHub/Codeberg, நடவடிக்கை எடுக்கக் கோரவும். மேலே பட்டியலிடப்பட்ட (\"மூன்றாம் தரப்பு\" என பெயரிடப்பட்ட) அனைத்து பொதுவான/சமூகத்தால் பராமரிக்கப்படும் பிளகின்கள். நாங்கள் அவற்றை க்யூரேட் செய்யவில்லை, எனவே அவற்றின் மீது எந்த நடவடிக்கையும் எடுக்க முடியாது.\n\n'; - - @override - String get input_does_not_match_format => - 'உள்ளீடு தேவையான வடிவத்துடன் பொருந்தவில்லை'; - - @override - String get plugins => 'செருகுநிரல்கள்'; - - @override - String get paste_plugin_download_url => - 'பதிவிறக்க url அல்லது GitHub/Codeberg repo url அல்லது .smplug கோப்பிற்கான நேரடி இணைப்பை ஒட்டவும்'; - - @override - String get download_and_install_plugin_from_url => - 'url இலிருந்து பிளகினைப் பதிவிறக்கி நிறுவவும்'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'பிளகினைச் சேர்க்கத் தவறிவிட்டது: $error'; - } - - @override - String get upload_plugin_from_file => 'கோப்பிலிருந்து பிளகினைப் பதிவேற்றவும்'; - - @override - String get installed => 'நிறுவப்பட்டது'; - - @override - String get available_plugins => 'கிடைக்கக்கூடிய பிளகின்கள்'; - - @override - String get configure_plugins => - 'உங்கள் சொந்த மெட்டாடேட்டா வழங்குநர் மற்றும் ஆடியோ மூல செருகுநிரல்களை அமைக்கவும்'; - - @override - String get audio_scrobblers => 'ஆடியோ ஸ்க்ரோப்ளர்கள்'; - - @override - String get scrobbling => 'ஸ்க்ரோப்ளிங்'; - - @override - String get source => 'மூலம்: '; - - @override - String get uncompressed => 'அழுத்தப்படாத'; - - @override - String get dab_music_source_description => - 'ஆடியோஃபைல்களுக்காக. உயர்தர/லாஸ்லெஸ் ஆடியோ ஸ்ட்ரீம்களை வழங்குகிறது. ISRC அடிப்படையில் துல்லியமான பாடல் பொருத்தம்.'; -} diff --git a/lib/l10n/generated/app_localizations_th.dart b/lib/l10n/generated/app_localizations_th.dart deleted file mode 100644 index 16584ab8..00000000 --- a/lib/l10n/generated/app_localizations_th.dart +++ /dev/null @@ -1,1561 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Thai (`th`). -class AppLocalizationsTh extends AppLocalizations { - AppLocalizationsTh([String locale = 'th']) : super(locale); - - @override - String get guest => 'ผู้มาเยือน'; - - @override - String get browse => 'เรียกดู'; - - @override - String get search => 'ค้นหา'; - - @override - String get library => 'คลัง'; - - @override - String get lyrics => 'เนื้อเพลง'; - - @override - String get settings => 'ตั้งค่า'; - - @override - String get genre_categories_filter => 'กรองประเภทหรือแนวเพลง...'; - - @override - String get genre => 'ประเภท'; - - @override - String get personalized => 'ปรับแต่ง'; - - @override - String get featured => 'เด่น'; - - @override - String get new_releases => 'เพิ่งปล่อยใหม่'; - - @override - String get songs => 'เพลง'; - - @override - String playing_track(Object track) { - return 'กำลังเล่น $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'การดำเนินการนี้จะล้างคิวปัจจุบัน $track_length แทร็ก จะถูกลบออก\nคุณต้องการดำเนินการต่อหรือไม่?'; - } - - @override - String get load_more => 'โหลดเพิ่มเติม'; - - @override - String get playlists => 'เพลย์ลิสต์'; - - @override - String get artists => 'ศิลปิน'; - - @override - String get albums => 'อัลบั้ม'; - - @override - String get tracks => 'แทร็ก'; - - @override - String get downloads => 'ดาวน์โหลด'; - - @override - String get filter_playlists => 'กรองเพลย์ลิสต์...'; - - @override - String get liked_tracks => 'เพลงที่ชอบ'; - - @override - String get liked_tracks_description => 'เพลงที่คุณชื่นชอบทั้งหมด'; - - @override - String get playlist => 'เพลย์ลิสต์'; - - @override - String get create_a_playlist => 'สร้างเพลย์ลิสต์'; - - @override - String get update_playlist => 'อัพเดทเพลย์ลิสต์'; - - @override - String get create => 'สร้าง'; - - @override - String get cancel => 'ยกเลิก'; - - @override - String get update => 'อัพเดท'; - - @override - String get playlist_name => 'ชื่อเพลย์ลิสต์'; - - @override - String get name_of_playlist => 'ชื่อของเพลย์ลิสต์'; - - @override - String get description => 'คำอธิบาย'; - - @override - String get public => 'สาธารณะ'; - - @override - String get collaborative => 'ร่วมมือกัน'; - - @override - String get search_local_tracks => 'ค้นหาเพลงในเครื่อง...'; - - @override - String get play => 'เล่น'; - - @override - String get delete => 'ลบ'; - - @override - String get none => 'ไม่มี'; - - @override - String get sort_a_z => 'เรียงตาม A-Z'; - - @override - String get sort_z_a => 'เรียงตาม Z-A'; - - @override - String get sort_artist => 'เรียงตามศิลปิน'; - - @override - String get sort_album => 'เรียงตามอัลบั้ม'; - - @override - String get sort_duration => 'เรียงตามความยาว'; - - @override - String get sort_tracks => 'เรียงตามเพลง'; - - @override - String currently_downloading(Object tracks_length) { - return 'กำลังดาวน์โหลด ($tracks_length)'; - } - - @override - String get cancel_all => 'ยกเลิกทั้งหมด'; - - @override - String get filter_artist => 'กรองศิลปิน...'; - - @override - String followers(Object followers) { - return '$followers ผู้ติดตาม'; - } - - @override - String get add_artist_to_blacklist => 'เพิ่มศิลปินในบัญชีดำ'; - - @override - String get top_tracks => 'เพลงฮิต'; - - @override - String get fans_also_like => 'แฟนๆ ยังชอบ'; - - @override - String get loading => 'กำลังโหลด...'; - - @override - String get artist => 'ศิลปิน'; - - @override - String get blacklisted => 'อยู่ในบัญชีดำ'; - - @override - String get following => 'กำลังติดตาม'; - - @override - String get follow => 'ติดตาม'; - - @override - String get artist_url_copied => 'คัดลอก URL ศิลปินไปยังคลิปบอร์ด'; - - @override - String added_to_queue(Object tracks) { - return 'เพิ่ม $tracks เพลงลงในคิว'; - } - - @override - String get filter_albums => 'กรองอัลบั้ม...'; - - @override - String get synced => 'ซิงค์'; - - @override - String get plain => 'เรียบง่าย'; - - @override - String get shuffle => 'สุ่ม'; - - @override - String get search_tracks => 'ค้นหาเพลง...'; - - @override - String get released => 'เผยแพร่'; - - @override - String error(Object error) { - return 'ข้อผิดพลาด $error'; - } - - @override - String get title => 'ชื่อ'; - - @override - String get time => 'เวลา'; - - @override - String get more_actions => 'เพิ่มเติม'; - - @override - String download_count(Object count) { - return 'ดาวน์โหลด ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'เพิ่ม ($count) ลงในเพลย์ลิสต์'; - } - - @override - String add_count_to_queue(Object count) { - return 'เพิ่ม ($count) ลงในคิว'; - } - - @override - String play_count_next(Object count) { - return 'เล่น ($count) ต่อไป'; - } - - @override - String get album => 'อัลบั้ม'; - - @override - String copied_to_clipboard(Object data) { - return 'คัดลอก $data ไปยังคลิปบอร์ด'; - } - - @override - String add_to_following_playlists(Object track) { - return 'เพิ่ม $track ลงในเพลย์ลิสต์'; - } - - @override - String get add => 'เพิ่ม'; - - @override - String added_track_to_queue(Object track) { - return 'เพิ่ม $track ลงในคิว'; - } - - @override - String get add_to_queue => 'เพิ่มลงในคิว'; - - @override - String track_will_play_next(Object track) { - return '$track จะเล่นต่อไป'; - } - - @override - String get play_next => 'เล่นต่อไป'; - - @override - String removed_track_from_queue(Object track) { - return 'ลบ $track ออกจากคิว'; - } - - @override - String get remove_from_queue => 'ลบออกจากคิว'; - - @override - String get remove_from_favorites => 'ลบออกจากรายการโปรด'; - - @override - String get save_as_favorite => 'บันทึกเป็นรายการโปรด'; - - @override - String get add_to_playlist => 'เพิ่มลงในเพลย์ลิสต์'; - - @override - String get remove_from_playlist => 'ลบออกจากเพลย์ลิสต์'; - - @override - String get add_to_blacklist => 'เพิ่มลงในบัญชีดำ'; - - @override - String get remove_from_blacklist => 'ลบออกจากบัญชีดำ'; - - @override - String get share => 'แชร์'; - - @override - String get mini_player => 'มินิเพลเยอร์'; - - @override - String get slide_to_seek => 'เลื่อนเพื่อไปข้างหน้าหรือถอยหลัง'; - - @override - String get shuffle_playlist => 'สุ่มเพลย์ลิสต์'; - - @override - String get unshuffle_playlist => 'ยกเลิกการสุ่มเพลย์ลิสต์'; - - @override - String get previous_track => 'แทร็กก่อนหน้า'; - - @override - String get next_track => 'แทร็กถัดไป'; - - @override - String get pause_playback => 'หยุดการเล่น'; - - @override - String get resume_playback => 'เล่นต่อ'; - - @override - String get loop_track => 'วนเพลง'; - - @override - String get no_loop => 'ไม่มีการวนซ้ำ'; - - @override - String get repeat_playlist => 'ซ้ำเพลย์ลิสต์'; - - @override - String get queue => 'คิว'; - - @override - String get alternative_track_sources => 'แหล่งแทร็กอื่น'; - - @override - String get download_track => 'ดาวน์โหลดแทร็ก'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks แทร็กในคิว'; - } - - @override - String get clear_all => 'ล้างทั้งหมด'; - - @override - String get show_hide_ui_on_hover => 'แสดง/ซ่อน UI เมื่อโฮเวอร์'; - - @override - String get always_on_top => 'อยู่ด้านบนเสมอ'; - - @override - String get exit_mini_player => 'ออกจากมินิเพลย์เยอร์'; - - @override - String get download_location => 'ตำแหน่งดาวน์โหลด'; - - @override - String get local_library => 'ห้องสมุดท้องถิ่น'; - - @override - String get add_library_location => 'เพิ่มในห้องสมุด'; - - @override - String get remove_library_location => 'ลบออกจากห้องสมุด'; - - @override - String get account => 'บัญชี'; - - @override - String get logout => 'ออกจากระบบ'; - - @override - String get logout_of_this_account => 'ออกจากระบบบัญชีนี้'; - - @override - String get language_region => 'ภาษาและภูมิภาค'; - - @override - String get language => 'ภาษา'; - - @override - String get system_default => 'ค่าเริ่มต้นของระบบ'; - - @override - String get market_place_region => 'ภูมิภาค Marketplace'; - - @override - String get recommendation_country => 'ประเทศที่แนะนำ'; - - @override - String get appearance => 'ลักษณะที่ปรากฏ'; - - @override - String get layout_mode => 'โหมดเค้าโครง'; - - @override - String get override_layout_settings => - 'แทนที่การตั้งค่าโหมดเค้าโครงแบบตอบสนอง'; - - @override - String get adaptive => 'ปรับเปลี่ยน'; - - @override - String get compact => 'กระชับ'; - - @override - String get extended => 'ขยาย'; - - @override - String get theme => 'ธีม'; - - @override - String get dark => 'มืด'; - - @override - String get light => 'สว่าง'; - - @override - String get system => 'ระบบ'; - - @override - String get accent_color => 'สีเน้น'; - - @override - String get sync_album_color => 'ซิงค์สีอัลบั้ม'; - - @override - String get sync_album_color_description => - 'ใช้สีเด่นของอาร์ตอัลบั้มเป็นสีเน้น'; - - @override - String get playback => 'การเล่น'; - - @override - String get audio_quality => 'คุณภาพเสียง'; - - @override - String get high => 'สูง'; - - @override - String get low => 'ต่ำ'; - - @override - String get pre_download_play => 'ดาวน์โหลดล่วงหน้าและเล่น'; - - @override - String get pre_download_play_description => - 'แทนที่จะสตรีมเสียง ดาวน์โหลดข้อมูลและเล่นแทน (แนะนำสำหรับผู้ใช้แบนด์วิดธ์สูง)'; - - @override - String get skip_non_music => 'ข้ามส่วนที่ไม่ใช่เพลง (SponsorBlock)'; - - @override - String get blacklist_description => 'แทร็กและศิลปินที่บล็อก'; - - @override - String get wait_for_download_to_finish => - 'โปรดรอให้การดาวน์โหลดปัจจุบันเสร็จสิ้น'; - - @override - String get desktop => 'เดสก์ท็อป'; - - @override - String get close_behavior => 'ปิดพฤติกรรม'; - - @override - String get close => 'ปิด'; - - @override - String get minimize_to_tray => 'ลดขนาดลงถาด'; - - @override - String get show_tray_icon => 'แสดงไอคอนถาดระบบ'; - - @override - String get about => 'เกี่ยวกับ'; - - @override - String get u_love_spotube => 'เรารู้ว่าคุณรัก Spotube'; - - @override - String get check_for_updates => 'ตรวจสอบการปรับปรุง'; - - @override - String get about_spotube => 'เกี่ยวกับ Spotube'; - - @override - String get blacklist => 'แบล็กลิสต์'; - - @override - String get please_sponsor => 'กรุณาสนับสนุน/บริจาค'; - - @override - String get spotube_description => - 'Spotube โปรแกรมเล่น Spotify ฟรีสำหรับทุกคน น้ำหนักเบา รองรับหลายแพลตฟอร์ม'; - - @override - String get version => 'รุ่น'; - - @override - String get build_number => 'หมายเลขบิลด์'; - - @override - String get founder => 'ผู้ก่อตั้ง'; - - @override - String get repository => 'ที่เก็บ'; - - @override - String get bug_issues => 'ข้อผิดพลาด+ปัญหา'; - - @override - String get made_with => 'ทำด้วย❤️ใน บังคลาเทศ🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'ใบอนุญาต'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'ไม่ต้องกังวล ข้อมูลรับรองใดๆ ของคุณจะไม่ถูกเก็บรวบรวมหรือแชร์กับใคร'; - - @override - String get know_how_to_login => 'ไม่รู้จักวิธีดำเนินการนี้ใช่ไหม'; - - @override - String get follow_step_by_step_guide => 'ทำตามคู่มือทีละขั้น'; - - @override - String cookie_name_cookie(Object name) { - return 'คุกกี้ $name'; - } - - @override - String get fill_in_all_fields => 'กรุณากรอกข้อมูลทุกช่อง'; - - @override - String get submit => 'ยื่น'; - - @override - String get exit => 'ออก'; - - @override - String get previous => 'ย้อนกลับ'; - - @override - String get next => 'ถัดไป'; - - @override - String get done => 'เสร็จ'; - - @override - String get step_1 => 'ขั้นที่ 1'; - - @override - String get first_go_to => 'ก่อนอื่น ไปที่'; - - @override - String get something_went_wrong => 'มีอะไรผิดพลาด'; - - @override - String get piped_instance => 'อินสแตนซ์เซิร์ฟเวอร์แบบ Pipe'; - - @override - String get piped_description => - 'อินสแตนซ์เซิร์ฟเวอร์แบบ Pipe ที่ใช้สำหรับการจับคู่แทร็ก'; - - @override - String get piped_warning => - 'บางอย่างอาจใช้งานไม่ได้ผล คุณจึงต้องรับความเสี่ยงเอง'; - - @override - String get invidious_instance => 'อินสแตนซ์เซิร์ฟเวอร์ Invidious'; - - @override - String get invidious_description => - 'อินสแตนซ์เซิร์ฟเวอร์ Invidious ที่ใช้สำหรับการจับคู่เพลง'; - - @override - String get invidious_warning => - 'บางอันอาจใช้งานไม่ดี ใช้ด้วยความเสี่ยงของคุณเอง'; - - @override - String get generate => 'สร้าง'; - - @override - String track_exists(Object track) { - return 'แทร็ก $track มีอยู่แล้ว'; - } - - @override - String get replace_downloaded_tracks => 'แทนที่แทร็กที่ดาวน์โหลดทั้งหมด'; - - @override - String get skip_download_tracks => 'ข้ามการดาวน์โหลดแทร็กที่ดาวน์โหลดทั้งหมด'; - - @override - String get do_you_want_to_replace => 'คุณต้องการแทนที่แทร็กที่มีอยู่หรือไม่'; - - @override - String get replace => 'แทนที่'; - - @override - String get skip => 'ข้าม'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'เลือกสูงสุด $count $type'; - } - - @override - String get select_genres => 'เลือกประเภท'; - - @override - String get add_genres => 'เพิ่มประเภท'; - - @override - String get country => 'ประเทศ'; - - @override - String get number_of_tracks_generate => 'จำนวนแทร็กที่จะสร้าง'; - - @override - String get acousticness => 'อะคูสติก'; - - @override - String get danceability => 'ความสามารถในการเต้น'; - - @override - String get energy => 'พลัง'; - - @override - String get instrumentalness => 'บรรเลง'; - - @override - String get liveness => 'ความสด'; - - @override - String get loudness => 'ความดัง'; - - @override - String get speechiness => 'การพูด'; - - @override - String get valence => 'ความสุข'; - - @override - String get popularity => 'ความนิยม'; - - @override - String get key => 'คีย์'; - - @override - String get duration => 'ระยะเวลา (วินาที)'; - - @override - String get tempo => 'ความเร็ว (BPM)'; - - @override - String get mode => 'โหมด'; - - @override - String get time_signature => 'ลายเซ็นเวลา'; - - @override - String get short => 'สั้น'; - - @override - String get medium => 'กลาง'; - - @override - String get long => 'ยาว'; - - @override - String get min => 'ต่ำสุด'; - - @override - String get max => 'สูงสุด'; - - @override - String get target => 'เป้าหมาย'; - - @override - String get moderate => 'ปานกลาง'; - - @override - String get deselect_all => 'ยกเลิกการเลือกทั้งหมด'; - - @override - String get select_all => 'เลือกทั้งหมด'; - - @override - String get are_you_sure => 'คุณแน่ใจไหม?'; - - @override - String get generating_playlist => 'กำลังสร้างเพลย์ลิสต์ที่คุณกำหนดเอง...'; - - @override - String selected_count_tracks(Object count) { - return 'เลือก $count แทร็ก'; - } - - @override - String get download_warning => - 'ถ้าคุณดาวน์โหลดเพลงทั้งหมดเป็นจำนวนมาก คุณกำลังละเมิดลิขสิทธิ์เพลงและสร้างความเสียหายให้กับสังคมดนตรี สร้างสรรค์ หวังว่าคุณจะรับรู้เรื่องนี้ เสมอ พยายามเคารพและสนับสนุนผลงานหนักของศิลปิน'; - - @override - String get download_ip_ban_warning => - 'นอกเหนือจากนั้น IP ของคุณอาจถูกบล็อกบน YouTube เนื่องจากคำขอดาวน์โหลดมากเกินกว่าปกติ การบล็อก IP หมายความว่าคุณไม่สามารถใช้ YouTube (แม้ว่าคุณจะล็อกอินอยู่) เป็นเวลาอย่างน้อย 2-3 เดือนจากอุปกรณ์ IP นั้น และ Spotube จะไม่รับผิดชอบใด ๆ หากสิ่งนี้เกิดขึ้น'; - - @override - String get by_clicking_accept_terms => - 'คลิก \'ยอมรับ\' คุณยินยอมตามเงื่อนไขต่อไปนี้:'; - - @override - String get download_agreement_1 => - 'ฉันรู้ว่าฉันกำลังละเมิดลิขสิทธิ์เพลง ฉันเลว'; - - @override - String get download_agreement_2 => - 'ฉันจะสนับสนุนศิลปินทุกที่ที่ฉันทำได้และฉันทำสิ่งนี้เพียงเพราะฉันไม่มีเงินซื้อผลงานศิลปะของพวกเขา'; - - @override - String get download_agreement_3 => - 'ฉันรับทราบอย่างสมบูรณ์ว่า IP ของฉันอาจถูกบล็อกบน YouTube และฉันจะไม่ถือ Spotube หรือเจ้าของ/ผู้มีส่วนร่วมใด ๆ รับผิดชอบต่ออุบัติเหตุใด ๆ ที่เกิดจากการกระทำปัจจุบันของฉัน'; - - @override - String get decline => 'ปฏิเสธ'; - - @override - String get accept => 'ยอมรับ'; - - @override - String get details => 'รายละเอียด'; - - @override - String get youtube => 'youtube'; - - @override - String get channel => 'ช่อง'; - - @override - String get likes => 'ถูกใจ'; - - @override - String get dislikes => 'ไม่ชอบ'; - - @override - String get views => 'วิว'; - - @override - String get streamUrl => 'สตรีม URL'; - - @override - String get stop => 'หยุด'; - - @override - String get sort_newest => 'เรียงตามการเพิ่มใหม่ล่าสุด'; - - @override - String get sort_oldest => 'เรียงตามการเพิ่มเก่าสุด'; - - @override - String get sleep_timer => 'ตั้งเวลาปิด'; - - @override - String mins(Object minutes) { - return '$minutes นาที'; - } - - @override - String hours(Object hours) { - return '$hours ชั่วโมง'; - } - - @override - String hour(Object hours) { - return '$hours ชั่วโมง'; - } - - @override - String get custom_hours => 'ชั่วโมงที่กำหนดเอง'; - - @override - String get logs => 'บันทึก'; - - @override - String get developers => 'นักพัฒนา'; - - @override - String get not_logged_in => 'คุณไม่ได้เข้าสู่ระบบ'; - - @override - String get search_mode => 'โหมดการค้นหา'; - - @override - String get audio_source => 'แหล่งที่มาของเสียง'; - - @override - String get ok => 'ตกลง'; - - @override - String get failed_to_encrypt => 'เข้ารหัสล้มเหลว'; - - @override - String get encryption_failed_warning => - 'Spotube ใช้การเข้ารหัสเพื่อเก็บข้อมูลของคุณอย่างปลอดภัย แต่ไม่สามารถทำได้ ดังนั้นจะเปลี่ยนเป็นการจัดเก็บที่ไม่ปลอดภัย\nหากคุณใช้ Linux โปรดตรวจสอบว่าคุณได้ติดตั้งบริการลับ (gnome-keyring, kde-wallet, keepassxc เป็นต้น)'; - - @override - String get querying_info => 'กำลังดึงข้อมูล...'; - - @override - String get piped_api_down => 'Piped API ไม่ทำงาน'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Piped instance $pipedInstance ไม่ทำงานขณะนี้\n\nเปลี่ยนอินสแตนซ์หรือเปลี่ยน \'ประเภท API\' เป็น YouTube API อย่างเป็นทางการ\n\nอย่าลืมรีสตาร์ทแอปหลังจากเปลี่ยน'; - } - - @override - String get you_are_offline => 'คุณออฟไลน์อยู่'; - - @override - String get connection_restored => - 'การเชื่อมต่ออินเทอร์เน็ตของคุณได้รับการกู้คืน'; - - @override - String get use_system_title_bar => 'ใช้แถบชื่อระบบ'; - - @override - String get crunching_results => 'กำลังประมวลผล...'; - - @override - String get search_to_get_results => 'ค้นหาเพื่อดูผลลัพธ์'; - - @override - String get use_amoled_mode => 'ธีมมืดสนิท'; - - @override - String get pitch_dark_theme => 'โหมด AMOLED'; - - @override - String get normalize_audio => 'ปรับระดับเสียง'; - - @override - String get change_cover => 'เปลี่ยนปก'; - - @override - String get add_cover => 'เพิ่มปก'; - - @override - String get restore_defaults => 'คืนค่าเริ่มต้น'; - - @override - String get download_music_format => 'รูปแบบการดาวน์โหลดเพลง'; - - @override - String get streaming_music_format => 'รูปแบบการสตรีมเพลง'; - - @override - String get download_music_quality => 'คุณภาพการดาวน์โหลด'; - - @override - String get streaming_music_quality => 'คุณภาพการสตรีม'; - - @override - String get login_with_lastfm => 'เข้าสู่ระบบด้วย Last.fm'; - - @override - String get connect => 'เชื่อมต่อ'; - - @override - String get disconnect_lastfm => 'ตัดการเชื่อมต่อ Last.fm'; - - @override - String get disconnect => 'ตัดการเชื่อมต่อ'; - - @override - String get username => 'ชื่อผู้ใช้'; - - @override - String get password => 'รหัสผ่าน'; - - @override - String get login => 'เข้าสู่ระบบ'; - - @override - String get login_with_your_lastfm => 'เข้าสู่ระบบด้วย Last.fm'; - - @override - String get scrobble_to_lastfm => 'Scrobble ไปเป็น Last.fm'; - - @override - String get go_to_album => 'ไปที่อัลบั้ม'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'เรียกดูทั้งหมด'; - - @override - String get genres => 'ประเภท'; - - @override - String get explore_genres => 'สำรวจประเภท'; - - @override - String get friends => 'เพื่อน'; - - @override - String get no_lyrics_available => 'ขออภัย ไม่พบเนื้อเพลงสำหรับเพลงนี้'; - - @override - String get start_a_radio => 'เปิดวิทยุ'; - - @override - String get how_to_start_radio => 'หากต้องการเปิดวิทยุฟังยังไง?'; - - @override - String get replace_queue_question => - 'คุณต้องการแทนที่คิวปัจจุบันหรือเพิ่มเข้าไปหรือไม่'; - - @override - String get endless_playback => 'เล่นซ้ำ'; - - @override - String get delete_playlist => 'ลบเพลย์ลิสต์'; - - @override - String get delete_playlist_confirmation => - 'คุณแน่ใจที่จะลบเพลย์ลิสต์นี้หรือไม่'; - - @override - String get local_tracks => 'เพลงในเครื่อง'; - - @override - String get local_tab => 'ท้องถิ่น'; - - @override - String get song_link => 'ลิงค์เพลง'; - - @override - String get skip_this_nonsense => 'ข้ามสิ่งไร้สาระนี้'; - - @override - String get freedom_of_music => '“เสรีภาพแห่งเสียงเพลง”'; - - @override - String get freedom_of_music_palm => '“เสรีภาพแห่งเสียงเพลง ในมือของคุณ”'; - - @override - String get get_started => 'เริ่มต้น'; - - @override - String get youtube_source_description => 'แนะนำและใช้งานได้ดีที่สุด'; - - @override - String get piped_source_description => - 'รู้สึกอิสระ? เหมือน YouTube แต่ฟรีกว่าเยอะ'; - - @override - String get jiosaavn_source_description => 'ดีที่สุดสำหรับภูมิภาคเอเชียใต้'; - - @override - String get invidious_source_description => - 'คล้ายกับ Piped แต่มีความพร้อมใช้งานสูงกว่า'; - - @override - String highest_quality(Object quality) { - return 'คุณภาพสูงสุด: $quality'; - } - - @override - String get select_audio_source => 'เลือกแหล่งเสียง'; - - @override - String get endless_playback_description => 'เพิ่มเพลงใหม่ลงในคิวโดยอัตโนมัติ'; - - @override - String get choose_your_region => 'เลือกภูมิภาคของคุณ'; - - @override - String get choose_your_region_description => - 'สิ่งนี้จะช่วยให้ Spotube แสดงเนื้อหาที่เหมาะสมสำหรับคุณ'; - - @override - String get choose_your_language => 'เลือกภาษาของคุณ'; - - @override - String get help_project_grow => 'ช่วยให้โครงการนี้เติบโต'; - - @override - String get help_project_grow_description => - 'Spotube เป็นโครงการโอเพนซอร์ส คุณสามารถช่วยให้โครงการนี้เติบโตได้โดยการมีส่วนร่วมในโครงการ รายงานข้อบกพร่อง หรือเสนอคุณสมบัติใหม่'; - - @override - String get contribute_on_github => 'มีส่วนร่วมบน GitHub'; - - @override - String get donate_on_open_collective => 'บริจาคบน Open Collective'; - - @override - String get browse_anonymously => 'เรียกดูแบบไม่ระบุตัวตน'; - - @override - String get enable_connect => 'เปิดใช้งานการเชื่อมต่อ'; - - @override - String get enable_connect_description => 'ควบคุม Spotube จากอุปกรณ์อื่น'; - - @override - String get devices => 'อุปกรณ์'; - - @override - String get select => 'เลือก'; - - @override - String connect_client_alert(Object client) { - return 'คุณกำลังถูกควบคุมโดย $client'; - } - - @override - String get this_device => 'อุปกรณ์นี้'; - - @override - String get remote => 'ระยะไกล'; - - @override - String get stats => 'สถิติ'; - - @override - String and_n_more(Object count) { - return 'และ $count อีก'; - } - - @override - String get recently_played => 'เพลงที่เพิ่งเล่น'; - - @override - String get browse_more => 'ดูเพิ่มเติม'; - - @override - String get no_title => 'ไม่มีชื่อ'; - - @override - String get not_playing => 'ไม่เล่น'; - - @override - String get epic_failure => 'ล้มเหลวอย่างยิ่ง!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'เพิ่ม $tracks_length เพลงในคิว'; - } - - @override - String get spotube_has_an_update => 'Spotube มีการอัปเดต'; - - @override - String get download_now => 'ดาวน์โหลดตอนนี้'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum ได้รับการปล่อยออกมา'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version ได้รับการปล่อยออกมา'; - } - - @override - String get read_the_latest => 'อ่านข่าวสารล่าสุด '; - - @override - String get release_notes => 'บันทึกการปล่อย'; - - @override - String get pick_color_scheme => 'เลือกธีมสี'; - - @override - String get save => 'บันทึก'; - - @override - String get choose_the_device => 'เลือกอุปกรณ์:'; - - @override - String get multiple_device_connected => - 'มีอุปกรณ์เชื่อมต่อหลายเครื่อง\nเลือกอุปกรณ์ที่คุณต้องการให้การดำเนินการนี้เกิดขึ้น'; - - @override - String get nothing_found => 'ไม่พบข้อมูล'; - - @override - String get the_box_is_empty => 'กล่องว่างเปล่า'; - - @override - String get top_artists => 'ศิลปินยอดนิยม'; - - @override - String get top_albums => 'อัลบั้มยอดนิยม'; - - @override - String get this_week => 'สัปดาห์นี้'; - - @override - String get this_month => 'เดือนนี้'; - - @override - String get last_6_months => '6 เดือนที่ผ่านมา'; - - @override - String get this_year => 'ปีนี้'; - - @override - String get last_2_years => '2 ปีที่ผ่านมา'; - - @override - String get all_time => 'ตลอดกาล'; - - @override - String powered_by_provider(Object providerName) { - return 'ขับเคลื่อนโดย $providerName'; - } - - @override - String get email => 'อีเมล'; - - @override - String get profile_followers => 'ผู้ติดตาม'; - - @override - String get birthday => 'วันเกิด'; - - @override - String get subscription => 'การสมัครสมาชิก'; - - @override - String get not_born => 'ยังไม่เกิด'; - - @override - String get hacker => 'แฮ็กเกอร์'; - - @override - String get profile => 'โปรไฟล์'; - - @override - String get no_name => 'ไม่มีชื่อ'; - - @override - String get edit => 'แก้ไข'; - - @override - String get user_profile => 'โปรไฟล์ผู้ใช้'; - - @override - String count_plays(Object count) { - return '$count การเล่น'; - } - - @override - String get streaming_fees_hypothetical => - '*คำนวณจากการจ่ายเงินต่อการสตรีมของ Spotify\nระหว่าง \$0.003 ถึง \$0.005 นี่เป็นการคำนวณสมมุติ\nเพื่อให้ข้อมูลแก่ผู้ใช้เกี่ยวกับจำนวนเงินที่พวกเขา\nอาจจะจ่ายให้กับศิลปินหากพวกเขาฟังเพลงของพวกเขาใน Spotify'; - - @override - String get minutes_listened => 'เวลาที่ฟัง'; - - @override - String get streamed_songs => 'เพลงที่สตรีม'; - - @override - String count_streams(Object count) { - return '$count สตรีม'; - } - - @override - String get owned_by_you => 'เป็นเจ้าของโดยคุณ'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl คัดลอกไปที่คลิปบอร์ดแล้ว'; - } - - @override - String get hipotetical_calculation => - '*การคำนวณนี้อิงจากค่าเฉลี่ยการจ่ายเงินต่อสตรีมของแพลตฟอร์มสตรีมมิ่งเพลงออนไลน์ที่ \$0.003 ถึง \$0.005 นี่เป็นการคำนวณสมมติฐานเพื่อให้ผู้ใช้เข้าใจว่าพวกเขาจะต้องจ่ายเงินให้ศิลปินเท่าไหร่หากพวกเขาฟังเพลงบนแพลตฟอร์มสตรีมมิ่งเพลงที่แตกต่างกัน'; - - @override - String count_mins(Object minutes) { - return '$minutes นาที'; - } - - @override - String get summary_minutes => 'นาที'; - - @override - String get summary_listened_to_music => 'ฟังเพลง'; - - @override - String get summary_songs => 'เพลง'; - - @override - String get summary_streamed_overall => 'สตรีมทั้งหมด'; - - @override - String get summary_owed_to_artists => 'ค้างชำระให้ศิลปิน\nในเดือนนี้'; - - @override - String get summary_artists => 'ศิลปิน'; - - @override - String get summary_music_reached_you => 'เพลงมาถึงคุณ'; - - @override - String get summary_full_albums => 'อัลบั้มเต็ม'; - - @override - String get summary_got_your_love => 'ได้รับความรักของคุณ'; - - @override - String get summary_playlists => 'เพลย์ลิสต์'; - - @override - String get summary_were_on_repeat => 'อยู่ในโหมดซ้ำ'; - - @override - String total_money(Object money) { - return 'รวม $money'; - } - - @override - String get webview_not_found => 'ไม่พบ Webview'; - - @override - String get webview_not_found_description => - 'ไม่พบ runtime ของ Webview บนอุปกรณ์ของคุณ\nหากติดตั้งแล้วตรวจสอบให้แน่ใจว่าอยู่ใน environment PATH\n\nหลังจากติดตั้งแล้ว ให้รีสตาร์ทแอป'; - - @override - String get unsupported_platform => 'แพลตฟอร์มไม่รองรับ'; - - @override - String get cache_music => 'แคชเพลง'; - - @override - String get open => 'เปิด'; - - @override - String get cache_folder => 'โฟลเดอร์แคช'; - - @override - String get export => 'ส่งออก'; - - @override - String get clear_cache => 'ล้างแคช'; - - @override - String get clear_cache_confirmation => 'คุณต้องการล้างแคชหรือไม่?'; - - @override - String get export_cache_files => 'ส่งออกไฟล์แคช'; - - @override - String found_n_files(Object count) { - return 'พบ $count ไฟล์'; - } - - @override - String get export_cache_confirmation => 'คุณต้องการส่งออกไฟล์เหล่านี้ไปยัง'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'ส่งออก $filesExported จาก $files ไฟล์'; - } - - @override - String get undo => 'ย้อนกลับ'; - - @override - String get download_all => 'ดาวน์โหลดทั้งหมด'; - - @override - String get add_all_to_playlist => 'เพิ่มทั้งหมดในเพลย์ลิสต์'; - - @override - String get add_all_to_queue => 'เพิ่มทั้งหมดในคิว'; - - @override - String get play_all_next => 'เล่นทั้งหมดถัดไป'; - - @override - String get pause => 'หยุดชั่วคราว'; - - @override - String get view_all => 'ดูทั้งหมด'; - - @override - String get no_tracks_added_yet => 'ดูเหมือนคุณยังไม่ได้เพิ่มเพลงใด ๆ'; - - @override - String get no_tracks => 'ดูเหมือนจะไม่มีเพลงที่นี่'; - - @override - String get no_tracks_listened_yet => 'ดูเหมือนคุณยังไม่ได้ฟังอะไรเลย'; - - @override - String get not_following_artists => 'คุณไม่ได้ติดตามศิลปินใด ๆ'; - - @override - String get no_favorite_albums_yet => - 'ดูเหมือนคุณยังไม่ได้เพิ่มอัลบัมใด ๆ ในรายการโปรด'; - - @override - String get no_logs_found => 'ไม่พบบันทึก'; - - @override - String get youtube_engine => 'เครื่องมือ YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine ยังไม่ได้ติดตั้ง'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine ยังไม่ได้ติดตั้งในระบบของคุณ'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'ตรวจสอบให้แน่ใจว่ามันมีอยู่ในตัวแปร PATH หรือ\nตั้งค่าพาธที่แท้จริงของไฟล์ที่สามารถทำงานได้ $engine ด้านล่าง'; - } - - @override - String get youtube_engine_unix_issue_message => - 'ใน macOS/Linux/Unix อย่าง OS การตั้งค่าพาธใน .zshrc/.bashrc/.bash_profile เป็นต้น จะไม่ทำงาน\nคุณต้องตั้งค่าพาธในไฟล์การกำหนดค่า shell'; - - @override - String get download => 'ดาวน์โหลด'; - - @override - String get file_not_found => 'ไม่พบไฟล์'; - - @override - String get custom => 'กำหนดเอง'; - - @override - String get add_custom_url => 'เพิ่ม URL แบบกำหนดเอง'; - - @override - String get edit_port => 'แก้ไขพอร์ต'; - - @override - String get port_helper_msg => - 'ค่าเริ่มต้นคือ -1 ซึ่งหมายถึงหมายเลขสุ่ม หากคุณได้กำหนดค่าไฟร์วอลล์แล้ว แนะนำให้ตั้งค่านี้'; - - @override - String connect_request(Object client) { - return 'อนุญาตให้ $client เชื่อมต่อหรือไม่?'; - } - - @override - String get connection_request_denied => - 'การเชื่อมต่อล้มเหลว ผู้ใช้ปฏิเสธการเข้าถึง'; - - @override - String get an_error_occurred => 'เกิดข้อผิดพลาด'; - - @override - String get copy_to_clipboard => 'คัดลอกไปยังคลิปบอร์ด'; - - @override - String get view_logs => 'ดูบันทึก'; - - @override - String get retry => 'ลองใหม่'; - - @override - String get no_default_metadata_provider_selected => - 'คุณไม่ได้ตั้งค่าผู้ให้บริการเมตาดาต้าเริ่มต้น'; - - @override - String get manage_metadata_providers => 'จัดการผู้ให้บริการเมตาดาต้า'; - - @override - String get open_link_in_browser => 'เปิดลิงก์ในเบราว์เซอร์หรือไม่?'; - - @override - String get do_you_want_to_open_the_following_link => - 'คุณต้องการเปิดลิงก์ต่อไปนี้หรือไม่'; - - @override - String get unsafe_url_warning => - 'การเปิดลิงก์จากแหล่งที่ไม่น่าเชื่อถืออาจไม่ปลอดภัย โปรดระมัดระวัง!\nคุณยังสามารถคัดลอกลิงก์ไปยังคลิปบอร์ดของคุณได้'; - - @override - String get copy_link => 'คัดลอกลิงก์'; - - @override - String get building_your_timeline => - 'กำลังสร้างไทม์ไลน์ของคุณตามการฟังของคุณ...'; - - @override - String get official => 'อย่างเป็นทางการ'; - - @override - String author_name(Object author) { - return 'ผู้เขียน: $author'; - } - - @override - String get third_party => 'บุคคลที่สาม'; - - @override - String get plugin_requires_authentication => - 'ปลั๊กอินต้องมีการรับรองความถูกต้อง'; - - @override - String get update_available => 'มีการอัปเดต'; - - @override - String get supports_scrobbling => 'รองรับการ scrobbling'; - - @override - String get plugin_scrobbling_info => - 'ปลั๊กอินนี้จะ scrobble เพลงของคุณเพื่อสร้างประวัติการฟังของคุณ'; - - @override - String get default_metadata_source => 'แหล่งเมตาดาต้าพื้นฐาน'; - - @override - String get set_default_metadata_source => 'ตั้งค่าแหล่งเมตาดาต้าพื้นฐาน'; - - @override - String get default_audio_source => 'แหล่งเสียงพื้นฐาน'; - - @override - String get set_default_audio_source => 'ตั้งค่าแหล่งเสียงพื้นฐาน'; - - @override - String get set_default => 'ตั้งค่าเริ่มต้น'; - - @override - String get support => 'สนับสนุน'; - - @override - String get support_plugin_development => 'สนับสนุนการพัฒนาปลั๊กอิน'; - - @override - String can_access_name_api(Object name) { - return '- สามารถเข้าถึง API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'คุณต้องการติดตั้งปลั๊กอินนี้หรือไม่?'; - - @override - String get third_party_plugin_warning => - 'ปลั๊กอินนี้มาจากที่เก็บของบุคคลที่สาม โปรดตรวจสอบให้แน่ใจว่าคุณเชื่อถือแหล่งที่มาก่อนทำการติดตั้ง'; - - @override - String get author => 'ผู้เขียน'; - - @override - String get this_plugin_can_do_following => 'ปลั๊กอินนี้สามารถทำสิ่งต่อไปนี้'; - - @override - String get install => 'ติดตั้ง'; - - @override - String get install_a_metadata_provider => 'ติดตั้งผู้ให้บริการเมตาดาต้า'; - - @override - String get no_tracks_playing => 'ขณะนี้ไม่มีเพลงที่กำลังเล่นอยู่'; - - @override - String get synced_lyrics_not_available => - 'ไม่มีเนื้อเพลงที่ซิงค์สำหรับเพลงนี้ กรุณาใช้แท็บ'; - - @override - String get plain_lyrics => 'เนื้อเพลงธรรมดา'; - - @override - String get tab_instead => 'แทน'; - - @override - String get disclaimer => 'ข้อสงวนสิทธิ์'; - - @override - String get third_party_plugin_dmca_notice => - 'ทีม Spotube ไม่รับผิดชอบใดๆ (รวมถึงทางกฎหมาย) สำหรับปลั๊กอิน \"บุคคลที่สาม\" ใดๆ\nโปรดใช้งานด้วยความเสี่ยงของคุณเอง สำหรับข้อบกพร่อง/ปัญหาใดๆ โปรดรายงานไปยังที่เก็บปลั๊กอิน\n\nหากปลั๊กอิน \"บุคคลที่สาม\" ใดๆ ละเมิด ToS/DMCA ของบริการ/นิติบุคคลใดๆ โปรดขอให้ผู้เขียนปลั๊กอิน \"บุคคลที่สาม\" หรือแพลตฟอร์มโฮสติ้ง เช่น GitHub/Codeberg ดำเนินการ ที่ระบุไว้ข้างต้น (ที่ติดป้าย \"บุคคลที่สาม\") เป็นปลั๊กอินสาธารณะ/ที่ดูแลโดยชุมชนทั้งหมด เราไม่ได้จัดการดูแล ดังนั้นเราจึงไม่สามารถดำเนินการใดๆ กับพวกเขาได้\n\n'; - - @override - String get input_does_not_match_format => 'อินพุตไม่ตรงกับรูปแบบที่ต้องการ'; - - @override - String get plugins => 'ปลั๊กอิน'; - - @override - String get paste_plugin_download_url => - 'วาง url ดาวน์โหลดหรือ url ที่เก็บ GitHub/Codeberg หรือลิงก์โดยตรงไปยังไฟล์ .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'ดาวน์โหลดและติดตั้งปลั๊กอินจาก url'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'ไม่สามารถเพิ่มปลั๊กอินได้: $error'; - } - - @override - String get upload_plugin_from_file => 'อัปโหลดปลั๊กอินจากไฟล์'; - - @override - String get installed => 'ติดตั้งแล้ว'; - - @override - String get available_plugins => 'ปลั๊กอินที่มีอยู่'; - - @override - String get configure_plugins => - 'กำหนดค่าปลั๊กอินผู้ให้บริการเมตาดาต้าและแหล่งเสียงของคุณเอง'; - - @override - String get audio_scrobblers => 'เครื่อง scrobbler เสียง'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'แหล่งที่มา: '; - - @override - String get uncompressed => 'ไม่บีบอัด'; - - @override - String get dab_music_source_description => - 'สำหรับคนรักเสียงเพลง ให้สตรีมเสียงคุณภาพสูง/ไร้การสูญเสียการบีบอัด การจับคู่แทร็กแม่นยำตาม ISRC'; -} diff --git a/lib/l10n/generated/app_localizations_tl.dart b/lib/l10n/generated/app_localizations_tl.dart deleted file mode 100644 index 5febc92d..00000000 --- a/lib/l10n/generated/app_localizations_tl.dart +++ /dev/null @@ -1,1581 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Tagalog (`tl`). -class AppLocalizationsTl extends AppLocalizations { - AppLocalizationsTl([String locale = 'tl']) : super(locale); - - @override - String get guest => 'Bisita'; - - @override - String get browse => 'Mag-browse'; - - @override - String get search => 'Maghanap'; - - @override - String get library => 'Silid-aklatan'; - - @override - String get lyrics => 'Mga Liriko'; - - @override - String get settings => 'Mga Setting'; - - @override - String get genre_categories_filter => 'I-filter ang mga kategorya o genre...'; - - @override - String get genre => 'Genre'; - - @override - String get personalized => 'Naka-personalize'; - - @override - String get featured => 'Tampok'; - - @override - String get new_releases => 'Mga Bagong Paglabas'; - - @override - String get songs => 'Mga Kanta'; - - @override - String playing_track(Object track) { - return 'Tumutugtog ang $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Ito ay magbubura ng kasalukuyang pila. $track_length na mga track ang tatanggalin\nGusto mo bang magpatuloy?'; - } - - @override - String get load_more => 'Mag-load pa'; - - @override - String get playlists => 'Mga Playlist'; - - @override - String get artists => 'Mga Artista'; - - @override - String get albums => 'Mga Album'; - - @override - String get tracks => 'Mga Track'; - - @override - String get downloads => 'Mga Download'; - - @override - String get filter_playlists => 'I-filter ang iyong mga playlist...'; - - @override - String get liked_tracks => 'Mga Nagustuhang Track'; - - @override - String get liked_tracks_description => - 'Lahat ng mga track na iyong nagustuhan'; - - @override - String get playlist => 'Playlist'; - - @override - String get create_a_playlist => 'Gumawa ng playlist'; - - @override - String get update_playlist => 'I-update ang playlist'; - - @override - String get create => 'Lumikha'; - - @override - String get cancel => 'Ikansela'; - - @override - String get update => 'I-update'; - - @override - String get playlist_name => 'Pangalan ng Playlist'; - - @override - String get name_of_playlist => 'Pangalan ng playlist'; - - @override - String get description => 'Paglalarawan'; - - @override - String get public => 'Pampubliko'; - - @override - String get collaborative => 'Pakikipagtulungan'; - - @override - String get search_local_tracks => 'Maghanap ng mga lokal na track...'; - - @override - String get play => 'I-play'; - - @override - String get delete => 'Burahin'; - - @override - String get none => 'Wala'; - - @override - String get sort_a_z => 'Ayusin ayon sa A-Z'; - - @override - String get sort_z_a => 'Ayusin ayon sa Z-A'; - - @override - String get sort_artist => 'Ayusin ayon sa Artista'; - - @override - String get sort_album => 'Ayusin ayon sa Album'; - - @override - String get sort_duration => 'Ayusin ayon sa Tagal'; - - @override - String get sort_tracks => 'Ayusin ang mga Track'; - - @override - String currently_downloading(Object tracks_length) { - return 'Kasalukuyang Nagda-download ($tracks_length)'; - } - - @override - String get cancel_all => 'Kanselahin Lahat'; - - @override - String get filter_artist => 'I-filter ang mga artista...'; - - @override - String followers(Object followers) { - return '$followers na mga Tagasunod'; - } - - @override - String get add_artist_to_blacklist => 'Idagdag ang artista sa blacklist'; - - @override - String get top_tracks => 'Mga Nangungunang Track'; - - @override - String get fans_also_like => 'Gusto rin ng mga tagahanga'; - - @override - String get loading => 'Naglo-load...'; - - @override - String get artist => 'Artista'; - - @override - String get blacklisted => 'Naka-blacklist'; - - @override - String get following => 'Sinusundan'; - - @override - String get follow => 'Sundan'; - - @override - String get artist_url_copied => 'Na-copy sa clipboard ang URL ng artista'; - - @override - String added_to_queue(Object tracks) { - return 'Idinagdag ang $tracks na mga track sa pila'; - } - - @override - String get filter_albums => 'I-filter ang mga album...'; - - @override - String get synced => 'Naka-sync'; - - @override - String get plain => 'Simpleng'; - - @override - String get shuffle => 'I-shuffle'; - - @override - String get search_tracks => 'Maghanap ng mga track...'; - - @override - String get released => 'Inilabas'; - - @override - String error(Object error) { - return 'Error $error'; - } - - @override - String get title => 'Pamagat'; - - @override - String get time => 'Oras'; - - @override - String get more_actions => 'Higit pang mga aksyon'; - - @override - String download_count(Object count) { - return 'I-download ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Idagdag ($count) sa Playlist'; - } - - @override - String add_count_to_queue(Object count) { - return 'Idagdag ($count) sa Pila'; - } - - @override - String play_count_next(Object count) { - return 'I-play ($count) kasunod'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return 'Na-copy ang $data sa clipboard'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Idagdag ang $track sa mga sumusunod na Playlist'; - } - - @override - String get add => 'Idagdag'; - - @override - String added_track_to_queue(Object track) { - return 'Idinagdag ang $track sa pila'; - } - - @override - String get add_to_queue => 'Idagdag sa pila'; - - @override - String track_will_play_next(Object track) { - return 'Ang $track ay tutugtog susunod'; - } - - @override - String get play_next => 'I-play susunod'; - - @override - String removed_track_from_queue(Object track) { - return 'Tinanggal ang $track mula sa pila'; - } - - @override - String get remove_from_queue => 'Alisin mula sa pila'; - - @override - String get remove_from_favorites => 'Alisin mula sa mga paborito'; - - @override - String get save_as_favorite => 'I-save bilang paborito'; - - @override - String get add_to_playlist => 'Idagdag sa playlist'; - - @override - String get remove_from_playlist => 'Alisin mula sa playlist'; - - @override - String get add_to_blacklist => 'Idagdag sa blacklist'; - - @override - String get remove_from_blacklist => 'Alisin mula sa blacklist'; - - @override - String get share => 'Ibahagi'; - - @override - String get mini_player => 'Mini Player'; - - @override - String get slide_to_seek => 'I-slide para mag-seek pasulong o pabalik'; - - @override - String get shuffle_playlist => 'I-shuffle ang playlist'; - - @override - String get unshuffle_playlist => 'I-unshuffle ang playlist'; - - @override - String get previous_track => 'Nakaraang track'; - - @override - String get next_track => 'Susunod na track'; - - @override - String get pause_playback => 'I-pause ang Playback'; - - @override - String get resume_playback => 'Ipagpatuloy ang Playback'; - - @override - String get loop_track => 'I-loop ang track'; - - @override - String get no_loop => 'Walang loop'; - - @override - String get repeat_playlist => 'Ulitin ang playlist'; - - @override - String get queue => 'Pila'; - - @override - String get alternative_track_sources => - 'Alternatibong mga pinagmulan ng track'; - - @override - String get download_track => 'I-download ang track'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks na mga track sa pila'; - } - - @override - String get clear_all => 'Burahin lahat'; - - @override - String get show_hide_ui_on_hover => 'Ipakita/Itago ang UI sa hover'; - - @override - String get always_on_top => 'Palaging nasa ibabaw'; - - @override - String get exit_mini_player => 'Lumabas sa Mini player'; - - @override - String get download_location => 'Lokasyon ng pag-download'; - - @override - String get local_library => 'Lokal na silid-aklatan'; - - @override - String get add_library_location => 'Idagdag sa silid-aklatan'; - - @override - String get remove_library_location => 'Alisin mula sa silid-aklatan'; - - @override - String get account => 'Account'; - - @override - String get logout => 'Mag-logout'; - - @override - String get logout_of_this_account => 'Mag-logout sa account na ito'; - - @override - String get language_region => 'Wika at Rehiyon'; - - @override - String get language => 'Wika'; - - @override - String get system_default => 'Default ng Sistema'; - - @override - String get market_place_region => 'Rehiyon ng Marketplace'; - - @override - String get recommendation_country => 'Bansang Inirerekomenda'; - - @override - String get appearance => 'Hitsura'; - - @override - String get layout_mode => 'Mode ng Layout'; - - @override - String get override_layout_settings => - 'I-override ang mga setting ng responsive layout mode'; - - @override - String get adaptive => 'Umaangkop'; - - @override - String get compact => 'Kompakto'; - - @override - String get extended => 'Pinalawig'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Madilim'; - - @override - String get light => 'Maliwanag'; - - @override - String get system => 'Sistema'; - - @override - String get accent_color => 'Kulay ng Accent'; - - @override - String get sync_album_color => 'I-sync ang kulay ng album'; - - @override - String get sync_album_color_description => - 'Ginagamit ang pangunahing kulay ng album art bilang kulay ng accent'; - - @override - String get playback => 'Playback'; - - @override - String get audio_quality => 'Kalidad ng Audio'; - - @override - String get high => 'Mataas'; - - @override - String get low => 'Mababa'; - - @override - String get pre_download_play => 'Mag-pre-download at i-play'; - - @override - String get pre_download_play_description => - 'Sa halip na mag-stream ng audio, mag-download ng bytes at i-play sa halip (Inirerekomenda para sa mga gumagamit ng mataas na bandwidth)'; - - @override - String get skip_non_music => - 'Laktawan ang mga segment na hindi musika (SponsorBlock)'; - - @override - String get blacklist_description => 'Mga track at artista na nasa blacklist'; - - @override - String get wait_for_download_to_finish => - 'Mangyaring maghintay para matapos ang kasalukuyang pag-download'; - - @override - String get desktop => 'Desktop'; - - @override - String get close_behavior => 'Pag-uugali ng Pagsara'; - - @override - String get close => 'Isara'; - - @override - String get minimize_to_tray => 'I-minimize sa tray'; - - @override - String get show_tray_icon => 'Ipakita ang icon ng System tray'; - - @override - String get about => 'Tungkol sa'; - - @override - String get u_love_spotube => 'Alam naming gusto mo ang Spotube'; - - @override - String get check_for_updates => 'Maghanap ng mga update'; - - @override - String get about_spotube => 'Tungkol sa Spotube'; - - @override - String get blacklist => 'Blacklist'; - - @override - String get please_sponsor => 'Mangyaring Mag-sponsor/Mag-donate'; - - @override - String get spotube_description => - 'Spotube, isang magaan, cross-platform, libreng-para-sa-lahat na spotify client'; - - @override - String get version => 'Bersyon'; - - @override - String get build_number => 'Build Number'; - - @override - String get founder => 'Nagtatag'; - - @override - String get repository => 'Repository'; - - @override - String get bug_issues => 'Bug+Mga Isyu'; - - @override - String get made_with => 'Ginawa nang may ❤️ sa Bangladesh🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Lisensya'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Huwag mag-alala, ang alinman sa iyong mga kredensyal ay hindi kokolektahin o ibabahagi sa sinuman'; - - @override - String get know_how_to_login => 'Hindi mo alam kung paano gawin ito?'; - - @override - String get follow_step_by_step_guide => 'Sundin ang Hakbang-hakbang na gabay'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => 'Mangyaring punan ang lahat ng field'; - - @override - String get submit => 'Isumite'; - - @override - String get exit => 'Lumabas'; - - @override - String get previous => 'Nakaraan'; - - @override - String get next => 'Susunod'; - - @override - String get done => 'Tapos na'; - - @override - String get step_1 => 'Hakbang 1'; - - @override - String get first_go_to => 'Una, Pumunta sa'; - - @override - String get something_went_wrong => 'May nangyaring mali'; - - @override - String get piped_instance => 'Instance ng Piped Server'; - - @override - String get piped_description => - 'Ang instance ng Piped server na gagamitin para sa pagtutugma ng track'; - - @override - String get piped_warning => - 'Maaaring hindi gumagana nang mabuti ang ilan sa mga ito. Kaya gamitin sa sarili mong peligro'; - - @override - String get invidious_instance => 'Instance ng Invidious Server'; - - @override - String get invidious_description => - 'Ang instance ng Invidious server na gagamitin para sa pagtutugma ng track'; - - @override - String get invidious_warning => - 'Maaaring hindi gumagana nang mabuti ang ilan sa mga ito. Kaya gamitin sa sarili mong peligro'; - - @override - String get generate => 'Gumawa'; - - @override - String track_exists(Object track) { - return 'Ang Track na $track ay umiiral na'; - } - - @override - String get replace_downloaded_tracks => - 'Palitan ang lahat ng na-download na mga track'; - - @override - String get skip_download_tracks => - 'Laktawan ang pag-download ng lahat ng na-download na mga track'; - - @override - String get do_you_want_to_replace => - 'Gusto mo bang palitan ang umiiral na track??'; - - @override - String get replace => 'Palitan'; - - @override - String get skip => 'Laktawan'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Pumili ng hanggang $count $type'; - } - - @override - String get select_genres => 'Pumili ng mga Genre'; - - @override - String get add_genres => 'Magdagdag ng mga Genre'; - - @override - String get country => 'Bansa'; - - @override - String get number_of_tracks_generate => 'Bilang ng mga track na gagawin'; - - @override - String get acousticness => 'Acoustic-ness'; - - @override - String get danceability => 'Kakayahang Sayawin'; - - @override - String get energy => 'Enerhiya'; - - @override - String get instrumentalness => 'Instrumental-ness'; - - @override - String get liveness => 'Liveness'; - - @override - String get loudness => 'Lakas'; - - @override - String get speechiness => 'Pagsasalita'; - - @override - String get valence => 'Valence'; - - @override - String get popularity => 'Popularidad'; - - @override - String get key => 'Key'; - - @override - String get duration => 'Tagal (s)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mode'; - - @override - String get time_signature => 'Time Signature'; - - @override - String get short => 'Maikli'; - - @override - String get medium => 'Katamtaman'; - - @override - String get long => 'Mahaba'; - - @override - String get min => 'Min'; - - @override - String get max => 'Max'; - - @override - String get target => 'Target'; - - @override - String get moderate => 'Katamtaman'; - - @override - String get deselect_all => 'Alisin ang Pagkakapili sa Lahat'; - - @override - String get select_all => 'Piliin Lahat'; - - @override - String get are_you_sure => 'Sigurado ka ba?'; - - @override - String get generating_playlist => 'Gumagawa ng iyong custom na playlist...'; - - @override - String selected_count_tracks(Object count) { - return 'Napili ang $count na mga track'; - } - - @override - String get download_warning => - 'Kung nag-download ka ng lahat ng Track sa maramihan, malinaw na nagpa-pirate ka ng Musika at nagsasanhi ng pinsala sa creative society ng Musika. Sana ay alam mo ito. Palaging, subukang igalang at suportahan ang masipag na paggawa ng Artist'; - - @override - String get download_ip_ban_warning => - 'Sa nga pala, ang iyong IP ay maaaring ma-block sa YouTube dahil sa sobrang mga kahilingan sa pag-download kaysa sa karaniwan. Ang IP block ay nangangahulugang hindi mo magagamit ang YouTube (kahit na naka-log in ka) sa loob ng hindi bababa sa 2-3 buwan mula sa device na may IP na iyon. At hindi pinanghahawakan ng Spotube ang anumang responsibilidad kung mangyayari ito'; - - @override - String get by_clicking_accept_terms => - 'Sa pamamagitan ng pag-click sa \'tanggapin\', sumasang-ayon ka sa mga sumusunod na tuntunin:'; - - @override - String get download_agreement_1 => - 'Alam kong nagpa-pirate ako ng Musika. Masama ako'; - - @override - String get download_agreement_2 => - 'Susuportahan ko ang Artist saan man ako maaari at ginagawa ko lang ito dahil wala akong pera para bumili ng kanilang sining'; - - @override - String get download_agreement_3 => - 'Lubos kong nauunawaan na ang aking IP ay maaaring ma-block sa YouTube at hindi ko pinanghahawakan ang Spotube o ang kanyang mga may-ari/nag-ambag na responsable para sa anumang aksidente na sanhi ng aking kasalukuyang aksyon'; - - @override - String get decline => 'Tanggihan'; - - @override - String get accept => 'Tanggapin'; - - @override - String get details => 'Mga Detalye'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Channel'; - - @override - String get likes => 'Mga Like'; - - @override - String get dislikes => 'Mga Dislike'; - - @override - String get views => 'Mga View'; - - @override - String get streamUrl => 'Stream URL'; - - @override - String get stop => 'Ihinto'; - - @override - String get sort_newest => 'Ayusin ayon sa pinakabagong idinagdag'; - - @override - String get sort_oldest => 'Ayusin ayon sa pinakalumang idinagdag'; - - @override - String get sleep_timer => 'Sleep Timer'; - - @override - String mins(Object minutes) { - return '$minutes Minuto'; - } - - @override - String hours(Object hours) { - return '$hours Oras'; - } - - @override - String hour(Object hours) { - return '$hours Oras'; - } - - @override - String get custom_hours => 'Custom na Oras'; - - @override - String get logs => 'Mga Log'; - - @override - String get developers => 'Mga Developer'; - - @override - String get not_logged_in => 'Hindi ka naka-log in'; - - @override - String get search_mode => 'Mode ng Paghahanap'; - - @override - String get audio_source => 'Pinagmulan ng Audio'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Nabigong i-encrypt'; - - @override - String get encryption_failed_warning => - 'Gumagamit ng encryption ang Spotube para ligtas na i-store ang iyong data. Ngunit nabigo. Kaya babalik ito sa hindi secure na storage\nKung gumagamit ka ng linux, mangyaring tiyakin na mayroon kang anumang secret-service na naka-install (gnome-keyring, kde-wallet, keepassxc atbp)'; - - @override - String get querying_info => 'Kinukuha ang impormasyon...'; - - @override - String get piped_api_down => 'Ang Piped API ay hindi gumagana'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Ang instance ng Piped na $pipedInstance ay kasalukuyang hindi gumagana\n\nMaaari mong baguhin ang instance o baguhin ang \'Uri ng API\' sa opisyal na YouTube API\n\nSiguraduhing i-restart ang app pagkatapos ng pagbabago'; - } - - @override - String get you_are_offline => 'Kasalukuyan kang offline'; - - @override - String get connection_restored => - 'Naibalik na ang iyong koneksyon sa internet'; - - @override - String get use_system_title_bar => 'Gamitin ang title bar ng system'; - - @override - String get crunching_results => 'Pinaproseso ang mga resulta...'; - - @override - String get search_to_get_results => 'Maghanap para makakuha ng mga resulta'; - - @override - String get use_amoled_mode => 'Matingkad na itim na madilim na tema'; - - @override - String get pitch_dark_theme => 'AMOLED Mode'; - - @override - String get normalize_audio => 'I-normalize ang audio'; - - @override - String get change_cover => 'Baguhin ang cover'; - - @override - String get add_cover => 'Magdagdag ng cover'; - - @override - String get restore_defaults => 'Ibalik ang mga default'; - - @override - String get download_music_format => 'I-download na format ng musika'; - - @override - String get streaming_music_format => 'Format ng streaming ng musika'; - - @override - String get download_music_quality => 'Kalidad ng i-download na musika'; - - @override - String get streaming_music_quality => 'Kalidad ng streaming ng musika'; - - @override - String get login_with_lastfm => 'Mag-login gamit ang Last.fm'; - - @override - String get connect => 'Kumonekta'; - - @override - String get disconnect_lastfm => 'Idiskonekta ang Last.fm'; - - @override - String get disconnect => 'Idiskonekta'; - - @override - String get username => 'Username'; - - @override - String get password => 'Password'; - - @override - String get login => 'Mag-login'; - - @override - String get login_with_your_lastfm => - 'Mag-login gamit ang iyong Last.fm account'; - - @override - String get scrobble_to_lastfm => 'I-scrobble sa Last.fm'; - - @override - String get go_to_album => 'Pumunta sa Album'; - - @override - String get discord_rich_presence => 'Discord Rich Presence'; - - @override - String get browse_all => 'I-browse Lahat'; - - @override - String get genres => 'Mga Genre'; - - @override - String get explore_genres => 'Tuklasin ang mga Genre'; - - @override - String get friends => 'Mga Kaibigan'; - - @override - String get no_lyrics_available => - 'Paumanhin, hindi mahanap ang lyrics para sa track na ito'; - - @override - String get start_a_radio => 'Magsimula ng Radio'; - - @override - String get how_to_start_radio => 'Paano mo gustong simulan ang radio?'; - - @override - String get replace_queue_question => - 'Gusto mo bang palitan ang kasalukuyang pila o idagdag dito?'; - - @override - String get endless_playback => 'Walang Hanggang Playback'; - - @override - String get delete_playlist => 'Burahin ang Playlist'; - - @override - String get delete_playlist_confirmation => - 'Sigurado ka bang gusto mong burahin ang playlist na ito?'; - - @override - String get local_tracks => 'Mga Lokal na Track'; - - @override - String get local_tab => 'Lokal'; - - @override - String get song_link => 'Link ng Kanta'; - - @override - String get skip_this_nonsense => 'Laktawan ang kalokohan na ito'; - - @override - String get freedom_of_music => '\"Kalayaan ng Musika\"'; - - @override - String get freedom_of_music_palm => '\"Kalayaan ng Musika sa iyong palad\"'; - - @override - String get get_started => 'Magsimula na tayo'; - - @override - String get youtube_source_description => - 'Inirerekomenda at pinakamahusay na gumagana.'; - - @override - String get piped_source_description => - 'Gusto ng kalayaan? Kapareho ng YouTube ngunit mas malaya.'; - - @override - String get jiosaavn_source_description => - 'Pinakamahusay para sa rehiyon ng South Asia.'; - - @override - String get invidious_source_description => - 'Katulad ng Piped ngunit may mas mataas na availability.'; - - @override - String highest_quality(Object quality) { - return 'Pinakamataas na Kalidad: $quality'; - } - - @override - String get select_audio_source => 'Pumili ng Pinagmulan ng Audio'; - - @override - String get endless_playback_description => - 'Awtomatikong magdagdag ng mga bagong kanta\nsa dulo ng pila'; - - @override - String get choose_your_region => 'Piliin ang iyong rehiyon'; - - @override - String get choose_your_region_description => - 'Ito ay tutulong sa Spotube na ipakita sa iyo ang tamang content\npara sa iyong lokasyon.'; - - @override - String get choose_your_language => 'Piliin ang iyong wika'; - - @override - String get help_project_grow => 'Tulungan ang proyektong ito na lumago'; - - @override - String get help_project_grow_description => - 'Ang Spotube ay isang open-source na proyekto. Maaari mong tulungan ang proyektong ito na lumago sa pamamagitan ng pag-contribute sa proyekto, pag-ulat ng mga bug, o pagmungkahi ng mga bagong feature.'; - - @override - String get contribute_on_github => 'Mag-contribute sa GitHub'; - - @override - String get donate_on_open_collective => 'Mag-donate sa Open Collective'; - - @override - String get browse_anonymously => 'Mag-browse nang Anonymous'; - - @override - String get enable_connect => 'I-enable ang Connect'; - - @override - String get enable_connect_description => - 'Kontrolin ang Spotube mula sa ibang mga device'; - - @override - String get devices => 'Mga Device'; - - @override - String get select => 'Pumili'; - - @override - String connect_client_alert(Object client) { - return 'Ikaw ay kontrolado ng $client'; - } - - @override - String get this_device => 'Ang Device na ito'; - - @override - String get remote => 'Remote'; - - @override - String get stats => 'Mga Stat'; - - @override - String and_n_more(Object count) { - return 'at $count pa'; - } - - @override - String get recently_played => 'Kamakailan Lang na Ni-play'; - - @override - String get browse_more => 'Mag-browse pa'; - - @override - String get no_title => 'Walang Pamagat'; - - @override - String get not_playing => 'Hindi tumutugtog'; - - @override - String get epic_failure => 'Epic na pagkabigo!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Nagdagdag ng $tracks_length na mga track sa pila'; - } - - @override - String get spotube_has_an_update => 'Ang Spotube ay may update'; - - @override - String get download_now => 'I-download Ngayon'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Ang Spotube Nightly $nightlyBuildNum ay inilabas na'; - } - - @override - String release_version(Object version) { - return 'Ang Spotube v$version ay inilabas na'; - } - - @override - String get read_the_latest => 'Basahin ang pinakabagong '; - - @override - String get release_notes => 'release notes'; - - @override - String get pick_color_scheme => 'Pumili ng color scheme'; - - @override - String get save => 'I-save'; - - @override - String get choose_the_device => 'Piliin ang device:'; - - @override - String get multiple_device_connected => - 'Mayroong maraming device na nakakonekta.\nPiliin ang device kung saan mo gustong maganap ang aksyon na ito'; - - @override - String get nothing_found => 'Walang nahanap'; - - @override - String get the_box_is_empty => 'Ang kahon ay walang laman'; - - @override - String get top_artists => 'Nangungunang mga Artista'; - - @override - String get top_albums => 'Nangungunang mga Album'; - - @override - String get this_week => 'Ngayong linggo'; - - @override - String get this_month => 'Ngayong buwan'; - - @override - String get last_6_months => 'Nakaraang 6 na buwan'; - - @override - String get this_year => 'Ngayong taon'; - - @override - String get last_2_years => 'Nakaraang 2 taon'; - - @override - String get all_time => 'Lahat ng panahon'; - - @override - String powered_by_provider(Object providerName) { - return 'Pinapagana ng $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Mga Tagasunod'; - - @override - String get birthday => 'Kaarawan'; - - @override - String get subscription => 'Subscription'; - - @override - String get not_born => 'Hindi pa ipinanganak'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profile'; - - @override - String get no_name => 'Walang Pangalan'; - - @override - String get edit => 'I-edit'; - - @override - String get user_profile => 'Profile ng User'; - - @override - String count_plays(Object count) { - return '$count na mga play'; - } - - @override - String get streaming_fees_hypothetical => - 'Mga bayarin sa streaming (hypothetical)'; - - @override - String get minutes_listened => 'Mga minutong pinapakinggan'; - - @override - String get streamed_songs => 'Mga na-stream na kanta'; - - @override - String count_streams(Object count) { - return '$count na mga stream'; - } - - @override - String get owned_by_you => 'Pag-aari mo'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return 'Na-kopya ang $shareUrl sa clipboard'; - } - - @override - String get hipotetical_calculation => - '*Ito ay kinakalkula batay sa average na payout ng online music streaming platform na \$0.003 hanggang \$0.005 kada stream. Ito ay isang hypothetical na kalkulasyon upang bigyan ang user ng insight kung magkano ang babayaran nila sa mga artist kung sakaling makinig sila ng kanilang kanta sa iba\'t ibang music streaming platform.'; - - @override - String count_mins(Object minutes) { - return '$minutes minuto'; - } - - @override - String get summary_minutes => 'minuto'; - - @override - String get summary_listened_to_music => 'Nakinig sa musika'; - - @override - String get summary_songs => 'mga kanta'; - - @override - String get summary_streamed_overall => 'Na-stream sa kabuuan'; - - @override - String get summary_owed_to_artists => 'Utang sa mga artista\nngayong buwan'; - - @override - String get summary_artists => 'artista'; - - @override - String get summary_music_reached_you => 'Umabot sa iyo ang musika'; - - @override - String get summary_full_albums => 'buong album'; - - @override - String get summary_got_your_love => 'Nakuha ang iyong pagmamahal'; - - @override - String get summary_playlists => 'mga playlist'; - - @override - String get summary_were_on_repeat => 'Pinu-playlst muli'; - - @override - String total_money(Object money) { - return 'Kabuuang $money'; - } - - @override - String get webview_not_found => 'Hindi nahanap ang Webview'; - - @override - String get webview_not_found_description => - 'Walang webview runtime na naka-install sa iyong device.\nKung naka-install ito, siguraduhing nasa Environment PATH\n\nPagkatapos mag-install, i-restart ang app'; - - @override - String get unsupported_platform => 'Hindi suportadong platform'; - - @override - String get cache_music => 'I-cache ang musika'; - - @override - String get open => 'Buksan'; - - @override - String get cache_folder => 'Folder ng cache'; - - @override - String get export => 'I-export'; - - @override - String get clear_cache => 'Burahin ang cache'; - - @override - String get clear_cache_confirmation => 'Gusto mo bang burahin ang cache?'; - - @override - String get export_cache_files => 'I-export ang mga Naka-cache na File'; - - @override - String found_n_files(Object count) { - return 'Nahanap ang $count na mga file'; - } - - @override - String get export_cache_confirmation => - 'Gusto mo bang i-export ang mga file na ito sa'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Na-export ang $filesExported mula sa $files na mga file'; - } - - @override - String get undo => 'I-undo'; - - @override - String get download_all => 'I-download lahat'; - - @override - String get add_all_to_playlist => 'Idagdag lahat sa playlist'; - - @override - String get add_all_to_queue => 'Idagdag lahat sa pila'; - - @override - String get play_all_next => 'I-play lahat susunod'; - - @override - String get pause => 'Pause'; - - @override - String get view_all => 'Tingnan lahat'; - - @override - String get no_tracks_added_yet => - 'Mukhang wala ka pang idinaragdag na mga track'; - - @override - String get no_tracks => 'Mukhang walang mga track dito'; - - @override - String get no_tracks_listened_yet => 'Mukhang wala ka pang pinakikinggan'; - - @override - String get not_following_artists => - 'Hindi ka sumusunod sa anumang mga artista'; - - @override - String get no_favorite_albums_yet => - 'Mukhang wala ka pang idinagdag na anumang mga album sa iyong mga paborito'; - - @override - String get no_logs_found => 'Walang nahanap na mga log'; - - @override - String get youtube_engine => 'YouTube Engine'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return 'Hindi naka-install ang $engine'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return 'Hindi naka-install ang $engine sa iyong sistema.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Siguraduhing available ito sa PATH variable o\ni-set ang absolute path sa $engine executable sa ibaba'; - } - - @override - String get youtube_engine_unix_issue_message => - 'Sa macOS/Linux/unix tulad ng OS, ang pag-set ng path sa .zshrc/.bashrc/.bash_profile atbp. ay hindi gagana.\nKailangan mong i-set ang path sa configuration file ng shell'; - - @override - String get download => 'I-download'; - - @override - String get file_not_found => 'Hindi nahanap ang file'; - - @override - String get custom => 'Custom'; - - @override - String get add_custom_url => 'Magdagdag ng custom URL'; - - @override - String get edit_port => 'I-edit ang port'; - - @override - String get port_helper_msg => - 'Ang default ay -1 na nagpapahiwatig ng random na numero. Kung na-configure mo ang firewall, inirerekomenda na itakda ito.'; - - @override - String connect_request(Object client) { - return 'Payagan ang $client na kumonekta?'; - } - - @override - String get connection_request_denied => - 'Tanggihan ang koneksyon. Tinanggihan ng gumagamit ang pag-access.'; - - @override - String get an_error_occurred => 'May naganap na error'; - - @override - String get copy_to_clipboard => 'Kopyahin sa clipboard'; - - @override - String get view_logs => 'Tingnan ang mga log'; - - @override - String get retry => 'Subukang muli'; - - @override - String get no_default_metadata_provider_selected => - 'Wala kang nakatakdang default na metadata provider'; - - @override - String get manage_metadata_providers => - 'Pamahalaan ang mga metadata provider'; - - @override - String get open_link_in_browser => 'Buksan ang Link sa Browser?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Gusto mo bang buksan ang sumusunod na link'; - - @override - String get unsafe_url_warning => - 'Maaaring hindi ligtas ang pagbukas ng mga link mula sa hindi pinagkakatiwalaang pinagmulan. Mag-ingat!\nMaaari mo ring kopyahin ang link sa iyong clipboard.'; - - @override - String get copy_link => 'Kopyahin ang Link'; - - @override - String get building_your_timeline => - 'Binubuo ang iyong timeline batay sa iyong mga pinakinggan...'; - - @override - String get official => 'Opisyal'; - - @override - String author_name(Object author) { - return 'May-akda: $author'; - } - - @override - String get third_party => 'Third-party'; - - @override - String get plugin_requires_authentication => - 'Nangangailangan ng authentication ang plugin'; - - @override - String get update_available => 'May available na update'; - - @override - String get supports_scrobbling => 'Sinusuportahan ang scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Sinis-scrobble ng plugin na ito ang iyong musika upang mabuo ang iyong kasaysayan ng pakikinig.'; - - @override - String get default_metadata_source => 'Default na pinagmulan ng metadata'; - - @override - String get set_default_metadata_source => - 'Itakda ang default na pinagmulan ng metadata'; - - @override - String get default_audio_source => 'Default na pinagmulan ng audio'; - - @override - String get set_default_audio_source => - 'Itakda ang default na pinagmulan ng audio'; - - @override - String get set_default => 'Itakda bilang default'; - - @override - String get support => 'Suporta'; - - @override - String get support_plugin_development => 'Suportahan ang pagbuo ng plugin'; - - @override - String can_access_name_api(Object name) { - return '- Maaaring i-access ang **$name** API'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Gusto mo bang i-install ang plugin na ito?'; - - @override - String get third_party_plugin_warning => - 'Ang plugin na ito ay mula sa third-party na repository. Mangyaring tiyakin na pinagkakatiwalaan mo ang pinagmulan bago mag-install.'; - - @override - String get author => 'May-akda'; - - @override - String get this_plugin_can_do_following => - 'Maaaring gawin ng plugin na ito ang sumusunod'; - - @override - String get install => 'I-install'; - - @override - String get install_a_metadata_provider => 'Mag-install ng Metadata Provider'; - - @override - String get no_tracks_playing => 'Walang Track na kasalukuyang tumutugtog'; - - @override - String get synced_lyrics_not_available => - 'Hindi available ang mga naka-sync na lyrics para sa kantang ito. Mangyaring gamitin ang'; - - @override - String get plain_lyrics => 'Simpleng Lyrics'; - - @override - String get tab_instead => 'na tab sa halip.'; - - @override - String get disclaimer => 'Disclaimer'; - - @override - String get third_party_plugin_dmca_notice => - 'Ang Spotube team ay walang hawak na anumang responsibilidad (kabilang ang legal) para sa anumang \"Third-party\" plugins.\nMangyaring gamitin ang mga ito sa iyong sariling peligro. Para sa anumang mga bug/isyu, mangyaring iulat ang mga ito sa repository ng plugin.\n\nKung ang anumang \"Third-party\" plugin ay lumalabag sa ToS/DMCA ng anumang serbisyo/legal na entity, mangyaring hilingin sa \"Third-party\" plugin author o sa hosting platform e.g. GitHub/Codeberg na gumawa ng aksyon. Ang nakalista sa itaas (\"Third-party\" na may label) ay lahat ng pampubliko/komunidad na pinananatiling mga plugin. Hindi namin sila kinukurusado, kaya hindi kami makakagawa ng anumang aksyon sa kanila.\n\n'; - - @override - String get input_does_not_match_format => - 'Ang input ay hindi tumutugma sa kinakailangang format'; - - @override - String get plugins => 'Mga plugin'; - - @override - String get paste_plugin_download_url => - 'I-paste ang download url o GitHub/Codeberg repo url o direktang link sa .smplug file'; - - @override - String get download_and_install_plugin_from_url => - 'I-download at i-install ang plugin mula sa url'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Nabigo ang pagdagdag ng plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'I-upload ang plugin mula sa file'; - - @override - String get installed => 'Naka-install'; - - @override - String get available_plugins => 'Mga available na plugin'; - - @override - String get configure_plugins => - 'I-configure ang sarili mong metadata provider at mga audio source plugin'; - - @override - String get audio_scrobblers => 'Mga Audio Scrobbler'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Pinagmulan: '; - - @override - String get uncompressed => 'Hindi naka-compress'; - - @override - String get dab_music_source_description => - 'Para sa mga audiophile. Nagbibigay ng de-kalidad/walang loss na audio streams. Tumpak na pagtutugma ng track batay sa ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_tr.dart b/lib/l10n/generated/app_localizations_tr.dart deleted file mode 100644 index c2280f47..00000000 --- a/lib/l10n/generated/app_localizations_tr.dart +++ /dev/null @@ -1,1573 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Turkish (`tr`). -class AppLocalizationsTr extends AppLocalizations { - AppLocalizationsTr([String locale = 'tr']) : super(locale); - - @override - String get guest => 'Misafir'; - - @override - String get browse => 'Göz at'; - - @override - String get search => 'Ara'; - - @override - String get library => 'Kütüphane'; - - @override - String get lyrics => 'Şarkı sözleri'; - - @override - String get settings => 'Ayarlar'; - - @override - String get genre_categories_filter => - 'Kategorileri veya türleri filtreleyin...'; - - @override - String get genre => 'Tür'; - - @override - String get personalized => 'Kişiselleştirilmiş'; - - @override - String get featured => 'Öne çıkanlar'; - - @override - String get new_releases => 'Yeni çıkanlar'; - - @override - String get songs => 'Şarkılar'; - - @override - String playing_track(Object track) { - return '$track oynatılıyor'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Bu, mevcut kuyruğu temizleyecektir. $track_length parça kaldırılacak\nDevam etmek istiyor musunuz?'; - } - - @override - String get load_more => 'Daha fazlasını yükle'; - - @override - String get playlists => 'Oynatma listeleri'; - - @override - String get artists => 'Sanatçılar'; - - @override - String get albums => 'Albümler'; - - @override - String get tracks => 'Parçalar'; - - @override - String get downloads => 'İndirilenler'; - - @override - String get filter_playlists => 'Oynatma listelerinizi filtreleyin...'; - - @override - String get liked_tracks => 'Beğenilen parçalar'; - - @override - String get liked_tracks_description => 'Beğendiğiniz tüm parçalar'; - - @override - String get playlist => 'Çalma Listesi'; - - @override - String get create_a_playlist => 'Bir oynatma listesi oluştur'; - - @override - String get update_playlist => 'Oynatma listesini güncelle'; - - @override - String get create => 'Oluştur'; - - @override - String get cancel => 'İptal'; - - @override - String get update => 'Güncelle'; - - @override - String get playlist_name => 'Oynatma listesi adı'; - - @override - String get name_of_playlist => 'Oynatma listesinin adı'; - - @override - String get description => 'Açıklama'; - - @override - String get public => 'Halka açık'; - - @override - String get collaborative => 'İşbirliği'; - - @override - String get search_local_tracks => 'Yerel parçaları ara...'; - - @override - String get play => 'Oynat'; - - @override - String get delete => 'Sil'; - - @override - String get none => 'Yok'; - - @override - String get sort_a_z => 'A - Z\'ye göre sırala'; - - @override - String get sort_z_a => 'Z - A\'ya göre sırala'; - - @override - String get sort_artist => 'Sanatçıya göre sırala'; - - @override - String get sort_album => 'Albüme göre sırala'; - - @override - String get sort_duration => 'Süreye göre sırala'; - - @override - String get sort_tracks => 'Parçaları sırala'; - - @override - String currently_downloading(Object tracks_length) { - return 'Şu anda indirilenler ($tracks_length)'; - } - - @override - String get cancel_all => 'Tümünü iptal et'; - - @override - String get filter_artist => 'Sanatçıları filtreleyin...'; - - @override - String followers(Object followers) { - return '$followers Takipçiler'; - } - - @override - String get add_artist_to_blacklist => 'Sanatçıyı kara listeye ekle'; - - @override - String get top_tracks => 'En iyi parçalar'; - - @override - String get fans_also_like => 'Hayranlar ayrıca şunları da beğendi'; - - @override - String get loading => 'Yükleniyor...'; - - @override - String get artist => 'Sanatçı'; - - @override - String get blacklisted => 'Kara listeye alındı'; - - @override - String get following => 'Takip ediliyor'; - - @override - String get follow => 'Takip et'; - - @override - String get artist_url_copied => 'Sanatçı bağlantısı panoya kopyalandı'; - - @override - String added_to_queue(Object tracks) { - return 'Kuyruğa $tracks parçası eklendi'; - } - - @override - String get filter_albums => 'Albümleri filtreleyin...'; - - @override - String get synced => 'Senkronize edildi'; - - @override - String get plain => 'Sade'; - - @override - String get shuffle => 'Karıştır'; - - @override - String get search_tracks => 'Parça ara...'; - - @override - String get released => 'Yayınlandı'; - - @override - String error(Object error) { - return 'Hata $error'; - } - - @override - String get title => 'Başlık'; - - @override - String get time => 'Zaman'; - - @override - String get more_actions => 'Daha fazla eylem'; - - @override - String download_count(Object count) { - return 'İndir ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Oynatma Listesine ekle ($count)'; - } - - @override - String add_count_to_queue(Object count) { - return 'Kuyruğa ekle ($count)'; - } - - @override - String play_count_next(Object count) { - return 'Sonrakini oynat ($count)'; - } - - @override - String get album => 'Albüm'; - - @override - String copied_to_clipboard(Object data) { - return '$data panoya kopyalandı'; - } - - @override - String add_to_following_playlists(Object track) { - return '$track parçasını aşağıdaki oynatma listelerine ekle'; - } - - @override - String get add => 'Ekle'; - - @override - String added_track_to_queue(Object track) { - return '$track kuyruğa eklendi'; - } - - @override - String get add_to_queue => 'Kuyruğa ekle'; - - @override - String track_will_play_next(Object track) { - return '$track bir sonraki çalacak'; - } - - @override - String get play_next => 'Sonrakini oynat'; - - @override - String removed_track_from_queue(Object track) { - return '$track kuyruktan kaldırıldı'; - } - - @override - String get remove_from_queue => 'Kuyruktan kaldır'; - - @override - String get remove_from_favorites => 'Favorilerden kaldır'; - - @override - String get save_as_favorite => 'Favori olarak kaydet'; - - @override - String get add_to_playlist => 'Oynatma listesine ekle'; - - @override - String get remove_from_playlist => 'Oynatma listesinden kaldır'; - - @override - String get add_to_blacklist => 'Kara listeye ekle'; - - @override - String get remove_from_blacklist => 'Kara listeden kaldır'; - - @override - String get share => 'Paylaş'; - - @override - String get mini_player => 'Mini oynatıcı'; - - @override - String get slide_to_seek => 'İleri veya geri arama yapmak için kaydırın'; - - @override - String get shuffle_playlist => 'Oynatma listesini karıştır'; - - @override - String get unshuffle_playlist => 'Oynatma listesinin karışıklığını kaldır'; - - @override - String get previous_track => 'Önceki parça'; - - @override - String get next_track => 'Sonraki parça'; - - @override - String get pause_playback => 'Oynatmayı duraklat'; - - @override - String get resume_playback => 'Oynatmayı sürdür'; - - @override - String get loop_track => 'Döngü parçası'; - - @override - String get no_loop => 'Dönüş Yok'; - - @override - String get repeat_playlist => 'Oynatma listesini tekrarla'; - - @override - String get queue => 'Kuyruk'; - - @override - String get alternative_track_sources => 'Alternatif parça kaynakları'; - - @override - String get download_track => 'Parçayı indir'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks parça kuyrukta'; - } - - @override - String get clear_all => 'Tümünü temizle'; - - @override - String get show_hide_ui_on_hover => - 'Fareyle üzerine gelindiğinde kullanıcı arayüzünü göster/gizle'; - - @override - String get always_on_top => 'Her zaman üstte'; - - @override - String get exit_mini_player => 'Mini oynatıcıdan çık'; - - @override - String get download_location => 'İndirme konumu'; - - @override - String get local_library => 'Yerel kütüphane'; - - @override - String get add_library_location => 'Kütüphaneye ekle'; - - @override - String get remove_library_location => 'Kütüphaneden çıkar'; - - @override - String get account => 'Hesap'; - - @override - String get logout => 'Çıkış yap'; - - @override - String get logout_of_this_account => 'Hesaptan çıkış yap'; - - @override - String get language_region => 'Dil ve bölge'; - - @override - String get language => 'Tercih edilen dil'; - - @override - String get system_default => 'Sistem varsayılanı'; - - @override - String get market_place_region => 'Tercih edilen bölge'; - - @override - String get recommendation_country => 'Tavsiye edilen ülke'; - - @override - String get appearance => 'Görünüm'; - - @override - String get layout_mode => 'Düzen modu'; - - @override - String get override_layout_settings => - 'Duyarlı düzen modu ayarlarını geçersiz kıl'; - - @override - String get adaptive => 'Uyarlanabilir'; - - @override - String get compact => 'Sıkıştırılmış'; - - @override - String get extended => 'Genişletilmiş'; - - @override - String get theme => 'Tema'; - - @override - String get dark => 'Koyu'; - - @override - String get light => 'Açık'; - - @override - String get system => 'Sistem'; - - @override - String get accent_color => 'Vurgu rengi'; - - @override - String get sync_album_color => 'Albüm rengini senkronize et'; - - @override - String get sync_album_color_description => - 'Vurgu rengi olarak albüm resminin baskın rengini kullanır'; - - @override - String get playback => 'Oynatma'; - - @override - String get audio_quality => 'Ses kalitesi'; - - @override - String get high => 'Yüksek'; - - @override - String get low => 'Düşük'; - - @override - String get pre_download_play => 'Önceden indir ve oynat'; - - @override - String get pre_download_play_description => - 'Ses akışı yerine baytları indir ve oynat (Daha yüksek bant genişliğine sahip kullanıcılar için önerilir)'; - - @override - String get skip_non_music => 'Müzik olmayan bölümleri atlat (SponsorBlock)'; - - @override - String get blacklist_description => - 'Kara listeye alınan parçalar ve sanatçılar'; - - @override - String get wait_for_download_to_finish => - 'Lütfen mevcut indirme işleminin tamamlanmasını bekleyin'; - - @override - String get desktop => 'Masaüstü'; - - @override - String get close_behavior => 'Kapatma davranışı'; - - @override - String get close => 'Kapat'; - - @override - String get minimize_to_tray => 'Tepsiye küçült'; - - @override - String get show_tray_icon => 'Sistem tepsisi simgesini göster'; - - @override - String get about => 'Hakkında'; - - @override - String get u_love_spotube => 'Spotube\'u sevdiğinizi biliyoruz'; - - @override - String get check_for_updates => 'Güncellemeleri kontrol et'; - - @override - String get about_spotube => 'Spotube hakkında'; - - @override - String get blacklist => 'Kara liste'; - - @override - String get please_sponsor => 'Sponsor Ol/Bağış Yap'; - - @override - String get spotube_description => - 'Spotube, hafif, platformlar arası uyumlu ve herkes için ücretsiz bir Spotify istemcisidir.'; - - @override - String get version => 'Sürüm'; - - @override - String get build_number => 'Derleme numarası'; - - @override - String get founder => 'Geliştirici'; - - @override - String get repository => 'Depo'; - - @override - String get bug_issues => 'Hata + Sorunlar'; - - @override - String get made_with => '❤️ ile Bangladeş\'te yapıldı'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Lisans'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Endişelenmeyin, kimlik bilgilerinizden hiçbiri toplanmayacak veya kimseyle paylaşılmayacak'; - - @override - String get know_how_to_login => 'Bunu nasıl yapacağınızı bilmiyor musunuz?'; - - @override - String get follow_step_by_step_guide => 'Adım adım kılavuzu takip edin'; - - @override - String cookie_name_cookie(Object name) { - return '$name çerezi'; - } - - @override - String get fill_in_all_fields => 'Lütfen tüm alanları doldurun'; - - @override - String get submit => 'Başvur'; - - @override - String get exit => 'Çık'; - - @override - String get previous => 'Önceki'; - - @override - String get next => 'Sonraki'; - - @override - String get done => 'Bitti'; - - @override - String get step_1 => '1. Adım'; - - @override - String get first_go_to => 'İlk olarak şuraya gidin:'; - - @override - String get something_went_wrong => 'Bir hata oluştu'; - - @override - String get piped_instance => 'Piped sunucu örneği'; - - @override - String get piped_description => - 'Parça eşleştirme için kullanılacak Piped sunucu örneği'; - - @override - String get piped_warning => - 'Bazıları iyi çalışmayabilir. Yani riski size ait olmak üzere kullanın'; - - @override - String get invidious_instance => 'Invidious Sunucu Örneği'; - - @override - String get invidious_description => - 'Parça eşleştirmesi için kullanılacak Invidious sunucu örneği'; - - @override - String get invidious_warning => - 'Bazıları iyi çalışmayabilir. Kendi riskinizde kullanın'; - - @override - String get generate => 'Oluştur'; - - @override - String track_exists(Object track) { - return '$track parçası zaten var'; - } - - @override - String get replace_downloaded_tracks => 'İndirilen tüm parçaları değiştir'; - - @override - String get skip_download_tracks => 'İndirilen tüm parçaları indirmeyi atla'; - - @override - String get do_you_want_to_replace => - 'Mevcut parçayı değiştirmek istiyor musunuz?'; - - @override - String get replace => 'Değiştir'; - - @override - String get skip => 'Atla'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'En fazla $count $type seçin'; - } - - @override - String get select_genres => 'Türleri seç'; - - @override - String get add_genres => 'Tür ekle'; - - @override - String get country => 'Ülke'; - - @override - String get number_of_tracks_generate => 'Oluşturulacak parça sayısı'; - - @override - String get acousticness => 'Akustiklik'; - - @override - String get danceability => 'Dans Edilebilirlik'; - - @override - String get energy => 'Enerji'; - - @override - String get instrumentalness => 'Araçsallık'; - - @override - String get liveness => 'Canlılık'; - - @override - String get loudness => 'Ses yüksekliği'; - - @override - String get speechiness => 'Konuşkanlık'; - - @override - String get valence => 'Değerlik'; - - @override - String get popularity => 'Popülerlik'; - - @override - String get key => 'Anahtar'; - - @override - String get duration => 'Süre (sn)'; - - @override - String get tempo => 'Tempo (BPM)'; - - @override - String get mode => 'Mod'; - - @override - String get time_signature => 'Zaman imzası'; - - @override - String get short => 'Kısa'; - - @override - String get medium => 'Orta'; - - @override - String get long => 'Uzun'; - - @override - String get min => 'Min'; - - @override - String get max => 'Maks'; - - @override - String get target => 'Hedef'; - - @override - String get moderate => 'Orta'; - - @override - String get deselect_all => 'Tüm seçimleri kaldır'; - - @override - String get select_all => 'Tümünü seç'; - - @override - String get are_you_sure => 'Emin misiniz?'; - - @override - String get generating_playlist => 'Özel oynatma listeniz oluşturuluyor...'; - - @override - String selected_count_tracks(Object count) { - return '$count parça seçildi'; - } - - @override - String get download_warning => - 'Tüm şarkıları toplu olarak indiriyorsanız, açıkça müzik korsanlığı yapıyorsunuz ve müzik dünyasının yaratıcı topluluğuna zarar veriyorsunuz demektir. Umuyorum bunun farkındasınızdır. Her zaman, sanatçıların emeğine saygı göstermeyi ve desteklemeyi deneyin.'; - - @override - String get download_ip_ban_warning => - 'Ayrıca, normalden fazla indirme istekleri nedeniyle YouTube\'da IP\'niz engellenebilir. IP engeli, en az 2-3 ay boyunca YouTube\'u (hatta oturum açmış olsanız bile) o IP cihazından kullanamayacağınız anlamına gelir. Ve eğer böyle bir durum yaşanırsa, Spotube bundan hiçbir sorumluluk kabul etmez.'; - - @override - String get by_clicking_accept_terms => - '\"Kabul et\" e tıklayarak aşağıdaki şartları kabul etmiş olursunuz:'; - - @override - String get download_agreement_1 => - 'Müzik korsanlığı yaptığımı biliyorum. Ben fakir biriyim.'; - - @override - String get download_agreement_2 => - 'Sanatçıyı elimden geldiğince destekleyeceğim ve bunu sadece sanatını satın alacak param olmadığı için yapıyorum'; - - @override - String get download_agreement_3 => - 'YouTube\'da IP\'min engellenebileceğinin tamamen farkındayım ve mevcut eylemlerimden kaynaklanan herhangi bir kaza için Spotube\'u veya sahiplerini/katkıda bulunanları sorumlu tutmuyorum.'; - - @override - String get decline => 'Reddet'; - - @override - String get accept => 'Kabul et'; - - @override - String get details => 'Detaylar'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kanal'; - - @override - String get likes => 'Beğenenler'; - - @override - String get dislikes => 'Beğenmeyenler'; - - @override - String get views => 'İzlenmeler'; - - @override - String get streamUrl => 'Akış bağlantısı'; - - @override - String get stop => 'Durdur'; - - @override - String get sort_newest => 'En yeni eklenene göre sırala.'; - - @override - String get sort_oldest => 'En eski eklenene göre sırala'; - - @override - String get sleep_timer => 'Uyku Zamanlayıcısı'; - - @override - String mins(Object minutes) { - return '$minutes Dakika'; - } - - @override - String hours(Object hours) { - return '$hours Saatler'; - } - - @override - String hour(Object hours) { - return '$hours Saat'; - } - - @override - String get custom_hours => 'Özel Saatler'; - - @override - String get logs => 'Günlükler'; - - @override - String get developers => 'Geliştiriciler'; - - @override - String get not_logged_in => 'Giriş yapmadınız'; - - @override - String get search_mode => 'Arama modu'; - - @override - String get audio_source => 'Ses kaynağı'; - - @override - String get ok => 'Tamam'; - - @override - String get failed_to_encrypt => 'Şifreleme başarısız oldu'; - - @override - String get encryption_failed_warning => - 'Spotube, verilerinizi güvenli bir şekilde depolamak için şifreleme kullanır. Ancak bunu başaramadı. Bu nedenle, güvensiz depolamaya geri dönecektir\nLinux kullanıyorsanız, lütfen gnome-keyring, kde-wallet, keepassxc vb. herhangi bir gizli servisin yüklü olduğundan emin olun.'; - - @override - String get querying_info => 'Bilgi sorgulanıyor...'; - - @override - String get piped_api_down => 'Piped API kapalı'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Piped örneği $pipedInstance şu anda kapalı\n\nÖrneği değiştirin veya \'API türünü\' resmi YouTube API\'si olarak değiştirin\n\nDeğişiklikten sonra uygulamayı yeniden başlattığınızdan emin olun'; - } - - @override - String get you_are_offline => 'Şu anda çevrimdışısınız'; - - @override - String get connection_restored => 'İnternet bağlantınız geri yüklendi'; - - @override - String get use_system_title_bar => 'Sistem başlık çubuğunu kullan'; - - @override - String get crunching_results => 'Sonuçlar...'; - - @override - String get search_to_get_results => 'Sonuç almak için arayın'; - - @override - String get use_amoled_mode => 'AMOLED modu kullan'; - - @override - String get pitch_dark_theme => 'Zifiri karanlık koyu tema'; - - @override - String get normalize_audio => 'Sesi normalleştir'; - - @override - String get change_cover => 'Kapağı değiştir'; - - @override - String get add_cover => 'Kapak ekle'; - - @override - String get restore_defaults => 'Varsayılanları geri yükle'; - - @override - String get download_music_format => 'Müzik indirme formatı'; - - @override - String get streaming_music_format => 'Müzik akış formatı'; - - @override - String get download_music_quality => 'İndirilen müzik kalitesi'; - - @override - String get streaming_music_quality => 'Yayınlanan müzik kalitesi'; - - @override - String get login_with_lastfm => 'Last.fm ile giriş yap'; - - @override - String get connect => 'Bağlan'; - - @override - String get disconnect_lastfm => 'Last.fm bağlantısını kes'; - - @override - String get disconnect => 'Bağlantıyı kes'; - - @override - String get username => 'Kullanıcı adı'; - - @override - String get password => 'Şifre'; - - @override - String get login => 'Giriş yap'; - - @override - String get login_with_your_lastfm => 'Last.fm hesabınızla giriş yapın'; - - @override - String get scrobble_to_lastfm => 'Last.fm için Scrobble'; - - @override - String get go_to_album => 'Albüme git'; - - @override - String get discord_rich_presence => 'Discord zengin varlığı'; - - @override - String get browse_all => 'Tümüne göz at'; - - @override - String get genres => 'Müzik türleri'; - - @override - String get explore_genres => 'Türleri keşfet'; - - @override - String get friends => 'Arkadaşlar'; - - @override - String get no_lyrics_available => 'Üzgünüz, bu parçanın sözleri bulunamıyor'; - - @override - String get start_a_radio => 'Radyo başlat'; - - @override - String get how_to_start_radio => 'Radyoyu nasıl başlatmak istersiniz?'; - - @override - String get replace_queue_question => - 'Mevcut kuyruğu değiştirmek mi yoksa eklemek mi istersiniz?'; - - @override - String get endless_playback => 'Sonsuz olarak oynat'; - - @override - String get delete_playlist => 'Oynatma listesini sil'; - - @override - String get delete_playlist_confirmation => - 'Bu oynatma listesini silmek istediğinizden emin misiniz?'; - - @override - String get local_tracks => 'Yerel parçalar'; - - @override - String get local_tab => 'Yerel'; - - @override - String get song_link => 'Şarkı bağlantısı'; - - @override - String get skip_this_nonsense => 'Bu saçmalığı atla'; - - @override - String get freedom_of_music => '“Müzik özgürlüğü”'; - - @override - String get freedom_of_music_palm => '“Müzik özgürlüğü avucunuzun içinde”'; - - @override - String get get_started => 'Haydi başlayalım'; - - @override - String get youtube_source_description => - 'Tavsiye edilir ve en iyi şekilde çalışır.'; - - @override - String get piped_source_description => - 'Özgür hissediyor musunuz? YouTube ile aynı, ama çok daha özgür.'; - - @override - String get jiosaavn_source_description => 'Güney Asya bölgesi için en iyisi.'; - - @override - String get invidious_source_description => - 'Piped\'a benzer, ancak daha yüksek kullanılabilirliğe sahip.'; - - @override - String highest_quality(Object quality) { - return 'En yüksek kalite: $quality'; - } - - @override - String get select_audio_source => 'Ses kaynağını seçin'; - - @override - String get endless_playback_description => - 'Yeni şarkıları otomatik olarak\nkuyruğun sonuna ekle'; - - @override - String get choose_your_region => 'Bölgenizi seçin'; - - @override - String get choose_your_region_description => - 'Bu, Spotube\'un konumunuza uygun içerikleri göstermesine yardımcı olacaktır.'; - - @override - String get choose_your_language => 'Dilinizi seçin'; - - @override - String get help_project_grow => 'Bu projenin büyümesine yardımcı olun'; - - @override - String get help_project_grow_description => - 'Spotube açık kaynaklı bir projedir. Projeye katkıda bulunarak, hataları bildirerek veya yeni özellikler önererek bu projenin büyümesine yardımcı olabilirsiniz.'; - - @override - String get contribute_on_github => 'GitHub\'da katkıda bulun'; - - @override - String get donate_on_open_collective => 'Open Collective\'de bağış yap'; - - @override - String get browse_anonymously => 'Anonim olarak giriş yap'; - - @override - String get enable_connect => 'Bağlanmayı etkinleştir'; - - @override - String get enable_connect_description => - 'Spotube\'u diğer cihazlardan kontrol edin'; - - @override - String get devices => 'Cihazlar'; - - @override - String get select => 'Seç'; - - @override - String connect_client_alert(Object client) { - return '$client tarafından kontrol ediliyorsun.'; - } - - @override - String get this_device => 'Bu cihaz'; - - @override - String get remote => 'Yönet'; - - @override - String get stats => 'İstatistikler'; - - @override - String and_n_more(Object count) { - return 've $count daha'; - } - - @override - String get recently_played => 'Son Çalınanlar'; - - @override - String get browse_more => 'Daha Fazla Göz At'; - - @override - String get no_title => 'Başlık Yok'; - - @override - String get not_playing => 'Çalmıyor'; - - @override - String get epic_failure => 'Efsanevi başarısızlık!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '$tracks_length şarkı sıraya eklendi'; - } - - @override - String get spotube_has_an_update => 'Spotube bir güncelleme aldı'; - - @override - String get download_now => 'Şimdi İndir'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum yayımlandı'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version yayımlandı'; - } - - @override - String get read_the_latest => 'Son haberleri oku'; - - @override - String get release_notes => 'sürüm notları'; - - @override - String get pick_color_scheme => 'Renk şeması seç'; - - @override - String get save => 'Kaydet'; - - @override - String get choose_the_device => 'Cihazı seçin:'; - - @override - String get multiple_device_connected => - 'Birden fazla cihaz bağlı.\nBu işlemi gerçekleştirmek istediğiniz cihazı seçin'; - - @override - String get nothing_found => 'Hiçbir şey bulunamadı'; - - @override - String get the_box_is_empty => 'Kutu boş'; - - @override - String get top_artists => 'En İyi Sanatçılar'; - - @override - String get top_albums => 'En İyi Albümler'; - - @override - String get this_week => 'Bu hafta'; - - @override - String get this_month => 'Bu ay'; - - @override - String get last_6_months => 'Son 6 ay'; - - @override - String get this_year => 'Bu yıl'; - - @override - String get last_2_years => 'Son 2 yıl'; - - @override - String get all_time => 'Tüm zamanlar'; - - @override - String powered_by_provider(Object providerName) { - return '$providerName tarafından desteklenmektedir'; - } - - @override - String get email => 'E-posta'; - - @override - String get profile_followers => 'Takipçiler'; - - @override - String get birthday => 'Doğum Günü'; - - @override - String get subscription => 'Abonelik'; - - @override - String get not_born => 'Henüz doğmadı'; - - @override - String get hacker => 'Hacker'; - - @override - String get profile => 'Profil'; - - @override - String get no_name => 'İsim Yok'; - - @override - String get edit => 'Düzenle'; - - @override - String get user_profile => 'Kullanıcı Profili'; - - @override - String count_plays(Object count) { - return '$count çalma'; - } - - @override - String get streaming_fees_hypothetical => - '*Spotify\'ın akış başına ödeme miktarına\n\$0.003 ile \$0.005 arasında hesaplanmıştır. Bu, kullanıcıya\nSpotify\'da şarkılarını dinlerse sanatçılara ne kadar ödeme\nyapmış olabileceğini göstermek için hipotetik bir hesaplamadır.'; - - @override - String get minutes_listened => 'Dinlenilen Dakikalar'; - - @override - String get streamed_songs => 'Yayınlanan Şarkılar'; - - @override - String count_streams(Object count) { - return '$count yayın'; - } - - @override - String get owned_by_you => 'Sahip olduğunuz'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl panoya kopyalandı'; - } - - @override - String get hipotetical_calculation => - '*Bu, çevrimiçi müzik akışı platformlarının ortalama akış başına \$0,003 ile \$0,005 arasındaki ödemesine göre hesaplanmıştır. Bu, kullanıcının farklı müzik akışı platformlarında şarkılarını dinleselerdi sanatçılara ne kadar ödeme yapacaklarına dair fikir vermek için yapılan varsayımsal bir hesaplamadır.'; - - @override - String count_mins(Object minutes) { - return '$minutes dk'; - } - - @override - String get summary_minutes => 'dakika'; - - @override - String get summary_listened_to_music => 'Dinlenen müzik'; - - @override - String get summary_songs => 'şarkılar'; - - @override - String get summary_streamed_overall => 'Genel olarak akış'; - - @override - String get summary_owed_to_artists => 'Sanatçılara borç\nbu ay'; - - @override - String get summary_artists => 'sanatçının'; - - @override - String get summary_music_reached_you => 'Müzik sana ulaştı'; - - @override - String get summary_full_albums => 'tam albümler'; - - @override - String get summary_got_your_love => 'Sevgini aldı'; - - @override - String get summary_playlists => 'çalma listeleri'; - - @override - String get summary_were_on_repeat => 'Tekrarda vardı'; - - @override - String total_money(Object money) { - return 'Toplam $money'; - } - - @override - String get webview_not_found => 'Webview bulunamadı'; - - @override - String get webview_not_found_description => - 'Cihazınızda herhangi bir Webview çalışma zamanı yüklü değil.\nEğer kuruluysa, ortam YOLUNDA olduğundan emin olun\n\nKurulumdan sonra uygulamayı yeniden başlatın'; - - @override - String get unsupported_platform => 'Desteklenmeyen platform'; - - @override - String get cache_music => 'Müziği önbellekle'; - - @override - String get open => 'Aç'; - - @override - String get cache_folder => 'Önbellek klasörü'; - - @override - String get export => 'Dışa aktar'; - - @override - String get clear_cache => 'Önbelleği temizle'; - - @override - String get clear_cache_confirmation => - 'Önbelleği temizlemek istiyor musunuz?'; - - @override - String get export_cache_files => 'Önbelleğe Alınmış Dosyaları Dışa Aktar'; - - @override - String found_n_files(Object count) { - return '$count dosya bulundu'; - } - - @override - String get export_cache_confirmation => - 'Bu dosyaları dışa aktarmak istiyor musunuz'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '$filesExported / $files dosya dışa aktarıldı'; - } - - @override - String get undo => 'Geri Al'; - - @override - String get download_all => 'Tümünü İndir'; - - @override - String get add_all_to_playlist => 'Hepsini çalma listesine ekle'; - - @override - String get add_all_to_queue => 'Hepsini kuyruğa ekle'; - - @override - String get play_all_next => 'Hepsini bir sonraki çal'; - - @override - String get pause => 'Duraklat'; - - @override - String get view_all => 'Tümünü Gör'; - - @override - String get no_tracks_added_yet => - 'Henüz hiçbir şarkı eklemediniz gibi görünüyor'; - - @override - String get no_tracks => 'Burada hiç şarkı yok gibi görünüyor'; - - @override - String get no_tracks_listened_yet => - 'Henüz hiçbir şey dinlemediniz gibi görünüyor'; - - @override - String get not_following_artists => 'Hiçbir sanatçıyı takip etmiyorsunuz'; - - @override - String get no_favorite_albums_yet => - 'Henüz favorilerinize herhangi bir albüm eklemediniz gibi görünüyor'; - - @override - String get no_logs_found => 'Log bulunamadı'; - - @override - String get youtube_engine => 'YouTube Motoru'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine Yüklü değil'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine sisteminizde yüklü değil.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'PATH değişkeninde kullanılabilir olduğundan emin olun veya\n$engine çalıştırılabilir dosyasının mutlak yolunu aşağıda ayarlayın'; - } - - @override - String get youtube_engine_unix_issue_message => - 'macOS/Linux/Unix benzeri işletim sistemlerinde, .zshrc/.bashrc/.bash_profile gibi dosyalarda yol ayarlamak işe yaramaz.\nYolunuzu kabuk yapılandırma dosyasına ayarlamanız gerekir'; - - @override - String get download => 'İndir'; - - @override - String get file_not_found => 'Dosya bulunamadı'; - - @override - String get custom => 'Özel'; - - @override - String get add_custom_url => 'Özel URL ekle'; - - @override - String get edit_port => 'Portu düzenle'; - - @override - String get port_helper_msg => - 'Varsayılan -1\'dir, bu da rastgele bir sayıyı gösterir. Bir güvenlik duvarınız varsa, bunu ayarlamanız önerilir.'; - - @override - String connect_request(Object client) { - return '$client bağlantısına izin verilsin mi?'; - } - - @override - String get connection_request_denied => - 'Bağlantı reddedildi. Kullanıcı erişimi reddetti.'; - - @override - String get an_error_occurred => 'Bir hata oluştu'; - - @override - String get copy_to_clipboard => 'Panoya kopyala'; - - @override - String get view_logs => 'Günlükleri görüntüle'; - - @override - String get retry => 'Tekrar dene'; - - @override - String get no_default_metadata_provider_selected => - 'Varsayılan bir meta veri sağlayıcısı ayarlanmadı'; - - @override - String get manage_metadata_providers => 'Meta veri sağlayıcılarını yönet'; - - @override - String get open_link_in_browser => 'Bağlantıyı Tarayıcıda Aç?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Aşağıdaki bağlantıyı açmak istiyor musunuz'; - - @override - String get unsafe_url_warning => - 'Güvenilmeyen kaynaklardan bağlantı açmak güvensiz olabilir. Dikkatli olun!\nBağlantıyı panonuza da kopyalayabilirsiniz.'; - - @override - String get copy_link => 'Bağlantıyı Kopyala'; - - @override - String get building_your_timeline => - 'Dinlemelerinize göre zaman çizelgeniz oluşturuluyor...'; - - @override - String get official => 'Resmi'; - - @override - String author_name(Object author) { - return 'Yazar: $author'; - } - - @override - String get third_party => 'Üçüncü taraf'; - - @override - String get plugin_requires_authentication => - 'Eklenti kimlik doğrulama gerektirir'; - - @override - String get update_available => 'Güncelleme mevcut'; - - @override - String get supports_scrobbling => 'Scrobbling\'i destekler'; - - @override - String get plugin_scrobbling_info => - 'Bu eklenti, dinleme geçmişinizi oluşturmak için müziğinizi scrobble eder.'; - - @override - String get default_metadata_source => 'Varsayılan meta veri kaynağı'; - - @override - String get set_default_metadata_source => - 'Varsayılan meta veri kaynağını ayarla'; - - @override - String get default_audio_source => 'Varsayılan ses kaynağı'; - - @override - String get set_default_audio_source => 'Varsayılan ses kaynağını ayarla'; - - @override - String get set_default => 'Varsayılan olarak ayarla'; - - @override - String get support => 'Destek'; - - @override - String get support_plugin_development => 'Eklenti geliştirmeyi destekle'; - - @override - String can_access_name_api(Object name) { - return '- **$name** API\'ye erişebilir'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Bu eklentiyi yüklemek istiyor musunuz?'; - - @override - String get third_party_plugin_warning => - 'Bu eklenti üçüncü taraf bir depodan gelmektedir. Lütfen yüklemeden önce kaynağa güvendiğinizden emin olun.'; - - @override - String get author => 'Yazar'; - - @override - String get this_plugin_can_do_following => - 'Bu eklenti aşağıdakileri yapabilir'; - - @override - String get install => 'Yükle'; - - @override - String get install_a_metadata_provider => 'Bir Meta Veri Sağlayıcısı Yükle'; - - @override - String get no_tracks_playing => 'Şu anda çalınan bir Parça yok'; - - @override - String get synced_lyrics_not_available => - 'Bu şarkı için senkronize şarkı sözleri mevcut değil. Lütfen'; - - @override - String get plain_lyrics => 'Düz Şarkı Sözleri'; - - @override - String get tab_instead => 'sekmesini kullanın.'; - - @override - String get disclaimer => 'Sorumluluk Reddi'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube ekibi, herhangi bir \"Üçüncü taraf\" eklentisi için herhangi bir sorumluluk (yasal olanlar dahil) kabul etmez.\nLütfen bunları kendi riskinizde kullanın. Herhangi bir hata/sorun için lütfen bunları eklenti deposuna bildirin.\n\nHerhangi bir \"Üçüncü taraf\" eklentisi bir hizmetin/yasal varlığın ToS/DMCA\'sını ihlal ediyorsa, lütfen \"Üçüncü taraf\" eklenti yazarından veya barındırma platformundan, örneğin GitHub/Codeberg\'den harekete geçmesini isteyin. Yukarıda listelenen (\"Üçüncü taraf\" olarak etiketlenen) eklentilerin tümü genel/topluluk tarafından sürdürülen eklentilerdir. Biz bunları küratörlüğünü yapmıyoruz, bu yüzden onlar üzerinde herhangi bir işlem yapamayız.\n\n'; - - @override - String get input_does_not_match_format => 'Girdi, gerekli biçimle eşleşmiyor'; - - @override - String get plugins => 'Eklentiler'; - - @override - String get paste_plugin_download_url => - 'İndirme url\'sini veya GitHub/Codeberg repo url\'sini veya .smplug dosyasına doğrudan bağlantıyı yapıştırın'; - - @override - String get download_and_install_plugin_from_url => - 'url\'den eklentiyi indir ve yükle'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Eklenti eklenemedi: $error'; - } - - @override - String get upload_plugin_from_file => 'Dosyadan eklenti yükle'; - - @override - String get installed => 'Yüklü'; - - @override - String get available_plugins => 'Mevcut eklentiler'; - - @override - String get configure_plugins => - 'Kendi meta veri sağlayıcı ve ses kaynağı eklentilerinizi yapılandırın'; - - @override - String get audio_scrobblers => 'Ses Scrobbler\'lar'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Kaynak: '; - - @override - String get uncompressed => 'Sıkıştırılmamış'; - - @override - String get dab_music_source_description => - 'Audiophile\'ler için. Yüksek kaliteli/kayıpsız ses akışları sağlar. Doğru ISRC tabanlı parça eşleştirme.'; -} diff --git a/lib/l10n/generated/app_localizations_uk.dart b/lib/l10n/generated/app_localizations_uk.dart deleted file mode 100644 index c2bed426..00000000 --- a/lib/l10n/generated/app_localizations_uk.dart +++ /dev/null @@ -1,1570 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Ukrainian (`uk`). -class AppLocalizationsUk extends AppLocalizations { - AppLocalizationsUk([String locale = 'uk']) : super(locale); - - @override - String get guest => 'Гість'; - - @override - String get browse => 'Огляд'; - - @override - String get search => 'Пошук'; - - @override - String get library => 'Медіатека'; - - @override - String get lyrics => 'Тексти пісень'; - - @override - String get settings => 'Налаштування'; - - @override - String get genre_categories_filter => 'Фільтрувати категорії або жанри...'; - - @override - String get genre => 'Жанр'; - - @override - String get personalized => 'Персоналізовані'; - - @override - String get featured => 'Рекомендовані'; - - @override - String get new_releases => 'Нові релізи'; - - @override - String get songs => 'Пісні'; - - @override - String playing_track(Object track) { - return 'Відтворюється $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Це очистить поточну чергу. Буде видалено $track_length треків\nПродовжити?'; - } - - @override - String get load_more => 'Завантажити більше'; - - @override - String get playlists => 'Плейлисти'; - - @override - String get artists => 'Виконавці'; - - @override - String get albums => 'Альбоми'; - - @override - String get tracks => 'Треки'; - - @override - String get downloads => 'Завантаження'; - - @override - String get filter_playlists => 'Фільтрувати плейлисти...'; - - @override - String get liked_tracks => 'Сподобалися треки'; - - @override - String get liked_tracks_description => 'Усі ваші сподобалися треки'; - - @override - String get playlist => 'Плейлист'; - - @override - String get create_a_playlist => 'Створити плейлист'; - - @override - String get update_playlist => 'Оновити плейлист'; - - @override - String get create => 'Створити'; - - @override - String get cancel => 'Скасувати'; - - @override - String get update => 'Оновити'; - - @override - String get playlist_name => 'Назва плейлиста'; - - @override - String get name_of_playlist => 'Назва плейлиста'; - - @override - String get description => 'Опис'; - - @override - String get public => 'Публічний'; - - @override - String get collaborative => 'Спільний'; - - @override - String get search_local_tracks => 'Пошук локальних треків...'; - - @override - String get play => 'Відтворити'; - - @override - String get delete => 'Видалити'; - - @override - String get none => 'Немає'; - - @override - String get sort_a_z => 'Сортувати за алфавітом A-Я'; - - @override - String get sort_z_a => 'Сортувати за алфавітом Я-А'; - - @override - String get sort_artist => 'Сортувати за виконавцем'; - - @override - String get sort_album => 'Сортувати за альбомом'; - - @override - String get sort_duration => 'Сортувати за тривалістю'; - - @override - String get sort_tracks => 'Сортувати треки'; - - @override - String currently_downloading(Object tracks_length) { - return 'Завантажується ($tracks_length)'; - } - - @override - String get cancel_all => 'Скасувати все'; - - @override - String get filter_artist => 'Фільтрувати виконавців...'; - - @override - String followers(Object followers) { - return '$followers підписників'; - } - - @override - String get add_artist_to_blacklist => 'Додати виконавця до чорного списку'; - - @override - String get top_tracks => 'Топ треки'; - - @override - String get fans_also_like => 'Шанувальникам також подобається'; - - @override - String get loading => 'Завантаження...'; - - @override - String get artist => 'Виконавець'; - - @override - String get blacklisted => 'У чорному списку'; - - @override - String get following => 'Стежу'; - - @override - String get follow => 'Стежити'; - - @override - String get artist_url_copied => 'URL виконавця скопійовано до буфера обміну'; - - @override - String added_to_queue(Object tracks) { - return 'Додано $tracks треків до черги'; - } - - @override - String get filter_albums => 'Фільтрувати альбоми...'; - - @override - String get synced => 'Синхронізовано'; - - @override - String get plain => 'Звичайний'; - - @override - String get shuffle => 'Випадковий порядок'; - - @override - String get search_tracks => 'Пошук треків...'; - - @override - String get released => 'Випущено'; - - @override - String error(Object error) { - return 'Помилка $error'; - } - - @override - String get title => 'Назва'; - - @override - String get time => 'Час'; - - @override - String get more_actions => 'Більше дій'; - - @override - String download_count(Object count) { - return 'Завантажено ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Додати ($count) до плейлиста'; - } - - @override - String add_count_to_queue(Object count) { - return 'Додати ($count) до черги'; - } - - @override - String play_count_next(Object count) { - return 'Відтворити ($count) наступними'; - } - - @override - String get album => 'Альбом'; - - @override - String copied_to_clipboard(Object data) { - return 'Скопійовано $data до буфера обміну'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Додати $track до наступних плейлистів'; - } - - @override - String get add => 'Додати'; - - @override - String added_track_to_queue(Object track) { - return 'Додано $track до черги'; - } - - @override - String get add_to_queue => 'Додати до черги'; - - @override - String track_will_play_next(Object track) { - return '$track буде відтворено наступним'; - } - - @override - String get play_next => 'Відтворити наступним'; - - @override - String removed_track_from_queue(Object track) { - return 'Видалено $track з черги'; - } - - @override - String get remove_from_queue => 'Видалити з черги'; - - @override - String get remove_from_favorites => 'Видалити з обраних'; - - @override - String get save_as_favorite => 'Зберегти як обране'; - - @override - String get add_to_playlist => 'Додати до плейлиста'; - - @override - String get remove_from_playlist => 'Видалити з плейлиста'; - - @override - String get add_to_blacklist => 'Додати до чорного списку'; - - @override - String get remove_from_blacklist => 'Видалити з чорного списку'; - - @override - String get share => 'Поділитися'; - - @override - String get mini_player => 'Міні-плеєр'; - - @override - String get slide_to_seek => - 'Проведіть пальцем, щоб перемотати вперед або назад'; - - @override - String get shuffle_playlist => 'Випадковий порядок відтворення плейлиста'; - - @override - String get unshuffle_playlist => - 'Відключити випадковий порядок відтворення плейлиста'; - - @override - String get previous_track => 'Попередній трек'; - - @override - String get next_track => 'Наступний трек'; - - @override - String get pause_playback => 'Призупинити відтворення'; - - @override - String get resume_playback => 'Відновити відтворення'; - - @override - String get loop_track => 'Повторювати трек'; - - @override - String get no_loop => 'Без повтору'; - - @override - String get repeat_playlist => 'Повторювати плейлист'; - - @override - String get queue => 'Черга'; - - @override - String get alternative_track_sources => 'Альтернативні джерела треків'; - - @override - String get download_track => 'Завантажити трек'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks треків у черзі'; - } - - @override - String get clear_all => 'Очистити все'; - - @override - String get show_hide_ui_on_hover => - 'Показувати/приховувати інтерфейс при наведенні курсору'; - - @override - String get always_on_top => 'Завжди зверху'; - - @override - String get exit_mini_player => 'Вийти з міні-плеєра'; - - @override - String get download_location => 'Шлях завантаження'; - - @override - String get local_library => 'Місцева бібліотека'; - - @override - String get add_library_location => 'Додати до бібліотеки'; - - @override - String get remove_library_location => 'Видалити з бібліотеки'; - - @override - String get account => 'Обліковий запис'; - - @override - String get logout => 'Вийти'; - - @override - String get logout_of_this_account => 'Вийти з цього облікового запису'; - - @override - String get language_region => 'Мова та регіон'; - - @override - String get language => 'Мова'; - - @override - String get system_default => 'Системна мова'; - - @override - String get market_place_region => 'Регіон маркетплейсу'; - - @override - String get recommendation_country => 'Країна рекомендацій'; - - @override - String get appearance => 'Зовнішній вигляд'; - - @override - String get layout_mode => 'Режим макета'; - - @override - String get override_layout_settings => - 'Перезаписати налаштування адаптивного режиму макета'; - - @override - String get adaptive => 'Адаптивний'; - - @override - String get compact => 'Компактний'; - - @override - String get extended => 'Розширений'; - - @override - String get theme => 'Тема'; - - @override - String get dark => 'Темна'; - - @override - String get light => 'Світла'; - - @override - String get system => 'Системна'; - - @override - String get accent_color => 'Колір акценту'; - - @override - String get sync_album_color => 'Синхронізувати колір альбому'; - - @override - String get sync_album_color_description => - 'Використовує домінуючий колір обкладинки альбому як колір акценту'; - - @override - String get playback => 'Відтворення'; - - @override - String get audio_quality => 'Якість аудіо'; - - @override - String get high => 'Висока'; - - @override - String get low => 'Низька'; - - @override - String get pre_download_play => 'Попереднє завантаження та відтворення'; - - @override - String get pre_download_play_description => - 'Замість потокового відтворення аудіо завантажте байти та відтворіть їх (рекомендовано для користувачів з високою пропускною здатністю)'; - - @override - String get skip_non_music => 'Пропустити не музичні сегменти'; - - @override - String get blacklist_description => 'Треки та виконавці в чорному списку'; - - @override - String get wait_for_download_to_finish => - 'Зачекайте, поки завершиться поточна загрузка'; - - @override - String get desktop => 'Робочий стіл'; - - @override - String get close_behavior => 'Поведінка при закритті'; - - @override - String get close => 'Закрити'; - - @override - String get minimize_to_tray => 'Згорнути в трей'; - - @override - String get show_tray_icon => 'Показувати значок у системному треї'; - - @override - String get about => 'Про'; - - @override - String get u_love_spotube => 'Ми знаємо, що ви любите Spotube'; - - @override - String get check_for_updates => 'Перевірити наявність оновлень'; - - @override - String get about_spotube => 'Про Spotube'; - - @override - String get blacklist => 'Чорний список'; - - @override - String get please_sponsor => 'Будь ласка, станьте спонсором/зробіть пожертву'; - - @override - String get spotube_description => - 'Spotube, легкий, кросплатформовий, безкоштовний клієнт Spotify'; - - @override - String get version => 'Версія'; - - @override - String get build_number => 'Номер збірки'; - - @override - String get founder => 'Засновник'; - - @override - String get repository => 'Репозиторій'; - - @override - String get bug_issues => 'Помилки та проблеми'; - - @override - String get made_with => 'Зроблено з ❤️ в Бангладеш 🇧🇩'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Ліцензія'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Не хвилюйтеся, жодні ваші облікові дані не будуть зібрані або передані кому-небудь'; - - @override - String get know_how_to_login => 'Не знаєте, як це зробити?'; - - @override - String get follow_step_by_step_guide => 'Дотримуйтесь покрокової інструкції'; - - @override - String cookie_name_cookie(Object name) { - return 'Кукі-файл $name'; - } - - @override - String get fill_in_all_fields => 'Будь ласка, заповніть усі поля'; - - @override - String get submit => 'Надіслати'; - - @override - String get exit => 'Вийти'; - - @override - String get previous => 'Попередній'; - - @override - String get next => 'Наступний'; - - @override - String get done => 'Готово'; - - @override - String get step_1 => 'Крок 1'; - - @override - String get first_go_to => 'Спочатку перейдіть на'; - - @override - String get something_went_wrong => 'Щось пішло не так'; - - @override - String get piped_instance => 'Примірник сервера Piped'; - - @override - String get piped_description => - 'Примірник сервера Piped, який використовуватиметься для зіставлення треків'; - - @override - String get piped_warning => - 'Деякі з них можуть працювати неправильно. Тому використовуйте на свій страх і ризик'; - - @override - String get invidious_instance => 'Екземпляр сервера Invidious'; - - @override - String get invidious_description => - 'Екземпляр сервера Invidious для зіставлення треків'; - - @override - String get invidious_warning => - 'Деякі можуть працювати не дуже добре. Використовуйте на власний ризик'; - - @override - String get generate => 'Генерувати'; - - @override - String track_exists(Object track) { - return 'Трек $track вже існує'; - } - - @override - String get replace_downloaded_tracks => 'Замінити всі завантажені треки'; - - @override - String get skip_download_tracks => - 'Пропустити завантаження всіх завантажених треків'; - - @override - String get do_you_want_to_replace => 'Ви хочете замінити існуючий трек?'; - - @override - String get replace => 'Замінити'; - - @override - String get skip => 'Пропустити'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Виберіть до $count $type'; - } - - @override - String get select_genres => 'Виберіть жанри'; - - @override - String get add_genres => 'Додати жанри'; - - @override - String get country => 'Країна'; - - @override - String get number_of_tracks_generate => 'Кількість треків для створення'; - - @override - String get acousticness => 'Акустичність'; - - @override - String get danceability => 'Танцювальність'; - - @override - String get energy => 'Енергія'; - - @override - String get instrumentalness => 'Інструментальність'; - - @override - String get liveness => 'Живість'; - - @override - String get loudness => 'Гучність'; - - @override - String get speechiness => 'Розмовність'; - - @override - String get valence => 'Валентність'; - - @override - String get popularity => 'Популярність'; - - @override - String get key => 'Тональність'; - - @override - String get duration => 'Тривалість (с)'; - - @override - String get tempo => 'Темп (BPM)'; - - @override - String get mode => 'Режим'; - - @override - String get time_signature => 'Розмір'; - - @override - String get short => 'Короткий'; - - @override - String get medium => 'Середній'; - - @override - String get long => 'Довгий'; - - @override - String get min => 'Мін'; - - @override - String get max => 'Макс'; - - @override - String get target => 'Цільовий'; - - @override - String get moderate => 'Помірний'; - - @override - String get deselect_all => 'Зняти вибір з усіх'; - - @override - String get select_all => 'Вибрати всі'; - - @override - String get are_you_sure => 'Ви впевнені?'; - - @override - String get generating_playlist => - 'Створення вашого персонального плейлиста...'; - - @override - String selected_count_tracks(Object count) { - return 'Вибрано $count треків'; - } - - @override - String get download_warning => - 'Якщо ви завантажуєте всі треки масово, ви явно піратствуєте і завдаєте шкоди музичному творчому співтовариству. Сподіваюся, ви усвідомлюєте це. Завжди намагайтеся поважати і підтримувати важку працю артиста'; - - @override - String get download_ip_ban_warning => - 'До речі, ваш IP може бути заблокований на YouTube через надмірну кількість запитів на завантаження, ніж зазвичай. Блокування IP-адреси означає, що ви не зможете користуватися YouTube (навіть якщо ви увійшли в систему) протягом щонайменше 2-3 місяців з цього пристрою. І Spotube не несе жодної відповідальності, якщо це станеться'; - - @override - String get by_clicking_accept_terms => - 'Натискаючи \'прийняти\', ви погоджуєтеся з наступними умовами:'; - - @override - String get download_agreement_1 => 'Я знаю, що краду музику. Я поганий.'; - - @override - String get download_agreement_2 => - 'Я підтримаю автора, де тільки зможу, і роблю це лише тому, що не маю грошей, щоб купити його роботи.'; - - @override - String get download_agreement_3 => - 'Я повністю усвідомлюю, що мій IP може бути заблокований на YouTube, і я не покладаю на Spotube або його власників/контрибуторів відповідальність за будь-які нещасні випадки, спричинені моїми діями.'; - - @override - String get decline => 'Відхилити'; - - @override - String get accept => 'Прийняти'; - - @override - String get details => 'Деталі'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Канал'; - - @override - String get likes => 'Подобається'; - - @override - String get dislikes => 'Не подобається'; - - @override - String get views => 'Переглядів'; - - @override - String get streamUrl => 'Посилання на стрімінг'; - - @override - String get stop => 'Зупинити'; - - @override - String get sort_newest => 'Сортувати за датою додавання (новіші першими)'; - - @override - String get sort_oldest => 'Сортувати за датою додавання (старіші першими)'; - - @override - String get sleep_timer => 'Таймер сну'; - - @override - String mins(Object minutes) { - return '$minutes хвилин'; - } - - @override - String hours(Object hours) { - return '$hours годин'; - } - - @override - String hour(Object hours) { - return '$hours година'; - } - - @override - String get custom_hours => 'Кількість годин на замовлення'; - - @override - String get logs => 'Логи'; - - @override - String get developers => 'Розробники'; - - @override - String get not_logged_in => 'Ви не ввійшли в обліковий запис'; - - @override - String get search_mode => 'Режим пошуку'; - - @override - String get audio_source => 'Джерело аудіо'; - - @override - String get ok => 'Гаразд'; - - @override - String get failed_to_encrypt => 'Не вдалося зашифрувати'; - - @override - String get encryption_failed_warning => - 'Spotube використовує шифрування для безпечного зберігання ваших даних. Але не вдалося цього зробити. Тому він перейде до небезпечного зберігання\nЯкщо ви використовуєте Linux, переконайтеся, що у вас встановлено будь-який секретний сервіс (gnome-keyring, kde-wallet, keepassxc тощо)'; - - @override - String get querying_info => 'Запит інформації...'; - - @override - String get piped_api_down => 'API Piped не працює'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Поточний екземпляр Piped $pipedInstance не працює\n\nЗмініть екземпляр або змініть \'Тип API\' на офіційний YouTube API\n\nОбов\'язково перезапустіть програму після зміни'; - } - - @override - String get you_are_offline => 'Ви зараз не в мережі'; - - @override - String get connection_restored => 'Ваше інтернет-з\'єднання відновлено'; - - @override - String get use_system_title_bar => 'Використовувати системний заголовок'; - - @override - String get crunching_results => 'Опрацювання результатів...'; - - @override - String get search_to_get_results => 'Почніть пошук, щоб отримати результати'; - - @override - String get use_amoled_mode => 'Режим AMOLED'; - - @override - String get pitch_dark_theme => 'Темна тема'; - - @override - String get normalize_audio => 'Нормалізувати звук'; - - @override - String get change_cover => 'Змінити обкладинку'; - - @override - String get add_cover => 'Додати обкладинку'; - - @override - String get restore_defaults => 'Відновити налаштування за замовчуванням'; - - @override - String get download_music_format => 'Формат завантаження музики'; - - @override - String get streaming_music_format => 'Формат потокової музики'; - - @override - String get download_music_quality => 'Якість завантаженої музики'; - - @override - String get streaming_music_quality => 'Якість потокової музики'; - - @override - String get login_with_lastfm => 'Увійти з Last.fm'; - - @override - String get connect => 'Підключити'; - - @override - String get disconnect_lastfm => 'Відключитися від Last.fm'; - - @override - String get disconnect => 'Відключити'; - - @override - String get username => 'Ім\'я користувача'; - - @override - String get password => 'Пароль'; - - @override - String get login => 'Увійти'; - - @override - String get login_with_your_lastfm => 'Увійти в свій обліковий запис Last.fm'; - - @override - String get scrobble_to_lastfm => 'Скробблінг на Last.fm'; - - @override - String get go_to_album => 'Перейти до альбому'; - - @override - String get discord_rich_presence => 'Багата присутність у Discord'; - - @override - String get browse_all => 'Переглянути все'; - - @override - String get genres => 'Жанри'; - - @override - String get explore_genres => 'Досліджувати жанри'; - - @override - String get friends => 'Друзі'; - - @override - String get no_lyrics_available => - 'Вибачте, не вдалося знайти текст для цього треку'; - - @override - String get start_a_radio => 'Запустити радіо'; - - @override - String get how_to_start_radio => 'Як ви хочете запустити радіо?'; - - @override - String get replace_queue_question => - 'Ви хочете замінити поточну чергу чи додати до неї?'; - - @override - String get endless_playback => 'Безкінечне відтворення'; - - @override - String get delete_playlist => 'Видалити плейлист'; - - @override - String get delete_playlist_confirmation => - 'Ви впевнені, що хочете видалити цей плейлист?'; - - @override - String get local_tracks => 'Місцеві треки'; - - @override - String get local_tab => 'Місцевий'; - - @override - String get song_link => 'Посилання на пісню'; - - @override - String get skip_this_nonsense => 'Пропустити цей бред'; - - @override - String get freedom_of_music => '“Свобода музики”'; - - @override - String get freedom_of_music_palm => '“Свобода музики у вашій долоні”'; - - @override - String get get_started => 'Давайте почнемо'; - - @override - String get youtube_source_description => - 'Рекомендовано та працює краще за все.'; - - @override - String get piped_source_description => - 'Чи почуваєте себе вільно? Те саме, що і на YouTube, але набагато безкоштовно.'; - - @override - String get jiosaavn_source_description => - 'Найкраще для регіону Південної Азії.'; - - @override - String get invidious_source_description => - 'Подібний до Piped, але з вищою доступністю.'; - - @override - String highest_quality(Object quality) { - return 'Найвища якість: $quality'; - } - - @override - String get select_audio_source => 'Виберіть джерело аудіо'; - - @override - String get endless_playback_description => - 'Автоматично додавати нові пісні\nв кінець черги'; - - @override - String get choose_your_region => 'Виберіть ваш регіон'; - - @override - String get choose_your_region_description => - 'Це допоможе Spotube показати вам правильний контент\nдля вашого місцезнаходження.'; - - @override - String get choose_your_language => 'Виберіть свою мову'; - - @override - String get help_project_grow => 'Допоможіть цьому проекту рости'; - - @override - String get help_project_grow_description => - 'Spotube - це проект з відкритим кодом. Ви можете допомогти цьому проекту зростати, вносячи свій внесок у проект, повідомляючи про помилки або пропонуючи нові функції.'; - - @override - String get contribute_on_github => 'Долучайтесь на GitHub'; - - @override - String get donate_on_open_collective => 'Пожертвуйте на Open Collective'; - - @override - String get browse_anonymously => 'Анонімно переглядати'; - - @override - String get enable_connect => 'Увімкнути підключення'; - - @override - String get enable_connect_description => 'Керуйте Spotube з інших пристроїв'; - - @override - String get devices => 'Пристрої'; - - @override - String get select => 'Вибрати'; - - @override - String connect_client_alert(Object client) { - return 'Вас керує $client'; - } - - @override - String get this_device => 'Цей пристрій'; - - @override - String get remote => 'Віддалений'; - - @override - String get stats => 'Статистика'; - - @override - String and_n_more(Object count) { - return 'і $count більше'; - } - - @override - String get recently_played => 'Нещодавно Відтворене'; - - @override - String get browse_more => 'Переглянути Більше'; - - @override - String get no_title => 'Без Назви'; - - @override - String get not_playing => 'Не Відтворюється'; - - @override - String get epic_failure => 'Епічний провал!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Додано $tracks_length треків до черги'; - } - - @override - String get spotube_has_an_update => 'Spotube має оновлення'; - - @override - String get download_now => 'Завантажити Зараз'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum було випущено'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version було випущено'; - } - - @override - String get read_the_latest => 'Читати останні новини'; - - @override - String get release_notes => 'ноти про випуск'; - - @override - String get pick_color_scheme => 'Оберіть кольорову схему'; - - @override - String get save => 'Зберегти'; - - @override - String get choose_the_device => 'Виберіть пристрій:'; - - @override - String get multiple_device_connected => - 'Підключено кілька пристроїв.\nВиберіть пристрій, на якому ви хочете виконати цю дію'; - - @override - String get nothing_found => 'Нічого не знайдено'; - - @override - String get the_box_is_empty => 'Коробка порожня'; - - @override - String get top_artists => 'Топ Артисти'; - - @override - String get top_albums => 'Топ Альбоми'; - - @override - String get this_week => 'Цього тижня'; - - @override - String get this_month => 'Цього місяця'; - - @override - String get last_6_months => 'Останні 6 місяців'; - - @override - String get this_year => 'Цього року'; - - @override - String get last_2_years => 'Останні 2 роки'; - - @override - String get all_time => 'Усі часи'; - - @override - String powered_by_provider(Object providerName) { - return 'Забезпечено $providerName'; - } - - @override - String get email => 'Електронна пошта'; - - @override - String get profile_followers => 'Підписники'; - - @override - String get birthday => 'День народження'; - - @override - String get subscription => 'Підписка'; - - @override - String get not_born => 'Ще не народжений'; - - @override - String get hacker => 'Хакер'; - - @override - String get profile => 'Профіль'; - - @override - String get no_name => 'Без імені'; - - @override - String get edit => 'Редагувати'; - - @override - String get user_profile => 'Профіль користувача'; - - @override - String count_plays(Object count) { - return '$count відтворень'; - } - - @override - String get streaming_fees_hypothetical => - '*Розраховано на основі виплат Spotify за стримінг\nвід \$0.003 до \$0.005. Це гіпотетичний\nрозрахунок, щоб дати уявлення користувачу про те, скільки б він\nзаплатив артистам, якби слухав їхні пісні на Spotify.'; - - @override - String get minutes_listened => 'Хвилини прослуховування'; - - @override - String get streamed_songs => 'Стримлені пісні'; - - @override - String count_streams(Object count) { - return '$count стримів'; - } - - @override - String get owned_by_you => 'Ваша власність'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl скопійовано в буфер обміну'; - } - - @override - String get hipotetical_calculation => - '*Це розраховано на основі середньої виплати за стрім онлайн-платформ для потокового відтворення музики, що становить від \$0,003 до \$0,005. Це гіпотетичний розрахунок, щоб дати користувачеві уявлення про те, скільки б вони заплатили артистам, якщо б слухали їхні пісні на різних музичних стрімінгових платформах.'; - - @override - String count_mins(Object minutes) { - return '$minutes хв'; - } - - @override - String get summary_minutes => 'хвилини'; - - @override - String get summary_listened_to_music => 'Прослухана музика'; - - @override - String get summary_songs => 'пісні'; - - @override - String get summary_streamed_overall => 'Загалом стримів'; - - @override - String get summary_owed_to_artists => 'Заборгованість артистам\nцього місяця'; - - @override - String get summary_artists => 'артистів'; - - @override - String get summary_music_reached_you => 'Музика досягла вас'; - - @override - String get summary_full_albums => 'повні альбоми'; - - @override - String get summary_got_your_love => 'Отримав вашу любов'; - - @override - String get summary_playlists => 'плейлисти'; - - @override - String get summary_were_on_repeat => 'Були на повторі'; - - @override - String total_money(Object money) { - return 'Загалом $money'; - } - - @override - String get webview_not_found => 'Webview не знайдено'; - - @override - String get webview_not_found_description => - 'На вашому пристрої не встановлено виконуване середовище Webview.\nЯкщо воно встановлено, переконайтеся, що воно знаходиться в environment PATH\n\nПісля встановлення перезапустіть програму'; - - @override - String get unsupported_platform => 'Непідтримувана платформа'; - - @override - String get cache_music => 'Кешувати музику'; - - @override - String get open => 'Відкрити'; - - @override - String get cache_folder => 'Тека кешу'; - - @override - String get export => 'Експорт'; - - @override - String get clear_cache => 'Очистити кеш'; - - @override - String get clear_cache_confirmation => 'Ви хочете очистити кеш?'; - - @override - String get export_cache_files => 'Експортувати кешовані файли'; - - @override - String found_n_files(Object count) { - return 'Знайдено $count файлів'; - } - - @override - String get export_cache_confirmation => 'Ви хочете експортувати ці файли до'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Експортовано $filesExported з $files файлів'; - } - - @override - String get undo => 'Скасувати'; - - @override - String get download_all => 'Завантажити все'; - - @override - String get add_all_to_playlist => 'Додати все до плейлиста'; - - @override - String get add_all_to_queue => 'Додати все в чергу'; - - @override - String get play_all_next => 'Відтворити все наступне'; - - @override - String get pause => 'Пауза'; - - @override - String get view_all => 'Переглянути все'; - - @override - String get no_tracks_added_yet => 'Здається, ви ще не додали жодної пісні'; - - @override - String get no_tracks => 'Здається, тут немає пісень'; - - @override - String get no_tracks_listened_yet => 'Здається, ви ще нічого не слухали'; - - @override - String get not_following_artists => 'Ви не підписані на жодного артиста'; - - @override - String get no_favorite_albums_yet => - 'Здається, ви ще не додали жодного альбому в улюблені'; - - @override - String get no_logs_found => 'Жодних журналів не знайдено'; - - @override - String get youtube_engine => 'YouTube Двигун'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine не встановлено'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine не встановлено на вашій системі.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Переконайтесь, що він доступний у змінній PATH або\nвстановіть абсолютний шлях до виконуваного файлу $engine нижче'; - } - - @override - String get youtube_engine_unix_issue_message => - 'У macOS/Linux/Unix-подібних ОС, встановлення шляху в .zshrc/.bashrc/.bash_profile тощо не працює.\nВам потрібно налаштувати шлях у файлі конфігурації оболонки'; - - @override - String get download => 'Завантажити'; - - @override - String get file_not_found => 'Файл не знайдено'; - - @override - String get custom => 'Користувацький'; - - @override - String get add_custom_url => 'Додати користувацький URL'; - - @override - String get edit_port => 'Редагувати порт'; - - @override - String get port_helper_msg => - 'За замовчуванням -1, що означає випадкове число. Якщо у вас налаштований брандмауер, рекомендується це налаштувати.'; - - @override - String connect_request(Object client) { - return 'Дозволити $client підключення?'; - } - - @override - String get connection_request_denied => - 'Підключення відхилено. Користувач відмовив у доступі.'; - - @override - String get an_error_occurred => 'Сталася помилка'; - - @override - String get copy_to_clipboard => 'Копіювати в буфер обміну'; - - @override - String get view_logs => 'Переглянути логи'; - - @override - String get retry => 'Повторити'; - - @override - String get no_default_metadata_provider_selected => - 'Ви не встановили провайдера метаданих за замовчуванням'; - - @override - String get manage_metadata_providers => 'Керувати провайдерами метаданих'; - - @override - String get open_link_in_browser => 'Відкрити посилання в браузері?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Ви хочете відкрити наступне посилання'; - - @override - String get unsafe_url_warning => - 'Відкриття посилань з ненадійних джерел може бути небезпечним. Будьте обережні!\nВи також можете скопіювати посилання в буфер обміну.'; - - @override - String get copy_link => 'Копіювати посилання'; - - @override - String get building_your_timeline => - 'Створення вашої часової шкали на основі ваших прослуховувань...'; - - @override - String get official => 'Офіційний'; - - @override - String author_name(Object author) { - return 'Автор: $author'; - } - - @override - String get third_party => 'Сторонній'; - - @override - String get plugin_requires_authentication => 'Плагін вимагає автентифікації'; - - @override - String get update_available => 'Доступне оновлення'; - - @override - String get supports_scrobbling => 'Підтримує скроблінг'; - - @override - String get plugin_scrobbling_info => - 'Цей плагін скроббить вашу музику, щоб створити вашу історію прослуховувань.'; - - @override - String get default_metadata_source => 'Джерело метаданих за замовчуванням'; - - @override - String get set_default_metadata_source => - 'Встановити джерело метаданих за замовчуванням'; - - @override - String get default_audio_source => 'Джерело аудіо за замовчуванням'; - - @override - String get set_default_audio_source => - 'Встановити джерело аудіо за замовчуванням'; - - @override - String get set_default => 'Встановити за замовчуванням'; - - @override - String get support => 'Підтримка'; - - @override - String get support_plugin_development => 'Підтримати розробку плагіна'; - - @override - String can_access_name_api(Object name) { - return '- Може отримати доступ до **$name** API'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Ви хочете встановити цей плагін?'; - - @override - String get third_party_plugin_warning => - 'Цей плагін із стороннього репозиторію. Будь ласка, переконайтеся, що ви довіряєте джерелу перед встановленням.'; - - @override - String get author => 'Автор'; - - @override - String get this_plugin_can_do_following => 'Цей плагін може робити наступне'; - - @override - String get install => 'Встановити'; - - @override - String get install_a_metadata_provider => 'Встановити провайдера метаданих'; - - @override - String get no_tracks_playing => 'Наразі не відтворюється жоден трек'; - - @override - String get synced_lyrics_not_available => - 'Синхронізовані тексти недоступні для цієї пісні. Будь ласка, використовуйте вкладку'; - - @override - String get plain_lyrics => 'Звичайні тексти'; - - @override - String get tab_instead => 'замість цього.'; - - @override - String get disclaimer => 'Відмова від відповідальності'; - - @override - String get third_party_plugin_dmca_notice => - 'Команда Spotube не несе жодної відповідальності (включно з юридичною) за будь-які плагіни \"третіх сторін\".\nБудь ласка, використовуйте їх на свій страх і ризик. Про будь-які помилки/проблеми повідомляйте в репозиторій плагіна.\n\nЯкщо якийсь плагін \"третьої сторони\" порушує ToS/DMCA будь-якої служби/юридичної особи, будь ласка, попросіть автора плагіна \"третьої сторони\" або хостингову платформу, наприклад, GitHub/Codeberg, вжити заходів. Усі перераховані вище (позначені як \"треті сторони\") є плагінами, які підтримуються публічно/спільнотою. Ми не куруємо їх, тому не можемо вжити жодних заходів щодо них.\n\n'; - - @override - String get input_does_not_match_format => - 'Введені дані не відповідають необхідному формату'; - - @override - String get plugins => 'Плагіни'; - - @override - String get paste_plugin_download_url => - 'Вставте URL-адресу для завантаження або URL-адресу репозиторію GitHub/Codeberg або пряме посилання на файл .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Завантажити та встановити плагін з URL-адреси'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Не вдалося додати плагін: $error'; - } - - @override - String get upload_plugin_from_file => 'Завантажити плагін з файлу'; - - @override - String get installed => 'Встановлено'; - - @override - String get available_plugins => 'Доступні плагіни'; - - @override - String get configure_plugins => - 'Налаштуйте власні плагіни метаданих і аудіоджерела'; - - @override - String get audio_scrobblers => 'Аудіо скробблери'; - - @override - String get scrobbling => 'Скроблінг'; - - @override - String get source => 'Джерело: '; - - @override - String get uncompressed => 'Без стиснення'; - - @override - String get dab_music_source_description => - 'Для аудіофілів. Забезпечує високоякісні/без втрат аудіопотоки. Точна відповідність треків на основі ISRC.'; -} diff --git a/lib/l10n/generated/app_localizations_vi.dart b/lib/l10n/generated/app_localizations_vi.dart deleted file mode 100644 index 4d7a8945..00000000 --- a/lib/l10n/generated/app_localizations_vi.dart +++ /dev/null @@ -1,1574 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Vietnamese (`vi`). -class AppLocalizationsVi extends AppLocalizations { - AppLocalizationsVi([String locale = 'vi']) : super(locale); - - @override - String get guest => 'Khách'; - - @override - String get browse => 'Khám phá'; - - @override - String get search => 'Tìm kiếm'; - - @override - String get library => 'Thư viên'; - - @override - String get lyrics => 'Lời bài hát'; - - @override - String get settings => 'Cài đặt'; - - @override - String get genre_categories_filter => 'Lọc theo thể loại nhạc...'; - - @override - String get genre => 'Thể loại nhạc'; - - @override - String get personalized => 'Cá nhân hóa'; - - @override - String get featured => 'Nổi bật'; - - @override - String get new_releases => 'Bản phát hành mới'; - - @override - String get songs => 'Bài hát'; - - @override - String playing_track(Object track) { - return 'Đang phát $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return 'Điều này sẽ xóa hàng đợi hiện tại. $track_length bài hát sẽ bị xóa\nBạn có muốn tiếp tục không?'; - } - - @override - String get load_more => 'Tải thêm'; - - @override - String get playlists => 'Danh sách phát'; - - @override - String get artists => 'Nghệ sĩ'; - - @override - String get albums => 'Album'; - - @override - String get tracks => 'Bài hát'; - - @override - String get downloads => 'Tải về'; - - @override - String get filter_playlists => 'Lọc danh sách phát...'; - - @override - String get liked_tracks => 'Bài hát được thích'; - - @override - String get liked_tracks_description => 'Tất cả bài hát bạn đã thích'; - - @override - String get playlist => 'Danh sách phát'; - - @override - String get create_a_playlist => 'Tạo danh sách phát'; - - @override - String get update_playlist => 'Cập nhật danh sách phát'; - - @override - String get create => 'Tạo'; - - @override - String get cancel => 'Hủy'; - - @override - String get update => 'Cập nhật'; - - @override - String get playlist_name => 'Tên danh sách phát'; - - @override - String get name_of_playlist => 'Tên của danh sách phát'; - - @override - String get description => 'Mô tả'; - - @override - String get public => 'Công khai'; - - @override - String get collaborative => 'Hợp tác'; - - @override - String get search_local_tracks => 'Tìm kiếm bài hát trong máy...'; - - @override - String get play => 'Phát'; - - @override - String get delete => 'Xóa'; - - @override - String get none => 'Không có'; - - @override - String get sort_a_z => 'Sắp xếp theo A-Z'; - - @override - String get sort_z_a => 'Sắp xếp theo Z-A'; - - @override - String get sort_artist => 'Sắp xếp theo Nghệ sĩ'; - - @override - String get sort_album => 'Sắp xếp theo Album'; - - @override - String get sort_duration => 'Sắp xếp theo Thời lượng'; - - @override - String get sort_tracks => 'Sắp xếp các bài hát'; - - @override - String currently_downloading(Object tracks_length) { - return 'Đang tải về ($tracks_length bài hát)'; - } - - @override - String get cancel_all => 'Hủy tất cả'; - - @override - String get filter_artist => 'Lọc nghệ sĩ...'; - - @override - String followers(Object followers) { - return '$followers Người theo dõi'; - } - - @override - String get add_artist_to_blacklist => 'Thêm nghệ sĩ vào blacklist'; - - @override - String get top_tracks => 'Bài hát nổi bật'; - - @override - String get fans_also_like => 'Người hâm mộ cũng thích'; - - @override - String get loading => 'Đang tải...'; - - @override - String get artist => 'Nghệ sĩ'; - - @override - String get blacklisted => 'Đã đưa vào blacklist'; - - @override - String get following => 'Đang theo dõi'; - - @override - String get follow => 'Theo dõi'; - - @override - String get artist_url_copied => 'Đã sao chép URL nghệ sĩ'; - - @override - String added_to_queue(Object tracks) { - return 'Đã thêm $tracks bài hát vào hàng đợi'; - } - - @override - String get filter_albums => 'Lọc album...'; - - @override - String get synced => 'Đồng bộ'; - - @override - String get plain => 'Bình thường'; - - @override - String get shuffle => 'Trộn'; - - @override - String get search_tracks => 'Tìm kiếm bài hát...'; - - @override - String get released => 'Phát hành'; - - @override - String error(Object error) { - return 'Lỗi $error'; - } - - @override - String get title => 'Đề mục'; - - @override - String get time => 'Thời gian'; - - @override - String get more_actions => 'Thao tác khác'; - - @override - String download_count(Object count) { - return 'Tải xuống ($count)'; - } - - @override - String add_count_to_playlist(Object count) { - return 'Thêm ($count) vào danh sách phát'; - } - - @override - String add_count_to_queue(Object count) { - return 'Thêm ($count) vào hàng đợi'; - } - - @override - String play_count_next(Object count) { - return 'Phát ($count) tiếp theo'; - } - - @override - String get album => 'Album'; - - @override - String copied_to_clipboard(Object data) { - return 'Đã sao chép $data vào clipboard'; - } - - @override - String add_to_following_playlists(Object track) { - return 'Thêm $track vào danh sách phát đang theo dõi'; - } - - @override - String get add => 'Thêm'; - - @override - String added_track_to_queue(Object track) { - return 'Đã thêm $track vào hàng đợi'; - } - - @override - String get add_to_queue => 'Thêm vào hàng đợi'; - - @override - String track_will_play_next(Object track) { - return '$track sẽ được phát tiếp theo'; - } - - @override - String get play_next => 'Phát tiếp theo'; - - @override - String removed_track_from_queue(Object track) { - return 'Đã xóa $track khỏi hàng đợi'; - } - - @override - String get remove_from_queue => 'Xóa khỏi hàng đợi'; - - @override - String get remove_from_favorites => 'Xóa khỏi bài hát yêu thích'; - - @override - String get save_as_favorite => 'Thêm vào bài hát yêu thích'; - - @override - String get add_to_playlist => 'Thêm vào danh sách phát'; - - @override - String get remove_from_playlist => 'Xóa khỏi danh sách phát'; - - @override - String get add_to_blacklist => 'Thêm vào blacklist'; - - @override - String get remove_from_blacklist => 'Xóa khỏi blacklist'; - - @override - String get share => 'Chia sẻ'; - - @override - String get mini_player => 'Trình phát thu nhỏ'; - - @override - String get slide_to_seek => 'Trượt để tìm kiếm tiến hoặc lùi'; - - @override - String get shuffle_playlist => 'Xáo trộn bài hát'; - - @override - String get unshuffle_playlist => 'Hủy xáo trộn bài hát'; - - @override - String get previous_track => 'Bài hát trước'; - - @override - String get next_track => 'Bài hát tiếp theo'; - - @override - String get pause_playback => 'Tạm dừng phát'; - - @override - String get resume_playback => 'Tiếp tục phát'; - - @override - String get loop_track => 'Lặp lại bài hát'; - - @override - String get no_loop => 'Không lặp lại'; - - @override - String get repeat_playlist => 'Lặp lại danh sách phát'; - - @override - String get queue => 'Hàng đợi'; - - @override - String get alternative_track_sources => 'Đổi nguồn bài hát'; - - @override - String get download_track => 'Tải xuống'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks bài hát trong hàng đợi'; - } - - @override - String get clear_all => 'Xóa tất cả'; - - @override - String get show_hide_ui_on_hover => - 'Hiển thị/Ẩn giao diện người dùng khi di chuột qua'; - - @override - String get always_on_top => 'Luôn ở trên cùng'; - - @override - String get exit_mini_player => 'Thoát khỏi trình phát thu nhỏ'; - - @override - String get download_location => 'Vị trí tải xuống'; - - @override - String get local_library => 'Thư viện địa phương'; - - @override - String get add_library_location => 'Thêm vào thư viện'; - - @override - String get remove_library_location => 'Xóa khỏi thư viện'; - - @override - String get account => 'Tài khoản'; - - @override - String get logout => 'Đăng xuất'; - - @override - String get logout_of_this_account => 'Đăng xuất khỏi tài khoản này'; - - @override - String get language_region => 'Ngôn ngữ và Khu vực'; - - @override - String get language => 'Ngôn ngữ'; - - @override - String get system_default => 'Mặc định hệ thống'; - - @override - String get market_place_region => 'Khu vực Marketplace'; - - @override - String get recommendation_country => 'Quốc gia gợi ý'; - - @override - String get appearance => 'Giao diện'; - - @override - String get layout_mode => 'Chế độ layout'; - - @override - String get override_layout_settings => 'Ghi đè cài đặt layout'; - - @override - String get adaptive => 'Tương thích'; - - @override - String get compact => 'Nhỏ gọn'; - - @override - String get extended => 'Mở rộng'; - - @override - String get theme => 'Chủ đề'; - - @override - String get dark => 'Tối'; - - @override - String get light => 'Sáng'; - - @override - String get system => 'Hệ thống'; - - @override - String get accent_color => 'Màu nhấn'; - - @override - String get sync_album_color => 'Đồng bộ màu album'; - - @override - String get sync_album_color_description => - 'Sử dụng màu chủ đạo của hình ảnh album làm màu nhấn'; - - @override - String get playback => 'Phát'; - - @override - String get audio_quality => 'Chất lượng âm thanh'; - - @override - String get high => 'Cao'; - - @override - String get low => 'Thấp'; - - @override - String get pre_download_play => 'Tải xuống và phát'; - - @override - String get pre_download_play_description => - 'Thay vì stream âm thanh, tải xuống trước và phát (Khuyến nghị cho người dùng có băng thông cao)'; - - @override - String get skip_non_music => 'Bỏ qua các đoạn không phải nhạc (SponsorBlock)'; - - @override - String get blacklist_description => 'Các bài hát và nghệ sĩ trong blacklist'; - - @override - String get wait_for_download_to_finish => - 'Vui lòng đợi quá trình tải xuống hiện tại hoàn thành'; - - @override - String get desktop => 'Máy tính'; - - @override - String get close_behavior => 'Thao tác đóng'; - - @override - String get close => 'Đóng'; - - @override - String get minimize_to_tray => 'Thu nhỏ vào khay hệ thống'; - - @override - String get show_tray_icon => 'Hiển thị biểu tượng trên khay hệ thống'; - - @override - String get about => 'Về chúng tôi'; - - @override - String get u_love_spotube => 'Chúng tôi biết bạn yêu Spotube'; - - @override - String get check_for_updates => 'Kiểm tra cập nhật'; - - @override - String get about_spotube => 'Về Spotube'; - - @override - String get blacklist => 'blacklist'; - - @override - String get please_sponsor => 'Vui lòng tài trợ/ủng hộ'; - - @override - String get spotube_description => - 'Spotube, một ứng dụng Spotify nhẹ, đa nền tảng và miễn phí'; - - @override - String get version => 'Phiên bản'; - - @override - String get build_number => 'Số phiên bản'; - - @override - String get founder => 'Người sáng lập'; - - @override - String get repository => 'Mã nguồn'; - - @override - String get bug_issues => 'Báo cáo lỗi'; - - @override - String get made_with => 'Được làm bằng ❤️ ở Băng-la-đét'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => 'Giấy phép'; - - @override - String get credentials_will_not_be_shared_disclaimer => - 'Đừng lo, thông tin đăng nhập của bạn sẽ không được thu thập hoặc chia sẻ với bất kỳ ai'; - - @override - String get know_how_to_login => 'Không biết cách lấy thông tin đăng nhập?'; - - @override - String get follow_step_by_step_guide => 'Các bước lấy thông tin đăng nhập'; - - @override - String cookie_name_cookie(Object name) { - return 'Cookie $name'; - } - - @override - String get fill_in_all_fields => 'Vui lòng điền đầy đủ thông tin'; - - @override - String get submit => 'Gửi'; - - @override - String get exit => 'Thoát'; - - @override - String get previous => 'Trước'; - - @override - String get next => 'Tiếp'; - - @override - String get done => 'Hoàn tất'; - - @override - String get step_1 => 'Bước 1'; - - @override - String get first_go_to => 'Đầu tiên, truy cập'; - - @override - String get something_went_wrong => 'Đã xảy ra lỗi'; - - @override - String get piped_instance => 'Phiên bản Server Piped'; - - @override - String get piped_description => - 'Phiên bản Piped để sử dụng cho Track matching'; - - @override - String get piped_warning => - 'Một số phiên bản Piped có thể không hoạt động tốt'; - - @override - String get invidious_instance => 'Phiên bản máy chủ Invidious'; - - @override - String get invidious_description => - 'Phiên bản máy chủ Invidious để sử dụng để so khớp bản nhạc'; - - @override - String get invidious_warning => - 'Một số có thể sẽ không hoạt động tốt. Vì vậy hãy sử dụng với rủi ro của riêng bạn'; - - @override - String get generate => 'Tạo'; - - @override - String track_exists(Object track) { - return 'Bài hát $track đã tồn tại'; - } - - @override - String get replace_downloaded_tracks => 'Thay thế tất cả các bài hát đã tải'; - - @override - String get skip_download_tracks => - 'Bỏ qua tải xuống tất cả các bài hát đã tải'; - - @override - String get do_you_want_to_replace => - 'Bạn có muốn thay thế bài hát hiện có không?'; - - @override - String get replace => 'Thay thế'; - - @override - String get skip => 'Bỏ qua'; - - @override - String select_up_to_count_type(Object count, Object type) { - return 'Chọn tối đa $count $type'; - } - - @override - String get select_genres => 'Chọn Thể loại'; - - @override - String get add_genres => 'Thêm Thể loại'; - - @override - String get country => 'Quốc gia'; - - @override - String get number_of_tracks_generate => 'Số lượng bài hát để tạo'; - - @override - String get acousticness => 'Độ âm thanh'; - - @override - String get danceability => 'Khả năng nhảy'; - - @override - String get energy => 'Năng lượng'; - - @override - String get instrumentalness => 'Độ nhạc cụ'; - - @override - String get liveness => 'Sống động'; - - @override - String get loudness => 'Độ ồn'; - - @override - String get speechiness => 'Độ nói'; - - @override - String get valence => 'Tính tích cực'; - - @override - String get popularity => 'Độ phổ biến'; - - @override - String get key => 'Tông'; - - @override - String get duration => 'Thời lượng (giây)'; - - @override - String get tempo => 'Nhịp độ (BPM)'; - - @override - String get mode => 'Chế độ'; - - @override - String get time_signature => 'Chữ ký thời gian'; - - @override - String get short => 'Ngắn'; - - @override - String get medium => 'Trung bình'; - - @override - String get long => 'Dài'; - - @override - String get min => 'Tối thiểu'; - - @override - String get max => 'Tối đa'; - - @override - String get target => 'Mục tiêu'; - - @override - String get moderate => 'Trung bình'; - - @override - String get deselect_all => 'Bỏ chọn tất cả'; - - @override - String get select_all => 'Chọn tất cả'; - - @override - String get are_you_sure => 'Bạn có chắc chắn?'; - - @override - String get generating_playlist => - 'Đang tạo danh sách phát tùy chỉnh của bạn...'; - - @override - String selected_count_tracks(Object count) { - return 'Đã chọn $count bài hát'; - } - - @override - String get download_warning => - 'Tải xuống tất cả các bài hát một lần, sẽ vi phạm bản quyền âm nhạc và gây thiệt hại cho xã hội sáng tạo âm nhạc. Hy vọng bạn nhận thức được điều này. Hãy luôn tôn trọng và ủng hộ công sức của nghệ sĩ'; - - @override - String get download_ip_ban_warning => - 'Địa chỉ IP của bạn có thể bị chặn trên YouTube do yêu cầu tải xuống quá mức so với bình thường. Chặn IP có nghĩa là bạn không thể sử dụng YouTube (ngay cả khi bạn đã đăng nhập) ít nhất 2-3 tháng từ thiết bị IP đó. Và Spotube không chịu trách nhiệm nếu điều này xảy ra'; - - @override - String get by_clicking_accept_terms => - 'Bằng cách nhấp vào \'Chấp nhận\', bạn đồng ý với các điều khoản sau:'; - - @override - String get download_agreement_1 => - 'Tôi biết mình đang vi phạm bản quyền âm nhạc. Đó là không tốt.'; - - @override - String get download_agreement_2 => - 'Tôi sẽ ủng hộ nghệ sĩ bất cứ nơi nào tôi có thể và tôi chỉ làm điều này vì tôi không có tiền để mua tác phẩm của họ'; - - @override - String get download_agreement_3 => - 'Tôi hoàn toàn nhận thức được rằng địa chỉ IP của tôi có thể bị chặn trên YouTube và tôi không đổ lỗi cho Spotube hoặc chủ sở hữu/người đóng góp của nó về bất kỳ tai nạn nào do hành động này của tôi'; - - @override - String get decline => 'Từ chối'; - - @override - String get accept => 'Chấp nhận'; - - @override - String get details => 'Chi tiết'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => 'Kênh'; - - @override - String get likes => 'Thích'; - - @override - String get dislikes => 'Không thích'; - - @override - String get views => 'Lượt xem'; - - @override - String get streamUrl => 'URL phát trực tiếp'; - - @override - String get stop => 'Dừng'; - - @override - String get sort_newest => 'Sắp xếp theo mới nhất'; - - @override - String get sort_oldest => 'Sắp xếp theo cũ nhất'; - - @override - String get sleep_timer => 'Hẹn giờ tắt'; - - @override - String mins(Object minutes) { - return '$minutes Phút'; - } - - @override - String hours(Object hours) { - return '$hours Giờ'; - } - - @override - String hour(Object hours) { - return '$hours Giờ'; - } - - @override - String get custom_hours => 'Giờ Tùy chỉnh'; - - @override - String get logs => 'Nhật ký'; - - @override - String get developers => 'Nhà phát triển'; - - @override - String get not_logged_in => 'Bạn chưa đăng nhập'; - - @override - String get search_mode => 'Chế độ tìm kiếm'; - - @override - String get audio_source => 'Nguồn âm thanh'; - - @override - String get ok => 'Ok'; - - @override - String get failed_to_encrypt => 'Mã hóa không thành công'; - - @override - String get encryption_failed_warning => - 'Spotube không thành công trong việc mã hóa nhằm lưu trữ dữ liêu an toàn. vậy nên sẽ chuyển về lưu trữ không an toàn\nNếu bạn đang sử dụng Linux, đảm bảo rằng bạn có sử dụng dịch vụ bảo mật (gnome-keyring, kde-wallet, keepassxc, v.v.)'; - - @override - String get querying_info => 'Đang truy vấn thông tin...'; - - @override - String get piped_api_down => 'API Piped đang gặp sự cố'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return 'Phiên bản Piped $pipedInstance hiện đang gặp sự cố\n\nThay đổi phiên bản hoặc thay đổi \'Loại API\' thành API YouTube official\n\nKhởi động lai ứng dụng sau khi thay đổi.'; - } - - @override - String get you_are_offline => 'Bạn đang ngoại tuyến'; - - @override - String get connection_restored => - 'Kết nối internet của bạn đã được khôi phục'; - - @override - String get use_system_title_bar => 'Sử dụng thanh tiêu đề hệ thống'; - - @override - String get crunching_results => 'Đang tìm kiếm...'; - - @override - String get search_to_get_results => 'Chưa tìm kiếm'; - - @override - String get use_amoled_mode => 'Chủ đề tối hoàn toàn'; - - @override - String get pitch_dark_theme => 'Chế độ AMOLED'; - - @override - String get normalize_audio => 'Bình thường hóa âm thanh'; - - @override - String get change_cover => 'Thay đổi ảnh bìa'; - - @override - String get add_cover => 'Thêm ảnh bìa'; - - @override - String get restore_defaults => 'Khôi phục mặc định'; - - @override - String get download_music_format => 'Định dạng nhạc tải về'; - - @override - String get streaming_music_format => 'Định dạng nhạc phát trực tuyến'; - - @override - String get download_music_quality => 'Chất lượng nhạc tải về'; - - @override - String get streaming_music_quality => 'Chất lượng nhạc phát trực tuyến'; - - @override - String get login_with_lastfm => 'Đăng nhập bằng tài khoản Last.fm'; - - @override - String get connect => 'Liên kết'; - - @override - String get disconnect_lastfm => 'Dừng liên kết Last.fm'; - - @override - String get disconnect => 'Ngắt kết nối'; - - @override - String get username => 'Tên người dùng'; - - @override - String get password => 'Mật khẩu'; - - @override - String get login => 'Đăng nhập'; - - @override - String get login_with_your_lastfm => - 'Đăng nhập bằng tài khoản Last.fm của bạn'; - - @override - String get scrobble_to_lastfm => 'Scrobble đến Last.fm'; - - @override - String get go_to_album => 'Đi đến Album'; - - @override - String get discord_rich_presence => 'Hiển thị trạng thái Discord'; - - @override - String get browse_all => 'Duyệt tất cả'; - - @override - String get genres => 'Thể loại'; - - @override - String get explore_genres => 'Khám phá Thể loại'; - - @override - String get friends => 'Bạn bè'; - - @override - String get no_lyrics_available => - 'Xin lỗi, không tìm thấy lời cho bài hát này'; - - @override - String get start_a_radio => 'Bắt đầu Một Đài phát thanh'; - - @override - String get how_to_start_radio => - 'Bạn muốn bắt đầu đài phát thanh như thế nào?'; - - @override - String get replace_queue_question => - 'Bạn muốn thay thế hàng đợi hiện tại hay thêm vào?'; - - @override - String get endless_playback => 'Phát không giới hạn'; - - @override - String get delete_playlist => 'Xóa Danh sách phát'; - - @override - String get delete_playlist_confirmation => - 'Bạn có chắc chắn muốn xóa danh sách phát này không?'; - - @override - String get local_tracks => 'Bài hát Địa phương'; - - @override - String get local_tab => 'Địa phương'; - - @override - String get song_link => 'Liên kết Bài hát'; - - @override - String get skip_this_nonsense => 'Bỏ qua bớt rối này'; - - @override - String get freedom_of_music => '“Sự Tự do của Âm nhạc”'; - - @override - String get freedom_of_music_palm => - '“Sự Tự do của Âm nhạc trong lòng bàn tay của bạn”'; - - @override - String get get_started => 'Bắt đầu thôi'; - - @override - String get youtube_source_description => - 'Được đề xuất và hoạt động tốt nhất.'; - - @override - String get piped_source_description => - 'Cảm thấy tự do? Giống như YouTube nhưng miễn phí hơn rất nhiều.'; - - @override - String get jiosaavn_source_description => 'Tốt nhất cho khu vực Nam Á.'; - - @override - String get invidious_source_description => - 'Tương tự như Piped nhưng có tính khả dụng cao hơn.'; - - @override - String highest_quality(Object quality) { - return 'Chất lượng Tốt nhất: $quality'; - } - - @override - String get select_audio_source => 'Chọn Nguồn Âm thanh'; - - @override - String get endless_playback_description => - 'Tự động thêm các bài hát mới\nvào cuối hàng đợi'; - - @override - String get choose_your_region => 'Chọn khu vực của bạn'; - - @override - String get choose_your_region_description => - 'Điều này sẽ giúp Spotube hiển thị nội dung phù hợp cho vị trí của bạn.'; - - @override - String get choose_your_language => 'Chọn ngôn ngữ của bạn'; - - @override - String get help_project_grow => 'Hãy giúp dự án này phát triển'; - - @override - String get help_project_grow_description => - 'Spotube là một dự án mã nguồn mở. Bạn có thể giúp dự án này phát triển bằng cách đóng góp vào dự án, báo cáo lỗi hoặc đề xuất tính năng mới.'; - - @override - String get contribute_on_github => 'Đóng góp trên GitHub'; - - @override - String get donate_on_open_collective => 'Quyên góp trên Open Collective'; - - @override - String get browse_anonymously => 'Duyệt Anonymously'; - - @override - String get enable_connect => 'Kích hoạt kết nối'; - - @override - String get enable_connect_description => - 'Điều khiển Spotube từ các thiết bị khác'; - - @override - String get devices => 'Thiết bị'; - - @override - String get select => 'Chọn'; - - @override - String connect_client_alert(Object client) { - return 'Bạn đang được điều khiển bởi $client'; - } - - @override - String get this_device => 'Thiết bị này'; - - @override - String get remote => 'Từ xa'; - - @override - String get stats => 'Thống kê'; - - @override - String and_n_more(Object count) { - return 'và $count cái khác'; - } - - @override - String get recently_played => 'Gần đây đã phát'; - - @override - String get browse_more => 'Xem thêm'; - - @override - String get no_title => 'Không có tiêu đề'; - - @override - String get not_playing => 'Không phát'; - - @override - String get epic_failure => 'Thất bại hoàn toàn!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return 'Đã thêm $tracks_length bài hát vào danh sách phát'; - } - - @override - String get spotube_has_an_update => 'Spotube có bản cập nhật'; - - @override - String get download_now => 'Tải về ngay'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum đã được phát hành'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version đã được phát hành'; - } - - @override - String get read_the_latest => 'Đọc tin mới nhất'; - - @override - String get release_notes => 'ghi chú phát hành'; - - @override - String get pick_color_scheme => 'Chọn chủ đề màu sắc'; - - @override - String get save => 'Lưu'; - - @override - String get choose_the_device => 'Chọn thiết bị:'; - - @override - String get multiple_device_connected => - 'Có nhiều thiết bị kết nối.\nChọn thiết bị mà bạn muốn thực hiện hành động này'; - - @override - String get nothing_found => 'Không tìm thấy gì'; - - @override - String get the_box_is_empty => 'Hộp trống'; - - @override - String get top_artists => 'Những Nghệ Sĩ Hàng Đầu'; - - @override - String get top_albums => 'Những Album Hàng Đầu'; - - @override - String get this_week => 'Tuần này'; - - @override - String get this_month => 'Tháng này'; - - @override - String get last_6_months => '6 tháng qua'; - - @override - String get this_year => 'Năm nay'; - - @override - String get last_2_years => '2 năm qua'; - - @override - String get all_time => 'Mọi thời đại'; - - @override - String powered_by_provider(Object providerName) { - return 'Cung cấp bởi $providerName'; - } - - @override - String get email => 'Email'; - - @override - String get profile_followers => 'Người theo dõi'; - - @override - String get birthday => 'Ngày sinh'; - - @override - String get subscription => 'Gói cước'; - - @override - String get not_born => 'Chưa sinh'; - - @override - String get hacker => 'Tin tặc'; - - @override - String get profile => 'Hồ sơ'; - - @override - String get no_name => 'Không có tên'; - - @override - String get edit => 'Chỉnh sửa'; - - @override - String get user_profile => 'Hồ sơ người dùng'; - - @override - String count_plays(Object count) { - return '$count lần phát'; - } - - @override - String get streaming_fees_hypothetical => - '*Tính toán dựa trên thanh toán của Spotify cho mỗi lần phát\ntừ \$0.003 đến \$0.005. Đây là một tính toán giả định để\ngive người dùng cái nhìn về số tiền họ sẽ chi trả cho các nghệ sĩ nếu họ nghe\nbài hát của họ trên Spotify.'; - - @override - String get minutes_listened => 'Thời gian nghe'; - - @override - String get streamed_songs => 'Bài hát đã phát'; - - @override - String count_streams(Object count) { - return '$count lượt phát'; - } - - @override - String get owned_by_you => 'Thuộc sở hữu của bạn'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl đã sao chép vào bảng tạm'; - } - - @override - String get hipotetical_calculation => - '*Điều này được tính toán dựa trên khoản thanh toán trung bình mỗi luồng của nền tảng phát nhạc trực tuyến là \$0,003 đến \$0,005. Đây là một phép tính giả định để cung cấp cho người dùng cái nhìn sâu sắc về số tiền họ đã trả cho các nghệ sĩ nếu họ nghe bài hát của họ trên các nền tảng phát nhạc trực tuyến khác nhau.'; - - @override - String count_mins(Object minutes) { - return '$minutes phút'; - } - - @override - String get summary_minutes => 'phút'; - - @override - String get summary_listened_to_music => 'Đã nghe nhạc'; - - @override - String get summary_songs => 'bài hát'; - - @override - String get summary_streamed_overall => 'Stream tổng cộng'; - - @override - String get summary_owed_to_artists => 'Nợ nghệ sĩ\ntrong tháng này'; - - @override - String get summary_artists => 'nghệ sĩ'; - - @override - String get summary_music_reached_you => 'Âm nhạc đã đến với bạn'; - - @override - String get summary_full_albums => 'album đầy đủ'; - - @override - String get summary_got_your_love => 'Nhận được tình yêu của bạn'; - - @override - String get summary_playlists => 'danh sách phát'; - - @override - String get summary_were_on_repeat => 'Đã được phát lại'; - - @override - String total_money(Object money) { - return 'Tổng cộng $money'; - } - - @override - String get webview_not_found => 'Không tìm thấy Webview'; - - @override - String get webview_not_found_description => - 'Không có runtime Webview nào được cài đặt trên thiết bị của bạn.\nNếu đã cài đặt, hãy đảm bảo rằng nó nằm trong environment PATH\n\nSau khi cài đặt, hãy khởi động lại ứng dụng'; - - @override - String get unsupported_platform => 'Nền tảng không được hỗ trợ'; - - @override - String get cache_music => 'Lưu nhạc vào bộ nhớ đệm'; - - @override - String get open => 'Mở'; - - @override - String get cache_folder => 'Thư mục bộ nhớ đệm'; - - @override - String get export => 'Xuất'; - - @override - String get clear_cache => 'Xóa bộ nhớ đệm'; - - @override - String get clear_cache_confirmation => 'Bạn có muốn xóa bộ nhớ đệm không?'; - - @override - String get export_cache_files => 'Xuất các tệp được lưu trong bộ nhớ đệm'; - - @override - String found_n_files(Object count) { - return 'Tìm thấy $count tệp'; - } - - @override - String get export_cache_confirmation => 'Bạn có muốn xuất các tệp này đến'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return 'Đã xuất $filesExported trên $files tệp'; - } - - @override - String get undo => 'Hoàn tác'; - - @override - String get download_all => 'Tải xuống tất cả'; - - @override - String get add_all_to_playlist => 'Thêm tất cả vào danh sách phát'; - - @override - String get add_all_to_queue => 'Thêm tất cả vào danh sách chờ'; - - @override - String get play_all_next => 'Chơi tất cả tiếp theo'; - - @override - String get pause => 'Tạm dừng'; - - @override - String get view_all => 'Xem tất cả'; - - @override - String get no_tracks_added_yet => 'Có vẻ bạn chưa thêm bất kỳ bài hát nào'; - - @override - String get no_tracks => 'Có vẻ không có bài hát nào ở đây'; - - @override - String get no_tracks_listened_yet => 'Có vẻ bạn chưa nghe gì cả'; - - @override - String get not_following_artists => - 'Bạn không đang theo dõi bất kỳ nghệ sĩ nào'; - - @override - String get no_favorite_albums_yet => - 'Có vẻ bạn chưa thêm album nào vào danh sách yêu thích'; - - @override - String get no_logs_found => 'Không tìm thấy nhật ký'; - - @override - String get youtube_engine => 'Công cụ YouTube'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine chưa được cài đặt'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine chưa được cài đặt trong hệ thống của bạn.'; - } - - @override - String youtube_engine_set_path(Object engine) { - return 'Đảm bảo nó có sẵn trong biến PATH hoặc\nđặt đường dẫn tuyệt đối đến tệp thực thi $engine dưới đây'; - } - - @override - String get youtube_engine_unix_issue_message => - 'Trên macOS/Linux/Unix, việc thiết lập đường dẫn trong .zshrc/.bashrc/.bash_profile v.v. sẽ không hoạt động.\nBạn cần thiết lập đường dẫn trong tệp cấu hình shell'; - - @override - String get download => 'Tải xuống'; - - @override - String get file_not_found => 'Không tìm thấy tệp'; - - @override - String get custom => 'Tùy chỉnh'; - - @override - String get add_custom_url => 'Thêm URL tùy chỉnh'; - - @override - String get edit_port => 'Chỉnh sửa cổng'; - - @override - String get port_helper_msg => - 'Mặc định là -1, có nghĩa là số ngẫu nhiên. Nếu bạn đã cấu hình tường lửa, nên đặt điều này.'; - - @override - String connect_request(Object client) { - return 'Cho phép $client kết nối?'; - } - - @override - String get connection_request_denied => - 'Kết nối bị từ chối. Người dùng đã từ chối quyền truy cập.'; - - @override - String get an_error_occurred => 'Đã xảy ra lỗi'; - - @override - String get copy_to_clipboard => 'Sao chép vào khay nhớ tạm'; - - @override - String get view_logs => 'Xem nhật ký'; - - @override - String get retry => 'Thử lại'; - - @override - String get no_default_metadata_provider_selected => - 'Bạn chưa đặt nhà cung cấp siêu dữ liệu mặc định nào'; - - @override - String get manage_metadata_providers => 'Quản lý nhà cung cấp siêu dữ liệu'; - - @override - String get open_link_in_browser => 'Mở liên kết trong Trình duyệt?'; - - @override - String get do_you_want_to_open_the_following_link => - 'Bạn có muốn mở liên kết sau không'; - - @override - String get unsafe_url_warning => - 'Việc mở các liên kết từ các nguồn không đáng tin cậy có thể không an toàn. Hãy thận trọng!\nBạn cũng có thể sao chép liên kết vào khay nhớ tạm của mình.'; - - @override - String get copy_link => 'Sao chép liên kết'; - - @override - String get building_your_timeline => - 'Đang xây dựng dòng thời gian của bạn dựa trên những gì bạn đã nghe...'; - - @override - String get official => 'Chính thức'; - - @override - String author_name(Object author) { - return 'Tác giả: $author'; - } - - @override - String get third_party => 'Bên thứ ba'; - - @override - String get plugin_requires_authentication => 'Plugin yêu cầu xác thực'; - - @override - String get update_available => 'Có bản cập nhật'; - - @override - String get supports_scrobbling => 'Hỗ trợ scrobbling'; - - @override - String get plugin_scrobbling_info => - 'Plugin này scrobble nhạc của bạn để tạo lịch sử nghe của bạn.'; - - @override - String get default_metadata_source => 'Nguồn siêu dữ liệu mặc định'; - - @override - String get set_default_metadata_source => 'Đặt nguồn siêu dữ liệu mặc định'; - - @override - String get default_audio_source => 'Nguồn âm thanh mặc định'; - - @override - String get set_default_audio_source => 'Đặt nguồn âm thanh mặc định'; - - @override - String get set_default => 'Đặt làm mặc định'; - - @override - String get support => 'Hỗ trợ'; - - @override - String get support_plugin_development => 'Hỗ trợ phát triển plugin'; - - @override - String can_access_name_api(Object name) { - return '- Có thể truy cập API **$name**'; - } - - @override - String get do_you_want_to_install_this_plugin => - 'Bạn có muốn cài đặt plugin này không?'; - - @override - String get third_party_plugin_warning => - 'Plugin này đến từ một kho lưu trữ của bên thứ ba. Vui lòng đảm bảo rằng bạn tin tưởng nguồn trước khi cài đặt.'; - - @override - String get author => 'Tác giả'; - - @override - String get this_plugin_can_do_following => - 'Plugin này có thể làm những việc sau'; - - @override - String get install => 'Cài đặt'; - - @override - String get install_a_metadata_provider => - 'Cài đặt một Nhà cung cấp siêu dữ liệu'; - - @override - String get no_tracks_playing => 'Hiện không có bản nhạc nào đang phát'; - - @override - String get synced_lyrics_not_available => - 'Lời bài hát được đồng bộ hóa không có sẵn cho bài hát này. Vui lòng sử dụng'; - - @override - String get plain_lyrics => 'Lời bài hát thuần túy'; - - @override - String get tab_instead => 'thay thế.'; - - @override - String get disclaimer => 'Miễn trừ trách nhiệm'; - - @override - String get third_party_plugin_dmca_notice => - 'Nhóm Spotube không chịu bất kỳ trách nhiệm nào (bao gồm cả pháp lý) đối với bất kỳ plugin \"Bên thứ ba\" nào.\nVui lòng sử dụng chúng với rủi ro của riêng bạn. Đối với bất kỳ lỗi/vấn đề nào, vui lòng báo cáo chúng cho kho lưu trữ plugin.\n\nNếu bất kỳ plugin \"Bên thứ ba\" nào vi phạm ToS/DMCA của bất kỳ dịch vụ/thực thể pháp lý nào, vui lòng yêu cầu tác giả plugin \"Bên thứ ba\" hoặc nền tảng lưu trữ, ví dụ: GitHub/Codeberg, thực hiện hành động. Tất cả các plugin được liệt kê ở trên (được gắn nhãn \"Bên thứ ba\") đều là các plugin công cộng/do cộng đồng duy trì. Chúng tôi không quản lý chúng, vì vậy chúng tôi không thể thực hiện bất kỳ hành động nào đối với chúng.\n\n'; - - @override - String get input_does_not_match_format => - 'Đầu vào không khớp với định dạng yêu cầu'; - - @override - String get plugins => 'Tiện ích bổ sung'; - - @override - String get paste_plugin_download_url => - 'Dán url tải xuống hoặc url kho lưu trữ GitHub/Codeberg hoặc liên kết trực tiếp đến tệp .smplug'; - - @override - String get download_and_install_plugin_from_url => - 'Tải xuống và cài đặt plugin từ url'; - - @override - String failed_to_add_plugin_error(Object error) { - return 'Không thể thêm plugin: $error'; - } - - @override - String get upload_plugin_from_file => 'Tải lên plugin từ tệp'; - - @override - String get installed => 'Đã cài đặt'; - - @override - String get available_plugins => 'Các plugin có sẵn'; - - @override - String get configure_plugins => - 'Cấu hình nhà cung cấp siêu dữ liệu và tiện ích nguồn âm thanh riêng'; - - @override - String get audio_scrobblers => 'Bộ scrobbler âm thanh'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => 'Nguồn: '; - - @override - String get uncompressed => 'Không nén'; - - @override - String get dab_music_source_description => - 'Dành cho người yêu âm nhạc chất lượng cao. Cung cấp luồng âm thanh chất lượng cao/không nén. Phù hợp bài hát dựa trên ISRC chính xác.'; -} diff --git a/lib/l10n/generated/app_localizations_zh.dart b/lib/l10n/generated/app_localizations_zh.dart deleted file mode 100644 index ac7d4890..00000000 --- a/lib/l10n/generated/app_localizations_zh.dart +++ /dev/null @@ -1,3051 +0,0 @@ -// ignore: unused_import -import 'package:intl/intl.dart' as intl; -import 'app_localizations.dart'; - -// ignore_for_file: type=lint - -/// The translations for Chinese (`zh`). -class AppLocalizationsZh extends AppLocalizations { - AppLocalizationsZh([String locale = 'zh']) : super(locale); - - @override - String get guest => '访客'; - - @override - String get browse => '浏览'; - - @override - String get search => '搜索'; - - @override - String get library => '音乐库'; - - @override - String get lyrics => '歌词'; - - @override - String get settings => '设置'; - - @override - String get genre_categories_filter => '筛选类别...'; - - @override - String get genre => '探索歌单'; - - @override - String get personalized => '为你打造'; - - @override - String get featured => '推荐'; - - @override - String get new_releases => '新歌热播'; - - @override - String get songs => '歌曲'; - - @override - String playing_track(Object track) { - return '播放 $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return '这将清空当前的播放队列。$track_length 首歌曲将被移除\n你确定要继续吗?'; - } - - @override - String get load_more => '加载更多'; - - @override - String get playlists => '歌单'; - - @override - String get artists => '艺人'; - - @override - String get albums => '专辑'; - - @override - String get tracks => '歌曲'; - - @override - String get downloads => '下载'; - - @override - String get filter_playlists => '筛选歌单...'; - - @override - String get liked_tracks => '已点赞的歌曲'; - - @override - String get liked_tracks_description => '你点赞过的所有歌曲'; - - @override - String get playlist => '播放列表'; - - @override - String get create_a_playlist => '创建一个歌单'; - - @override - String get update_playlist => '更新播放列表'; - - @override - String get create => '创建'; - - @override - String get cancel => '取消'; - - @override - String get update => '更新'; - - @override - String get playlist_name => '歌单名称'; - - @override - String get name_of_playlist => '歌单的名称'; - - @override - String get description => '描述'; - - @override - String get public => '公开'; - - @override - String get collaborative => '共享协作'; - - @override - String get search_local_tracks => '搜索本地歌曲...'; - - @override - String get play => '播放'; - - @override - String get delete => '删除'; - - @override - String get none => '无'; - - @override - String get sort_a_z => '按字母正序'; - - @override - String get sort_z_a => '按字母倒序'; - - @override - String get sort_artist => '按艺人'; - - @override - String get sort_album => '按专辑'; - - @override - String get sort_duration => '按时长排序'; - - @override - String get sort_tracks => '排序方式'; - - @override - String currently_downloading(Object tracks_length) { - return '正在下载 ($tracks_length)'; - } - - @override - String get cancel_all => '取消全部'; - - @override - String get filter_artist => '筛选艺人...'; - - @override - String followers(Object followers) { - return '$followers 名关注者'; - } - - @override - String get add_artist_to_blacklist => '屏蔽该艺人'; - - @override - String get top_tracks => '热门歌曲'; - - @override - String get fans_also_like => '粉丝也喜欢'; - - @override - String get loading => '加载中...'; - - @override - String get artist => '艺人'; - - @override - String get blacklisted => '已屏蔽'; - - @override - String get following => '关注中'; - - @override - String get follow => '关注'; - - @override - String get artist_url_copied => '艺人的分享链接已复制至剪贴板'; - - @override - String added_to_queue(Object tracks) { - return '已添加 $tracks 首歌曲到播放队列'; - } - - @override - String get filter_albums => '筛选专辑...'; - - @override - String get synced => '同步'; - - @override - String get plain => '无同步'; - - @override - String get shuffle => '随机播放'; - - @override - String get search_tracks => '搜索歌曲...'; - - @override - String get released => '发行时间'; - - @override - String error(Object error) { - return '错误 $error'; - } - - @override - String get title => '标题'; - - @override - String get time => '时长'; - - @override - String get more_actions => '更多操作'; - - @override - String download_count(Object count) { - return '下载 ($count) 首歌曲'; - } - - @override - String add_count_to_playlist(Object count) { - return '添加 ($count) 首歌曲到歌单中'; - } - - @override - String add_count_to_queue(Object count) { - return '添加 ($count) 首歌曲到播放队列中'; - } - - @override - String play_count_next(Object count) { - return '接下来播放 ($count) 首歌曲'; - } - - @override - String get album => '专辑'; - - @override - String copied_to_clipboard(Object data) { - return '已将 $data 复制至剪贴板'; - } - - @override - String add_to_following_playlists(Object track) { - return '添加 $track 到以下播放列表'; - } - - @override - String get add => '添加'; - - @override - String added_track_to_queue(Object track) { - return '添加 $track 到播放队列'; - } - - @override - String get add_to_queue => '添加到播放队列'; - - @override - String track_will_play_next(Object track) { - return '$track 将在下一首播放'; - } - - @override - String get play_next => '下一首播放'; - - @override - String removed_track_from_queue(Object track) { - return '将 $track 从播放队列中移除'; - } - - @override - String get remove_from_queue => '从播放队列移除'; - - @override - String get remove_from_favorites => '取消点赞'; - - @override - String get save_as_favorite => '点赞'; - - @override - String get add_to_playlist => '添加到歌单'; - - @override - String get remove_from_playlist => '从歌单中移除'; - - @override - String get add_to_blacklist => '添加到屏蔽列表'; - - @override - String get remove_from_blacklist => '从屏蔽列表中移除'; - - @override - String get share => '分享'; - - @override - String get mini_player => '小窗模式'; - - @override - String get slide_to_seek => '滑动以前进或后退'; - - @override - String get shuffle_playlist => '随机播放歌单'; - - @override - String get unshuffle_playlist => '取消随机播放歌单'; - - @override - String get previous_track => '上一首歌曲'; - - @override - String get next_track => '下一首歌曲'; - - @override - String get pause_playback => '暂停播放'; - - @override - String get resume_playback => '恢复播放'; - - @override - String get loop_track => '单曲循环'; - - @override - String get no_loop => '无循环'; - - @override - String get repeat_playlist => '歌单循环'; - - @override - String get queue => '播放队列'; - - @override - String get alternative_track_sources => '其它音源'; - - @override - String get download_track => '下载歌曲'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks 首歌曲在播放队列中'; - } - - @override - String get clear_all => '清除全部'; - - @override - String get show_hide_ui_on_hover => '悬停时显示/隐藏控制栏'; - - @override - String get always_on_top => '置顶'; - - @override - String get exit_mini_player => '退出小窗模式'; - - @override - String get download_location => '下载路径'; - - @override - String get local_library => '本地图书馆'; - - @override - String get add_library_location => '添加到图书馆'; - - @override - String get remove_library_location => '从图书馆中删除'; - - @override - String get account => '账户'; - - @override - String get logout => '退出'; - - @override - String get logout_of_this_account => '退出该账户'; - - @override - String get language_region => '语言和地区'; - - @override - String get language => '语言'; - - @override - String get system_default => '系统默认'; - - @override - String get market_place_region => '市场地区'; - - @override - String get recommendation_country => '选择国家与地区以获取对应推荐'; - - @override - String get appearance => '外观'; - - @override - String get layout_mode => '布局类型'; - - @override - String get override_layout_settings => '将覆盖响应式布局设置'; - - @override - String get adaptive => '自适应'; - - @override - String get compact => '紧凑'; - - @override - String get extended => '宽广'; - - @override - String get theme => '主题'; - - @override - String get dark => '深色'; - - @override - String get light => '浅色'; - - @override - String get system => '系统'; - - @override - String get accent_color => '主色调'; - - @override - String get sync_album_color => '匹配封面颜色'; - - @override - String get sync_album_color_description => '选取专辑封面主题色作为主色调'; - - @override - String get playback => '播放'; - - @override - String get audio_quality => '音质'; - - @override - String get high => '高'; - - @override - String get low => '低'; - - @override - String get pre_download_play => '先下后播'; - - @override - String get pre_download_play_description => '先下载歌曲后再播放而非流式播放(推荐带宽较高用户使用)'; - - @override - String get skip_non_music => '跳过非音乐片段(屏蔽赞助商)'; - - @override - String get blacklist_description => '已屏蔽的歌曲与艺人'; - - @override - String get wait_for_download_to_finish => '请等待当前下载任务完成'; - - @override - String get desktop => '桌面端设置'; - - @override - String get close_behavior => '点击关闭按钮行为'; - - @override - String get close => '关闭'; - - @override - String get minimize_to_tray => '最小化到托盘'; - - @override - String get show_tray_icon => '显示托盘图标'; - - @override - String get about => '关于'; - - @override - String get u_love_spotube => '我们明白你喜欢 Spotube'; - - @override - String get check_for_updates => '检查更新'; - - @override - String get about_spotube => '关于 Spotube'; - - @override - String get blacklist => '屏蔽列表'; - - @override - String get please_sponsor => '请赞助/捐赠'; - - @override - String get spotube_description => 'Spotube,一个轻量、跨平台且完全免费的 Spotify 客户端。'; - - @override - String get version => '版本'; - - @override - String get build_number => '构建代码'; - - @override - String get founder => '发起人'; - - @override - String get repository => '源码'; - - @override - String get bug_issues => '缺陷和问题报告'; - - @override - String get made_with => '于孟加拉🇧🇩用 ❤️ 发电'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => '许可证'; - - @override - String get credentials_will_not_be_shared_disclaimer => - '不用担心,软件不会收集或分享任何个人数据给第三方'; - - @override - String get know_how_to_login => '不知道该怎么做?'; - - @override - String get follow_step_by_step_guide => '请按照以下指南进行'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => '请填写所有栏目'; - - @override - String get submit => '提交'; - - @override - String get exit => '退出'; - - @override - String get previous => '上一步'; - - @override - String get next => '下一步'; - - @override - String get done => '完成'; - - @override - String get step_1 => '步骤 1'; - - @override - String get first_go_to => '首先,前往'; - - @override - String get something_went_wrong => '某些地方出现了问题'; - - @override - String get piped_instance => 'Piped 服务器实例'; - - @override - String get piped_description => 'Piped 服务器实例用于匹配歌曲'; - - @override - String get piped_warning => '它们中的一部分可能并不能正常工作。使用时请自行承担风险'; - - @override - String get invidious_instance => 'Invidious服务器实例'; - - @override - String get invidious_description => '用于音轨匹配的Invidious服务器实例'; - - @override - String get invidious_warning => '有些可能无法正常工作。请自行承担风险'; - - @override - String get generate => '生成'; - - @override - String track_exists(Object track) { - return '歌曲 $track 已存在'; - } - - @override - String get replace_downloaded_tracks => '替换已下载的歌曲'; - - @override - String get skip_download_tracks => '下载时跳过已下载的歌曲'; - - @override - String get do_you_want_to_replace => '你确定要替换已下载的歌曲吗??'; - - @override - String get replace => '替换'; - - @override - String get skip => '跳过'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '选择多达 $count 种的类型 $type'; - } - - @override - String get select_genres => '选择曲风'; - - @override - String get add_genres => '添加曲风'; - - @override - String get country => '国家和地区'; - - @override - String get number_of_tracks_generate => '生成歌曲的数目'; - - @override - String get acousticness => '原声程度'; - - @override - String get danceability => '律动感'; - - @override - String get energy => '冲击感'; - - @override - String get instrumentalness => '歌唱部分占比'; - - @override - String get liveness => '现场感'; - - @override - String get loudness => '响度'; - - @override - String get speechiness => '朗诵比例'; - - @override - String get valence => '心理感受'; - - @override - String get popularity => '流行度'; - - @override - String get key => '曲调'; - - @override - String get duration => '歌曲时长 (s)'; - - @override - String get tempo => '分钟节拍数 (BPM)'; - - @override - String get mode => '旋律重复度'; - - @override - String get time_signature => '音符时值'; - - @override - String get short => '短'; - - @override - String get medium => '中'; - - @override - String get long => '长'; - - @override - String get min => '最低'; - - @override - String get max => '最高'; - - @override - String get target => '目标'; - - @override - String get moderate => '中'; - - @override - String get deselect_all => '取消全选'; - - @override - String get select_all => '全选'; - - @override - String get are_you_sure => '你确定吗?'; - - @override - String get generating_playlist => '正在生成你的自定义歌单...'; - - @override - String selected_count_tracks(Object count) { - return '已选择 $count 首歌曲'; - } - - @override - String get download_warning => - '如果你大量下载这些歌曲,你显然在侵犯音乐的版权并对音乐创作社区造成了伤害。我希望你能意识到这一点。永远要尊重并支持艺术家们的辛勤工作'; - - @override - String get download_ip_ban_warning => - '小心,如果出现超出正常的下载请求那你的 IP 可能会被 YouTube 封禁,这意味着你的设备将在长达 2-3 个月的时间内无法使用该 IP 访问 YouTube(即使你没登录)。Spotube 对此不承担任何责任'; - - @override - String get by_clicking_accept_terms => '点击 \'同意\' 代表着你同意以下的条款'; - - @override - String get download_agreement_1 => '我明白侵犯音乐版权是一件不好的事情'; - - @override - String get download_agreement_2 => '我将尽可能支持艺术家的工作。我现在之所以做不到是因为缺乏资金来购买正版'; - - @override - String get download_agreement_3 => - '我完全了解我的 IP 存在被 YouTube的风险。我同意 Spotube 的所有者与贡献者们无须对我目前的行为所导致的任何后果负责'; - - @override - String get decline => '拒绝'; - - @override - String get accept => '同意'; - - @override - String get details => '详情'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => '频道'; - - @override - String get likes => '赞'; - - @override - String get dislikes => '踩'; - - @override - String get views => '浏览次数'; - - @override - String get streamUrl => '播放流 URL'; - - @override - String get stop => '停止'; - - @override - String get sort_newest => '按添加日期正序'; - - @override - String get sort_oldest => '按添加日期倒序'; - - @override - String get sleep_timer => '睡眠定时器'; - - @override - String mins(Object minutes) { - return '$minutes 分'; - } - - @override - String hours(Object hours) { - return '$hours 时'; - } - - @override - String hour(Object hours) { - return '$hours 时'; - } - - @override - String get custom_hours => '自定义时间'; - - @override - String get logs => '日志'; - - @override - String get developers => '开发者'; - - @override - String get not_logged_in => '你尚未登录'; - - @override - String get search_mode => '搜索模式'; - - @override - String get audio_source => '音频源'; - - @override - String get ok => '确定'; - - @override - String get failed_to_encrypt => '加密失败'; - - @override - String get encryption_failed_warning => - 'Spotube使用加密来安全地存储您的数据。但是失败了。因此,它将回退到不安全的存储\n如果您使用Linux,请确保已安装gnome-keyring、kde-wallet和keepassxc等秘密服务'; - - @override - String get querying_info => '正在查询信息...'; - - @override - String get piped_api_down => 'Piped API不可用'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return '当前Piped实例$pipedInstance不可用\n\n请更改实例或将\'API类型\'更改为官方YouTube API\n\n更改后请确保重新启动应用程序'; - } - - @override - String get you_are_offline => '您当前处于离线状态'; - - @override - String get connection_restored => '您的互联网连接已恢复'; - - @override - String get use_system_title_bar => '使用系统标题栏'; - - @override - String get crunching_results => '处理结果中...'; - - @override - String get search_to_get_results => '搜索以获取结果'; - - @override - String get use_amoled_mode => '使用 AMOLED 模式'; - - @override - String get pitch_dark_theme => '深色主题'; - - @override - String get normalize_audio => '标准化音频'; - - @override - String get change_cover => '更改封面'; - - @override - String get add_cover => '添加封面'; - - @override - String get restore_defaults => '恢复默认值'; - - @override - String get download_music_format => '下载音乐格式'; - - @override - String get streaming_music_format => '流媒体音乐格式'; - - @override - String get download_music_quality => '下载音乐质量'; - - @override - String get streaming_music_quality => '流媒体音乐质量'; - - @override - String get login_with_lastfm => '使用 Last.fm 登录'; - - @override - String get connect => '连接'; - - @override - String get disconnect_lastfm => '断开 Last.fm 连接'; - - @override - String get disconnect => '断开连接'; - - @override - String get username => '用户名'; - - @override - String get password => '密码'; - - @override - String get login => '登录'; - - @override - String get login_with_your_lastfm => '使用您的 Last.fm 帐户登录'; - - @override - String get scrobble_to_lastfm => '在 Last.fm 上记录播放'; - - @override - String get go_to_album => '前往专辑'; - - @override - String get discord_rich_presence => 'Discord 丰富展现'; - - @override - String get browse_all => '浏览全部'; - - @override - String get genres => '音乐类型'; - - @override - String get explore_genres => '探索音乐类型'; - - @override - String get friends => '朋友'; - - @override - String get no_lyrics_available => '抱歉,无法找到此曲的歌词'; - - @override - String get start_a_radio => '开始收听电台'; - - @override - String get how_to_start_radio => '您想如何开始收听电台?'; - - @override - String get replace_queue_question => '您想要替换当前队列还是追加到队列?'; - - @override - String get endless_playback => '无尽播放'; - - @override - String get delete_playlist => '删除播放列表'; - - @override - String get delete_playlist_confirmation => '您确定要删除此播放列表吗?'; - - @override - String get local_tracks => '本地音轨'; - - @override - String get local_tab => '本地'; - - @override - String get song_link => '歌曲链接'; - - @override - String get skip_this_nonsense => '跳过此无聊内容'; - - @override - String get freedom_of_music => '“音乐的自由”'; - - @override - String get freedom_of_music_palm => '“音乐的自由掌握在您手中”'; - - @override - String get get_started => '让我们开始吧'; - - @override - String get youtube_source_description => '推荐并且效果最佳。'; - - @override - String get piped_source_description => '感觉自由?与YouTube一样但更自由。'; - - @override - String get jiosaavn_source_description => '最适合南亚地区。'; - - @override - String get invidious_source_description => '类似于Piped,但可用性更高。'; - - @override - String highest_quality(Object quality) { - return '最高音质:$quality'; - } - - @override - String get select_audio_source => '选择音频源'; - - @override - String get endless_playback_description => '自动将新歌曲添加到队列的末尾'; - - @override - String get choose_your_region => '选择您的地区'; - - @override - String get choose_your_region_description => '这将帮助Spotube为您的位置显示正确的内容。'; - - @override - String get choose_your_language => '选择您的语言'; - - @override - String get help_project_grow => '帮助这个项目成长'; - - @override - String get help_project_grow_description => - 'Spotube是一个开源项目。您可以通过为项目做出贡献、报告错误或建议新功能来帮助该项目成长。'; - - @override - String get contribute_on_github => '在GitHub上做出贡献'; - - @override - String get donate_on_open_collective => '在Open Collective上捐款'; - - @override - String get browse_anonymously => '匿名浏览'; - - @override - String get enable_connect => '启用连接'; - - @override - String get enable_connect_description => '从其他设备控制Spotube'; - - @override - String get devices => '设备'; - - @override - String get select => '选择'; - - @override - String connect_client_alert(Object client) { - return '您正在被 $client 控制'; - } - - @override - String get this_device => '此设备'; - - @override - String get remote => '远程'; - - @override - String get stats => '统计'; - - @override - String and_n_more(Object count) { - return '和 $count 更多'; - } - - @override - String get recently_played => '最近播放'; - - @override - String get browse_more => '浏览更多'; - - @override - String get no_title => '没有标题'; - - @override - String get not_playing => '未播放'; - - @override - String get epic_failure => '史诗级失败!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '已将 $tracks_length 首曲目添加到队列'; - } - - @override - String get spotube_has_an_update => 'Spotube 有更新'; - - @override - String get download_now => '立即下载'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum 已发布'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version 已发布'; - } - - @override - String get read_the_latest => '阅读最新'; - - @override - String get release_notes => '版本说明'; - - @override - String get pick_color_scheme => '选择配色方案'; - - @override - String get save => '保存'; - - @override - String get choose_the_device => '选择设备:'; - - @override - String get multiple_device_connected => '已连接多个设备。\n选择您希望执行此操作的设备'; - - @override - String get nothing_found => '未找到任何内容'; - - @override - String get the_box_is_empty => '箱子为空'; - - @override - String get top_artists => '热门艺术家'; - - @override - String get top_albums => '热门专辑'; - - @override - String get this_week => '本周'; - - @override - String get this_month => '本月'; - - @override - String get last_6_months => '过去6个月'; - - @override - String get this_year => '今年'; - - @override - String get last_2_years => '过去2年'; - - @override - String get all_time => '所有时间'; - - @override - String powered_by_provider(Object providerName) { - return '由 $providerName 提供支持'; - } - - @override - String get email => '电子邮件'; - - @override - String get profile_followers => '关注者'; - - @override - String get birthday => '生日'; - - @override - String get subscription => '订阅'; - - @override - String get not_born => '尚未出生'; - - @override - String get hacker => '黑客'; - - @override - String get profile => '个人资料'; - - @override - String get no_name => '无名'; - - @override - String get edit => '编辑'; - - @override - String get user_profile => '用户资料'; - - @override - String count_plays(Object count) { - return '$count 次播放'; - } - - @override - String get streaming_fees_hypothetical => - '*基于 Spotify 每次播放的支付金额\n从 \$0.003 到 \$0.005 计算。这是一个假设性的\n计算,旨在让用户了解如果他们在 Spotify 上收听\n这些歌曲,可能会付给艺术家的金额。'; - - @override - String get minutes_listened => '听的分钟数'; - - @override - String get streamed_songs => '已流媒体歌曲'; - - @override - String count_streams(Object count) { - return '$count 次流媒体'; - } - - @override - String get owned_by_you => '由您拥有'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl 已复制到剪贴板'; - } - - @override - String get hipotetical_calculation => - '*这是根据在线音乐流媒体平台每流平均支付0.003美元至0.005美元计算得出的。这是一个假设性的计算,旨在让用户了解如果他们在不同的音乐流媒体平台上收听歌曲,他们将需要向艺人支付多少费用。'; - - @override - String count_mins(Object minutes) { - return '$minutes 分钟'; - } - - @override - String get summary_minutes => '分钟'; - - @override - String get summary_listened_to_music => '听音乐'; - - @override - String get summary_songs => '歌曲'; - - @override - String get summary_streamed_overall => '总体流媒体'; - - @override - String get summary_owed_to_artists => '本月欠艺术家的'; - - @override - String get summary_artists => '艺术家的'; - - @override - String get summary_music_reached_you => '音乐触及了你'; - - @override - String get summary_full_albums => '完整专辑'; - - @override - String get summary_got_your_love => '获得了你的爱'; - - @override - String get summary_playlists => '播放列表'; - - @override - String get summary_were_on_repeat => '已重复播放'; - - @override - String total_money(Object money) { - return '总计 $money'; - } - - @override - String get webview_not_found => '未找到 Webview'; - - @override - String get webview_not_found_description => - '您的设备中未安装 Webview 运行时。\n如果已安装,请确保它在 environment PATH 中\n\n安装后,重新启动应用程序'; - - @override - String get unsupported_platform => '不支持的平台'; - - @override - String get cache_music => '缓存音乐'; - - @override - String get open => '打开'; - - @override - String get cache_folder => '缓存文件夹'; - - @override - String get export => '导出'; - - @override - String get clear_cache => '清除缓存'; - - @override - String get clear_cache_confirmation => '您要清除缓存吗?'; - - @override - String get export_cache_files => '导出缓存文件'; - - @override - String found_n_files(Object count) { - return '找到 $count 个文件'; - } - - @override - String get export_cache_confirmation => '您要导出这些文件到'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '导出了 $filesExported / $files 个文件'; - } - - @override - String get undo => '撤销'; - - @override - String get download_all => '下载全部'; - - @override - String get add_all_to_playlist => '将全部添加到播放列表'; - - @override - String get add_all_to_queue => '将全部添加到队列'; - - @override - String get play_all_next => '播放全部下一首'; - - @override - String get pause => '暂停'; - - @override - String get view_all => '查看所有'; - - @override - String get no_tracks_added_yet => '看起来你还没有添加任何曲目'; - - @override - String get no_tracks => '看起来这里没有任何曲目'; - - @override - String get no_tracks_listened_yet => '看起来你还没有听任何东西'; - - @override - String get not_following_artists => '你没有关注任何艺术家'; - - @override - String get no_favorite_albums_yet => '看起来你还没有将任何专辑添加到收藏夹'; - - @override - String get no_logs_found => '未找到日志'; - - @override - String get youtube_engine => 'YouTube 引擎'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine 未安装'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine 未在您的系统中安装。'; - } - - @override - String youtube_engine_set_path(Object engine) { - return '确保它可用在 PATH 变量中,或\n设置 $engine 可执行文件的绝对路径'; - } - - @override - String get youtube_engine_unix_issue_message => - '在 macOS/Linux/Unix 类操作系统中,在 .zshrc/.bashrc/.bash_profile 等文件中设置路径无效。\n您需要在 shell 配置文件中设置路径'; - - @override - String get download => '下载'; - - @override - String get file_not_found => '文件未找到'; - - @override - String get custom => '自定义'; - - @override - String get add_custom_url => '添加自定义 URL'; - - @override - String get edit_port => '编辑端口'; - - @override - String get port_helper_msg => '默认值为-1,表示随机数。如果您已配置防火墙,建议设置此项。'; - - @override - String connect_request(Object client) { - return '允许 $client 连接吗?'; - } - - @override - String get connection_request_denied => '连接被拒绝。用户拒绝访问。'; - - @override - String get an_error_occurred => '发生错误'; - - @override - String get copy_to_clipboard => '复制到剪贴板'; - - @override - String get view_logs => '查看日志'; - - @override - String get retry => '重试'; - - @override - String get no_default_metadata_provider_selected => '您未设置默认元数据提供者'; - - @override - String get manage_metadata_providers => '管理元数据提供者'; - - @override - String get open_link_in_browser => '在浏览器中打开链接?'; - - @override - String get do_you_want_to_open_the_following_link => '您想打开以下链接吗'; - - @override - String get unsafe_url_warning => '从不受信任的来源打开链接可能不安全。请谨慎!\n您也可以将链接复制到剪贴板。'; - - @override - String get copy_link => '复制链接'; - - @override - String get building_your_timeline => '正在根据您的收听记录构建您的时间线...'; - - @override - String get official => '官方'; - - @override - String author_name(Object author) { - return '作者:$author'; - } - - @override - String get third_party => '第三方'; - - @override - String get plugin_requires_authentication => '插件需要身份验证'; - - @override - String get update_available => '有可用更新'; - - @override - String get supports_scrobbling => '支持 Scrobbling'; - - @override - String get plugin_scrobbling_info => '此插件会 scrobble 您的音乐以生成您的收听历史记录。'; - - @override - String get default_metadata_source => '默认元数据源'; - - @override - String get set_default_metadata_source => '设置默认元数据源'; - - @override - String get default_audio_source => '默认音频源'; - - @override - String get set_default_audio_source => '设置默认音频源'; - - @override - String get set_default => '设为默认'; - - @override - String get support => '支持'; - - @override - String get support_plugin_development => '支持插件开发'; - - @override - String can_access_name_api(Object name) { - return '- 可以访问 **$name** API'; - } - - @override - String get do_you_want_to_install_this_plugin => '您想安装此插件吗?'; - - @override - String get third_party_plugin_warning => '此插件来自第三方存储库。请在安装前确保您信任此来源。'; - - @override - String get author => '作者'; - - @override - String get this_plugin_can_do_following => '此插件可以执行以下操作'; - - @override - String get install => '安装'; - - @override - String get install_a_metadata_provider => '安装元数据提供者'; - - @override - String get no_tracks_playing => '当前没有播放任何曲目'; - - @override - String get synced_lyrics_not_available => '此歌曲的同步歌词不可用。请使用'; - - @override - String get plain_lyrics => '纯歌词'; - - @override - String get tab_instead => '选项卡。'; - - @override - String get disclaimer => '免责声明'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube 团队对任何“第三方”插件不承担任何责任(包括法律责任)。\n请自行承担风险使用。对于任何错误/问题,请向插件存储库报告。\n\n如果任何“第三方”插件违反了任何服务/法律实体的服务条款/DMCA,请要求该“第三方”插件作者或托管平台(例如 GitHub/Codeberg)采取行动。上面列出的(标记为“第三方”)都是公共/社区维护的插件。我们不对此类插件进行管理,因此无法对其采取任何行动。\n\n'; - - @override - String get input_does_not_match_format => '输入与所需格式不匹配'; - - @override - String get plugins => '插件'; - - @override - String get paste_plugin_download_url => - '粘贴下载 URL、GitHub/Codeberg 存储库 URL 或 .smplug 文件的直接链接'; - - @override - String get download_and_install_plugin_from_url => '从 URL 下载并安装插件'; - - @override - String failed_to_add_plugin_error(Object error) { - return '添加插件失败:$error'; - } - - @override - String get upload_plugin_from_file => '从文件上传插件'; - - @override - String get installed => '已安装'; - - @override - String get available_plugins => '可用插件'; - - @override - String get configure_plugins => '配置您自己的元数据提供者和音频源插件'; - - @override - String get audio_scrobblers => '音频 Scrobblers'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => '来源:'; - - @override - String get uncompressed => '无损'; - - @override - String get dab_music_source_description => - '适合发烧友。提供高质量/无损音频流。基于 ISRC 的精确曲目匹配。'; -} - -/// The translations for Chinese, as used in Taiwan (`zh_TW`). -class AppLocalizationsZhTw extends AppLocalizationsZh { - AppLocalizationsZhTw() : super('zh_TW'); - - @override - String get guest => '訪客'; - - @override - String get browse => '瀏覽'; - - @override - String get search => '搜尋'; - - @override - String get library => '音樂庫'; - - @override - String get lyrics => '歌詞'; - - @override - String get settings => '設定'; - - @override - String get genre_categories_filter => '過濾分類...'; - - @override - String get genre => '探索歌單'; - - @override - String get personalized => '為你打造'; - - @override - String get featured => '推薦'; - - @override - String get new_releases => '新歌熱播'; - - @override - String get songs => '歌曲'; - - @override - String playing_track(Object track) { - return '播放 $track'; - } - - @override - String queue_clear_alert(Object track_length) { - return '這將清空目前的播放清單。$track_length 首歌曲將被移除\n你確定要繼續嗎?'; - } - - @override - String get load_more => '載入更多'; - - @override - String get playlists => '歌單'; - - @override - String get artists => '藝人'; - - @override - String get albums => '專輯'; - - @override - String get tracks => '歌曲'; - - @override - String get downloads => '下載'; - - @override - String get filter_playlists => '過濾歌單...'; - - @override - String get liked_tracks => '已按讚的歌曲'; - - @override - String get liked_tracks_description => '你按過讚的所有歌曲'; - - @override - String get playlist => '播放清單'; - - @override - String get create_a_playlist => '建立一個歌單'; - - @override - String get update_playlist => '更新播放清單'; - - @override - String get create => '建立'; - - @override - String get cancel => '取消'; - - @override - String get update => '更新'; - - @override - String get playlist_name => '歌單名稱'; - - @override - String get name_of_playlist => '歌單的名稱'; - - @override - String get description => '說明'; - - @override - String get public => '公開'; - - @override - String get collaborative => '共享協作'; - - @override - String get search_local_tracks => '搜尋本地歌曲...'; - - @override - String get play => '播放'; - - @override - String get delete => '刪除'; - - @override - String get none => '無'; - - @override - String get sort_a_z => '依字母順序'; - - @override - String get sort_z_a => '依字母倒序'; - - @override - String get sort_artist => '按藝人'; - - @override - String get sort_album => '按專輯'; - - @override - String get sort_duration => '依長度排序'; - - @override - String get sort_tracks => '排序方式'; - - @override - String currently_downloading(Object tracks_length) { - return '正在下載 ($tracks_length)'; - } - - @override - String get cancel_all => '取消全部'; - - @override - String get filter_artist => '過濾藝人...'; - - @override - String followers(Object followers) { - return '$followers 名追蹤者'; - } - - @override - String get add_artist_to_blacklist => '封鎖該藝人'; - - @override - String get top_tracks => '熱門歌曲'; - - @override - String get fans_also_like => '粉絲也喜歡'; - - @override - String get loading => '載入中...'; - - @override - String get artist => '藝人'; - - @override - String get blacklisted => '已封鎖'; - - @override - String get following => '關注中'; - - @override - String get follow => '關注'; - - @override - String get artist_url_copied => '此名藝人的分享連結已複製至剪貼簿'; - - @override - String added_to_queue(Object tracks) { - return '已新增 $tracks 首歌曲到播放清單'; - } - - @override - String get filter_albums => '過濾專輯...'; - - @override - String get synced => '同步'; - - @override - String get plain => '未同步'; - - @override - String get shuffle => '隨機播放'; - - @override - String get search_tracks => '搜尋歌曲...'; - - @override - String get released => '發表時間'; - - @override - String error(Object error) { - return '發生錯誤: $error'; - } - - @override - String get title => '標題'; - - @override - String get time => '時長'; - - @override - String get more_actions => '更多動作'; - - @override - String download_count(Object count) { - return '下載 ($count) 首歌曲'; - } - - @override - String add_count_to_playlist(Object count) { - return '將 ($count) 首歌曲新增到歌單中'; - } - - @override - String add_count_to_queue(Object count) { - return '新增 ($count) 首歌曲到播放清單'; - } - - @override - String play_count_next(Object count) { - return '接下來將播放 ($count) 首歌曲'; - } - - @override - String get album => '專輯'; - - @override - String copied_to_clipboard(Object data) { - return '已將 $data 複製至剪貼簿'; - } - - @override - String add_to_following_playlists(Object track) { - return '新增 $track 到以下播放清單'; - } - - @override - String get add => '新增'; - - @override - String added_track_to_queue(Object track) { - return '新增 $track 到播放清單'; - } - - @override - String get add_to_queue => '新增至播放清單'; - - @override - String track_will_play_next(Object track) { - return '$track 將在下一首播放'; - } - - @override - String get play_next => '下一首播放'; - - @override - String removed_track_from_queue(Object track) { - return '將 $track 從播放清單移除'; - } - - @override - String get remove_from_queue => '從播放清單移除'; - - @override - String get remove_from_favorites => '取消按讚'; - - @override - String get save_as_favorite => '按讚'; - - @override - String get add_to_playlist => '新增到歌單'; - - @override - String get remove_from_playlist => '從歌單移除'; - - @override - String get add_to_blacklist => '新增到已封鎖清單'; - - @override - String get remove_from_blacklist => '從已封鎖清單移除'; - - @override - String get share => '分享'; - - @override - String get mini_player => '小窗模式'; - - @override - String get slide_to_seek => '滑動以前進或後退'; - - @override - String get shuffle_playlist => '隨機播放歌單'; - - @override - String get unshuffle_playlist => '取消隨機播放歌單'; - - @override - String get previous_track => '上一首歌曲'; - - @override - String get next_track => '下一首歌'; - - @override - String get pause_playback => '暫停播放'; - - @override - String get resume_playback => '恢復播放'; - - @override - String get loop_track => '單曲循環'; - - @override - String get no_loop => '無循環'; - - @override - String get repeat_playlist => '歌單循環'; - - @override - String get queue => '播放清單'; - - @override - String get alternative_track_sources => '其它音源'; - - @override - String get download_track => '下載歌曲'; - - @override - String tracks_in_queue(Object tracks) { - return '$tracks 首歌曲在播放清單中'; - } - - @override - String get clear_all => '清除全部'; - - @override - String get show_hide_ui_on_hover => '游標暫留時顯示 / 隱藏控制列'; - - @override - String get always_on_top => '置頂'; - - @override - String get exit_mini_player => '退出小窗模式'; - - @override - String get download_location => '下載路徑'; - - @override - String get local_library => '本地媒體庫'; - - @override - String get add_library_location => '新增至媒體庫'; - - @override - String get remove_library_location => '從媒體庫移除'; - - @override - String get account => '帳戶'; - - @override - String get logout => '退出'; - - @override - String get logout_of_this_account => '退出該帳戶'; - - @override - String get language_region => '語言與地區'; - - @override - String get language => '語言'; - - @override - String get system_default => '系統預設'; - - @override - String get market_place_region => '市集地區'; - - @override - String get recommendation_country => '請選擇國家與地區以取得對應的音樂推薦'; - - @override - String get appearance => '外觀'; - - @override - String get layout_mode => '佈局類型'; - - @override - String get override_layout_settings => '將覆寫響應式佈局設定'; - - @override - String get adaptive => '響應式'; - - @override - String get compact => '緊湊'; - - @override - String get extended => '寬闊'; - - @override - String get theme => '主題'; - - @override - String get dark => '深色'; - - @override - String get light => '淺色'; - - @override - String get system => '依循系統'; - - @override - String get accent_color => '主色調'; - - @override - String get sync_album_color => '符合封面顏色'; - - @override - String get sync_album_color_description => '選取專輯封面主題色為主色調'; - - @override - String get playback => '播放'; - - @override - String get audio_quality => '音質'; - - @override - String get high => '高'; - - @override - String get low => '低'; - - @override - String get pre_download_play => '下載後播放'; - - @override - String get pre_download_play_description => '先下載歌曲後再播放而非串流播放(建議頻寬較高使用者使用)'; - - @override - String get skip_non_music => '跳過非音樂片段(跳過贊助商廣告)'; - - @override - String get blacklist_description => '已封鎖的歌曲與藝人'; - - @override - String get wait_for_download_to_finish => '請等待目前下載工作完成'; - - @override - String get desktop => '桌面版設定'; - - @override - String get close_behavior => '點選關閉按鈕行為'; - - @override - String get close => '關閉'; - - @override - String get minimize_to_tray => '最小化到工作列'; - - @override - String get show_tray_icon => '顯示工作列圖示'; - - @override - String get about => '關於'; - - @override - String get u_love_spotube => '我們明白你喜歡 Spotube'; - - @override - String get check_for_updates => '檢查更新'; - - @override - String get about_spotube => '關於 Spotube'; - - @override - String get blacklist => '黑名單'; - - @override - String get please_sponsor => '請考慮贊助或捐款'; - - @override - String get spotube_description => 'Spotube,一款輕量、跨平台且完全免費的 Spotify 用戶端。'; - - @override - String get version => '版本'; - - @override - String get build_number => '建置編號'; - - @override - String get founder => '發起人'; - - @override - String get repository => '專案儲存庫'; - - @override - String get bug_issues => '缺陷與問題報告'; - - @override - String get made_with => '於孟加拉🇧🇩用 ❤️ 發電'; - - @override - String get kingkor_roy_tirtho => 'Kingkor Roy Tirtho'; - - @override - String copyright(Object current_year) { - return '© 2021-$current_year Kingkor Roy Tirtho'; - } - - @override - String get license => '授權'; - - @override - String get credentials_will_not_be_shared_disclaimer => - '您大可放心,軟體不會收集或分享任何個人資料給第三方'; - - @override - String get know_how_to_login => '不知道該怎麼辦?'; - - @override - String get follow_step_by_step_guide => '請依照以下說明進行'; - - @override - String cookie_name_cookie(Object name) { - return '$name Cookie'; - } - - @override - String get fill_in_all_fields => '請填入所有欄位'; - - @override - String get submit => '提交'; - - @override - String get exit => '退出'; - - @override - String get previous => '上一步'; - - @override - String get next => '下一步'; - - @override - String get done => '完成'; - - @override - String get step_1 => '步驟 1'; - - @override - String get first_go_to => '首先,前往'; - - @override - String get something_went_wrong => '某些地方出現了問題'; - - @override - String get piped_instance => 'Piped 伺服器實例'; - - @override - String get piped_description => 'Piped 伺服器實例用於匹配歌曲'; - - @override - String get piped_warning => '它們之中的一部分可能無法正常運作。使用時請自行承擔風險'; - - @override - String get invidious_instance => 'Invidious 伺服器實例'; - - @override - String get invidious_description => '用於音軌匹配的 Invidious 伺服器實例'; - - @override - String get invidious_warning => '有些可能無法正常運作。請自行承擔風險'; - - @override - String get generate => '生成'; - - @override - String track_exists(Object track) { - return '曲目 $track 已存在'; - } - - @override - String get replace_downloaded_tracks => '替換已下載的歌曲'; - - @override - String get skip_download_tracks => '下載時跳過已下載的歌曲'; - - @override - String get do_you_want_to_replace => '你確定要取代已下載的歌曲嗎??'; - - @override - String get replace => '取代'; - - @override - String get skip => '跳過'; - - @override - String select_up_to_count_type(Object count, Object type) { - return '選擇最多 $count 種的類型 $type'; - } - - @override - String get select_genres => '選擇曲風'; - - @override - String get add_genres => '新增曲風'; - - @override - String get country => '國家和地區'; - - @override - String get number_of_tracks_generate => '產生歌曲的數目'; - - @override - String get acousticness => '原聲程度'; - - @override - String get danceability => '律動感'; - - @override - String get energy => '衝擊感'; - - @override - String get instrumentalness => '歌唱部分佔比'; - - @override - String get liveness => '現場感'; - - @override - String get loudness => '響度'; - - @override - String get speechiness => '朗誦比例'; - - @override - String get valence => '心理感受'; - - @override - String get popularity => '流行度'; - - @override - String get key => '曲調'; - - @override - String get duration => '歌曲長度 (s)'; - - @override - String get tempo => '每分鐘拍數 (BPM)'; - - @override - String get mode => '旋律重複度'; - - @override - String get time_signature => '音符時值'; - - @override - String get short => '短'; - - @override - String get medium => '中'; - - @override - String get long => '長'; - - @override - String get min => '最低'; - - @override - String get max => '最高'; - - @override - String get target => '目標'; - - @override - String get moderate => '中'; - - @override - String get deselect_all => '取消全選'; - - @override - String get select_all => '全選'; - - @override - String get are_you_sure => '你確定嗎?'; - - @override - String get generating_playlist => '正在產生你的自訂歌單...'; - - @override - String selected_count_tracks(Object count) { - return '已選取 $count 首歌曲'; - } - - @override - String get download_warning => - '如果你大量下載這些歌曲,你顯然在侵犯音樂的版權並對音樂創作社區造成了傷害。我希望你能意識到這一點。永遠要尊重並支持藝術家們的辛勤工作'; - - @override - String get download_ip_ban_warning => - '小心,如果出現超出正常的下載請求,那你的 IP 可能會被 YouTube 封鎖,這意味著你的裝置將在長達 2-3 個月的時間內無法使用該 IP 訪問 YouTube(即使你沒登入)。Spotube 不會因而承擔任何責任'; - - @override - String get by_clicking_accept_terms => '點擊 \'同意\' 代表你同意以下的條款'; - - @override - String get download_agreement_1 => '我明白侵害音樂版權是一件不好的事'; - - @override - String get download_agreement_2 => '我將盡可能支持藝術家的工作。我現在之所以做不到是因為缺乏資金來購買正版'; - - @override - String get download_agreement_3 => - '我完全了解我的 IP 存在被 YouTube 封鎖的風險。並且我明白 Spotube 的擁有者與貢獻者們無須對我目前的行為所導致的任何後果負責'; - - @override - String get decline => '拒絕'; - - @override - String get accept => '同意'; - - @override - String get details => '詳細資訊'; - - @override - String get youtube => 'YouTube'; - - @override - String get channel => '頻道'; - - @override - String get likes => '讚'; - - @override - String get dislikes => '倒讚'; - - @override - String get views => '瀏覽次數'; - - @override - String get streamUrl => '播放串流 URL'; - - @override - String get stop => '停止'; - - @override - String get sort_newest => '依新增日期順序'; - - @override - String get sort_oldest => '依新增日期倒序'; - - @override - String get sleep_timer => '睡眠計時器'; - - @override - String mins(Object minutes) { - return '$minutes 分'; - } - - @override - String hours(Object hours) { - return '$hours 時'; - } - - @override - String hour(Object hours) { - return '$hours 時'; - } - - @override - String get custom_hours => '自訂時長'; - - @override - String get logs => '記錄檔(Log)'; - - @override - String get developers => '開發者'; - - @override - String get not_logged_in => '你尚未登入'; - - @override - String get search_mode => '搜尋模式'; - - @override - String get audio_source => '音訊來源'; - - @override - String get ok => '確定'; - - @override - String get failed_to_encrypt => '加密失敗'; - - @override - String get encryption_failed_warning => - 'Spotube使用加密來安全地儲存您的資料。但是失敗了。因此,它將回退到不安全的儲存空間\n如果您使用Linux,請確保已安裝gnome-keyring、kde-wallet和keepassxc等加密服務'; - - @override - String get querying_info => '正在查詢資訊...'; - - @override - String get piped_api_down => 'Piped API 無法使用'; - - @override - String piped_down_error_instructions(Object pipedInstance) { - return '當前Piped實例 $pipedInstance 不可用\n\n請更改實例或將\'API類型\'更改為官方YouTube API\n\n更改後請確保重新啟動應用程式'; - } - - @override - String get you_are_offline => '您目前處於離線狀態'; - - @override - String get connection_restored => '您的網路連線已恢復'; - - @override - String get use_system_title_bar => '使用作業系統的預設視窗標題列'; - - @override - String get crunching_results => '處理結果中...'; - - @override - String get search_to_get_results => '搜尋以取得結果'; - - @override - String get use_amoled_mode => '使用 AMOLED 模式'; - - @override - String get pitch_dark_theme => '漆黑主題'; - - @override - String get normalize_audio => '標準化音訊'; - - @override - String get change_cover => '更改封面'; - - @override - String get add_cover => '新增封面'; - - @override - String get restore_defaults => '恢復預設值'; - - @override - String get download_music_format => '下載音樂格式'; - - @override - String get streaming_music_format => '串流音樂格式'; - - @override - String get download_music_quality => '下載音樂品質'; - - @override - String get streaming_music_quality => '串流音樂品質'; - - @override - String get login_with_lastfm => '使用 Last.fm 登入'; - - @override - String get connect => '連線'; - - @override - String get disconnect_lastfm => '切斷 Last.fm 連線'; - - @override - String get disconnect => '斷開連線'; - - @override - String get username => '帳號'; - - @override - String get password => '密碼'; - - @override - String get login => '登入'; - - @override - String get login_with_your_lastfm => '使用您的 Last.fm 帳號登入'; - - @override - String get scrobble_to_lastfm => '在 Last.fm 上記錄你的播放'; - - @override - String get go_to_album => '前往專輯'; - - @override - String get discord_rich_presence => 'Discord Rick Presence(Discord 狀態)'; - - @override - String get browse_all => '瀏覽全部'; - - @override - String get genres => '音樂類型'; - - @override - String get explore_genres => '探索音樂類型'; - - @override - String get friends => '好友'; - - @override - String get no_lyrics_available => '抱歉,無法找到這首歌的歌詞'; - - @override - String get start_a_radio => '開始收聽電台'; - - @override - String get how_to_start_radio => '您想如何開始收聽電台?'; - - @override - String get replace_queue_question => '您想要取代目前清單還是追加到清單?'; - - @override - String get endless_playback => '無限播放'; - - @override - String get delete_playlist => '刪除播放清單'; - - @override - String get delete_playlist_confirmation => '您確定要刪除此播放清單嗎?'; - - @override - String get local_tracks => '本地音訊'; - - @override - String get local_tab => '本地'; - - @override - String get song_link => '歌曲連結'; - - @override - String get skip_this_nonsense => '跳過這個無聊內容'; - - @override - String get freedom_of_music => '“音樂的自由”'; - - @override - String get freedom_of_music_palm => '「音樂的自由掌握在您手中」'; - - @override - String get get_started => '我們開始吧'; - - @override - String get youtube_source_description => '建議且效果最佳。'; - - @override - String get piped_source_description => '感覺自由?與 YouTube 一樣,但更自由。'; - - @override - String get jiosaavn_source_description => '最適合南亞地區。'; - - @override - String get invidious_source_description => '類似 Piped,但可用性更高。'; - - @override - String highest_quality(Object quality) { - return '最高音質:$quality'; - } - - @override - String get select_audio_source => '選擇音訊來源'; - - @override - String get endless_playback_description => '自動將新歌曲加入清單的結尾'; - - @override - String get choose_your_region => '選擇您的所在地區'; - - @override - String get choose_your_region_description => '這能幫助 Spotube 為您的所在位置顯示正確的內容。'; - - @override - String get choose_your_language => '選擇您的語言'; - - @override - String get help_project_grow => '幫助這個專案成長'; - - @override - String get help_project_grow_description => - 'Spotube是一個開源專案。您可以透過為專案做出貢獻、回報錯誤或建議新功能來幫助專案成長。'; - - @override - String get contribute_on_github => '在GitHub上做出貢獻'; - - @override - String get donate_on_open_collective => '在Open Collective上捐款'; - - @override - String get browse_anonymously => '匿名瀏覽'; - - @override - String get enable_connect => '啟用連線'; - - @override - String get enable_connect_description => '從其他裝置控制Spotube'; - - @override - String get devices => '裝置'; - - @override - String get select => '選擇'; - - @override - String connect_client_alert(Object client) { - return '您正在被 $client 控制'; - } - - @override - String get this_device => '此裝置'; - - @override - String get remote => '遠端'; - - @override - String get stats => '統計'; - - @override - String and_n_more(Object count) { - return '還有 $count 個'; - } - - @override - String get recently_played => '最近播放'; - - @override - String get browse_more => '瀏覽更多'; - - @override - String get no_title => '無標題'; - - @override - String get not_playing => '未播放'; - - @override - String get epic_failure => '史詩級的失敗!'; - - @override - String added_num_tracks_to_queue(Object tracks_length) { - return '已將 $tracks_length 首曲目新增至清單'; - } - - @override - String get spotube_has_an_update => 'Spotube 有更新版本'; - - @override - String get download_now => '立即下載'; - - @override - String nightly_version(Object nightlyBuildNum) { - return 'Spotube Nightly $nightlyBuildNum 已發佈'; - } - - @override - String release_version(Object version) { - return 'Spotube v$version 已發布'; - } - - @override - String get read_the_latest => '閱讀最新'; - - @override - String get release_notes => '版本說明'; - - @override - String get pick_color_scheme => '選擇配色方案'; - - @override - String get save => '儲存'; - - @override - String get choose_the_device => '選擇裝置:'; - - @override - String get multiple_device_connected => '已連接多個裝置。\n選擇您希望執行此操作的裝置'; - - @override - String get nothing_found => '未找到任何內容'; - - @override - String get the_box_is_empty => '箱子為空'; - - @override - String get top_artists => '熱門藝人'; - - @override - String get top_albums => '熱門專輯'; - - @override - String get this_week => '本週'; - - @override - String get this_month => '本月'; - - @override - String get last_6_months => '過去6個月'; - - @override - String get this_year => '今年'; - - @override - String get last_2_years => '過去2年'; - - @override - String get all_time => '所有時間'; - - @override - String powered_by_provider(Object providerName) { - return '由 $providerName 提供支援'; - } - - @override - String get email => '電子郵件'; - - @override - String get profile_followers => '追蹤者'; - - @override - String get birthday => '生日'; - - @override - String get subscription => '訂閱'; - - @override - String get not_born => '尚未建立'; - - @override - String get hacker => '駭客'; - - @override - String get profile => '個人資訊'; - - @override - String get no_name => '沒有名字'; - - @override - String get edit => '編輯'; - - @override - String get user_profile => '使用者資料'; - - @override - String count_plays(Object count) { - return '$count 次播放'; - } - - @override - String get streaming_fees_hypothetical => - '*基於 Spotify 每次播放的支付金額\n從 \$0.003 到 \$0.005 計算。這是一個假設性的\n計算,旨在讓用戶了解如果他們在 Spotify 上收聽\n這些歌曲,可能會付給作者的金額。'; - - @override - String get minutes_listened => '聽的分鐘數'; - - @override - String get streamed_songs => '已串流歌曲'; - - @override - String count_streams(Object count) { - return '$count 次串流'; - } - - @override - String get owned_by_you => '由您所有'; - - @override - String copied_shareurl_to_clipboard(Object shareUrl) { - return '$shareUrl 已複製到剪貼簿'; - } - - @override - String get hipotetical_calculation => - '*此為根據線上音樂串流平台平均每次播放 \$0.003 至 \$0.005 的收益所計算的假設值。此為一個假設性計算,旨在讓使用者了解若他們在不同的音樂串流平台上收聽同一首歌曲,他們將會支付給藝人多少費用。'; - - @override - String count_mins(Object minutes) { - return '$minutes 分鐘'; - } - - @override - String get summary_minutes => '分鐘'; - - @override - String get summary_listened_to_music => '聽音樂'; - - @override - String get summary_songs => '歌曲'; - - @override - String get summary_streamed_overall => '整體串流媒體'; - - @override - String get summary_owed_to_artists => '本月欠藝術家的'; - - @override - String get summary_artists => '藝術家的'; - - @override - String get summary_music_reached_you => '音樂接觸到你'; - - @override - String get summary_full_albums => '完整專輯'; - - @override - String get summary_got_your_love => '獲得了你的愛心'; - - @override - String get summary_playlists => '播放清單'; - - @override - String get summary_were_on_repeat => '已經重複播放'; - - @override - String total_money(Object money) { - return '總計 $money'; - } - - @override - String get webview_not_found => '未找到 Webview 框架'; - - @override - String get webview_not_found_description => - '您的裝置中未安裝 Webview Runtime。\n如果已安裝,請確保它的位置在系統環境變數(PATH)中\n\n安裝後,重新啟動應用程式'; - - @override - String get unsupported_platform => '不支援的平台'; - - @override - String get cache_music => '快取音樂'; - - @override - String get open => '開啟'; - - @override - String get cache_folder => '快取資料夾'; - - @override - String get export => '導出'; - - @override - String get clear_cache => '清除快取'; - - @override - String get clear_cache_confirmation => '您要清除快取嗎?'; - - @override - String get export_cache_files => '匯出快取檔案'; - - @override - String found_n_files(Object count) { - return '找到 $count 個檔案'; - } - - @override - String get export_cache_confirmation => '您要匯出這些檔案到'; - - @override - String exported_n_out_of_m_files(Object files, Object filesExported) { - return '匯出了 $filesExported / $files 個檔案'; - } - - @override - String get undo => '取消'; - - @override - String get download_all => '下載全部'; - - @override - String get add_all_to_playlist => '全部加入到播放清單'; - - @override - String get add_all_to_queue => '全部加入清單'; - - @override - String get play_all_next => '播放全部下一首'; - - @override - String get pause => '暫停'; - - @override - String get view_all => '檢視全部'; - - @override - String get no_tracks_added_yet => '看起來你還沒有加入任何歌曲'; - - @override - String get no_tracks => '看起來這裡沒有任何歌曲'; - - @override - String get no_tracks_listened_yet => '看起來你還沒聽任何歌曲'; - - @override - String get not_following_artists => '你沒有關注任何藝術家'; - - @override - String get no_favorite_albums_yet => '看起來你還沒有將任何專輯加入到收藏夾'; - - @override - String get no_logs_found => '未找到日誌'; - - @override - String get youtube_engine => 'YouTube 引擎'; - - @override - String youtube_engine_not_installed_title(Object engine) { - return '$engine 未安裝'; - } - - @override - String youtube_engine_not_installed_message(Object engine) { - return '$engine 未在您的系統中安裝。'; - } - - @override - String youtube_engine_set_path(Object engine) { - return '確保它可用在 PATH 變數中,或\n設定 $engine 執行檔的絕對路徑'; - } - - @override - String get youtube_engine_unix_issue_message => - '在類 Unix 作業系統(如 macOS/Linux/Unix)中,請在 .zshrc/.bashrc/.bash_profile 等檔案中設定路徑無效。\n您需要在 shell 設定檔中設定路徑'; - - @override - String get download => '下載'; - - @override - String get file_not_found => '找不到檔案'; - - @override - String get custom => '自訂'; - - @override - String get add_custom_url => '新增自訂 URL'; - - @override - String get edit_port => '編輯端口'; - - @override - String get port_helper_msg => '預設值為 -1,表示隨機數。如果您已配置防火牆,建議設定此項目。'; - - @override - String connect_request(Object client) { - return '允許 $client 連線嗎?'; - } - - @override - String get connection_request_denied => '連線被拒絕。請求被使用者拒絕。'; - - @override - String get an_error_occurred => '發生錯誤'; - - @override - String get copy_to_clipboard => '複製到剪貼簿'; - - @override - String get view_logs => '檢視日誌'; - - @override - String get retry => '重試'; - - @override - String get no_default_metadata_provider_selected => '您沒有設定預設的中繼資料供應商'; - - @override - String get manage_metadata_providers => '管理中繼資料供應商'; - - @override - String get open_link_in_browser => '要在瀏覽器中開啟連結嗎?'; - - @override - String get do_you_want_to_open_the_following_link => '您想開啟以下連結嗎'; - - @override - String get unsafe_url_warning => '從不受信任的來源開啟連結可能不安全。請務必小心!\n您也可以將連結複製到剪貼簿。'; - - @override - String get copy_link => '複製連結'; - - @override - String get building_your_timeline => '正在根據您的收聽記錄建立您的時間軸...'; - - @override - String get official => '官方'; - - @override - String author_name(Object author) { - return '作者:$author'; - } - - @override - String get third_party => '第三方'; - - @override - String get plugin_requires_authentication => '此外掛程式需要驗證'; - - @override - String get update_available => '有可用的更新'; - - @override - String get supports_scrobbling => '支援 Scrobbling'; - - @override - String get plugin_scrobbling_info => '此外掛程式會 Scrobble 您的音樂以產生您的收聽記錄。'; - - @override - String get default_metadata_source => '預設中繼資料來源'; - - @override - String get set_default_metadata_source => '設定預設中繼資料來源'; - - @override - String get default_audio_source => '預設音訊來源'; - - @override - String get set_default_audio_source => '設定預設音訊來源'; - - @override - String get set_default => '設為預設'; - - @override - String get support => '支援'; - - @override - String get support_plugin_development => '支援外掛程式開發'; - - @override - String can_access_name_api(Object name) { - return '- 可以存取 **$name** API'; - } - - @override - String get do_you_want_to_install_this_plugin => '您想安裝此外掛程式嗎?'; - - @override - String get third_party_plugin_warning => '此外掛程式來自第三方儲存庫。請在安裝前確認您信任該來源。'; - - @override - String get author => '作者'; - - @override - String get this_plugin_can_do_following => '此外掛程式可以執行以下操作'; - - @override - String get install => '安裝'; - - @override - String get install_a_metadata_provider => '安裝中繼資料供應商'; - - @override - String get no_tracks_playing => '目前沒有正在播放的曲目'; - - @override - String get synced_lyrics_not_available => '此歌曲沒有同步歌詞。請改用'; - - @override - String get plain_lyrics => '純歌詞'; - - @override - String get tab_instead => '分頁。'; - - @override - String get disclaimer => '免責聲明'; - - @override - String get third_party_plugin_dmca_notice => - 'Spotube 團隊對任何「第三方」外掛程式不負任何責任(包括法律責任)。\n請自行承擔使用風險。如有任何錯誤/問題,請向該外掛程式的儲存庫回報。\n\n若有任何「第三方」外掛程式違反任何服務/法律實體的服務條款/DMCA,請向「第三方」外掛程式作者或託管平台(如 GitHub/Codeberg)要求採取行動。以上列出的(標記為「第三方」)外掛程式均為公開/社群維護的外掛程式。我們沒有對其進行審核,因此無法對其採取任何行動。\n\n'; - - @override - String get input_does_not_match_format => '輸入不符合所需格式'; - - @override - String get plugins => '外掛程式'; - - @override - String get paste_plugin_download_url => - '貼上下載網址、GitHub/Codeberg 儲存庫網址或 .smplug 檔案的直接連結'; - - @override - String get download_and_install_plugin_from_url => '從網址下載並安裝外掛程式'; - - @override - String failed_to_add_plugin_error(Object error) { - return '新增外掛程式失敗:$error'; - } - - @override - String get upload_plugin_from_file => '從檔案上傳外掛程式'; - - @override - String get installed => '已安裝'; - - @override - String get available_plugins => '可用的外掛程式'; - - @override - String get configure_plugins => '配置您自己的中繼資料提供者和音訊來源外掛程式'; - - @override - String get audio_scrobblers => '音訊 Scrobblers'; - - @override - String get scrobbling => 'Scrobbling'; - - @override - String get source => '來源:'; - - @override - String get uncompressed => '未壓縮'; - - @override - String get dab_music_source_description => - '適合音響發燒友。提供高品質/無損音訊串流。精確的 ISRC 曲目比對。'; -} diff --git a/lib/l10n/l10n.dart b/lib/l10n/l10n.dart deleted file mode 100644 index d0aeccc4..00000000 --- a/lib/l10n/l10n.dart +++ /dev/null @@ -1,57 +0,0 @@ -/// credits: -/// -/// Kingkor Roy Tirtho => English, Bengali -/// ChatGPT (GPT 3.5) XD => Hindi, French -/// maboroshin@github => Japanese -/// iceyear@github => Simplified Chinese -/// TexturedPolak@github => Polish -/// yuri-val@github => Ukrainian -/// energywave@github, ncvescera@github, OpenCode@github => Italian -/// mikropsoft@github => Turkish -/// Stephan-P@github, SecularSteve@github => Dutch -/// doannc2212@github => Vietnamese -/// sappho192@github => Korean -/// watchakorn-18k@github => Thai -/// llama3, vishnumur777@github => Tamil -/// Microsoft Copilot, Tutislav@github => Czech -/// 510208@github => Traditional Chinese - -library l10n; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; -export 'package:spotube/l10n/generated/app_localizations.dart'; - -class L10n { - static final all = [ - const Locale('en'), - const Locale('ar', 'SA'), - const Locale('bn', 'BD'), - const Locale('ca', 'AD'), - const Locale('cs', 'CZ'), - const Locale('de', 'GE'), - const Locale('es', 'ES'), - const Locale('fa', 'IR'), - const Locale('fi', 'FI'), - const Locale('fr', 'FR'), - const Locale('ne', 'NP'), - const Locale('hi', 'IN'), - const Locale('id', 'ID'), - const Locale('it', 'IT'), - const Locale('ja', 'JP'), - const Locale('ka', 'GE'), - const Locale('ko', 'KR'), - const Locale('nl', 'NL'), - const Locale('pl', 'PL'), - const Locale('pt', 'PT'), - const Locale('ru', 'RU'), - const Locale('tl', 'PH'), - const Locale('uk', 'UA'), - const Locale('th', 'TH'), - const Locale('ta', 'IN'), - const Locale('tr', 'TR'), - const Locale('zh', 'CN'), - const Locale('zh', 'TW'), - const Locale('vi', 'VN'), - const Locale('eu', 'ES'), - ]; -} diff --git a/lib/main.dart b/lib/main.dart deleted file mode 100644 index ecf7148d..00000000 --- a/lib/main.dart +++ /dev/null @@ -1,317 +0,0 @@ -import 'dart:async'; -import 'dart:ui'; -import 'dart:io'; - -import 'package:desktop_webview_window/desktop_webview_window.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart' as material; -import 'package:flutter/services.dart'; -import 'package:flutter_discord_rpc/flutter_discord_rpc.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; - -import 'package:home_widget/home_widget.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:local_notifier/local_notifier.dart'; -import 'package:media_kit/media_kit.dart'; -import 'package:metadata_god/metadata_god.dart'; -import 'package:smtc_windows/smtc_windows.dart'; -import 'package:spotube/collections/env.dart'; -import 'package:spotube/collections/http-override.dart'; -import 'package:spotube/collections/intents.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/hooks/configurators/use_close_behavior.dart'; -import 'package:spotube/hooks/configurators/use_deep_linking.dart'; -import 'package:spotube/hooks/configurators/use_disable_battery_optimizations.dart'; -import 'package:spotube/hooks/configurators/use_fix_window_stretching.dart'; -import 'package:spotube/hooks/configurators/use_get_storage_perms.dart'; -import 'package:spotube/hooks/configurators/use_has_touch.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/modules/settings/color_scheme_picker_dialog.dart'; -import 'package:spotube/provider/audio_player/audio_player_streams.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/glance/glance.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/updater/update_checker.dart'; -import 'package:spotube/provider/server/bonsoir.dart'; -import 'package:spotube/provider/server/server.dart'; -import 'package:spotube/provider/tray_manager/tray_manager.dart'; -import 'package:spotube/l10n/l10n.dart'; -import 'package:spotube/provider/connect/clients.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/cli/cli.dart'; -import 'package:spotube/services/kv_store/encrypted_kv_store.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/services/wm_tools/wm_tools.dart'; -import 'package:spotube/utils/migrations/sandbox.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:flutter_native_splash/flutter_native_splash.dart'; -import 'package:flutter_displaymode/flutter_displaymode.dart'; -import 'package:timezone/data/latest.dart' as tz; -import 'package:window_manager/window_manager.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:yt_dlp_dart/yt_dlp_dart.dart'; -import 'package:flutter_new_pipe_extractor/flutter_new_pipe_extractor.dart'; - -Future main(List rawArgs) async { - if (rawArgs.contains("web_view_title_bar")) { - WidgetsFlutterBinding.ensureInitialized(); - if (runWebViewTitleBarWidget(rawArgs)) { - return; - } - } - final arguments = await startCLI(rawArgs); - AppLogger.initialize(arguments["verbose"]); - - AppLogger.runZoned(() async { - final widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); - - HttpOverrides.global = BadCertificateAllowlistOverrides(); - - // await registerWindowsScheme("spotify"); - - tz.initializeTimeZones(); - - FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); - - MediaKit.ensureInitialized(); - - await migrateMacOsFromSandboxToNoSandbox(); - - // force High Refresh Rate on some Android devices (like One Plus) - if (kIsAndroid) { - await FlutterDisplayMode.setHighRefreshRate(); - } - if (kIsAndroid || kIsDesktop) { - await NewPipeExtractor.init(); - } - - if (!kIsWeb) { - MetadataGod.initialize(); - } - - await KVStoreService.initialize(); - - if (kIsDesktop) { - await windowManager.setPreventClose(true); - await YtDlp.instance - .setBinaryLocation( - KVStoreService.getYoutubeEnginePath(YoutubeClientEngine.ytDlp) ?? - "yt-dlp${kIsWindows ? '.exe' : ''}", - ) - .catchError((e, stack) => null); - await FlutterDiscordRPC.initialize(Env.discordAppId); - } - - if (kIsWindows) { - await SMTCWindows.initialize(); - } - - await EncryptedKvStoreService.initialize(); - - final database = AppDatabase(); - - if (kIsDesktop) { - await localNotifier.setup(appName: "Spotube"); - await WindowManagerTools.initialize(); - } - - if (kIsIOS) { - HomeWidget.setAppGroupId("group.spotube_home_player_widget"); - } - - runApp( - ProviderScope( - overrides: [ - databaseProvider.overrideWith((ref) => database), - ], - observers: const [ - AppLoggerProviderObserver(), - ], - child: const Spotube(), - ), - ); - }); -} - -class Spotube extends HookConsumerWidget { - const Spotube({super.key}); - - @override - Widget build(BuildContext context, ref) { - final themeMode = - ref.watch(userPreferencesProvider.select((s) => s.themeMode)); - final locale = ref.watch(userPreferencesProvider.select((s) => s.locale)); - final accentMaterialColor = - ref.watch(userPreferencesProvider.select((s) => s.accentColorScheme)); - final router = useMemoized(() => AppRouter(ref), []); - final hasTouchSupport = useHasTouch(); - - ref.listen(audioPlayerStreamListenersProvider, (_, __) {}); - ref.listen(bonsoirProvider, (_, __) {}); - ref.listen(connectClientsProvider, (_, __) {}); - ref.listen(serverProvider, (_, __) {}); - ref.listen(trayManagerProvider, (_, __) {}); - ref.listen(metadataPluginsProvider, (_, __) {}); - ref.listen(metadataPluginProvider, (_, __) {}); - ref.listen(audioSourcePluginProvider, (_, __) {}); - ref.listen(metadataPluginUpdateCheckerProvider, (_, __) {}); - ref.listen(audioSourcePluginUpdateCheckerProvider, (_, __) {}); - - useFixWindowStretching(); - useDisableBatteryOptimizations(); - useDeepLinking(ref, router); - useCloseBehavior(ref); - useGetStoragePermissions(ref); - - useEffect(() { - FlutterNativeSplash.remove(); - - if (kIsMobile) { - HomeWidget.registerInteractivityCallback(glanceBackgroundCallback); - } - - return () { - /// For enabling hot reload for audio player - if (!kDebugMode) return; - audioPlayer.dispose(); - }; - }, []); - - return ShadcnApp.router( - supportedLocales: L10n.all, - locale: locale.languageCode == "system" ? null : locale, - localizationsDelegates: const [ - AppLocalizations.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - routerConfig: router.config(), - debugShowCheckedModeBanner: false, - title: 'Spotube', - builder: (context, child) { - child = ScrollConfiguration( - behavior: ScrollConfiguration.of(context).copyWith( - dragDevices: hasTouchSupport - ? { - PointerDeviceKind.touch, - PointerDeviceKind.stylus, - PointerDeviceKind.invertedStylus, - } - : null, - ), - child: child!, - ); - - if (kIsLinux) { - child = DragToResizeArea( - resizeEdgeSize: 2.5, - child: child, - ); - } - - return child; - }, - scaling: const AdaptiveScaling(1), - theme: ThemeData( - radius: .5, - iconTheme: const IconThemeProperties(), - colorScheme: - colorSchemeMap[accentMaterialColor.name]?.call(ThemeMode.light) ?? - LegacyColorSchemes.lightSlate(), - surfaceOpacity: .8, - surfaceBlur: 10, - ), - darkTheme: ThemeData( - radius: .5, - iconTheme: const IconThemeProperties(), - colorScheme: - colorSchemeMap[accentMaterialColor.name]?.call(ThemeMode.dark) ?? - LegacyColorSchemes.darkSlate(), - surfaceOpacity: .8, - surfaceBlur: 10, - ), - materialTheme: material.ThemeData( - brightness: switch (themeMode) { - ThemeMode.system => MediaQuery.platformBrightnessOf(context), - ThemeMode.light => Brightness.light, - ThemeMode.dark => Brightness.dark, - }, - splashFactory: material.NoSplash.splashFactory, - appBarTheme: const material.AppBarTheme( - surfaceTintColor: Colors.transparent, - scrolledUnderElevation: 0, - shadowColor: Colors.transparent, - elevation: 0, - ), - ), - themeMode: themeMode, - shortcuts: { - ...WidgetsApp.defaultShortcuts.map((key, value) { - return MapEntry( - LogicalKeySet.fromSet(key.triggers?.toSet() ?? {}), - value, - ); - }), - LogicalKeySet(LogicalKeyboardKey.space): PlayPauseIntent(ref), - LogicalKeySet(LogicalKeyboardKey.comma, LogicalKeyboardKey.control): - NavigationIntent(router, "/settings"), - LogicalKeySet( - LogicalKeyboardKey.digit1, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.browse), - LogicalKeySet( - LogicalKeyboardKey.digit2, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.search), - LogicalKeySet( - LogicalKeyboardKey.digit3, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.lyrics), - LogicalKeySet( - LogicalKeyboardKey.digit4, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.userPlaylists), - LogicalKeySet( - LogicalKeyboardKey.digit5, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.userArtists), - LogicalKeySet( - LogicalKeyboardKey.digit6, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.userAlbums), - LogicalKeySet( - LogicalKeyboardKey.digit7, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.userLocalLibrary), - LogicalKeySet( - LogicalKeyboardKey.digit8, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): HomeTabIntent(router, tab: HomeTabs.userDownloads), - LogicalKeySet( - LogicalKeyboardKey.keyW, - LogicalKeyboardKey.control, - LogicalKeyboardKey.shift, - ): CloseAppIntent(), - }, - actions: { - ...WidgetsApp.defaultActions, - PlayPauseIntent: PlayPauseAction(), - NavigationIntent: NavigationAction(), - HomeTabIntent: HomeTabAction(), - CloseAppIntent: CloseAppAction(), - }, - ); - } -} diff --git a/lib/models/connect/connect.dart b/lib/models/connect/connect.dart deleted file mode 100644 index 11370dcb..00000000 --- a/lib/models/connect/connect.dart +++ /dev/null @@ -1,15 +0,0 @@ -library connect; - -import 'dart:async'; -import 'dart:convert'; - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/state.dart'; - -part 'connect.freezed.dart'; -part 'connect.g.dart'; - -part 'ws_event.dart'; -part 'load.dart'; diff --git a/lib/models/connect/connect.freezed.dart b/lib/models/connect/connect.freezed.dart deleted file mode 100644 index 157d0911..00000000 --- a/lib/models/connect/connect.freezed.dart +++ /dev/null @@ -1,715 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'connect.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -WebSocketLoadEventData _$WebSocketLoadEventDataFromJson( - Map json) { - switch (json['runtimeType']) { - case 'playlist': - return WebSocketLoadEventDataPlaylist.fromJson(json); - case 'album': - return WebSocketLoadEventDataAlbum.fromJson(json); - - default: - throw CheckedFromJsonException( - json, - 'runtimeType', - 'WebSocketLoadEventData', - 'Invalid union type "${json['runtimeType']}"!'); - } -} - -/// @nodoc -mixin _$WebSocketLoadEventData { - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List get tracks => throw _privateConstructorUsedError; - Object? get collection => throw _privateConstructorUsedError; - int? get initialIndex => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex) - playlist, - required TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex) - album, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex)? - playlist, - TResult? Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex)? - album, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex)? - playlist, - TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex)? - album, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(WebSocketLoadEventDataPlaylist value) playlist, - required TResult Function(WebSocketLoadEventDataAlbum value) album, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(WebSocketLoadEventDataPlaylist value)? playlist, - TResult? Function(WebSocketLoadEventDataAlbum value)? album, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(WebSocketLoadEventDataPlaylist value)? playlist, - TResult Function(WebSocketLoadEventDataAlbum value)? album, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - /// Serializes this WebSocketLoadEventData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $WebSocketLoadEventDataCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WebSocketLoadEventDataCopyWith<$Res> { - factory $WebSocketLoadEventDataCopyWith(WebSocketLoadEventData value, - $Res Function(WebSocketLoadEventData) then) = - _$WebSocketLoadEventDataCopyWithImpl<$Res, WebSocketLoadEventData>; - @useResult - $Res call( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - int? initialIndex}); -} - -/// @nodoc -class _$WebSocketLoadEventDataCopyWithImpl<$Res, - $Val extends WebSocketLoadEventData> - implements $WebSocketLoadEventDataCopyWith<$Res> { - _$WebSocketLoadEventDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tracks = null, - Object? initialIndex = freezed, - }) { - return _then(_value.copyWith( - tracks: null == tracks - ? _value.tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - initialIndex: freezed == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$WebSocketLoadEventDataPlaylistImplCopyWith<$Res> - implements $WebSocketLoadEventDataCopyWith<$Res> { - factory _$$WebSocketLoadEventDataPlaylistImplCopyWith( - _$WebSocketLoadEventDataPlaylistImpl value, - $Res Function(_$WebSocketLoadEventDataPlaylistImpl) then) = - __$$WebSocketLoadEventDataPlaylistImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex}); - - $SpotubeSimplePlaylistObjectCopyWith<$Res>? get collection; -} - -/// @nodoc -class __$$WebSocketLoadEventDataPlaylistImplCopyWithImpl<$Res> - extends _$WebSocketLoadEventDataCopyWithImpl<$Res, - _$WebSocketLoadEventDataPlaylistImpl> - implements _$$WebSocketLoadEventDataPlaylistImplCopyWith<$Res> { - __$$WebSocketLoadEventDataPlaylistImplCopyWithImpl( - _$WebSocketLoadEventDataPlaylistImpl _value, - $Res Function(_$WebSocketLoadEventDataPlaylistImpl) _then) - : super(_value, _then); - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tracks = null, - Object? collection = freezed, - Object? initialIndex = freezed, - }) { - return _then(_$WebSocketLoadEventDataPlaylistImpl( - tracks: null == tracks - ? _value._tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - collection: freezed == collection - ? _value.collection - : collection // ignore: cast_nullable_to_non_nullable - as SpotubeSimplePlaylistObject?, - initialIndex: freezed == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int?, - )); - } - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SpotubeSimplePlaylistObjectCopyWith<$Res>? get collection { - if (_value.collection == null) { - return null; - } - - return $SpotubeSimplePlaylistObjectCopyWith<$Res>(_value.collection!, - (value) { - return _then(_value.copyWith(collection: value)); - }); - } -} - -/// @nodoc -@JsonSerializable() -class _$WebSocketLoadEventDataPlaylistImpl - extends WebSocketLoadEventDataPlaylist { - _$WebSocketLoadEventDataPlaylistImpl( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - required final List tracks, - this.collection, - this.initialIndex, - final String? $type}) - : _tracks = tracks, - $type = $type ?? 'playlist', - super._(); - - factory _$WebSocketLoadEventDataPlaylistImpl.fromJson( - Map json) => - _$$WebSocketLoadEventDataPlaylistImplFromJson(json); - - final List _tracks; - @override - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List get tracks { - if (_tracks is EqualUnmodifiableListView) return _tracks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tracks); - } - - @override - final SpotubeSimplePlaylistObject? collection; - @override - final int? initialIndex; - - @JsonKey(name: 'runtimeType') - final String $type; - - @override - String toString() { - return 'WebSocketLoadEventData.playlist(tracks: $tracks, collection: $collection, initialIndex: $initialIndex)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$WebSocketLoadEventDataPlaylistImpl && - const DeepCollectionEquality().equals(other._tracks, _tracks) && - (identical(other.collection, collection) || - other.collection == collection) && - (identical(other.initialIndex, initialIndex) || - other.initialIndex == initialIndex)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_tracks), collection, initialIndex); - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$WebSocketLoadEventDataPlaylistImplCopyWith< - _$WebSocketLoadEventDataPlaylistImpl> - get copyWith => __$$WebSocketLoadEventDataPlaylistImplCopyWithImpl< - _$WebSocketLoadEventDataPlaylistImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex) - playlist, - required TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex) - album, - }) { - return playlist(tracks, collection, initialIndex); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex)? - playlist, - TResult? Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex)? - album, - }) { - return playlist?.call(tracks, collection, initialIndex); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex)? - playlist, - TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex)? - album, - required TResult orElse(), - }) { - if (playlist != null) { - return playlist(tracks, collection, initialIndex); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(WebSocketLoadEventDataPlaylist value) playlist, - required TResult Function(WebSocketLoadEventDataAlbum value) album, - }) { - return playlist(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(WebSocketLoadEventDataPlaylist value)? playlist, - TResult? Function(WebSocketLoadEventDataAlbum value)? album, - }) { - return playlist?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(WebSocketLoadEventDataPlaylist value)? playlist, - TResult Function(WebSocketLoadEventDataAlbum value)? album, - required TResult orElse(), - }) { - if (playlist != null) { - return playlist(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$WebSocketLoadEventDataPlaylistImplToJson( - this, - ); - } -} - -abstract class WebSocketLoadEventDataPlaylist extends WebSocketLoadEventData { - factory WebSocketLoadEventDataPlaylist( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - required final List tracks, - final SpotubeSimplePlaylistObject? collection, - final int? initialIndex}) = _$WebSocketLoadEventDataPlaylistImpl; - WebSocketLoadEventDataPlaylist._() : super._(); - - factory WebSocketLoadEventDataPlaylist.fromJson(Map json) = - _$WebSocketLoadEventDataPlaylistImpl.fromJson; - - @override - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List get tracks; - @override - SpotubeSimplePlaylistObject? get collection; - @override - int? get initialIndex; - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$WebSocketLoadEventDataPlaylistImplCopyWith< - _$WebSocketLoadEventDataPlaylistImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$WebSocketLoadEventDataAlbumImplCopyWith<$Res> - implements $WebSocketLoadEventDataCopyWith<$Res> { - factory _$$WebSocketLoadEventDataAlbumImplCopyWith( - _$WebSocketLoadEventDataAlbumImpl value, - $Res Function(_$WebSocketLoadEventDataAlbumImpl) then) = - __$$WebSocketLoadEventDataAlbumImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex}); - - $SpotubeSimpleAlbumObjectCopyWith<$Res>? get collection; -} - -/// @nodoc -class __$$WebSocketLoadEventDataAlbumImplCopyWithImpl<$Res> - extends _$WebSocketLoadEventDataCopyWithImpl<$Res, - _$WebSocketLoadEventDataAlbumImpl> - implements _$$WebSocketLoadEventDataAlbumImplCopyWith<$Res> { - __$$WebSocketLoadEventDataAlbumImplCopyWithImpl( - _$WebSocketLoadEventDataAlbumImpl _value, - $Res Function(_$WebSocketLoadEventDataAlbumImpl) _then) - : super(_value, _then); - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tracks = null, - Object? collection = freezed, - Object? initialIndex = freezed, - }) { - return _then(_$WebSocketLoadEventDataAlbumImpl( - tracks: null == tracks - ? _value._tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - collection: freezed == collection - ? _value.collection - : collection // ignore: cast_nullable_to_non_nullable - as SpotubeSimpleAlbumObject?, - initialIndex: freezed == initialIndex - ? _value.initialIndex - : initialIndex // ignore: cast_nullable_to_non_nullable - as int?, - )); - } - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SpotubeSimpleAlbumObjectCopyWith<$Res>? get collection { - if (_value.collection == null) { - return null; - } - - return $SpotubeSimpleAlbumObjectCopyWith<$Res>(_value.collection!, (value) { - return _then(_value.copyWith(collection: value)); - }); - } -} - -/// @nodoc -@JsonSerializable() -class _$WebSocketLoadEventDataAlbumImpl extends WebSocketLoadEventDataAlbum { - _$WebSocketLoadEventDataAlbumImpl( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - required final List tracks, - this.collection, - this.initialIndex, - final String? $type}) - : _tracks = tracks, - $type = $type ?? 'album', - super._(); - - factory _$WebSocketLoadEventDataAlbumImpl.fromJson( - Map json) => - _$$WebSocketLoadEventDataAlbumImplFromJson(json); - - final List _tracks; - @override - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List get tracks { - if (_tracks is EqualUnmodifiableListView) return _tracks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tracks); - } - - @override - final SpotubeSimpleAlbumObject? collection; - @override - final int? initialIndex; - - @JsonKey(name: 'runtimeType') - final String $type; - - @override - String toString() { - return 'WebSocketLoadEventData.album(tracks: $tracks, collection: $collection, initialIndex: $initialIndex)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$WebSocketLoadEventDataAlbumImpl && - const DeepCollectionEquality().equals(other._tracks, _tracks) && - (identical(other.collection, collection) || - other.collection == collection) && - (identical(other.initialIndex, initialIndex) || - other.initialIndex == initialIndex)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_tracks), collection, initialIndex); - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$WebSocketLoadEventDataAlbumImplCopyWith<_$WebSocketLoadEventDataAlbumImpl> - get copyWith => __$$WebSocketLoadEventDataAlbumImplCopyWithImpl< - _$WebSocketLoadEventDataAlbumImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex) - playlist, - required TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex) - album, - }) { - return album(tracks, collection, initialIndex); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex)? - playlist, - TResult? Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex)? - album, - }) { - return album?.call(tracks, collection, initialIndex); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex)? - playlist, - TResult Function( - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex)? - album, - required TResult orElse(), - }) { - if (album != null) { - return album(tracks, collection, initialIndex); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(WebSocketLoadEventDataPlaylist value) playlist, - required TResult Function(WebSocketLoadEventDataAlbum value) album, - }) { - return album(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(WebSocketLoadEventDataPlaylist value)? playlist, - TResult? Function(WebSocketLoadEventDataAlbum value)? album, - }) { - return album?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(WebSocketLoadEventDataPlaylist value)? playlist, - TResult Function(WebSocketLoadEventDataAlbum value)? album, - required TResult orElse(), - }) { - if (album != null) { - return album(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$WebSocketLoadEventDataAlbumImplToJson( - this, - ); - } -} - -abstract class WebSocketLoadEventDataAlbum extends WebSocketLoadEventData { - factory WebSocketLoadEventDataAlbum( - {@Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - required final List tracks, - final SpotubeSimpleAlbumObject? collection, - final int? initialIndex}) = _$WebSocketLoadEventDataAlbumImpl; - WebSocketLoadEventDataAlbum._() : super._(); - - factory WebSocketLoadEventDataAlbum.fromJson(Map json) = - _$WebSocketLoadEventDataAlbumImpl.fromJson; - - @override - @Assert("tracks is List", - "tracks must be a list of SpotubeFullTrackObject") - List get tracks; - @override - SpotubeSimpleAlbumObject? get collection; - @override - int? get initialIndex; - - /// Create a copy of WebSocketLoadEventData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$WebSocketLoadEventDataAlbumImplCopyWith<_$WebSocketLoadEventDataAlbumImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/models/connect/connect.g.dart b/lib/models/connect/connect.g.dart deleted file mode 100644 index 2da8f9b0..00000000 --- a/lib/models/connect/connect.g.dart +++ /dev/null @@ -1,55 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'connect.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$WebSocketLoadEventDataPlaylistImpl - _$$WebSocketLoadEventDataPlaylistImplFromJson(Map json) => - _$WebSocketLoadEventDataPlaylistImpl( - tracks: (json['tracks'] as List) - .map((e) => SpotubeTrackObject.fromJson( - Map.from(e as Map))) - .toList(), - collection: json['collection'] == null - ? null - : SpotubeSimplePlaylistObject.fromJson( - Map.from(json['collection'] as Map)), - initialIndex: (json['initialIndex'] as num?)?.toInt(), - $type: json['runtimeType'] as String?, - ); - -Map _$$WebSocketLoadEventDataPlaylistImplToJson( - _$WebSocketLoadEventDataPlaylistImpl instance) => - { - 'tracks': instance.tracks.map((e) => e.toJson()).toList(), - 'collection': instance.collection?.toJson(), - 'initialIndex': instance.initialIndex, - 'runtimeType': instance.$type, - }; - -_$WebSocketLoadEventDataAlbumImpl _$$WebSocketLoadEventDataAlbumImplFromJson( - Map json) => - _$WebSocketLoadEventDataAlbumImpl( - tracks: (json['tracks'] as List) - .map((e) => - SpotubeTrackObject.fromJson(Map.from(e as Map))) - .toList(), - collection: json['collection'] == null - ? null - : SpotubeSimpleAlbumObject.fromJson( - Map.from(json['collection'] as Map)), - initialIndex: (json['initialIndex'] as num?)?.toInt(), - $type: json['runtimeType'] as String?, - ); - -Map _$$WebSocketLoadEventDataAlbumImplToJson( - _$WebSocketLoadEventDataAlbumImpl instance) => - { - 'tracks': instance.tracks.map((e) => e.toJson()).toList(), - 'collection': instance.collection?.toJson(), - 'initialIndex': instance.initialIndex, - 'runtimeType': instance.$type, - }; diff --git a/lib/models/connect/load.dart b/lib/models/connect/load.dart deleted file mode 100644 index d61e0f1e..00000000 --- a/lib/models/connect/load.dart +++ /dev/null @@ -1,44 +0,0 @@ -part of 'connect.dart'; - -@freezed -class WebSocketLoadEventData with _$WebSocketLoadEventData { - const WebSocketLoadEventData._(); - - factory WebSocketLoadEventData.playlist({ - @Assert( - "tracks is List", - "tracks must be a list of SpotubeFullTrackObject", - ) - required List tracks, - SpotubeSimplePlaylistObject? collection, - int? initialIndex, - }) = WebSocketLoadEventDataPlaylist; - - factory WebSocketLoadEventData.album({ - @Assert( - "tracks is List", - "tracks must be a list of SpotubeFullTrackObject", - ) - required List tracks, - SpotubeSimpleAlbumObject? collection, - int? initialIndex, - }) = WebSocketLoadEventDataAlbum; - - factory WebSocketLoadEventData.fromJson(Map json) => - _$WebSocketLoadEventDataFromJson(json); - - String? get collectionId => when( - playlist: (tracks, collection, _) => collection?.id, - album: (tracks, collection, _) => collection?.id, - ); -} - -class WebSocketLoadEvent extends WebSocketEvent { - WebSocketLoadEvent(WebSocketLoadEventData data) : super(WsEvent.load, data); - - factory WebSocketLoadEvent.fromJson(Map json) { - return WebSocketLoadEvent( - WebSocketLoadEventData.fromJson(json['data'] as Map), - ); - } -} diff --git a/lib/models/connect/ws_event.dart b/lib/models/connect/ws_event.dart deleted file mode 100644 index 7867f686..00000000 --- a/lib/models/connect/ws_event.dart +++ /dev/null @@ -1,381 +0,0 @@ -part of 'connect.dart'; - -enum WsEvent { - error, - volume, - removeTrack, - addTrack, - reorder, - shuffle, - loop, - seek, - duration, - queue, - position, - playing, - resume, - pause, - load, - next, - previous, - jump, - stop; - - static WsEvent fromString(String value) { - return WsEvent.values.firstWhere((e) => e.name == value); - } -} - -typedef EventCallback = FutureOr Function(T event); - -class WebSocketEvent { - final WsEvent type; - final T data; - - WebSocketEvent(this.type, this.data); - - factory WebSocketEvent.fromJson( - Map json, - T Function(dynamic) fromJson, - ) { - return WebSocketEvent( - WsEvent.fromString(json["type"]), - fromJson(json["data"]), - ); - } - - String toJson() { - return jsonEncode({ - "type": type.name, - "data": data, - }); - } - - Future onPosition( - EventCallback callback, - ) async { - if (type == WsEvent.position) { - await callback(WebSocketPositionEvent.fromJson({"data": data})); - } - } - - Future onPlaying( - EventCallback callback, - ) async { - if (type == WsEvent.playing) { - await callback(WebSocketPlayingEvent(data as bool)); - } - } - - Future onResume( - EventCallback callback, - ) async { - if (type == WsEvent.resume) { - await callback(WebSocketResumeEvent()); - } - } - - Future onPause( - EventCallback callback, - ) async { - if (type == WsEvent.pause) { - await callback(WebSocketPauseEvent()); - } - } - - Future onStop( - EventCallback callback, - ) async { - if (type == WsEvent.stop) { - await callback(WebSocketStopEvent()); - } - } - - Future onLoad( - EventCallback callback, - ) async { - if (type == WsEvent.load) { - await callback( - WebSocketLoadEvent( - WebSocketLoadEventData.fromJson(data as Map), - ), - ); - } - } - - Future onNext( - EventCallback callback, - ) async { - if (type == WsEvent.next) { - await callback(WebSocketNextEvent()); - } - } - - Future onPrevious( - EventCallback callback, - ) async { - if (type == WsEvent.previous) { - await callback(WebSocketPreviousEvent()); - } - } - - Future onJump( - EventCallback callback, - ) async { - if (type == WsEvent.jump) { - await callback(WebSocketJumpEvent(data as int)); - } - } - - Future onError( - EventCallback callback, - ) async { - if (type == WsEvent.error) { - await callback(WebSocketErrorEvent(data as String)); - } - } - - Future onQueue( - EventCallback callback, - ) async { - if (type == WsEvent.queue) { - await callback( - WebSocketQueueEvent.fromJson(data as Map), - ); - } - } - - Future onDuration( - EventCallback callback, - ) async { - if (type == WsEvent.duration) { - await callback( - WebSocketDurationEvent( - Duration(seconds: data as int), - ), - ); - } - } - - Future onSeek( - EventCallback callback, - ) async { - if (type == WsEvent.seek) { - await callback( - WebSocketSeekEvent( - Duration(seconds: data as int), - ), - ); - } - } - - Future onShuffle( - EventCallback callback, - ) async { - if (type == WsEvent.shuffle) { - await callback(WebSocketShuffleEvent(data as bool)); - } - } - - Future onLoop( - EventCallback callback, - ) async { - if (type == WsEvent.loop) { - await callback( - WebSocketLoopEvent( - PlaylistMode.values.firstWhere((e) => e.name == data as String), - ), - ); - } - } - - Future onRemoveTrack( - EventCallback callback, - ) async { - if (type == WsEvent.removeTrack) { - await callback(WebSocketRemoveTrackEvent(data as String)); - } - } - - Future onAddTrack( - EventCallback callback, - ) async { - if (type == WsEvent.addTrack) { - await callback( - WebSocketAddTrackEvent.fromJson(data as Map)); - } - } - - Future onReorder( - EventCallback callback, - ) async { - if (type == WsEvent.reorder) { - await callback( - WebSocketReorderEvent.fromJson(data as Map)); - } - } - - Future onVolume( - EventCallback callback, - ) async { - if (type == WsEvent.volume) { - await callback(WebSocketVolumeEvent(data as double)); - } - } -} - -class WebSocketLoopEvent extends WebSocketEvent { - WebSocketLoopEvent(PlaylistMode data) : super(WsEvent.loop, data); - - WebSocketLoopEvent.fromJson(Map json) - : super( - WsEvent.loop, - PlaylistMode.values.firstWhere( - (e) => e.name == json["data"] as String, - ), - ); - - @override - String toJson() { - return jsonEncode({ - "type": type.name, - "data": data.name, - }); - } -} - -class WebSocketPositionEvent extends WebSocketEvent { - WebSocketPositionEvent(Duration data) : super(WsEvent.position, data); - - WebSocketPositionEvent.fromJson(Map json) - : super(WsEvent.position, Duration(seconds: json["data"] as int)); - - @override - String toJson() { - return jsonEncode({ - "type": type.name, - "data": data.inSeconds, - }); - } -} - -class WebSocketDurationEvent extends WebSocketEvent { - WebSocketDurationEvent(Duration data) : super(WsEvent.duration, data); - - WebSocketDurationEvent.fromJson(Map json) - : super(WsEvent.duration, Duration(seconds: json["data"] as int)); - - @override - String toJson() { - return jsonEncode({ - "type": type.name, - "data": data.inSeconds, - }); - } -} - -class WebSocketSeekEvent extends WebSocketEvent { - WebSocketSeekEvent(Duration data) : super(WsEvent.seek, data); - - WebSocketSeekEvent.fromJson(Map json) - : super(WsEvent.seek, Duration(seconds: json["data"] as int)); - - @override - String toJson() { - return jsonEncode({ - "type": type.name, - "data": data.inSeconds, - }); - } -} - -class WebSocketShuffleEvent extends WebSocketEvent { - WebSocketShuffleEvent(bool data) : super(WsEvent.shuffle, data); -} - -class WebSocketPlayingEvent extends WebSocketEvent { - WebSocketPlayingEvent(bool data) : super(WsEvent.playing, data); -} - -class WebSocketResumeEvent extends WebSocketEvent { - WebSocketResumeEvent() : super(WsEvent.resume, null); -} - -class WebSocketPauseEvent extends WebSocketEvent { - WebSocketPauseEvent() : super(WsEvent.pause, null); -} - -class WebSocketStopEvent extends WebSocketEvent { - WebSocketStopEvent() : super(WsEvent.stop, null); -} - -class WebSocketNextEvent extends WebSocketEvent { - WebSocketNextEvent() : super(WsEvent.next, null); -} - -class WebSocketPreviousEvent extends WebSocketEvent { - WebSocketPreviousEvent() : super(WsEvent.previous, null); -} - -class WebSocketJumpEvent extends WebSocketEvent { - WebSocketJumpEvent(int data) : super(WsEvent.jump, data); -} - -class WebSocketErrorEvent extends WebSocketEvent { - WebSocketErrorEvent(String data) : super(WsEvent.error, data); -} - -class WebSocketQueueEvent extends WebSocketEvent { - WebSocketQueueEvent(AudioPlayerState data) : super(WsEvent.queue, data); - - factory WebSocketQueueEvent.fromJson(Map json) => - WebSocketQueueEvent( - AudioPlayerState.fromJson(json), - ); -} - -class WebSocketRemoveTrackEvent extends WebSocketEvent { - WebSocketRemoveTrackEvent(String data) : super(WsEvent.removeTrack, data); -} - -class WebSocketAddTrackEvent extends WebSocketEvent { - WebSocketAddTrackEvent(SpotubeFullTrackObject data) - : super(WsEvent.addTrack, data); - - WebSocketAddTrackEvent.fromJson(Map json) - : super( - WsEvent.addTrack, - SpotubeFullTrackObject.fromJson( - json["data"] as Map, - ), - ); -} - -typedef ReorderData = ({int oldIndex, int newIndex}); - -class WebSocketReorderEvent extends WebSocketEvent { - WebSocketReorderEvent(ReorderData data) : super(WsEvent.reorder, data); - - factory WebSocketReorderEvent.fromJson(Map json) => - WebSocketReorderEvent( - ( - oldIndex: json["oldIndex"] as int, - newIndex: json["newIndex"] as int, - ), - ); - - @override - String toJson() { - return jsonEncode({ - "type": type.name, - "data": { - "oldIndex": data.oldIndex, - "newIndex": data.newIndex, - }, - }); - } -} - -class WebSocketVolumeEvent extends WebSocketEvent { - WebSocketVolumeEvent(double data) : super(WsEvent.volume, data); -} diff --git a/lib/models/database/database.dart b/lib/models/database/database.dart deleted file mode 100644 index f1c66c1a..00000000 --- a/lib/models/database/database.dart +++ /dev/null @@ -1,267 +0,0 @@ -library database; - -import 'dart:convert'; -import 'dart:io'; - -import 'package:drift/drift.dart'; -import 'package:drift/remote.dart'; -import 'package:encrypt/encrypt.dart'; -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' show ThemeMode, Colors; -import 'package:spotube/models/database/database.steps.dart'; -import 'package:spotube/models/lyrics.dart'; -import 'package:spotube/models/metadata/market.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/services/kv_store/encrypted_kv_store.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:flutter/widgets.dart' hide Table, Key, View; -import 'package:spotube/modules/settings/color_scheme_picker_dialog.dart'; -import 'package:drift/native.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/services/youtube_engine/newpipe_engine.dart'; -import 'package:spotube/services/youtube_engine/youtube_explode_engine.dart'; -import 'package:spotube/services/youtube_engine/yt_dlp_engine.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:sqlite3/sqlite3.dart'; -import 'package:sqlite3_flutter_libs/sqlite3_flutter_libs.dart'; - -part 'database.g.dart'; - -part 'tables/authentication.dart'; -part 'tables/blacklist.dart'; -part 'tables/preferences.dart'; -part 'tables/scrobbler.dart'; -part 'tables/skip_segment.dart'; -part 'tables/source_match.dart'; -part 'tables/audio_player_state.dart'; -part 'tables/history.dart'; -part 'tables/lyrics.dart'; -part 'tables/metadata_plugins.dart'; - -part 'typeconverters/color.dart'; -part 'typeconverters/locale.dart'; -part 'typeconverters/string_list.dart'; -part 'typeconverters/encrypted_text.dart'; -part 'typeconverters/map.dart'; -part 'typeconverters/map_list.dart'; -part 'typeconverters/subtitle.dart'; - -@DriftDatabase( - tables: [ - AuthenticationTable, - BlacklistTable, - PreferencesTable, - ScrobblerTable, - SkipSegmentTable, - SourceMatchTable, - AudioPlayerStateTable, - HistoryTable, - LyricsTable, - PluginsTable, - ], -) -class AppDatabase extends _$AppDatabase { - AppDatabase() : super(_openConnection()); - - @override - int get schemaVersion => 10; - - @override - MigrationStrategy get migration { - return MigrationStrategy( - onUpgrade: stepByStep( - from1To2: (m, schema) async { - // Add invidiousInstance column to preferences table - await m.addColumn( - schema.preferencesTable, - schema.preferencesTable.invidiousInstance, - ); - }, - from2To3: (m, schema) async { - await m.addColumn( - schema.preferencesTable, - schema.preferencesTable.cacheMusic, - ); - }, - from3To4: (m, schema) async { - await m.addColumn( - schema.preferencesTable, - schema.preferencesTable.youtubeClientEngine, - ); - }, - from4To5: (m, schema) async { - final columnName = schema.preferencesTable.accentColorScheme - .escapedNameFor(SqlDialect.sqlite); - final columnNameOld = - '"${schema.preferencesTable.accentColorScheme.name}_old"'; - final tableName = schema.preferencesTable.actualTableName; - await customStatement( - "ALTER TABLE $tableName " - "RENAME COLUMN $columnName to $columnNameOld", - ); - await customStatement( - "ALTER TABLE $tableName " - "ADD COLUMN $columnName TEXT NOT NULL DEFAULT 'Slate:0xff64748b'", - ); - await customStatement( - "UPDATE $tableName " - "SET $columnName = $columnNameOld", - ); - await customStatement( - "ALTER TABLE $tableName " - "DROP COLUMN $columnNameOld", - ); - await customStatement( - "UPDATE $tableName " - "SET $columnName = 'Slate:0xff64748b' WHERE $columnName = 'Blue:0xFF2196F3'", - ); - }, - from5To6: (m, schema) async { - try { - await m.addColumn( - schema.preferencesTable, - schema.preferencesTable.connectPort, - ); - } on DriftRemoteException catch (e) { - // If the column already exists, ignore the error - if (e.remoteCause != - 'duplicate column name: ${schema.preferencesTable.connectPort.name}') { - rethrow; - } - } - }, - from6To7: (m, schema) async { - await m.createTable(schema.metadataPluginsTable); - await m.addColumn( - schema.audioPlayerStateTable, - schema.audioPlayerStateTable.currentIndex, - ); - await m.addColumn( - schema.audioPlayerStateTable, - schema.audioPlayerStateTable.tracks, - ); - }, - from7To8: (m, schema) async { - await m - .addColumn( - schema.metadataPluginsTable, - schema.metadataPluginsTable.entryPoint, - ) - .catchError((error, stackTrace) { - // If the column already exists, ignore the error - if (!error.toString().contains('duplicate column name')) { - throw error; - } - }); - await m - .addColumn( - schema.metadataPluginsTable, - schema.metadataPluginsTable.apis, - ) - .catchError((error, stackTrace) { - // If the column already exists, ignore the error - if (!error.toString().contains('duplicate column name')) { - throw error; - } - }); - await m - .addColumn( - schema.metadataPluginsTable, - schema.metadataPluginsTable.abilities, - ) - .catchError((error, stackTrace) { - // If the column already exists, ignore the error - if (!error.toString().contains('duplicate column name')) { - throw error; - } - }); - await m - .addColumn( - schema.metadataPluginsTable, - schema.metadataPluginsTable.repository, - ) - .catchError((error, stackTrace) { - // If the column already exists, ignore the error - if (!error.toString().contains('duplicate column name')) { - throw error; - } - }); - await m - .addColumn( - schema.metadataPluginsTable, - schema.metadataPluginsTable.pluginApiVersion, - ) - .catchError((error, stackTrace) { - // If the column already exists, ignore the error - if (!error.toString().contains('duplicate column name')) { - throw error; - } - }); - }, - from8To9: (m, schema) async { - await m - .renameTable(schema.pluginsTable, "metadata_plugins_table") - .catchError((e, stack) => AppLogger.reportError(e, stack)); - await m - .renameColumn( - schema.pluginsTable, - "selected", - pluginsTable.selectedForMetadata, - ) - .catchError((e, stack) => AppLogger.reportError(e, stack)); - await m - .addColumn( - schema.pluginsTable, - pluginsTable.selectedForAudioSource, - ) - .catchError((e, stack) => AppLogger.reportError(e, stack)); - }, - from9To10: (m, schema) async { - await m - .dropColumn(schema.preferencesTable, "piped_instance") - .catchError((e, stack) => AppLogger.reportError(e, stack)); - await m - .dropColumn(schema.preferencesTable, "invidious_instance") - .catchError((e, stack) => AppLogger.reportError(e, stack)); - await m - .addColumn( - schema.sourceMatchTable, - sourceMatchTable.sourceInfo, - ) - .catchError((e, stack) => AppLogger.reportError(e, stack)); - await customStatement("DROP INDEX IF EXISTS uniq_track_match;") - .catchError((e, stack) => AppLogger.reportError(e, stack)); - await m - .dropColumn(schema.sourceMatchTable, "source_id") - .catchError((e, stack) => AppLogger.reportError(e, stack)); - }, - ), - ); - } -} - -LazyDatabase _openConnection() { - // the LazyDatabase util lets us find the right location for the file async. - return LazyDatabase(() async { - // put the database file, called db.sqlite here, into the documents folder - // for your app. - final dbFolder = await getApplicationSupportDirectory(); - final file = File(join(dbFolder.path, 'db.sqlite')); - - // Also work around limitations on old Android versions - if (Platform.isAndroid) { - await applyWorkaroundToOpenSqlite3OnOldAndroidVersions(); - } - - // Make sqlite3 pick a more suitable location for temporary files - the - // one from the system may be inaccessible due to sandboxing. - final cacheBase = (await getTemporaryDirectory()).path; - // We can't access /tmp on Android, which sqlite3 would try by default. - // Explicitly tell it about the correct temporary directory. - sqlite3.tempDirectory = cacheBase; - - return NativeDatabase.createInBackground(file); - }); -} diff --git a/lib/models/database/database.g.dart b/lib/models/database/database.g.dart deleted file mode 100644 index 8aa14899..00000000 --- a/lib/models/database/database.g.dart +++ /dev/null @@ -1,6316 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'database.dart'; - -// ignore_for_file: type=lint -class $AuthenticationTableTable extends AuthenticationTable - with TableInfo<$AuthenticationTableTable, AuthenticationTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $AuthenticationTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - @override - late final GeneratedColumnWithTypeConverter cookie = - GeneratedColumn('cookie', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter( - $AuthenticationTableTable.$convertercookie); - @override - late final GeneratedColumnWithTypeConverter - accessToken = GeneratedColumn('access_token', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter( - $AuthenticationTableTable.$converteraccessToken); - static const VerificationMeta _expirationMeta = - const VerificationMeta('expiration'); - @override - late final GeneratedColumn expiration = GeneratedColumn( - 'expiration', aliasedName, false, - type: DriftSqlType.dateTime, requiredDuringInsert: true); - @override - List get $columns => [id, cookie, accessToken, expiration]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'authentication_table'; - @override - VerificationContext validateIntegrity( - Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('expiration')) { - context.handle( - _expirationMeta, - expiration.isAcceptableOrUnknown( - data['expiration']!, _expirationMeta)); - } else if (isInserting) { - context.missing(_expirationMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - AuthenticationTableData map(Map data, - {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthenticationTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - cookie: $AuthenticationTableTable.$convertercookie.fromSql( - attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}cookie'])!), - accessToken: $AuthenticationTableTable.$converteraccessToken.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}access_token'])!), - expiration: attachedDatabase.typeMapping - .read(DriftSqlType.dateTime, data['${effectivePrefix}expiration'])!, - ); - } - - @override - $AuthenticationTableTable createAlias(String alias) { - return $AuthenticationTableTable(attachedDatabase, alias); - } - - static TypeConverter $convertercookie = - EncryptedTextConverter(); - static TypeConverter $converteraccessToken = - EncryptedTextConverter(); -} - -class AuthenticationTableData extends DataClass - implements Insertable { - final int id; - final DecryptedText cookie; - final DecryptedText accessToken; - final DateTime expiration; - const AuthenticationTableData( - {required this.id, - required this.cookie, - required this.accessToken, - required this.expiration}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - { - map['cookie'] = Variable( - $AuthenticationTableTable.$convertercookie.toSql(cookie)); - } - { - map['access_token'] = Variable( - $AuthenticationTableTable.$converteraccessToken.toSql(accessToken)); - } - map['expiration'] = Variable(expiration); - return map; - } - - AuthenticationTableCompanion toCompanion(bool nullToAbsent) { - return AuthenticationTableCompanion( - id: Value(id), - cookie: Value(cookie), - accessToken: Value(accessToken), - expiration: Value(expiration), - ); - } - - factory AuthenticationTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthenticationTableData( - id: serializer.fromJson(json['id']), - cookie: serializer.fromJson(json['cookie']), - accessToken: serializer.fromJson(json['accessToken']), - expiration: serializer.fromJson(json['expiration']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'cookie': serializer.toJson(cookie), - 'accessToken': serializer.toJson(accessToken), - 'expiration': serializer.toJson(expiration), - }; - } - - AuthenticationTableData copyWith( - {int? id, - DecryptedText? cookie, - DecryptedText? accessToken, - DateTime? expiration}) => - AuthenticationTableData( - id: id ?? this.id, - cookie: cookie ?? this.cookie, - accessToken: accessToken ?? this.accessToken, - expiration: expiration ?? this.expiration, - ); - AuthenticationTableData copyWithCompanion(AuthenticationTableCompanion data) { - return AuthenticationTableData( - id: data.id.present ? data.id.value : this.id, - cookie: data.cookie.present ? data.cookie.value : this.cookie, - accessToken: - data.accessToken.present ? data.accessToken.value : this.accessToken, - expiration: - data.expiration.present ? data.expiration.value : this.expiration, - ); - } - - @override - String toString() { - return (StringBuffer('AuthenticationTableData(') - ..write('id: $id, ') - ..write('cookie: $cookie, ') - ..write('accessToken: $accessToken, ') - ..write('expiration: $expiration') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, cookie, accessToken, expiration); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthenticationTableData && - other.id == this.id && - other.cookie == this.cookie && - other.accessToken == this.accessToken && - other.expiration == this.expiration); -} - -class AuthenticationTableCompanion - extends UpdateCompanion { - final Value id; - final Value cookie; - final Value accessToken; - final Value expiration; - const AuthenticationTableCompanion({ - this.id = const Value.absent(), - this.cookie = const Value.absent(), - this.accessToken = const Value.absent(), - this.expiration = const Value.absent(), - }); - AuthenticationTableCompanion.insert({ - this.id = const Value.absent(), - required DecryptedText cookie, - required DecryptedText accessToken, - required DateTime expiration, - }) : cookie = Value(cookie), - accessToken = Value(accessToken), - expiration = Value(expiration); - static Insertable custom({ - Expression? id, - Expression? cookie, - Expression? accessToken, - Expression? expiration, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (cookie != null) 'cookie': cookie, - if (accessToken != null) 'access_token': accessToken, - if (expiration != null) 'expiration': expiration, - }); - } - - AuthenticationTableCompanion copyWith( - {Value? id, - Value? cookie, - Value? accessToken, - Value? expiration}) { - return AuthenticationTableCompanion( - id: id ?? this.id, - cookie: cookie ?? this.cookie, - accessToken: accessToken ?? this.accessToken, - expiration: expiration ?? this.expiration, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (cookie.present) { - map['cookie'] = Variable( - $AuthenticationTableTable.$convertercookie.toSql(cookie.value)); - } - if (accessToken.present) { - map['access_token'] = Variable($AuthenticationTableTable - .$converteraccessToken - .toSql(accessToken.value)); - } - if (expiration.present) { - map['expiration'] = Variable(expiration.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthenticationTableCompanion(') - ..write('id: $id, ') - ..write('cookie: $cookie, ') - ..write('accessToken: $accessToken, ') - ..write('expiration: $expiration') - ..write(')')) - .toString(); - } -} - -class $BlacklistTableTable extends BlacklistTable - with TableInfo<$BlacklistTableTable, BlacklistTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $BlacklistTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _nameMeta = const VerificationMeta('name'); - @override - late final GeneratedColumn name = GeneratedColumn( - 'name', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - @override - late final GeneratedColumnWithTypeConverter - elementType = GeneratedColumn('element_type', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter( - $BlacklistTableTable.$converterelementType); - static const VerificationMeta _elementIdMeta = - const VerificationMeta('elementId'); - @override - late final GeneratedColumn elementId = GeneratedColumn( - 'element_id', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - @override - List get $columns => [id, name, elementType, elementId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'blacklist_table'; - @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta)); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('element_id')) { - context.handle(_elementIdMeta, - elementId.isAcceptableOrUnknown(data['element_id']!, _elementIdMeta)); - } else if (isInserting) { - context.missing(_elementIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - BlacklistTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return BlacklistTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - name: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}name'])!, - elementType: $BlacklistTableTable.$converterelementType.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}element_type'])!), - elementId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}element_id'])!, - ); - } - - @override - $BlacklistTableTable createAlias(String alias) { - return $BlacklistTableTable(attachedDatabase, alias); - } - - static JsonTypeConverter2 - $converterelementType = - const EnumNameConverter(BlacklistedType.values); -} - -class BlacklistTableData extends DataClass - implements Insertable { - final int id; - final String name; - final BlacklistedType elementType; - final String elementId; - const BlacklistTableData( - {required this.id, - required this.name, - required this.elementType, - required this.elementId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - { - map['element_type'] = Variable( - $BlacklistTableTable.$converterelementType.toSql(elementType)); - } - map['element_id'] = Variable(elementId); - return map; - } - - BlacklistTableCompanion toCompanion(bool nullToAbsent) { - return BlacklistTableCompanion( - id: Value(id), - name: Value(name), - elementType: Value(elementType), - elementId: Value(elementId), - ); - } - - factory BlacklistTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return BlacklistTableData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - elementType: $BlacklistTableTable.$converterelementType - .fromJson(serializer.fromJson(json['elementType'])), - elementId: serializer.fromJson(json['elementId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'elementType': serializer.toJson( - $BlacklistTableTable.$converterelementType.toJson(elementType)), - 'elementId': serializer.toJson(elementId), - }; - } - - BlacklistTableData copyWith( - {int? id, - String? name, - BlacklistedType? elementType, - String? elementId}) => - BlacklistTableData( - id: id ?? this.id, - name: name ?? this.name, - elementType: elementType ?? this.elementType, - elementId: elementId ?? this.elementId, - ); - BlacklistTableData copyWithCompanion(BlacklistTableCompanion data) { - return BlacklistTableData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - elementType: - data.elementType.present ? data.elementType.value : this.elementType, - elementId: data.elementId.present ? data.elementId.value : this.elementId, - ); - } - - @override - String toString() { - return (StringBuffer('BlacklistTableData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('elementType: $elementType, ') - ..write('elementId: $elementId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, name, elementType, elementId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is BlacklistTableData && - other.id == this.id && - other.name == this.name && - other.elementType == this.elementType && - other.elementId == this.elementId); -} - -class BlacklistTableCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value elementType; - final Value elementId; - const BlacklistTableCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.elementType = const Value.absent(), - this.elementId = const Value.absent(), - }); - BlacklistTableCompanion.insert({ - this.id = const Value.absent(), - required String name, - required BlacklistedType elementType, - required String elementId, - }) : name = Value(name), - elementType = Value(elementType), - elementId = Value(elementId); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? elementType, - Expression? elementId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (elementType != null) 'element_type': elementType, - if (elementId != null) 'element_id': elementId, - }); - } - - BlacklistTableCompanion copyWith( - {Value? id, - Value? name, - Value? elementType, - Value? elementId}) { - return BlacklistTableCompanion( - id: id ?? this.id, - name: name ?? this.name, - elementType: elementType ?? this.elementType, - elementId: elementId ?? this.elementId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (elementType.present) { - map['element_type'] = Variable( - $BlacklistTableTable.$converterelementType.toSql(elementType.value)); - } - if (elementId.present) { - map['element_id'] = Variable(elementId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('BlacklistTableCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('elementType: $elementType, ') - ..write('elementId: $elementId') - ..write(')')) - .toString(); - } -} - -class $PreferencesTableTable extends PreferencesTable - with TableInfo<$PreferencesTableTable, PreferencesTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $PreferencesTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _albumColorSyncMeta = - const VerificationMeta('albumColorSync'); - @override - late final GeneratedColumn albumColorSync = GeneratedColumn( - 'album_color_sync', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("album_color_sync" IN (0, 1))'), - defaultValue: const Constant(true)); - static const VerificationMeta _amoledDarkThemeMeta = - const VerificationMeta('amoledDarkTheme'); - @override - late final GeneratedColumn amoledDarkTheme = GeneratedColumn( - 'amoled_dark_theme', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("amoled_dark_theme" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _checkUpdateMeta = - const VerificationMeta('checkUpdate'); - @override - late final GeneratedColumn checkUpdate = GeneratedColumn( - 'check_update', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("check_update" IN (0, 1))'), - defaultValue: const Constant(true)); - static const VerificationMeta _normalizeAudioMeta = - const VerificationMeta('normalizeAudio'); - @override - late final GeneratedColumn normalizeAudio = GeneratedColumn( - 'normalize_audio', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("normalize_audio" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _showSystemTrayIconMeta = - const VerificationMeta('showSystemTrayIcon'); - @override - late final GeneratedColumn showSystemTrayIcon = GeneratedColumn( - 'show_system_tray_icon', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("show_system_tray_icon" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _systemTitleBarMeta = - const VerificationMeta('systemTitleBar'); - @override - late final GeneratedColumn systemTitleBar = GeneratedColumn( - 'system_title_bar', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("system_title_bar" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _skipNonMusicMeta = - const VerificationMeta('skipNonMusic'); - @override - late final GeneratedColumn skipNonMusic = GeneratedColumn( - 'skip_non_music', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("skip_non_music" IN (0, 1))'), - defaultValue: const Constant(false)); - @override - late final GeneratedColumnWithTypeConverter - closeBehavior = GeneratedColumn( - 'close_behavior', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: Constant(CloseBehavior.close.name)) - .withConverter( - $PreferencesTableTable.$convertercloseBehavior); - @override - late final GeneratedColumnWithTypeConverter - accentColorScheme = GeneratedColumn( - 'accent_color_scheme', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant("Slate:0xff64748b")) - .withConverter( - $PreferencesTableTable.$converteraccentColorScheme); - @override - late final GeneratedColumnWithTypeConverter layoutMode = - GeneratedColumn('layout_mode', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: Constant(LayoutMode.adaptive.name)) - .withConverter( - $PreferencesTableTable.$converterlayoutMode); - @override - late final GeneratedColumnWithTypeConverter locale = - GeneratedColumn('locale', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant( - '{"languageCode":"system","countryCode":"system"}')) - .withConverter($PreferencesTableTable.$converterlocale); - @override - late final GeneratedColumnWithTypeConverter market = - GeneratedColumn('market', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: Constant(Market.US.name)) - .withConverter($PreferencesTableTable.$convertermarket); - @override - late final GeneratedColumnWithTypeConverter searchMode = - GeneratedColumn('search_mode', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: Constant(SearchMode.youtube.name)) - .withConverter( - $PreferencesTableTable.$convertersearchMode); - static const VerificationMeta _downloadLocationMeta = - const VerificationMeta('downloadLocation'); - @override - late final GeneratedColumn downloadLocation = GeneratedColumn( - 'download_location', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant("")); - @override - late final GeneratedColumnWithTypeConverter, String> - localLibraryLocation = GeneratedColumn( - 'local_library_location', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant("")) - .withConverter>( - $PreferencesTableTable.$converterlocalLibraryLocation); - @override - late final GeneratedColumnWithTypeConverter themeMode = - GeneratedColumn('theme_mode', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: Constant(ThemeMode.system.name)) - .withConverter($PreferencesTableTable.$converterthemeMode); - static const VerificationMeta _audioSourceIdMeta = - const VerificationMeta('audioSourceId'); - @override - late final GeneratedColumn audioSourceId = GeneratedColumn( - 'audio_source_id', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); - @override - late final GeneratedColumnWithTypeConverter - youtubeClientEngine = GeneratedColumn( - 'youtube_client_engine', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: Constant(YoutubeClientEngine.youtubeExplode.name)) - .withConverter( - $PreferencesTableTable.$converteryoutubeClientEngine); - static const VerificationMeta _discordPresenceMeta = - const VerificationMeta('discordPresence'); - @override - late final GeneratedColumn discordPresence = GeneratedColumn( - 'discord_presence', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("discord_presence" IN (0, 1))'), - defaultValue: const Constant(true)); - static const VerificationMeta _endlessPlaybackMeta = - const VerificationMeta('endlessPlayback'); - @override - late final GeneratedColumn endlessPlayback = GeneratedColumn( - 'endless_playback', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("endless_playback" IN (0, 1))'), - defaultValue: const Constant(true)); - static const VerificationMeta _enableConnectMeta = - const VerificationMeta('enableConnect'); - @override - late final GeneratedColumn enableConnect = GeneratedColumn( - 'enable_connect', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("enable_connect" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _connectPortMeta = - const VerificationMeta('connectPort'); - @override - late final GeneratedColumn connectPort = GeneratedColumn( - 'connect_port', aliasedName, false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const Constant(-1)); - static const VerificationMeta _cacheMusicMeta = - const VerificationMeta('cacheMusic'); - @override - late final GeneratedColumn cacheMusic = GeneratedColumn( - 'cache_music', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('CHECK ("cache_music" IN (0, 1))'), - defaultValue: const Constant(true)); - @override - List get $columns => [ - id, - albumColorSync, - amoledDarkTheme, - checkUpdate, - normalizeAudio, - showSystemTrayIcon, - systemTitleBar, - skipNonMusic, - closeBehavior, - accentColorScheme, - layoutMode, - locale, - market, - searchMode, - downloadLocation, - localLibraryLocation, - themeMode, - audioSourceId, - youtubeClientEngine, - discordPresence, - endlessPlayback, - enableConnect, - connectPort, - cacheMusic - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'preferences_table'; - @override - VerificationContext validateIntegrity( - Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('album_color_sync')) { - context.handle( - _albumColorSyncMeta, - albumColorSync.isAcceptableOrUnknown( - data['album_color_sync']!, _albumColorSyncMeta)); - } - if (data.containsKey('amoled_dark_theme')) { - context.handle( - _amoledDarkThemeMeta, - amoledDarkTheme.isAcceptableOrUnknown( - data['amoled_dark_theme']!, _amoledDarkThemeMeta)); - } - if (data.containsKey('check_update')) { - context.handle( - _checkUpdateMeta, - checkUpdate.isAcceptableOrUnknown( - data['check_update']!, _checkUpdateMeta)); - } - if (data.containsKey('normalize_audio')) { - context.handle( - _normalizeAudioMeta, - normalizeAudio.isAcceptableOrUnknown( - data['normalize_audio']!, _normalizeAudioMeta)); - } - if (data.containsKey('show_system_tray_icon')) { - context.handle( - _showSystemTrayIconMeta, - showSystemTrayIcon.isAcceptableOrUnknown( - data['show_system_tray_icon']!, _showSystemTrayIconMeta)); - } - if (data.containsKey('system_title_bar')) { - context.handle( - _systemTitleBarMeta, - systemTitleBar.isAcceptableOrUnknown( - data['system_title_bar']!, _systemTitleBarMeta)); - } - if (data.containsKey('skip_non_music')) { - context.handle( - _skipNonMusicMeta, - skipNonMusic.isAcceptableOrUnknown( - data['skip_non_music']!, _skipNonMusicMeta)); - } - if (data.containsKey('download_location')) { - context.handle( - _downloadLocationMeta, - downloadLocation.isAcceptableOrUnknown( - data['download_location']!, _downloadLocationMeta)); - } - if (data.containsKey('audio_source_id')) { - context.handle( - _audioSourceIdMeta, - audioSourceId.isAcceptableOrUnknown( - data['audio_source_id']!, _audioSourceIdMeta)); - } - if (data.containsKey('discord_presence')) { - context.handle( - _discordPresenceMeta, - discordPresence.isAcceptableOrUnknown( - data['discord_presence']!, _discordPresenceMeta)); - } - if (data.containsKey('endless_playback')) { - context.handle( - _endlessPlaybackMeta, - endlessPlayback.isAcceptableOrUnknown( - data['endless_playback']!, _endlessPlaybackMeta)); - } - if (data.containsKey('enable_connect')) { - context.handle( - _enableConnectMeta, - enableConnect.isAcceptableOrUnknown( - data['enable_connect']!, _enableConnectMeta)); - } - if (data.containsKey('connect_port')) { - context.handle( - _connectPortMeta, - connectPort.isAcceptableOrUnknown( - data['connect_port']!, _connectPortMeta)); - } - if (data.containsKey('cache_music')) { - context.handle( - _cacheMusicMeta, - cacheMusic.isAcceptableOrUnknown( - data['cache_music']!, _cacheMusicMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - PreferencesTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PreferencesTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - albumColorSync: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}album_color_sync'])!, - amoledDarkTheme: attachedDatabase.typeMapping.read( - DriftSqlType.bool, data['${effectivePrefix}amoled_dark_theme'])!, - checkUpdate: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}check_update'])!, - normalizeAudio: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}normalize_audio'])!, - showSystemTrayIcon: attachedDatabase.typeMapping.read( - DriftSqlType.bool, data['${effectivePrefix}show_system_tray_icon'])!, - systemTitleBar: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}system_title_bar'])!, - skipNonMusic: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}skip_non_music'])!, - closeBehavior: $PreferencesTableTable.$convertercloseBehavior.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}close_behavior'])!), - accentColorScheme: $PreferencesTableTable.$converteraccentColorScheme - .fromSql(attachedDatabase.typeMapping.read(DriftSqlType.string, - data['${effectivePrefix}accent_color_scheme'])!), - layoutMode: $PreferencesTableTable.$converterlayoutMode.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}layout_mode'])!), - locale: $PreferencesTableTable.$converterlocale.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}locale'])!), - market: $PreferencesTableTable.$convertermarket.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}market'])!), - searchMode: $PreferencesTableTable.$convertersearchMode.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}search_mode'])!), - downloadLocation: attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}download_location'])!, - localLibraryLocation: $PreferencesTableTable - .$converterlocalLibraryLocation - .fromSql(attachedDatabase.typeMapping.read(DriftSqlType.string, - data['${effectivePrefix}local_library_location'])!), - themeMode: $PreferencesTableTable.$converterthemeMode.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}theme_mode'])!), - audioSourceId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}audio_source_id']), - youtubeClientEngine: $PreferencesTableTable.$converteryoutubeClientEngine - .fromSql(attachedDatabase.typeMapping.read(DriftSqlType.string, - data['${effectivePrefix}youtube_client_engine'])!), - discordPresence: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}discord_presence'])!, - endlessPlayback: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}endless_playback'])!, - enableConnect: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}enable_connect'])!, - connectPort: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}connect_port'])!, - cacheMusic: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}cache_music'])!, - ); - } - - @override - $PreferencesTableTable createAlias(String alias) { - return $PreferencesTableTable(attachedDatabase, alias); - } - - static JsonTypeConverter2 - $convertercloseBehavior = - const EnumNameConverter(CloseBehavior.values); - static TypeConverter $converteraccentColorScheme = - const SpotubeColorConverter(); - static JsonTypeConverter2 $converterlayoutMode = - const EnumNameConverter(LayoutMode.values); - static TypeConverter $converterlocale = - const LocaleConverter(); - static JsonTypeConverter2 $convertermarket = - const EnumNameConverter(Market.values); - static JsonTypeConverter2 $convertersearchMode = - const EnumNameConverter(SearchMode.values); - static TypeConverter, String> $converterlocalLibraryLocation = - const StringListConverter(); - static JsonTypeConverter2 $converterthemeMode = - const EnumNameConverter(ThemeMode.values); - static JsonTypeConverter2 - $converteryoutubeClientEngine = - const EnumNameConverter(YoutubeClientEngine.values); -} - -class PreferencesTableData extends DataClass - implements Insertable { - final int id; - final bool albumColorSync; - final bool amoledDarkTheme; - final bool checkUpdate; - final bool normalizeAudio; - final bool showSystemTrayIcon; - final bool systemTitleBar; - final bool skipNonMusic; - final CloseBehavior closeBehavior; - final SpotubeColor accentColorScheme; - final LayoutMode layoutMode; - final Locale locale; - final Market market; - final SearchMode searchMode; - final String downloadLocation; - final List localLibraryLocation; - final ThemeMode themeMode; - final String? audioSourceId; - final YoutubeClientEngine youtubeClientEngine; - final bool discordPresence; - final bool endlessPlayback; - final bool enableConnect; - final int connectPort; - final bool cacheMusic; - const PreferencesTableData( - {required this.id, - required this.albumColorSync, - required this.amoledDarkTheme, - required this.checkUpdate, - required this.normalizeAudio, - required this.showSystemTrayIcon, - required this.systemTitleBar, - required this.skipNonMusic, - required this.closeBehavior, - required this.accentColorScheme, - required this.layoutMode, - required this.locale, - required this.market, - required this.searchMode, - required this.downloadLocation, - required this.localLibraryLocation, - required this.themeMode, - this.audioSourceId, - required this.youtubeClientEngine, - required this.discordPresence, - required this.endlessPlayback, - required this.enableConnect, - required this.connectPort, - required this.cacheMusic}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['album_color_sync'] = Variable(albumColorSync); - map['amoled_dark_theme'] = Variable(amoledDarkTheme); - map['check_update'] = Variable(checkUpdate); - map['normalize_audio'] = Variable(normalizeAudio); - map['show_system_tray_icon'] = Variable(showSystemTrayIcon); - map['system_title_bar'] = Variable(systemTitleBar); - map['skip_non_music'] = Variable(skipNonMusic); - { - map['close_behavior'] = Variable( - $PreferencesTableTable.$convertercloseBehavior.toSql(closeBehavior)); - } - { - map['accent_color_scheme'] = Variable($PreferencesTableTable - .$converteraccentColorScheme - .toSql(accentColorScheme)); - } - { - map['layout_mode'] = Variable( - $PreferencesTableTable.$converterlayoutMode.toSql(layoutMode)); - } - { - map['locale'] = Variable( - $PreferencesTableTable.$converterlocale.toSql(locale)); - } - { - map['market'] = Variable( - $PreferencesTableTable.$convertermarket.toSql(market)); - } - { - map['search_mode'] = Variable( - $PreferencesTableTable.$convertersearchMode.toSql(searchMode)); - } - map['download_location'] = Variable(downloadLocation); - { - map['local_library_location'] = Variable($PreferencesTableTable - .$converterlocalLibraryLocation - .toSql(localLibraryLocation)); - } - { - map['theme_mode'] = Variable( - $PreferencesTableTable.$converterthemeMode.toSql(themeMode)); - } - if (!nullToAbsent || audioSourceId != null) { - map['audio_source_id'] = Variable(audioSourceId); - } - { - map['youtube_client_engine'] = Variable($PreferencesTableTable - .$converteryoutubeClientEngine - .toSql(youtubeClientEngine)); - } - map['discord_presence'] = Variable(discordPresence); - map['endless_playback'] = Variable(endlessPlayback); - map['enable_connect'] = Variable(enableConnect); - map['connect_port'] = Variable(connectPort); - map['cache_music'] = Variable(cacheMusic); - return map; - } - - PreferencesTableCompanion toCompanion(bool nullToAbsent) { - return PreferencesTableCompanion( - id: Value(id), - albumColorSync: Value(albumColorSync), - amoledDarkTheme: Value(amoledDarkTheme), - checkUpdate: Value(checkUpdate), - normalizeAudio: Value(normalizeAudio), - showSystemTrayIcon: Value(showSystemTrayIcon), - systemTitleBar: Value(systemTitleBar), - skipNonMusic: Value(skipNonMusic), - closeBehavior: Value(closeBehavior), - accentColorScheme: Value(accentColorScheme), - layoutMode: Value(layoutMode), - locale: Value(locale), - market: Value(market), - searchMode: Value(searchMode), - downloadLocation: Value(downloadLocation), - localLibraryLocation: Value(localLibraryLocation), - themeMode: Value(themeMode), - audioSourceId: audioSourceId == null && nullToAbsent - ? const Value.absent() - : Value(audioSourceId), - youtubeClientEngine: Value(youtubeClientEngine), - discordPresence: Value(discordPresence), - endlessPlayback: Value(endlessPlayback), - enableConnect: Value(enableConnect), - connectPort: Value(connectPort), - cacheMusic: Value(cacheMusic), - ); - } - - factory PreferencesTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PreferencesTableData( - id: serializer.fromJson(json['id']), - albumColorSync: serializer.fromJson(json['albumColorSync']), - amoledDarkTheme: serializer.fromJson(json['amoledDarkTheme']), - checkUpdate: serializer.fromJson(json['checkUpdate']), - normalizeAudio: serializer.fromJson(json['normalizeAudio']), - showSystemTrayIcon: serializer.fromJson(json['showSystemTrayIcon']), - systemTitleBar: serializer.fromJson(json['systemTitleBar']), - skipNonMusic: serializer.fromJson(json['skipNonMusic']), - closeBehavior: $PreferencesTableTable.$convertercloseBehavior - .fromJson(serializer.fromJson(json['closeBehavior'])), - accentColorScheme: - serializer.fromJson(json['accentColorScheme']), - layoutMode: $PreferencesTableTable.$converterlayoutMode - .fromJson(serializer.fromJson(json['layoutMode'])), - locale: serializer.fromJson(json['locale']), - market: $PreferencesTableTable.$convertermarket - .fromJson(serializer.fromJson(json['market'])), - searchMode: $PreferencesTableTable.$convertersearchMode - .fromJson(serializer.fromJson(json['searchMode'])), - downloadLocation: serializer.fromJson(json['downloadLocation']), - localLibraryLocation: - serializer.fromJson>(json['localLibraryLocation']), - themeMode: $PreferencesTableTable.$converterthemeMode - .fromJson(serializer.fromJson(json['themeMode'])), - audioSourceId: serializer.fromJson(json['audioSourceId']), - youtubeClientEngine: $PreferencesTableTable.$converteryoutubeClientEngine - .fromJson(serializer.fromJson(json['youtubeClientEngine'])), - discordPresence: serializer.fromJson(json['discordPresence']), - endlessPlayback: serializer.fromJson(json['endlessPlayback']), - enableConnect: serializer.fromJson(json['enableConnect']), - connectPort: serializer.fromJson(json['connectPort']), - cacheMusic: serializer.fromJson(json['cacheMusic']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'albumColorSync': serializer.toJson(albumColorSync), - 'amoledDarkTheme': serializer.toJson(amoledDarkTheme), - 'checkUpdate': serializer.toJson(checkUpdate), - 'normalizeAudio': serializer.toJson(normalizeAudio), - 'showSystemTrayIcon': serializer.toJson(showSystemTrayIcon), - 'systemTitleBar': serializer.toJson(systemTitleBar), - 'skipNonMusic': serializer.toJson(skipNonMusic), - 'closeBehavior': serializer.toJson( - $PreferencesTableTable.$convertercloseBehavior.toJson(closeBehavior)), - 'accentColorScheme': serializer.toJson(accentColorScheme), - 'layoutMode': serializer.toJson( - $PreferencesTableTable.$converterlayoutMode.toJson(layoutMode)), - 'locale': serializer.toJson(locale), - 'market': serializer.toJson( - $PreferencesTableTable.$convertermarket.toJson(market)), - 'searchMode': serializer.toJson( - $PreferencesTableTable.$convertersearchMode.toJson(searchMode)), - 'downloadLocation': serializer.toJson(downloadLocation), - 'localLibraryLocation': - serializer.toJson>(localLibraryLocation), - 'themeMode': serializer.toJson( - $PreferencesTableTable.$converterthemeMode.toJson(themeMode)), - 'audioSourceId': serializer.toJson(audioSourceId), - 'youtubeClientEngine': serializer.toJson($PreferencesTableTable - .$converteryoutubeClientEngine - .toJson(youtubeClientEngine)), - 'discordPresence': serializer.toJson(discordPresence), - 'endlessPlayback': serializer.toJson(endlessPlayback), - 'enableConnect': serializer.toJson(enableConnect), - 'connectPort': serializer.toJson(connectPort), - 'cacheMusic': serializer.toJson(cacheMusic), - }; - } - - PreferencesTableData copyWith( - {int? id, - bool? albumColorSync, - bool? amoledDarkTheme, - bool? checkUpdate, - bool? normalizeAudio, - bool? showSystemTrayIcon, - bool? systemTitleBar, - bool? skipNonMusic, - CloseBehavior? closeBehavior, - SpotubeColor? accentColorScheme, - LayoutMode? layoutMode, - Locale? locale, - Market? market, - SearchMode? searchMode, - String? downloadLocation, - List? localLibraryLocation, - ThemeMode? themeMode, - Value audioSourceId = const Value.absent(), - YoutubeClientEngine? youtubeClientEngine, - bool? discordPresence, - bool? endlessPlayback, - bool? enableConnect, - int? connectPort, - bool? cacheMusic}) => - PreferencesTableData( - id: id ?? this.id, - albumColorSync: albumColorSync ?? this.albumColorSync, - amoledDarkTheme: amoledDarkTheme ?? this.amoledDarkTheme, - checkUpdate: checkUpdate ?? this.checkUpdate, - normalizeAudio: normalizeAudio ?? this.normalizeAudio, - showSystemTrayIcon: showSystemTrayIcon ?? this.showSystemTrayIcon, - systemTitleBar: systemTitleBar ?? this.systemTitleBar, - skipNonMusic: skipNonMusic ?? this.skipNonMusic, - closeBehavior: closeBehavior ?? this.closeBehavior, - accentColorScheme: accentColorScheme ?? this.accentColorScheme, - layoutMode: layoutMode ?? this.layoutMode, - locale: locale ?? this.locale, - market: market ?? this.market, - searchMode: searchMode ?? this.searchMode, - downloadLocation: downloadLocation ?? this.downloadLocation, - localLibraryLocation: localLibraryLocation ?? this.localLibraryLocation, - themeMode: themeMode ?? this.themeMode, - audioSourceId: - audioSourceId.present ? audioSourceId.value : this.audioSourceId, - youtubeClientEngine: youtubeClientEngine ?? this.youtubeClientEngine, - discordPresence: discordPresence ?? this.discordPresence, - endlessPlayback: endlessPlayback ?? this.endlessPlayback, - enableConnect: enableConnect ?? this.enableConnect, - connectPort: connectPort ?? this.connectPort, - cacheMusic: cacheMusic ?? this.cacheMusic, - ); - PreferencesTableData copyWithCompanion(PreferencesTableCompanion data) { - return PreferencesTableData( - id: data.id.present ? data.id.value : this.id, - albumColorSync: data.albumColorSync.present - ? data.albumColorSync.value - : this.albumColorSync, - amoledDarkTheme: data.amoledDarkTheme.present - ? data.amoledDarkTheme.value - : this.amoledDarkTheme, - checkUpdate: - data.checkUpdate.present ? data.checkUpdate.value : this.checkUpdate, - normalizeAudio: data.normalizeAudio.present - ? data.normalizeAudio.value - : this.normalizeAudio, - showSystemTrayIcon: data.showSystemTrayIcon.present - ? data.showSystemTrayIcon.value - : this.showSystemTrayIcon, - systemTitleBar: data.systemTitleBar.present - ? data.systemTitleBar.value - : this.systemTitleBar, - skipNonMusic: data.skipNonMusic.present - ? data.skipNonMusic.value - : this.skipNonMusic, - closeBehavior: data.closeBehavior.present - ? data.closeBehavior.value - : this.closeBehavior, - accentColorScheme: data.accentColorScheme.present - ? data.accentColorScheme.value - : this.accentColorScheme, - layoutMode: - data.layoutMode.present ? data.layoutMode.value : this.layoutMode, - locale: data.locale.present ? data.locale.value : this.locale, - market: data.market.present ? data.market.value : this.market, - searchMode: - data.searchMode.present ? data.searchMode.value : this.searchMode, - downloadLocation: data.downloadLocation.present - ? data.downloadLocation.value - : this.downloadLocation, - localLibraryLocation: data.localLibraryLocation.present - ? data.localLibraryLocation.value - : this.localLibraryLocation, - themeMode: data.themeMode.present ? data.themeMode.value : this.themeMode, - audioSourceId: data.audioSourceId.present - ? data.audioSourceId.value - : this.audioSourceId, - youtubeClientEngine: data.youtubeClientEngine.present - ? data.youtubeClientEngine.value - : this.youtubeClientEngine, - discordPresence: data.discordPresence.present - ? data.discordPresence.value - : this.discordPresence, - endlessPlayback: data.endlessPlayback.present - ? data.endlessPlayback.value - : this.endlessPlayback, - enableConnect: data.enableConnect.present - ? data.enableConnect.value - : this.enableConnect, - connectPort: - data.connectPort.present ? data.connectPort.value : this.connectPort, - cacheMusic: - data.cacheMusic.present ? data.cacheMusic.value : this.cacheMusic, - ); - } - - @override - String toString() { - return (StringBuffer('PreferencesTableData(') - ..write('id: $id, ') - ..write('albumColorSync: $albumColorSync, ') - ..write('amoledDarkTheme: $amoledDarkTheme, ') - ..write('checkUpdate: $checkUpdate, ') - ..write('normalizeAudio: $normalizeAudio, ') - ..write('showSystemTrayIcon: $showSystemTrayIcon, ') - ..write('systemTitleBar: $systemTitleBar, ') - ..write('skipNonMusic: $skipNonMusic, ') - ..write('closeBehavior: $closeBehavior, ') - ..write('accentColorScheme: $accentColorScheme, ') - ..write('layoutMode: $layoutMode, ') - ..write('locale: $locale, ') - ..write('market: $market, ') - ..write('searchMode: $searchMode, ') - ..write('downloadLocation: $downloadLocation, ') - ..write('localLibraryLocation: $localLibraryLocation, ') - ..write('themeMode: $themeMode, ') - ..write('audioSourceId: $audioSourceId, ') - ..write('youtubeClientEngine: $youtubeClientEngine, ') - ..write('discordPresence: $discordPresence, ') - ..write('endlessPlayback: $endlessPlayback, ') - ..write('enableConnect: $enableConnect, ') - ..write('connectPort: $connectPort, ') - ..write('cacheMusic: $cacheMusic') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - id, - albumColorSync, - amoledDarkTheme, - checkUpdate, - normalizeAudio, - showSystemTrayIcon, - systemTitleBar, - skipNonMusic, - closeBehavior, - accentColorScheme, - layoutMode, - locale, - market, - searchMode, - downloadLocation, - localLibraryLocation, - themeMode, - audioSourceId, - youtubeClientEngine, - discordPresence, - endlessPlayback, - enableConnect, - connectPort, - cacheMusic - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PreferencesTableData && - other.id == this.id && - other.albumColorSync == this.albumColorSync && - other.amoledDarkTheme == this.amoledDarkTheme && - other.checkUpdate == this.checkUpdate && - other.normalizeAudio == this.normalizeAudio && - other.showSystemTrayIcon == this.showSystemTrayIcon && - other.systemTitleBar == this.systemTitleBar && - other.skipNonMusic == this.skipNonMusic && - other.closeBehavior == this.closeBehavior && - other.accentColorScheme == this.accentColorScheme && - other.layoutMode == this.layoutMode && - other.locale == this.locale && - other.market == this.market && - other.searchMode == this.searchMode && - other.downloadLocation == this.downloadLocation && - other.localLibraryLocation == this.localLibraryLocation && - other.themeMode == this.themeMode && - other.audioSourceId == this.audioSourceId && - other.youtubeClientEngine == this.youtubeClientEngine && - other.discordPresence == this.discordPresence && - other.endlessPlayback == this.endlessPlayback && - other.enableConnect == this.enableConnect && - other.connectPort == this.connectPort && - other.cacheMusic == this.cacheMusic); -} - -class PreferencesTableCompanion extends UpdateCompanion { - final Value id; - final Value albumColorSync; - final Value amoledDarkTheme; - final Value checkUpdate; - final Value normalizeAudio; - final Value showSystemTrayIcon; - final Value systemTitleBar; - final Value skipNonMusic; - final Value closeBehavior; - final Value accentColorScheme; - final Value layoutMode; - final Value locale; - final Value market; - final Value searchMode; - final Value downloadLocation; - final Value> localLibraryLocation; - final Value themeMode; - final Value audioSourceId; - final Value youtubeClientEngine; - final Value discordPresence; - final Value endlessPlayback; - final Value enableConnect; - final Value connectPort; - final Value cacheMusic; - const PreferencesTableCompanion({ - this.id = const Value.absent(), - this.albumColorSync = const Value.absent(), - this.amoledDarkTheme = const Value.absent(), - this.checkUpdate = const Value.absent(), - this.normalizeAudio = const Value.absent(), - this.showSystemTrayIcon = const Value.absent(), - this.systemTitleBar = const Value.absent(), - this.skipNonMusic = const Value.absent(), - this.closeBehavior = const Value.absent(), - this.accentColorScheme = const Value.absent(), - this.layoutMode = const Value.absent(), - this.locale = const Value.absent(), - this.market = const Value.absent(), - this.searchMode = const Value.absent(), - this.downloadLocation = const Value.absent(), - this.localLibraryLocation = const Value.absent(), - this.themeMode = const Value.absent(), - this.audioSourceId = const Value.absent(), - this.youtubeClientEngine = const Value.absent(), - this.discordPresence = const Value.absent(), - this.endlessPlayback = const Value.absent(), - this.enableConnect = const Value.absent(), - this.connectPort = const Value.absent(), - this.cacheMusic = const Value.absent(), - }); - PreferencesTableCompanion.insert({ - this.id = const Value.absent(), - this.albumColorSync = const Value.absent(), - this.amoledDarkTheme = const Value.absent(), - this.checkUpdate = const Value.absent(), - this.normalizeAudio = const Value.absent(), - this.showSystemTrayIcon = const Value.absent(), - this.systemTitleBar = const Value.absent(), - this.skipNonMusic = const Value.absent(), - this.closeBehavior = const Value.absent(), - this.accentColorScheme = const Value.absent(), - this.layoutMode = const Value.absent(), - this.locale = const Value.absent(), - this.market = const Value.absent(), - this.searchMode = const Value.absent(), - this.downloadLocation = const Value.absent(), - this.localLibraryLocation = const Value.absent(), - this.themeMode = const Value.absent(), - this.audioSourceId = const Value.absent(), - this.youtubeClientEngine = const Value.absent(), - this.discordPresence = const Value.absent(), - this.endlessPlayback = const Value.absent(), - this.enableConnect = const Value.absent(), - this.connectPort = const Value.absent(), - this.cacheMusic = const Value.absent(), - }); - static Insertable custom({ - Expression? id, - Expression? albumColorSync, - Expression? amoledDarkTheme, - Expression? checkUpdate, - Expression? normalizeAudio, - Expression? showSystemTrayIcon, - Expression? systemTitleBar, - Expression? skipNonMusic, - Expression? closeBehavior, - Expression? accentColorScheme, - Expression? layoutMode, - Expression? locale, - Expression? market, - Expression? searchMode, - Expression? downloadLocation, - Expression? localLibraryLocation, - Expression? themeMode, - Expression? audioSourceId, - Expression? youtubeClientEngine, - Expression? discordPresence, - Expression? endlessPlayback, - Expression? enableConnect, - Expression? connectPort, - Expression? cacheMusic, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (albumColorSync != null) 'album_color_sync': albumColorSync, - if (amoledDarkTheme != null) 'amoled_dark_theme': amoledDarkTheme, - if (checkUpdate != null) 'check_update': checkUpdate, - if (normalizeAudio != null) 'normalize_audio': normalizeAudio, - if (showSystemTrayIcon != null) - 'show_system_tray_icon': showSystemTrayIcon, - if (systemTitleBar != null) 'system_title_bar': systemTitleBar, - if (skipNonMusic != null) 'skip_non_music': skipNonMusic, - if (closeBehavior != null) 'close_behavior': closeBehavior, - if (accentColorScheme != null) 'accent_color_scheme': accentColorScheme, - if (layoutMode != null) 'layout_mode': layoutMode, - if (locale != null) 'locale': locale, - if (market != null) 'market': market, - if (searchMode != null) 'search_mode': searchMode, - if (downloadLocation != null) 'download_location': downloadLocation, - if (localLibraryLocation != null) - 'local_library_location': localLibraryLocation, - if (themeMode != null) 'theme_mode': themeMode, - if (audioSourceId != null) 'audio_source_id': audioSourceId, - if (youtubeClientEngine != null) - 'youtube_client_engine': youtubeClientEngine, - if (discordPresence != null) 'discord_presence': discordPresence, - if (endlessPlayback != null) 'endless_playback': endlessPlayback, - if (enableConnect != null) 'enable_connect': enableConnect, - if (connectPort != null) 'connect_port': connectPort, - if (cacheMusic != null) 'cache_music': cacheMusic, - }); - } - - PreferencesTableCompanion copyWith( - {Value? id, - Value? albumColorSync, - Value? amoledDarkTheme, - Value? checkUpdate, - Value? normalizeAudio, - Value? showSystemTrayIcon, - Value? systemTitleBar, - Value? skipNonMusic, - Value? closeBehavior, - Value? accentColorScheme, - Value? layoutMode, - Value? locale, - Value? market, - Value? searchMode, - Value? downloadLocation, - Value>? localLibraryLocation, - Value? themeMode, - Value? audioSourceId, - Value? youtubeClientEngine, - Value? discordPresence, - Value? endlessPlayback, - Value? enableConnect, - Value? connectPort, - Value? cacheMusic}) { - return PreferencesTableCompanion( - id: id ?? this.id, - albumColorSync: albumColorSync ?? this.albumColorSync, - amoledDarkTheme: amoledDarkTheme ?? this.amoledDarkTheme, - checkUpdate: checkUpdate ?? this.checkUpdate, - normalizeAudio: normalizeAudio ?? this.normalizeAudio, - showSystemTrayIcon: showSystemTrayIcon ?? this.showSystemTrayIcon, - systemTitleBar: systemTitleBar ?? this.systemTitleBar, - skipNonMusic: skipNonMusic ?? this.skipNonMusic, - closeBehavior: closeBehavior ?? this.closeBehavior, - accentColorScheme: accentColorScheme ?? this.accentColorScheme, - layoutMode: layoutMode ?? this.layoutMode, - locale: locale ?? this.locale, - market: market ?? this.market, - searchMode: searchMode ?? this.searchMode, - downloadLocation: downloadLocation ?? this.downloadLocation, - localLibraryLocation: localLibraryLocation ?? this.localLibraryLocation, - themeMode: themeMode ?? this.themeMode, - audioSourceId: audioSourceId ?? this.audioSourceId, - youtubeClientEngine: youtubeClientEngine ?? this.youtubeClientEngine, - discordPresence: discordPresence ?? this.discordPresence, - endlessPlayback: endlessPlayback ?? this.endlessPlayback, - enableConnect: enableConnect ?? this.enableConnect, - connectPort: connectPort ?? this.connectPort, - cacheMusic: cacheMusic ?? this.cacheMusic, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumColorSync.present) { - map['album_color_sync'] = Variable(albumColorSync.value); - } - if (amoledDarkTheme.present) { - map['amoled_dark_theme'] = Variable(amoledDarkTheme.value); - } - if (checkUpdate.present) { - map['check_update'] = Variable(checkUpdate.value); - } - if (normalizeAudio.present) { - map['normalize_audio'] = Variable(normalizeAudio.value); - } - if (showSystemTrayIcon.present) { - map['show_system_tray_icon'] = Variable(showSystemTrayIcon.value); - } - if (systemTitleBar.present) { - map['system_title_bar'] = Variable(systemTitleBar.value); - } - if (skipNonMusic.present) { - map['skip_non_music'] = Variable(skipNonMusic.value); - } - if (closeBehavior.present) { - map['close_behavior'] = Variable($PreferencesTableTable - .$convertercloseBehavior - .toSql(closeBehavior.value)); - } - if (accentColorScheme.present) { - map['accent_color_scheme'] = Variable($PreferencesTableTable - .$converteraccentColorScheme - .toSql(accentColorScheme.value)); - } - if (layoutMode.present) { - map['layout_mode'] = Variable( - $PreferencesTableTable.$converterlayoutMode.toSql(layoutMode.value)); - } - if (locale.present) { - map['locale'] = Variable( - $PreferencesTableTable.$converterlocale.toSql(locale.value)); - } - if (market.present) { - map['market'] = Variable( - $PreferencesTableTable.$convertermarket.toSql(market.value)); - } - if (searchMode.present) { - map['search_mode'] = Variable( - $PreferencesTableTable.$convertersearchMode.toSql(searchMode.value)); - } - if (downloadLocation.present) { - map['download_location'] = Variable(downloadLocation.value); - } - if (localLibraryLocation.present) { - map['local_library_location'] = Variable($PreferencesTableTable - .$converterlocalLibraryLocation - .toSql(localLibraryLocation.value)); - } - if (themeMode.present) { - map['theme_mode'] = Variable( - $PreferencesTableTable.$converterthemeMode.toSql(themeMode.value)); - } - if (audioSourceId.present) { - map['audio_source_id'] = Variable(audioSourceId.value); - } - if (youtubeClientEngine.present) { - map['youtube_client_engine'] = Variable($PreferencesTableTable - .$converteryoutubeClientEngine - .toSql(youtubeClientEngine.value)); - } - if (discordPresence.present) { - map['discord_presence'] = Variable(discordPresence.value); - } - if (endlessPlayback.present) { - map['endless_playback'] = Variable(endlessPlayback.value); - } - if (enableConnect.present) { - map['enable_connect'] = Variable(enableConnect.value); - } - if (connectPort.present) { - map['connect_port'] = Variable(connectPort.value); - } - if (cacheMusic.present) { - map['cache_music'] = Variable(cacheMusic.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PreferencesTableCompanion(') - ..write('id: $id, ') - ..write('albumColorSync: $albumColorSync, ') - ..write('amoledDarkTheme: $amoledDarkTheme, ') - ..write('checkUpdate: $checkUpdate, ') - ..write('normalizeAudio: $normalizeAudio, ') - ..write('showSystemTrayIcon: $showSystemTrayIcon, ') - ..write('systemTitleBar: $systemTitleBar, ') - ..write('skipNonMusic: $skipNonMusic, ') - ..write('closeBehavior: $closeBehavior, ') - ..write('accentColorScheme: $accentColorScheme, ') - ..write('layoutMode: $layoutMode, ') - ..write('locale: $locale, ') - ..write('market: $market, ') - ..write('searchMode: $searchMode, ') - ..write('downloadLocation: $downloadLocation, ') - ..write('localLibraryLocation: $localLibraryLocation, ') - ..write('themeMode: $themeMode, ') - ..write('audioSourceId: $audioSourceId, ') - ..write('youtubeClientEngine: $youtubeClientEngine, ') - ..write('discordPresence: $discordPresence, ') - ..write('endlessPlayback: $endlessPlayback, ') - ..write('enableConnect: $enableConnect, ') - ..write('connectPort: $connectPort, ') - ..write('cacheMusic: $cacheMusic') - ..write(')')) - .toString(); - } -} - -class $ScrobblerTableTable extends ScrobblerTable - with TableInfo<$ScrobblerTableTable, ScrobblerTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $ScrobblerTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _createdAtMeta = - const VerificationMeta('createdAt'); - @override - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', aliasedName, false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: currentDateAndTime); - static const VerificationMeta _usernameMeta = - const VerificationMeta('username'); - @override - late final GeneratedColumn username = GeneratedColumn( - 'username', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - @override - late final GeneratedColumnWithTypeConverter - passwordHash = GeneratedColumn( - 'password_hash', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter( - $ScrobblerTableTable.$converterpasswordHash); - @override - List get $columns => [id, createdAt, username, passwordHash]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'scrobbler_table'; - @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('created_at')) { - context.handle(_createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); - } - if (data.containsKey('username')) { - context.handle(_usernameMeta, - username.isAcceptableOrUnknown(data['username']!, _usernameMeta)); - } else if (isInserting) { - context.missing(_usernameMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - ScrobblerTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return ScrobblerTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - createdAt: attachedDatabase.typeMapping - .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, - username: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}username'])!, - passwordHash: $ScrobblerTableTable.$converterpasswordHash.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}password_hash'])!), - ); - } - - @override - $ScrobblerTableTable createAlias(String alias) { - return $ScrobblerTableTable(attachedDatabase, alias); - } - - static TypeConverter $converterpasswordHash = - EncryptedTextConverter(); -} - -class ScrobblerTableData extends DataClass - implements Insertable { - final int id; - final DateTime createdAt; - final String username; - final DecryptedText passwordHash; - const ScrobblerTableData( - {required this.id, - required this.createdAt, - required this.username, - required this.passwordHash}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['username'] = Variable(username); - { - map['password_hash'] = Variable( - $ScrobblerTableTable.$converterpasswordHash.toSql(passwordHash)); - } - return map; - } - - ScrobblerTableCompanion toCompanion(bool nullToAbsent) { - return ScrobblerTableCompanion( - id: Value(id), - createdAt: Value(createdAt), - username: Value(username), - passwordHash: Value(passwordHash), - ); - } - - factory ScrobblerTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return ScrobblerTableData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - username: serializer.fromJson(json['username']), - passwordHash: serializer.fromJson(json['passwordHash']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'username': serializer.toJson(username), - 'passwordHash': serializer.toJson(passwordHash), - }; - } - - ScrobblerTableData copyWith( - {int? id, - DateTime? createdAt, - String? username, - DecryptedText? passwordHash}) => - ScrobblerTableData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - username: username ?? this.username, - passwordHash: passwordHash ?? this.passwordHash, - ); - ScrobblerTableData copyWithCompanion(ScrobblerTableCompanion data) { - return ScrobblerTableData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - username: data.username.present ? data.username.value : this.username, - passwordHash: data.passwordHash.present - ? data.passwordHash.value - : this.passwordHash, - ); - } - - @override - String toString() { - return (StringBuffer('ScrobblerTableData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('username: $username, ') - ..write('passwordHash: $passwordHash') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, createdAt, username, passwordHash); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is ScrobblerTableData && - other.id == this.id && - other.createdAt == this.createdAt && - other.username == this.username && - other.passwordHash == this.passwordHash); -} - -class ScrobblerTableCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value username; - final Value passwordHash; - const ScrobblerTableCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.username = const Value.absent(), - this.passwordHash = const Value.absent(), - }); - ScrobblerTableCompanion.insert({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - required String username, - required DecryptedText passwordHash, - }) : username = Value(username), - passwordHash = Value(passwordHash); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? username, - Expression? passwordHash, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (username != null) 'username': username, - if (passwordHash != null) 'password_hash': passwordHash, - }); - } - - ScrobblerTableCompanion copyWith( - {Value? id, - Value? createdAt, - Value? username, - Value? passwordHash}) { - return ScrobblerTableCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - username: username ?? this.username, - passwordHash: passwordHash ?? this.passwordHash, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (username.present) { - map['username'] = Variable(username.value); - } - if (passwordHash.present) { - map['password_hash'] = Variable($ScrobblerTableTable - .$converterpasswordHash - .toSql(passwordHash.value)); - } - return map; - } - - @override - String toString() { - return (StringBuffer('ScrobblerTableCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('username: $username, ') - ..write('passwordHash: $passwordHash') - ..write(')')) - .toString(); - } -} - -class $SkipSegmentTableTable extends SkipSegmentTable - with TableInfo<$SkipSegmentTableTable, SkipSegmentTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $SkipSegmentTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _startMeta = const VerificationMeta('start'); - @override - late final GeneratedColumn start = GeneratedColumn( - 'start', aliasedName, false, - type: DriftSqlType.int, requiredDuringInsert: true); - static const VerificationMeta _endMeta = const VerificationMeta('end'); - @override - late final GeneratedColumn end = GeneratedColumn( - 'end', aliasedName, false, - type: DriftSqlType.int, requiredDuringInsert: true); - static const VerificationMeta _trackIdMeta = - const VerificationMeta('trackId'); - @override - late final GeneratedColumn trackId = GeneratedColumn( - 'track_id', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _createdAtMeta = - const VerificationMeta('createdAt'); - @override - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', aliasedName, false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: currentDateAndTime); - @override - List get $columns => [id, start, end, trackId, createdAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'skip_segment_table'; - @override - VerificationContext validateIntegrity( - Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('start')) { - context.handle( - _startMeta, start.isAcceptableOrUnknown(data['start']!, _startMeta)); - } else if (isInserting) { - context.missing(_startMeta); - } - if (data.containsKey('end')) { - context.handle( - _endMeta, end.isAcceptableOrUnknown(data['end']!, _endMeta)); - } else if (isInserting) { - context.missing(_endMeta); - } - if (data.containsKey('track_id')) { - context.handle(_trackIdMeta, - trackId.isAcceptableOrUnknown(data['track_id']!, _trackIdMeta)); - } else if (isInserting) { - context.missing(_trackIdMeta); - } - if (data.containsKey('created_at')) { - context.handle(_createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - SkipSegmentTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SkipSegmentTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - start: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}start'])!, - end: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}end'])!, - trackId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}track_id'])!, - createdAt: attachedDatabase.typeMapping - .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, - ); - } - - @override - $SkipSegmentTableTable createAlias(String alias) { - return $SkipSegmentTableTable(attachedDatabase, alias); - } -} - -class SkipSegmentTableData extends DataClass - implements Insertable { - final int id; - final int start; - final int end; - final String trackId; - final DateTime createdAt; - const SkipSegmentTableData( - {required this.id, - required this.start, - required this.end, - required this.trackId, - required this.createdAt}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['start'] = Variable(start); - map['end'] = Variable(end); - map['track_id'] = Variable(trackId); - map['created_at'] = Variable(createdAt); - return map; - } - - SkipSegmentTableCompanion toCompanion(bool nullToAbsent) { - return SkipSegmentTableCompanion( - id: Value(id), - start: Value(start), - end: Value(end), - trackId: Value(trackId), - createdAt: Value(createdAt), - ); - } - - factory SkipSegmentTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SkipSegmentTableData( - id: serializer.fromJson(json['id']), - start: serializer.fromJson(json['start']), - end: serializer.fromJson(json['end']), - trackId: serializer.fromJson(json['trackId']), - createdAt: serializer.fromJson(json['createdAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'start': serializer.toJson(start), - 'end': serializer.toJson(end), - 'trackId': serializer.toJson(trackId), - 'createdAt': serializer.toJson(createdAt), - }; - } - - SkipSegmentTableData copyWith( - {int? id, - int? start, - int? end, - String? trackId, - DateTime? createdAt}) => - SkipSegmentTableData( - id: id ?? this.id, - start: start ?? this.start, - end: end ?? this.end, - trackId: trackId ?? this.trackId, - createdAt: createdAt ?? this.createdAt, - ); - SkipSegmentTableData copyWithCompanion(SkipSegmentTableCompanion data) { - return SkipSegmentTableData( - id: data.id.present ? data.id.value : this.id, - start: data.start.present ? data.start.value : this.start, - end: data.end.present ? data.end.value : this.end, - trackId: data.trackId.present ? data.trackId.value : this.trackId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - ); - } - - @override - String toString() { - return (StringBuffer('SkipSegmentTableData(') - ..write('id: $id, ') - ..write('start: $start, ') - ..write('end: $end, ') - ..write('trackId: $trackId, ') - ..write('createdAt: $createdAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, start, end, trackId, createdAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SkipSegmentTableData && - other.id == this.id && - other.start == this.start && - other.end == this.end && - other.trackId == this.trackId && - other.createdAt == this.createdAt); -} - -class SkipSegmentTableCompanion extends UpdateCompanion { - final Value id; - final Value start; - final Value end; - final Value trackId; - final Value createdAt; - const SkipSegmentTableCompanion({ - this.id = const Value.absent(), - this.start = const Value.absent(), - this.end = const Value.absent(), - this.trackId = const Value.absent(), - this.createdAt = const Value.absent(), - }); - SkipSegmentTableCompanion.insert({ - this.id = const Value.absent(), - required int start, - required int end, - required String trackId, - this.createdAt = const Value.absent(), - }) : start = Value(start), - end = Value(end), - trackId = Value(trackId); - static Insertable custom({ - Expression? id, - Expression? start, - Expression? end, - Expression? trackId, - Expression? createdAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (start != null) 'start': start, - if (end != null) 'end': end, - if (trackId != null) 'track_id': trackId, - if (createdAt != null) 'created_at': createdAt, - }); - } - - SkipSegmentTableCompanion copyWith( - {Value? id, - Value? start, - Value? end, - Value? trackId, - Value? createdAt}) { - return SkipSegmentTableCompanion( - id: id ?? this.id, - start: start ?? this.start, - end: end ?? this.end, - trackId: trackId ?? this.trackId, - createdAt: createdAt ?? this.createdAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (start.present) { - map['start'] = Variable(start.value); - } - if (end.present) { - map['end'] = Variable(end.value); - } - if (trackId.present) { - map['track_id'] = Variable(trackId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SkipSegmentTableCompanion(') - ..write('id: $id, ') - ..write('start: $start, ') - ..write('end: $end, ') - ..write('trackId: $trackId, ') - ..write('createdAt: $createdAt') - ..write(')')) - .toString(); - } -} - -class $SourceMatchTableTable extends SourceMatchTable - with TableInfo<$SourceMatchTableTable, SourceMatchTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $SourceMatchTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _trackIdMeta = - const VerificationMeta('trackId'); - @override - late final GeneratedColumn trackId = GeneratedColumn( - 'track_id', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _sourceInfoMeta = - const VerificationMeta('sourceInfo'); - @override - late final GeneratedColumn sourceInfo = GeneratedColumn( - 'source_info', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant("{}")); - static const VerificationMeta _sourceTypeMeta = - const VerificationMeta('sourceType'); - @override - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _createdAtMeta = - const VerificationMeta('createdAt'); - @override - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', aliasedName, false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: currentDateAndTime); - @override - List get $columns => - [id, trackId, sourceInfo, sourceType, createdAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'source_match_table'; - @override - VerificationContext validateIntegrity( - Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('track_id')) { - context.handle(_trackIdMeta, - trackId.isAcceptableOrUnknown(data['track_id']!, _trackIdMeta)); - } else if (isInserting) { - context.missing(_trackIdMeta); - } - if (data.containsKey('source_info')) { - context.handle( - _sourceInfoMeta, - sourceInfo.isAcceptableOrUnknown( - data['source_info']!, _sourceInfoMeta)); - } - if (data.containsKey('source_type')) { - context.handle( - _sourceTypeMeta, - sourceType.isAcceptableOrUnknown( - data['source_type']!, _sourceTypeMeta)); - } else if (isInserting) { - context.missing(_sourceTypeMeta); - } - if (data.containsKey('created_at')) { - context.handle(_createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - SourceMatchTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SourceMatchTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - trackId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}track_id'])!, - sourceInfo: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}source_info'])!, - sourceType: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}source_type'])!, - createdAt: attachedDatabase.typeMapping - .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, - ); - } - - @override - $SourceMatchTableTable createAlias(String alias) { - return $SourceMatchTableTable(attachedDatabase, alias); - } -} - -class SourceMatchTableData extends DataClass - implements Insertable { - final int id; - final String trackId; - final String sourceInfo; - final String sourceType; - final DateTime createdAt; - const SourceMatchTableData( - {required this.id, - required this.trackId, - required this.sourceInfo, - required this.sourceType, - required this.createdAt}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['track_id'] = Variable(trackId); - map['source_info'] = Variable(sourceInfo); - map['source_type'] = Variable(sourceType); - map['created_at'] = Variable(createdAt); - return map; - } - - SourceMatchTableCompanion toCompanion(bool nullToAbsent) { - return SourceMatchTableCompanion( - id: Value(id), - trackId: Value(trackId), - sourceInfo: Value(sourceInfo), - sourceType: Value(sourceType), - createdAt: Value(createdAt), - ); - } - - factory SourceMatchTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SourceMatchTableData( - id: serializer.fromJson(json['id']), - trackId: serializer.fromJson(json['trackId']), - sourceInfo: serializer.fromJson(json['sourceInfo']), - sourceType: serializer.fromJson(json['sourceType']), - createdAt: serializer.fromJson(json['createdAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'trackId': serializer.toJson(trackId), - 'sourceInfo': serializer.toJson(sourceInfo), - 'sourceType': serializer.toJson(sourceType), - 'createdAt': serializer.toJson(createdAt), - }; - } - - SourceMatchTableData copyWith( - {int? id, - String? trackId, - String? sourceInfo, - String? sourceType, - DateTime? createdAt}) => - SourceMatchTableData( - id: id ?? this.id, - trackId: trackId ?? this.trackId, - sourceInfo: sourceInfo ?? this.sourceInfo, - sourceType: sourceType ?? this.sourceType, - createdAt: createdAt ?? this.createdAt, - ); - SourceMatchTableData copyWithCompanion(SourceMatchTableCompanion data) { - return SourceMatchTableData( - id: data.id.present ? data.id.value : this.id, - trackId: data.trackId.present ? data.trackId.value : this.trackId, - sourceInfo: - data.sourceInfo.present ? data.sourceInfo.value : this.sourceInfo, - sourceType: - data.sourceType.present ? data.sourceType.value : this.sourceType, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - ); - } - - @override - String toString() { - return (StringBuffer('SourceMatchTableData(') - ..write('id: $id, ') - ..write('trackId: $trackId, ') - ..write('sourceInfo: $sourceInfo, ') - ..write('sourceType: $sourceType, ') - ..write('createdAt: $createdAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, trackId, sourceInfo, sourceType, createdAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SourceMatchTableData && - other.id == this.id && - other.trackId == this.trackId && - other.sourceInfo == this.sourceInfo && - other.sourceType == this.sourceType && - other.createdAt == this.createdAt); -} - -class SourceMatchTableCompanion extends UpdateCompanion { - final Value id; - final Value trackId; - final Value sourceInfo; - final Value sourceType; - final Value createdAt; - const SourceMatchTableCompanion({ - this.id = const Value.absent(), - this.trackId = const Value.absent(), - this.sourceInfo = const Value.absent(), - this.sourceType = const Value.absent(), - this.createdAt = const Value.absent(), - }); - SourceMatchTableCompanion.insert({ - this.id = const Value.absent(), - required String trackId, - this.sourceInfo = const Value.absent(), - required String sourceType, - this.createdAt = const Value.absent(), - }) : trackId = Value(trackId), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? trackId, - Expression? sourceInfo, - Expression? sourceType, - Expression? createdAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (trackId != null) 'track_id': trackId, - if (sourceInfo != null) 'source_info': sourceInfo, - if (sourceType != null) 'source_type': sourceType, - if (createdAt != null) 'created_at': createdAt, - }); - } - - SourceMatchTableCompanion copyWith( - {Value? id, - Value? trackId, - Value? sourceInfo, - Value? sourceType, - Value? createdAt}) { - return SourceMatchTableCompanion( - id: id ?? this.id, - trackId: trackId ?? this.trackId, - sourceInfo: sourceInfo ?? this.sourceInfo, - sourceType: sourceType ?? this.sourceType, - createdAt: createdAt ?? this.createdAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (trackId.present) { - map['track_id'] = Variable(trackId.value); - } - if (sourceInfo.present) { - map['source_info'] = Variable(sourceInfo.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SourceMatchTableCompanion(') - ..write('id: $id, ') - ..write('trackId: $trackId, ') - ..write('sourceInfo: $sourceInfo, ') - ..write('sourceType: $sourceType, ') - ..write('createdAt: $createdAt') - ..write(')')) - .toString(); - } -} - -class $AudioPlayerStateTableTable extends AudioPlayerStateTable - with TableInfo<$AudioPlayerStateTableTable, AudioPlayerStateTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $AudioPlayerStateTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _playingMeta = - const VerificationMeta('playing'); - @override - late final GeneratedColumn playing = GeneratedColumn( - 'playing', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: - GeneratedColumn.constraintIsAlways('CHECK ("playing" IN (0, 1))')); - @override - late final GeneratedColumnWithTypeConverter loopMode = - GeneratedColumn('loop_mode', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter( - $AudioPlayerStateTableTable.$converterloopMode); - static const VerificationMeta _shuffledMeta = - const VerificationMeta('shuffled'); - @override - late final GeneratedColumn shuffled = GeneratedColumn( - 'shuffled', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: - GeneratedColumn.constraintIsAlways('CHECK ("shuffled" IN (0, 1))')); - @override - late final GeneratedColumnWithTypeConverter, String> - collections = GeneratedColumn('collections', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter>( - $AudioPlayerStateTableTable.$convertercollections); - @override - late final GeneratedColumnWithTypeConverter, String> - tracks = GeneratedColumn('tracks', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant("[]")) - .withConverter>( - $AudioPlayerStateTableTable.$convertertracks); - static const VerificationMeta _currentIndexMeta = - const VerificationMeta('currentIndex'); - @override - late final GeneratedColumn currentIndex = GeneratedColumn( - 'current_index', aliasedName, false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const Constant(0)); - @override - List get $columns => - [id, playing, loopMode, shuffled, collections, tracks, currentIndex]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'audio_player_state_table'; - @override - VerificationContext validateIntegrity( - Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('playing')) { - context.handle(_playingMeta, - playing.isAcceptableOrUnknown(data['playing']!, _playingMeta)); - } else if (isInserting) { - context.missing(_playingMeta); - } - if (data.containsKey('shuffled')) { - context.handle(_shuffledMeta, - shuffled.isAcceptableOrUnknown(data['shuffled']!, _shuffledMeta)); - } else if (isInserting) { - context.missing(_shuffledMeta); - } - if (data.containsKey('current_index')) { - context.handle( - _currentIndexMeta, - currentIndex.isAcceptableOrUnknown( - data['current_index']!, _currentIndexMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - AudioPlayerStateTableData map(Map data, - {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AudioPlayerStateTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - playing: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}playing'])!, - loopMode: $AudioPlayerStateTableTable.$converterloopMode.fromSql( - attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}loop_mode'])!), - shuffled: attachedDatabase.typeMapping - .read(DriftSqlType.bool, data['${effectivePrefix}shuffled'])!, - collections: $AudioPlayerStateTableTable.$convertercollections.fromSql( - attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}collections'])!), - tracks: $AudioPlayerStateTableTable.$convertertracks.fromSql( - attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}tracks'])!), - currentIndex: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}current_index'])!, - ); - } - - @override - $AudioPlayerStateTableTable createAlias(String alias) { - return $AudioPlayerStateTableTable(attachedDatabase, alias); - } - - static JsonTypeConverter2 $converterloopMode = - const EnumNameConverter(PlaylistMode.values); - static TypeConverter, String> $convertercollections = - const StringListConverter(); - static TypeConverter, String> $convertertracks = - const SpotubeTrackObjectListConverter(); -} - -class AudioPlayerStateTableData extends DataClass - implements Insertable { - final int id; - final bool playing; - final PlaylistMode loopMode; - final bool shuffled; - final List collections; - final List tracks; - final int currentIndex; - const AudioPlayerStateTableData( - {required this.id, - required this.playing, - required this.loopMode, - required this.shuffled, - required this.collections, - required this.tracks, - required this.currentIndex}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['playing'] = Variable(playing); - { - map['loop_mode'] = Variable( - $AudioPlayerStateTableTable.$converterloopMode.toSql(loopMode)); - } - map['shuffled'] = Variable(shuffled); - { - map['collections'] = Variable( - $AudioPlayerStateTableTable.$convertercollections.toSql(collections)); - } - { - map['tracks'] = Variable( - $AudioPlayerStateTableTable.$convertertracks.toSql(tracks)); - } - map['current_index'] = Variable(currentIndex); - return map; - } - - AudioPlayerStateTableCompanion toCompanion(bool nullToAbsent) { - return AudioPlayerStateTableCompanion( - id: Value(id), - playing: Value(playing), - loopMode: Value(loopMode), - shuffled: Value(shuffled), - collections: Value(collections), - tracks: Value(tracks), - currentIndex: Value(currentIndex), - ); - } - - factory AudioPlayerStateTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AudioPlayerStateTableData( - id: serializer.fromJson(json['id']), - playing: serializer.fromJson(json['playing']), - loopMode: $AudioPlayerStateTableTable.$converterloopMode - .fromJson(serializer.fromJson(json['loopMode'])), - shuffled: serializer.fromJson(json['shuffled']), - collections: serializer.fromJson>(json['collections']), - tracks: serializer.fromJson>(json['tracks']), - currentIndex: serializer.fromJson(json['currentIndex']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'playing': serializer.toJson(playing), - 'loopMode': serializer.toJson( - $AudioPlayerStateTableTable.$converterloopMode.toJson(loopMode)), - 'shuffled': serializer.toJson(shuffled), - 'collections': serializer.toJson>(collections), - 'tracks': serializer.toJson>(tracks), - 'currentIndex': serializer.toJson(currentIndex), - }; - } - - AudioPlayerStateTableData copyWith( - {int? id, - bool? playing, - PlaylistMode? loopMode, - bool? shuffled, - List? collections, - List? tracks, - int? currentIndex}) => - AudioPlayerStateTableData( - id: id ?? this.id, - playing: playing ?? this.playing, - loopMode: loopMode ?? this.loopMode, - shuffled: shuffled ?? this.shuffled, - collections: collections ?? this.collections, - tracks: tracks ?? this.tracks, - currentIndex: currentIndex ?? this.currentIndex, - ); - AudioPlayerStateTableData copyWithCompanion( - AudioPlayerStateTableCompanion data) { - return AudioPlayerStateTableData( - id: data.id.present ? data.id.value : this.id, - playing: data.playing.present ? data.playing.value : this.playing, - loopMode: data.loopMode.present ? data.loopMode.value : this.loopMode, - shuffled: data.shuffled.present ? data.shuffled.value : this.shuffled, - collections: - data.collections.present ? data.collections.value : this.collections, - tracks: data.tracks.present ? data.tracks.value : this.tracks, - currentIndex: data.currentIndex.present - ? data.currentIndex.value - : this.currentIndex, - ); - } - - @override - String toString() { - return (StringBuffer('AudioPlayerStateTableData(') - ..write('id: $id, ') - ..write('playing: $playing, ') - ..write('loopMode: $loopMode, ') - ..write('shuffled: $shuffled, ') - ..write('collections: $collections, ') - ..write('tracks: $tracks, ') - ..write('currentIndex: $currentIndex') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, playing, loopMode, shuffled, collections, tracks, currentIndex); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AudioPlayerStateTableData && - other.id == this.id && - other.playing == this.playing && - other.loopMode == this.loopMode && - other.shuffled == this.shuffled && - other.collections == this.collections && - other.tracks == this.tracks && - other.currentIndex == this.currentIndex); -} - -class AudioPlayerStateTableCompanion - extends UpdateCompanion { - final Value id; - final Value playing; - final Value loopMode; - final Value shuffled; - final Value> collections; - final Value> tracks; - final Value currentIndex; - const AudioPlayerStateTableCompanion({ - this.id = const Value.absent(), - this.playing = const Value.absent(), - this.loopMode = const Value.absent(), - this.shuffled = const Value.absent(), - this.collections = const Value.absent(), - this.tracks = const Value.absent(), - this.currentIndex = const Value.absent(), - }); - AudioPlayerStateTableCompanion.insert({ - this.id = const Value.absent(), - required bool playing, - required PlaylistMode loopMode, - required bool shuffled, - required List collections, - this.tracks = const Value.absent(), - this.currentIndex = const Value.absent(), - }) : playing = Value(playing), - loopMode = Value(loopMode), - shuffled = Value(shuffled), - collections = Value(collections); - static Insertable custom({ - Expression? id, - Expression? playing, - Expression? loopMode, - Expression? shuffled, - Expression? collections, - Expression? tracks, - Expression? currentIndex, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (playing != null) 'playing': playing, - if (loopMode != null) 'loop_mode': loopMode, - if (shuffled != null) 'shuffled': shuffled, - if (collections != null) 'collections': collections, - if (tracks != null) 'tracks': tracks, - if (currentIndex != null) 'current_index': currentIndex, - }); - } - - AudioPlayerStateTableCompanion copyWith( - {Value? id, - Value? playing, - Value? loopMode, - Value? shuffled, - Value>? collections, - Value>? tracks, - Value? currentIndex}) { - return AudioPlayerStateTableCompanion( - id: id ?? this.id, - playing: playing ?? this.playing, - loopMode: loopMode ?? this.loopMode, - shuffled: shuffled ?? this.shuffled, - collections: collections ?? this.collections, - tracks: tracks ?? this.tracks, - currentIndex: currentIndex ?? this.currentIndex, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (playing.present) { - map['playing'] = Variable(playing.value); - } - if (loopMode.present) { - map['loop_mode'] = Variable( - $AudioPlayerStateTableTable.$converterloopMode.toSql(loopMode.value)); - } - if (shuffled.present) { - map['shuffled'] = Variable(shuffled.value); - } - if (collections.present) { - map['collections'] = Variable($AudioPlayerStateTableTable - .$convertercollections - .toSql(collections.value)); - } - if (tracks.present) { - map['tracks'] = Variable( - $AudioPlayerStateTableTable.$convertertracks.toSql(tracks.value)); - } - if (currentIndex.present) { - map['current_index'] = Variable(currentIndex.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AudioPlayerStateTableCompanion(') - ..write('id: $id, ') - ..write('playing: $playing, ') - ..write('loopMode: $loopMode, ') - ..write('shuffled: $shuffled, ') - ..write('collections: $collections, ') - ..write('tracks: $tracks, ') - ..write('currentIndex: $currentIndex') - ..write(')')) - .toString(); - } -} - -class $HistoryTableTable extends HistoryTable - with TableInfo<$HistoryTableTable, HistoryTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $HistoryTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _createdAtMeta = - const VerificationMeta('createdAt'); - @override - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', aliasedName, false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: currentDateAndTime); - @override - late final GeneratedColumnWithTypeConverter type = - GeneratedColumn('type', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter($HistoryTableTable.$convertertype); - static const VerificationMeta _itemIdMeta = const VerificationMeta('itemId'); - @override - late final GeneratedColumn itemId = GeneratedColumn( - 'item_id', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - @override - late final GeneratedColumnWithTypeConverter, String> - data = GeneratedColumn('data', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter>( - $HistoryTableTable.$converterdata); - @override - List get $columns => [id, createdAt, type, itemId, data]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'history_table'; - @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('created_at')) { - context.handle(_createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); - } - if (data.containsKey('item_id')) { - context.handle(_itemIdMeta, - itemId.isAcceptableOrUnknown(data['item_id']!, _itemIdMeta)); - } else if (isInserting) { - context.missing(_itemIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - HistoryTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return HistoryTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - createdAt: attachedDatabase.typeMapping - .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, - type: $HistoryTableTable.$convertertype.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}type'])!), - itemId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}item_id'])!, - data: $HistoryTableTable.$converterdata.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}data'])!), - ); - } - - @override - $HistoryTableTable createAlias(String alias) { - return $HistoryTableTable(attachedDatabase, alias); - } - - static JsonTypeConverter2 $convertertype = - const EnumNameConverter(HistoryEntryType.values); - static TypeConverter, String> $converterdata = - const MapTypeConverter(); -} - -class HistoryTableData extends DataClass - implements Insertable { - final int id; - final DateTime createdAt; - final HistoryEntryType type; - final String itemId; - final Map data; - const HistoryTableData( - {required this.id, - required this.createdAt, - required this.type, - required this.itemId, - required this.data}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - { - map['type'] = - Variable($HistoryTableTable.$convertertype.toSql(type)); - } - map['item_id'] = Variable(itemId); - { - map['data'] = - Variable($HistoryTableTable.$converterdata.toSql(data)); - } - return map; - } - - HistoryTableCompanion toCompanion(bool nullToAbsent) { - return HistoryTableCompanion( - id: Value(id), - createdAt: Value(createdAt), - type: Value(type), - itemId: Value(itemId), - data: Value(data), - ); - } - - factory HistoryTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return HistoryTableData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - type: $HistoryTableTable.$convertertype - .fromJson(serializer.fromJson(json['type'])), - itemId: serializer.fromJson(json['itemId']), - data: serializer.fromJson>(json['data']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'type': serializer - .toJson($HistoryTableTable.$convertertype.toJson(type)), - 'itemId': serializer.toJson(itemId), - 'data': serializer.toJson>(data), - }; - } - - HistoryTableData copyWith( - {int? id, - DateTime? createdAt, - HistoryEntryType? type, - String? itemId, - Map? data}) => - HistoryTableData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - type: type ?? this.type, - itemId: itemId ?? this.itemId, - data: data ?? this.data, - ); - HistoryTableData copyWithCompanion(HistoryTableCompanion data) { - return HistoryTableData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - type: data.type.present ? data.type.value : this.type, - itemId: data.itemId.present ? data.itemId.value : this.itemId, - data: data.data.present ? data.data.value : this.data, - ); - } - - @override - String toString() { - return (StringBuffer('HistoryTableData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('type: $type, ') - ..write('itemId: $itemId, ') - ..write('data: $data') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, createdAt, type, itemId, data); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is HistoryTableData && - other.id == this.id && - other.createdAt == this.createdAt && - other.type == this.type && - other.itemId == this.itemId && - other.data == this.data); -} - -class HistoryTableCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value type; - final Value itemId; - final Value> data; - const HistoryTableCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.type = const Value.absent(), - this.itemId = const Value.absent(), - this.data = const Value.absent(), - }); - HistoryTableCompanion.insert({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - required HistoryEntryType type, - required String itemId, - required Map data, - }) : type = Value(type), - itemId = Value(itemId), - data = Value(data); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? type, - Expression? itemId, - Expression? data, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (type != null) 'type': type, - if (itemId != null) 'item_id': itemId, - if (data != null) 'data': data, - }); - } - - HistoryTableCompanion copyWith( - {Value? id, - Value? createdAt, - Value? type, - Value? itemId, - Value>? data}) { - return HistoryTableCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - type: type ?? this.type, - itemId: itemId ?? this.itemId, - data: data ?? this.data, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (type.present) { - map['type'] = - Variable($HistoryTableTable.$convertertype.toSql(type.value)); - } - if (itemId.present) { - map['item_id'] = Variable(itemId.value); - } - if (data.present) { - map['data'] = - Variable($HistoryTableTable.$converterdata.toSql(data.value)); - } - return map; - } - - @override - String toString() { - return (StringBuffer('HistoryTableCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('type: $type, ') - ..write('itemId: $itemId, ') - ..write('data: $data') - ..write(')')) - .toString(); - } -} - -class $LyricsTableTable extends LyricsTable - with TableInfo<$LyricsTableTable, LyricsTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $LyricsTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _trackIdMeta = - const VerificationMeta('trackId'); - @override - late final GeneratedColumn trackId = GeneratedColumn( - 'track_id', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - @override - late final GeneratedColumnWithTypeConverter data = - GeneratedColumn('data', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter($LyricsTableTable.$converterdata); - @override - List get $columns => [id, trackId, data]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'lyrics_table'; - @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('track_id')) { - context.handle(_trackIdMeta, - trackId.isAcceptableOrUnknown(data['track_id']!, _trackIdMeta)); - } else if (isInserting) { - context.missing(_trackIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - LyricsTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LyricsTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - trackId: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}track_id'])!, - data: $LyricsTableTable.$converterdata.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}data'])!), - ); - } - - @override - $LyricsTableTable createAlias(String alias) { - return $LyricsTableTable(attachedDatabase, alias); - } - - static TypeConverter $converterdata = - SubtitleTypeConverter(); -} - -class LyricsTableData extends DataClass implements Insertable { - final int id; - final String trackId; - final SubtitleSimple data; - const LyricsTableData( - {required this.id, required this.trackId, required this.data}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['track_id'] = Variable(trackId); - { - map['data'] = - Variable($LyricsTableTable.$converterdata.toSql(data)); - } - return map; - } - - LyricsTableCompanion toCompanion(bool nullToAbsent) { - return LyricsTableCompanion( - id: Value(id), - trackId: Value(trackId), - data: Value(data), - ); - } - - factory LyricsTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LyricsTableData( - id: serializer.fromJson(json['id']), - trackId: serializer.fromJson(json['trackId']), - data: serializer.fromJson(json['data']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'trackId': serializer.toJson(trackId), - 'data': serializer.toJson(data), - }; - } - - LyricsTableData copyWith({int? id, String? trackId, SubtitleSimple? data}) => - LyricsTableData( - id: id ?? this.id, - trackId: trackId ?? this.trackId, - data: data ?? this.data, - ); - LyricsTableData copyWithCompanion(LyricsTableCompanion data) { - return LyricsTableData( - id: data.id.present ? data.id.value : this.id, - trackId: data.trackId.present ? data.trackId.value : this.trackId, - data: data.data.present ? data.data.value : this.data, - ); - } - - @override - String toString() { - return (StringBuffer('LyricsTableData(') - ..write('id: $id, ') - ..write('trackId: $trackId, ') - ..write('data: $data') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, trackId, data); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LyricsTableData && - other.id == this.id && - other.trackId == this.trackId && - other.data == this.data); -} - -class LyricsTableCompanion extends UpdateCompanion { - final Value id; - final Value trackId; - final Value data; - const LyricsTableCompanion({ - this.id = const Value.absent(), - this.trackId = const Value.absent(), - this.data = const Value.absent(), - }); - LyricsTableCompanion.insert({ - this.id = const Value.absent(), - required String trackId, - required SubtitleSimple data, - }) : trackId = Value(trackId), - data = Value(data); - static Insertable custom({ - Expression? id, - Expression? trackId, - Expression? data, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (trackId != null) 'track_id': trackId, - if (data != null) 'data': data, - }); - } - - LyricsTableCompanion copyWith( - {Value? id, Value? trackId, Value? data}) { - return LyricsTableCompanion( - id: id ?? this.id, - trackId: trackId ?? this.trackId, - data: data ?? this.data, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (trackId.present) { - map['track_id'] = Variable(trackId.value); - } - if (data.present) { - map['data'] = - Variable($LyricsTableTable.$converterdata.toSql(data.value)); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LyricsTableCompanion(') - ..write('id: $id, ') - ..write('trackId: $trackId, ') - ..write('data: $data') - ..write(')')) - .toString(); - } -} - -class $PluginsTableTable extends PluginsTable - with TableInfo<$PluginsTableTable, PluginsTableData> { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - $PluginsTableTable(this.attachedDatabase, [this._alias]); - static const VerificationMeta _idMeta = const VerificationMeta('id'); - @override - late final GeneratedColumn id = GeneratedColumn( - 'id', aliasedName, false, - hasAutoIncrement: true, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: - GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); - static const VerificationMeta _nameMeta = const VerificationMeta('name'); - @override - late final GeneratedColumn name = GeneratedColumn( - 'name', aliasedName, false, - additionalChecks: - GeneratedColumn.checkTextLength(minTextLength: 1, maxTextLength: 50), - type: DriftSqlType.string, - requiredDuringInsert: true); - static const VerificationMeta _descriptionMeta = - const VerificationMeta('description'); - @override - late final GeneratedColumn description = GeneratedColumn( - 'description', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _versionMeta = - const VerificationMeta('version'); - @override - late final GeneratedColumn version = GeneratedColumn( - 'version', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _authorMeta = const VerificationMeta('author'); - @override - late final GeneratedColumn author = GeneratedColumn( - 'author', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - static const VerificationMeta _entryPointMeta = - const VerificationMeta('entryPoint'); - @override - late final GeneratedColumn entryPoint = GeneratedColumn( - 'entry_point', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true); - @override - late final GeneratedColumnWithTypeConverter, String> apis = - GeneratedColumn('apis', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter>($PluginsTableTable.$converterapis); - @override - late final GeneratedColumnWithTypeConverter, String> abilities = - GeneratedColumn('abilities', aliasedName, false, - type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter>($PluginsTableTable.$converterabilities); - static const VerificationMeta _selectedForMetadataMeta = - const VerificationMeta('selectedForMetadata'); - @override - late final GeneratedColumn selectedForMetadata = GeneratedColumn( - 'selected_for_metadata', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("selected_for_metadata" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _selectedForAudioSourceMeta = - const VerificationMeta('selectedForAudioSource'); - @override - late final GeneratedColumn selectedForAudioSource = - GeneratedColumn('selected_for_audio_source', aliasedName, false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("selected_for_audio_source" IN (0, 1))'), - defaultValue: const Constant(false)); - static const VerificationMeta _repositoryMeta = - const VerificationMeta('repository'); - @override - late final GeneratedColumn repository = GeneratedColumn( - 'repository', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); - static const VerificationMeta _pluginApiVersionMeta = - const VerificationMeta('pluginApiVersion'); - @override - late final GeneratedColumn pluginApiVersion = GeneratedColumn( - 'plugin_api_version', aliasedName, false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const Constant('2.0.0')); - @override - List get $columns => [ - id, - name, - description, - version, - author, - entryPoint, - apis, - abilities, - selectedForMetadata, - selectedForAudioSource, - repository, - pluginApiVersion - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'plugins_table'; - @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta)); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('description')) { - context.handle( - _descriptionMeta, - description.isAcceptableOrUnknown( - data['description']!, _descriptionMeta)); - } else if (isInserting) { - context.missing(_descriptionMeta); - } - if (data.containsKey('version')) { - context.handle(_versionMeta, - version.isAcceptableOrUnknown(data['version']!, _versionMeta)); - } else if (isInserting) { - context.missing(_versionMeta); - } - if (data.containsKey('author')) { - context.handle(_authorMeta, - author.isAcceptableOrUnknown(data['author']!, _authorMeta)); - } else if (isInserting) { - context.missing(_authorMeta); - } - if (data.containsKey('entry_point')) { - context.handle( - _entryPointMeta, - entryPoint.isAcceptableOrUnknown( - data['entry_point']!, _entryPointMeta)); - } else if (isInserting) { - context.missing(_entryPointMeta); - } - if (data.containsKey('selected_for_metadata')) { - context.handle( - _selectedForMetadataMeta, - selectedForMetadata.isAcceptableOrUnknown( - data['selected_for_metadata']!, _selectedForMetadataMeta)); - } - if (data.containsKey('selected_for_audio_source')) { - context.handle( - _selectedForAudioSourceMeta, - selectedForAudioSource.isAcceptableOrUnknown( - data['selected_for_audio_source']!, _selectedForAudioSourceMeta)); - } - if (data.containsKey('repository')) { - context.handle( - _repositoryMeta, - repository.isAcceptableOrUnknown( - data['repository']!, _repositoryMeta)); - } - if (data.containsKey('plugin_api_version')) { - context.handle( - _pluginApiVersionMeta, - pluginApiVersion.isAcceptableOrUnknown( - data['plugin_api_version']!, _pluginApiVersionMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - PluginsTableData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PluginsTableData( - id: attachedDatabase.typeMapping - .read(DriftSqlType.int, data['${effectivePrefix}id'])!, - name: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}name'])!, - description: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}description'])!, - version: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}version'])!, - author: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}author'])!, - entryPoint: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}entry_point'])!, - apis: $PluginsTableTable.$converterapis.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}apis'])!), - abilities: $PluginsTableTable.$converterabilities.fromSql(attachedDatabase - .typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}abilities'])!), - selectedForMetadata: attachedDatabase.typeMapping.read( - DriftSqlType.bool, data['${effectivePrefix}selected_for_metadata'])!, - selectedForAudioSource: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}selected_for_audio_source'])!, - repository: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}repository']), - pluginApiVersion: attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}plugin_api_version'])!, - ); - } - - @override - $PluginsTableTable createAlias(String alias) { - return $PluginsTableTable(attachedDatabase, alias); - } - - static TypeConverter, String> $converterapis = - const StringListConverter(); - static TypeConverter, String> $converterabilities = - const StringListConverter(); -} - -class PluginsTableData extends DataClass - implements Insertable { - final int id; - final String name; - final String description; - final String version; - final String author; - final String entryPoint; - final List apis; - final List abilities; - final bool selectedForMetadata; - final bool selectedForAudioSource; - final String? repository; - final String pluginApiVersion; - const PluginsTableData( - {required this.id, - required this.name, - required this.description, - required this.version, - required this.author, - required this.entryPoint, - required this.apis, - required this.abilities, - required this.selectedForMetadata, - required this.selectedForAudioSource, - this.repository, - required this.pluginApiVersion}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['version'] = Variable(version); - map['author'] = Variable(author); - map['entry_point'] = Variable(entryPoint); - { - map['apis'] = - Variable($PluginsTableTable.$converterapis.toSql(apis)); - } - { - map['abilities'] = Variable( - $PluginsTableTable.$converterabilities.toSql(abilities)); - } - map['selected_for_metadata'] = Variable(selectedForMetadata); - map['selected_for_audio_source'] = Variable(selectedForAudioSource); - if (!nullToAbsent || repository != null) { - map['repository'] = Variable(repository); - } - map['plugin_api_version'] = Variable(pluginApiVersion); - return map; - } - - PluginsTableCompanion toCompanion(bool nullToAbsent) { - return PluginsTableCompanion( - id: Value(id), - name: Value(name), - description: Value(description), - version: Value(version), - author: Value(author), - entryPoint: Value(entryPoint), - apis: Value(apis), - abilities: Value(abilities), - selectedForMetadata: Value(selectedForMetadata), - selectedForAudioSource: Value(selectedForAudioSource), - repository: repository == null && nullToAbsent - ? const Value.absent() - : Value(repository), - pluginApiVersion: Value(pluginApiVersion), - ); - } - - factory PluginsTableData.fromJson(Map json, - {ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PluginsTableData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - version: serializer.fromJson(json['version']), - author: serializer.fromJson(json['author']), - entryPoint: serializer.fromJson(json['entryPoint']), - apis: serializer.fromJson>(json['apis']), - abilities: serializer.fromJson>(json['abilities']), - selectedForMetadata: - serializer.fromJson(json['selectedForMetadata']), - selectedForAudioSource: - serializer.fromJson(json['selectedForAudioSource']), - repository: serializer.fromJson(json['repository']), - pluginApiVersion: serializer.fromJson(json['pluginApiVersion']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'version': serializer.toJson(version), - 'author': serializer.toJson(author), - 'entryPoint': serializer.toJson(entryPoint), - 'apis': serializer.toJson>(apis), - 'abilities': serializer.toJson>(abilities), - 'selectedForMetadata': serializer.toJson(selectedForMetadata), - 'selectedForAudioSource': serializer.toJson(selectedForAudioSource), - 'repository': serializer.toJson(repository), - 'pluginApiVersion': serializer.toJson(pluginApiVersion), - }; - } - - PluginsTableData copyWith( - {int? id, - String? name, - String? description, - String? version, - String? author, - String? entryPoint, - List? apis, - List? abilities, - bool? selectedForMetadata, - bool? selectedForAudioSource, - Value repository = const Value.absent(), - String? pluginApiVersion}) => - PluginsTableData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - version: version ?? this.version, - author: author ?? this.author, - entryPoint: entryPoint ?? this.entryPoint, - apis: apis ?? this.apis, - abilities: abilities ?? this.abilities, - selectedForMetadata: selectedForMetadata ?? this.selectedForMetadata, - selectedForAudioSource: - selectedForAudioSource ?? this.selectedForAudioSource, - repository: repository.present ? repository.value : this.repository, - pluginApiVersion: pluginApiVersion ?? this.pluginApiVersion, - ); - PluginsTableData copyWithCompanion(PluginsTableCompanion data) { - return PluginsTableData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: - data.description.present ? data.description.value : this.description, - version: data.version.present ? data.version.value : this.version, - author: data.author.present ? data.author.value : this.author, - entryPoint: - data.entryPoint.present ? data.entryPoint.value : this.entryPoint, - apis: data.apis.present ? data.apis.value : this.apis, - abilities: data.abilities.present ? data.abilities.value : this.abilities, - selectedForMetadata: data.selectedForMetadata.present - ? data.selectedForMetadata.value - : this.selectedForMetadata, - selectedForAudioSource: data.selectedForAudioSource.present - ? data.selectedForAudioSource.value - : this.selectedForAudioSource, - repository: - data.repository.present ? data.repository.value : this.repository, - pluginApiVersion: data.pluginApiVersion.present - ? data.pluginApiVersion.value - : this.pluginApiVersion, - ); - } - - @override - String toString() { - return (StringBuffer('PluginsTableData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('version: $version, ') - ..write('author: $author, ') - ..write('entryPoint: $entryPoint, ') - ..write('apis: $apis, ') - ..write('abilities: $abilities, ') - ..write('selectedForMetadata: $selectedForMetadata, ') - ..write('selectedForAudioSource: $selectedForAudioSource, ') - ..write('repository: $repository, ') - ..write('pluginApiVersion: $pluginApiVersion') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - version, - author, - entryPoint, - apis, - abilities, - selectedForMetadata, - selectedForAudioSource, - repository, - pluginApiVersion); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PluginsTableData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.version == this.version && - other.author == this.author && - other.entryPoint == this.entryPoint && - other.apis == this.apis && - other.abilities == this.abilities && - other.selectedForMetadata == this.selectedForMetadata && - other.selectedForAudioSource == this.selectedForAudioSource && - other.repository == this.repository && - other.pluginApiVersion == this.pluginApiVersion); -} - -class PluginsTableCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value version; - final Value author; - final Value entryPoint; - final Value> apis; - final Value> abilities; - final Value selectedForMetadata; - final Value selectedForAudioSource; - final Value repository; - final Value pluginApiVersion; - const PluginsTableCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.version = const Value.absent(), - this.author = const Value.absent(), - this.entryPoint = const Value.absent(), - this.apis = const Value.absent(), - this.abilities = const Value.absent(), - this.selectedForMetadata = const Value.absent(), - this.selectedForAudioSource = const Value.absent(), - this.repository = const Value.absent(), - this.pluginApiVersion = const Value.absent(), - }); - PluginsTableCompanion.insert({ - this.id = const Value.absent(), - required String name, - required String description, - required String version, - required String author, - required String entryPoint, - required List apis, - required List abilities, - this.selectedForMetadata = const Value.absent(), - this.selectedForAudioSource = const Value.absent(), - this.repository = const Value.absent(), - this.pluginApiVersion = const Value.absent(), - }) : name = Value(name), - description = Value(description), - version = Value(version), - author = Value(author), - entryPoint = Value(entryPoint), - apis = Value(apis), - abilities = Value(abilities); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? version, - Expression? author, - Expression? entryPoint, - Expression? apis, - Expression? abilities, - Expression? selectedForMetadata, - Expression? selectedForAudioSource, - Expression? repository, - Expression? pluginApiVersion, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (version != null) 'version': version, - if (author != null) 'author': author, - if (entryPoint != null) 'entry_point': entryPoint, - if (apis != null) 'apis': apis, - if (abilities != null) 'abilities': abilities, - if (selectedForMetadata != null) - 'selected_for_metadata': selectedForMetadata, - if (selectedForAudioSource != null) - 'selected_for_audio_source': selectedForAudioSource, - if (repository != null) 'repository': repository, - if (pluginApiVersion != null) 'plugin_api_version': pluginApiVersion, - }); - } - - PluginsTableCompanion copyWith( - {Value? id, - Value? name, - Value? description, - Value? version, - Value? author, - Value? entryPoint, - Value>? apis, - Value>? abilities, - Value? selectedForMetadata, - Value? selectedForAudioSource, - Value? repository, - Value? pluginApiVersion}) { - return PluginsTableCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - version: version ?? this.version, - author: author ?? this.author, - entryPoint: entryPoint ?? this.entryPoint, - apis: apis ?? this.apis, - abilities: abilities ?? this.abilities, - selectedForMetadata: selectedForMetadata ?? this.selectedForMetadata, - selectedForAudioSource: - selectedForAudioSource ?? this.selectedForAudioSource, - repository: repository ?? this.repository, - pluginApiVersion: pluginApiVersion ?? this.pluginApiVersion, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (version.present) { - map['version'] = Variable(version.value); - } - if (author.present) { - map['author'] = Variable(author.value); - } - if (entryPoint.present) { - map['entry_point'] = Variable(entryPoint.value); - } - if (apis.present) { - map['apis'] = - Variable($PluginsTableTable.$converterapis.toSql(apis.value)); - } - if (abilities.present) { - map['abilities'] = Variable( - $PluginsTableTable.$converterabilities.toSql(abilities.value)); - } - if (selectedForMetadata.present) { - map['selected_for_metadata'] = Variable(selectedForMetadata.value); - } - if (selectedForAudioSource.present) { - map['selected_for_audio_source'] = - Variable(selectedForAudioSource.value); - } - if (repository.present) { - map['repository'] = Variable(repository.value); - } - if (pluginApiVersion.present) { - map['plugin_api_version'] = Variable(pluginApiVersion.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PluginsTableCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('version: $version, ') - ..write('author: $author, ') - ..write('entryPoint: $entryPoint, ') - ..write('apis: $apis, ') - ..write('abilities: $abilities, ') - ..write('selectedForMetadata: $selectedForMetadata, ') - ..write('selectedForAudioSource: $selectedForAudioSource, ') - ..write('repository: $repository, ') - ..write('pluginApiVersion: $pluginApiVersion') - ..write(')')) - .toString(); - } -} - -abstract class _$AppDatabase extends GeneratedDatabase { - _$AppDatabase(QueryExecutor e) : super(e); - $AppDatabaseManager get managers => $AppDatabaseManager(this); - late final $AuthenticationTableTable authenticationTable = - $AuthenticationTableTable(this); - late final $BlacklistTableTable blacklistTable = $BlacklistTableTable(this); - late final $PreferencesTableTable preferencesTable = - $PreferencesTableTable(this); - late final $ScrobblerTableTable scrobblerTable = $ScrobblerTableTable(this); - late final $SkipSegmentTableTable skipSegmentTable = - $SkipSegmentTableTable(this); - late final $SourceMatchTableTable sourceMatchTable = - $SourceMatchTableTable(this); - late final $AudioPlayerStateTableTable audioPlayerStateTable = - $AudioPlayerStateTableTable(this); - late final $HistoryTableTable historyTable = $HistoryTableTable(this); - late final $LyricsTableTable lyricsTable = $LyricsTableTable(this); - late final $PluginsTableTable pluginsTable = $PluginsTableTable(this); - late final Index uniqueBlacklist = Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - historyTable, - lyricsTable, - pluginsTable, - uniqueBlacklist - ]; -} - -typedef $$AuthenticationTableTableCreateCompanionBuilder - = AuthenticationTableCompanion Function({ - Value id, - required DecryptedText cookie, - required DecryptedText accessToken, - required DateTime expiration, -}); -typedef $$AuthenticationTableTableUpdateCompanionBuilder - = AuthenticationTableCompanion Function({ - Value id, - Value cookie, - Value accessToken, - Value expiration, -}); - -class $$AuthenticationTableTableFilterComposer - extends Composer<_$AppDatabase, $AuthenticationTableTable> { - $$AuthenticationTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get cookie => $composableBuilder( - column: $table.cookie, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters - get accessToken => $composableBuilder( - column: $table.accessToken, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get expiration => $composableBuilder( - column: $table.expiration, builder: (column) => ColumnFilters(column)); -} - -class $$AuthenticationTableTableOrderingComposer - extends Composer<_$AppDatabase, $AuthenticationTableTable> { - $$AuthenticationTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get cookie => $composableBuilder( - column: $table.cookie, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get accessToken => $composableBuilder( - column: $table.accessToken, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get expiration => $composableBuilder( - column: $table.expiration, builder: (column) => ColumnOrderings(column)); -} - -class $$AuthenticationTableTableAnnotationComposer - extends Composer<_$AppDatabase, $AuthenticationTableTable> { - $$AuthenticationTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumnWithTypeConverter get cookie => - $composableBuilder(column: $table.cookie, builder: (column) => column); - - GeneratedColumnWithTypeConverter get accessToken => - $composableBuilder( - column: $table.accessToken, builder: (column) => column); - - GeneratedColumn get expiration => $composableBuilder( - column: $table.expiration, builder: (column) => column); -} - -class $$AuthenticationTableTableTableManager extends RootTableManager< - _$AppDatabase, - $AuthenticationTableTable, - AuthenticationTableData, - $$AuthenticationTableTableFilterComposer, - $$AuthenticationTableTableOrderingComposer, - $$AuthenticationTableTableAnnotationComposer, - $$AuthenticationTableTableCreateCompanionBuilder, - $$AuthenticationTableTableUpdateCompanionBuilder, - ( - AuthenticationTableData, - BaseReferences<_$AppDatabase, $AuthenticationTableTable, - AuthenticationTableData> - ), - AuthenticationTableData, - PrefetchHooks Function()> { - $$AuthenticationTableTableTableManager( - _$AppDatabase db, $AuthenticationTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$AuthenticationTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$AuthenticationTableTableOrderingComposer( - $db: db, $table: table), - createComputedFieldComposer: () => - $$AuthenticationTableTableAnnotationComposer( - $db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value cookie = const Value.absent(), - Value accessToken = const Value.absent(), - Value expiration = const Value.absent(), - }) => - AuthenticationTableCompanion( - id: id, - cookie: cookie, - accessToken: accessToken, - expiration: expiration, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required DecryptedText cookie, - required DecryptedText accessToken, - required DateTime expiration, - }) => - AuthenticationTableCompanion.insert( - id: id, - cookie: cookie, - accessToken: accessToken, - expiration: expiration, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$AuthenticationTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $AuthenticationTableTable, - AuthenticationTableData, - $$AuthenticationTableTableFilterComposer, - $$AuthenticationTableTableOrderingComposer, - $$AuthenticationTableTableAnnotationComposer, - $$AuthenticationTableTableCreateCompanionBuilder, - $$AuthenticationTableTableUpdateCompanionBuilder, - ( - AuthenticationTableData, - BaseReferences<_$AppDatabase, $AuthenticationTableTable, - AuthenticationTableData> - ), - AuthenticationTableData, - PrefetchHooks Function()>; -typedef $$BlacklistTableTableCreateCompanionBuilder = BlacklistTableCompanion - Function({ - Value id, - required String name, - required BlacklistedType elementType, - required String elementId, -}); -typedef $$BlacklistTableTableUpdateCompanionBuilder = BlacklistTableCompanion - Function({ - Value id, - Value name, - Value elementType, - Value elementId, -}); - -class $$BlacklistTableTableFilterComposer - extends Composer<_$AppDatabase, $BlacklistTableTable> { - $$BlacklistTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get name => $composableBuilder( - column: $table.name, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get elementType => $composableBuilder( - column: $table.elementType, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get elementId => $composableBuilder( - column: $table.elementId, builder: (column) => ColumnFilters(column)); -} - -class $$BlacklistTableTableOrderingComposer - extends Composer<_$AppDatabase, $BlacklistTableTable> { - $$BlacklistTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get name => $composableBuilder( - column: $table.name, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get elementType => $composableBuilder( - column: $table.elementType, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get elementId => $composableBuilder( - column: $table.elementId, builder: (column) => ColumnOrderings(column)); -} - -class $$BlacklistTableTableAnnotationComposer - extends Composer<_$AppDatabase, $BlacklistTableTable> { - $$BlacklistTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - GeneratedColumnWithTypeConverter get elementType => - $composableBuilder( - column: $table.elementType, builder: (column) => column); - - GeneratedColumn get elementId => - $composableBuilder(column: $table.elementId, builder: (column) => column); -} - -class $$BlacklistTableTableTableManager extends RootTableManager< - _$AppDatabase, - $BlacklistTableTable, - BlacklistTableData, - $$BlacklistTableTableFilterComposer, - $$BlacklistTableTableOrderingComposer, - $$BlacklistTableTableAnnotationComposer, - $$BlacklistTableTableCreateCompanionBuilder, - $$BlacklistTableTableUpdateCompanionBuilder, - ( - BlacklistTableData, - BaseReferences<_$AppDatabase, $BlacklistTableTable, BlacklistTableData> - ), - BlacklistTableData, - PrefetchHooks Function()> { - $$BlacklistTableTableTableManager( - _$AppDatabase db, $BlacklistTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$BlacklistTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$BlacklistTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$BlacklistTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value name = const Value.absent(), - Value elementType = const Value.absent(), - Value elementId = const Value.absent(), - }) => - BlacklistTableCompanion( - id: id, - name: name, - elementType: elementType, - elementId: elementId, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required String name, - required BlacklistedType elementType, - required String elementId, - }) => - BlacklistTableCompanion.insert( - id: id, - name: name, - elementType: elementType, - elementId: elementId, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$BlacklistTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $BlacklistTableTable, - BlacklistTableData, - $$BlacklistTableTableFilterComposer, - $$BlacklistTableTableOrderingComposer, - $$BlacklistTableTableAnnotationComposer, - $$BlacklistTableTableCreateCompanionBuilder, - $$BlacklistTableTableUpdateCompanionBuilder, - ( - BlacklistTableData, - BaseReferences<_$AppDatabase, $BlacklistTableTable, BlacklistTableData> - ), - BlacklistTableData, - PrefetchHooks Function()>; -typedef $$PreferencesTableTableCreateCompanionBuilder - = PreferencesTableCompanion Function({ - Value id, - Value albumColorSync, - Value amoledDarkTheme, - Value checkUpdate, - Value normalizeAudio, - Value showSystemTrayIcon, - Value systemTitleBar, - Value skipNonMusic, - Value closeBehavior, - Value accentColorScheme, - Value layoutMode, - Value locale, - Value market, - Value searchMode, - Value downloadLocation, - Value> localLibraryLocation, - Value themeMode, - Value audioSourceId, - Value youtubeClientEngine, - Value discordPresence, - Value endlessPlayback, - Value enableConnect, - Value connectPort, - Value cacheMusic, -}); -typedef $$PreferencesTableTableUpdateCompanionBuilder - = PreferencesTableCompanion Function({ - Value id, - Value albumColorSync, - Value amoledDarkTheme, - Value checkUpdate, - Value normalizeAudio, - Value showSystemTrayIcon, - Value systemTitleBar, - Value skipNonMusic, - Value closeBehavior, - Value accentColorScheme, - Value layoutMode, - Value locale, - Value market, - Value searchMode, - Value downloadLocation, - Value> localLibraryLocation, - Value themeMode, - Value audioSourceId, - Value youtubeClientEngine, - Value discordPresence, - Value endlessPlayback, - Value enableConnect, - Value connectPort, - Value cacheMusic, -}); - -class $$PreferencesTableTableFilterComposer - extends Composer<_$AppDatabase, $PreferencesTableTable> { - $$PreferencesTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get albumColorSync => $composableBuilder( - column: $table.albumColorSync, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get amoledDarkTheme => $composableBuilder( - column: $table.amoledDarkTheme, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get checkUpdate => $composableBuilder( - column: $table.checkUpdate, builder: (column) => ColumnFilters(column)); - - ColumnFilters get normalizeAudio => $composableBuilder( - column: $table.normalizeAudio, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get showSystemTrayIcon => $composableBuilder( - column: $table.showSystemTrayIcon, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get systemTitleBar => $composableBuilder( - column: $table.systemTitleBar, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get skipNonMusic => $composableBuilder( - column: $table.skipNonMusic, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get closeBehavior => $composableBuilder( - column: $table.closeBehavior, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters - get accentColorScheme => $composableBuilder( - column: $table.accentColorScheme, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters - get layoutMode => $composableBuilder( - column: $table.layoutMode, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters get locale => - $composableBuilder( - column: $table.locale, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters get market => - $composableBuilder( - column: $table.market, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters - get searchMode => $composableBuilder( - column: $table.searchMode, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get downloadLocation => $composableBuilder( - column: $table.downloadLocation, - builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters, List, String> - get localLibraryLocation => $composableBuilder( - column: $table.localLibraryLocation, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters get themeMode => - $composableBuilder( - column: $table.themeMode, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get audioSourceId => $composableBuilder( - column: $table.audioSourceId, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get youtubeClientEngine => $composableBuilder( - column: $table.youtubeClientEngine, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get discordPresence => $composableBuilder( - column: $table.discordPresence, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get endlessPlayback => $composableBuilder( - column: $table.endlessPlayback, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get enableConnect => $composableBuilder( - column: $table.enableConnect, builder: (column) => ColumnFilters(column)); - - ColumnFilters get connectPort => $composableBuilder( - column: $table.connectPort, builder: (column) => ColumnFilters(column)); - - ColumnFilters get cacheMusic => $composableBuilder( - column: $table.cacheMusic, builder: (column) => ColumnFilters(column)); -} - -class $$PreferencesTableTableOrderingComposer - extends Composer<_$AppDatabase, $PreferencesTableTable> { - $$PreferencesTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get albumColorSync => $composableBuilder( - column: $table.albumColorSync, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get amoledDarkTheme => $composableBuilder( - column: $table.amoledDarkTheme, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get checkUpdate => $composableBuilder( - column: $table.checkUpdate, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get normalizeAudio => $composableBuilder( - column: $table.normalizeAudio, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get showSystemTrayIcon => $composableBuilder( - column: $table.showSystemTrayIcon, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get systemTitleBar => $composableBuilder( - column: $table.systemTitleBar, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get skipNonMusic => $composableBuilder( - column: $table.skipNonMusic, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get closeBehavior => $composableBuilder( - column: $table.closeBehavior, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get accentColorScheme => $composableBuilder( - column: $table.accentColorScheme, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get layoutMode => $composableBuilder( - column: $table.layoutMode, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get locale => $composableBuilder( - column: $table.locale, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get market => $composableBuilder( - column: $table.market, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get searchMode => $composableBuilder( - column: $table.searchMode, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get downloadLocation => $composableBuilder( - column: $table.downloadLocation, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get localLibraryLocation => $composableBuilder( - column: $table.localLibraryLocation, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get themeMode => $composableBuilder( - column: $table.themeMode, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get audioSourceId => $composableBuilder( - column: $table.audioSourceId, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get youtubeClientEngine => $composableBuilder( - column: $table.youtubeClientEngine, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get discordPresence => $composableBuilder( - column: $table.discordPresence, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get endlessPlayback => $composableBuilder( - column: $table.endlessPlayback, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get enableConnect => $composableBuilder( - column: $table.enableConnect, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get connectPort => $composableBuilder( - column: $table.connectPort, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get cacheMusic => $composableBuilder( - column: $table.cacheMusic, builder: (column) => ColumnOrderings(column)); -} - -class $$PreferencesTableTableAnnotationComposer - extends Composer<_$AppDatabase, $PreferencesTableTable> { - $$PreferencesTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get albumColorSync => $composableBuilder( - column: $table.albumColorSync, builder: (column) => column); - - GeneratedColumn get amoledDarkTheme => $composableBuilder( - column: $table.amoledDarkTheme, builder: (column) => column); - - GeneratedColumn get checkUpdate => $composableBuilder( - column: $table.checkUpdate, builder: (column) => column); - - GeneratedColumn get normalizeAudio => $composableBuilder( - column: $table.normalizeAudio, builder: (column) => column); - - GeneratedColumn get showSystemTrayIcon => $composableBuilder( - column: $table.showSystemTrayIcon, builder: (column) => column); - - GeneratedColumn get systemTitleBar => $composableBuilder( - column: $table.systemTitleBar, builder: (column) => column); - - GeneratedColumn get skipNonMusic => $composableBuilder( - column: $table.skipNonMusic, builder: (column) => column); - - GeneratedColumnWithTypeConverter get closeBehavior => - $composableBuilder( - column: $table.closeBehavior, builder: (column) => column); - - GeneratedColumnWithTypeConverter - get accentColorScheme => $composableBuilder( - column: $table.accentColorScheme, builder: (column) => column); - - GeneratedColumnWithTypeConverter get layoutMode => - $composableBuilder( - column: $table.layoutMode, builder: (column) => column); - - GeneratedColumnWithTypeConverter get locale => - $composableBuilder(column: $table.locale, builder: (column) => column); - - GeneratedColumnWithTypeConverter get market => - $composableBuilder(column: $table.market, builder: (column) => column); - - GeneratedColumnWithTypeConverter get searchMode => - $composableBuilder( - column: $table.searchMode, builder: (column) => column); - - GeneratedColumn get downloadLocation => $composableBuilder( - column: $table.downloadLocation, builder: (column) => column); - - GeneratedColumnWithTypeConverter, String> - get localLibraryLocation => $composableBuilder( - column: $table.localLibraryLocation, builder: (column) => column); - - GeneratedColumnWithTypeConverter get themeMode => - $composableBuilder(column: $table.themeMode, builder: (column) => column); - - GeneratedColumn get audioSourceId => $composableBuilder( - column: $table.audioSourceId, builder: (column) => column); - - GeneratedColumnWithTypeConverter - get youtubeClientEngine => $composableBuilder( - column: $table.youtubeClientEngine, builder: (column) => column); - - GeneratedColumn get discordPresence => $composableBuilder( - column: $table.discordPresence, builder: (column) => column); - - GeneratedColumn get endlessPlayback => $composableBuilder( - column: $table.endlessPlayback, builder: (column) => column); - - GeneratedColumn get enableConnect => $composableBuilder( - column: $table.enableConnect, builder: (column) => column); - - GeneratedColumn get connectPort => $composableBuilder( - column: $table.connectPort, builder: (column) => column); - - GeneratedColumn get cacheMusic => $composableBuilder( - column: $table.cacheMusic, builder: (column) => column); -} - -class $$PreferencesTableTableTableManager extends RootTableManager< - _$AppDatabase, - $PreferencesTableTable, - PreferencesTableData, - $$PreferencesTableTableFilterComposer, - $$PreferencesTableTableOrderingComposer, - $$PreferencesTableTableAnnotationComposer, - $$PreferencesTableTableCreateCompanionBuilder, - $$PreferencesTableTableUpdateCompanionBuilder, - ( - PreferencesTableData, - BaseReferences<_$AppDatabase, $PreferencesTableTable, - PreferencesTableData> - ), - PreferencesTableData, - PrefetchHooks Function()> { - $$PreferencesTableTableTableManager( - _$AppDatabase db, $PreferencesTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$PreferencesTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$PreferencesTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$PreferencesTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value albumColorSync = const Value.absent(), - Value amoledDarkTheme = const Value.absent(), - Value checkUpdate = const Value.absent(), - Value normalizeAudio = const Value.absent(), - Value showSystemTrayIcon = const Value.absent(), - Value systemTitleBar = const Value.absent(), - Value skipNonMusic = const Value.absent(), - Value closeBehavior = const Value.absent(), - Value accentColorScheme = const Value.absent(), - Value layoutMode = const Value.absent(), - Value locale = const Value.absent(), - Value market = const Value.absent(), - Value searchMode = const Value.absent(), - Value downloadLocation = const Value.absent(), - Value> localLibraryLocation = const Value.absent(), - Value themeMode = const Value.absent(), - Value audioSourceId = const Value.absent(), - Value youtubeClientEngine = - const Value.absent(), - Value discordPresence = const Value.absent(), - Value endlessPlayback = const Value.absent(), - Value enableConnect = const Value.absent(), - Value connectPort = const Value.absent(), - Value cacheMusic = const Value.absent(), - }) => - PreferencesTableCompanion( - id: id, - albumColorSync: albumColorSync, - amoledDarkTheme: amoledDarkTheme, - checkUpdate: checkUpdate, - normalizeAudio: normalizeAudio, - showSystemTrayIcon: showSystemTrayIcon, - systemTitleBar: systemTitleBar, - skipNonMusic: skipNonMusic, - closeBehavior: closeBehavior, - accentColorScheme: accentColorScheme, - layoutMode: layoutMode, - locale: locale, - market: market, - searchMode: searchMode, - downloadLocation: downloadLocation, - localLibraryLocation: localLibraryLocation, - themeMode: themeMode, - audioSourceId: audioSourceId, - youtubeClientEngine: youtubeClientEngine, - discordPresence: discordPresence, - endlessPlayback: endlessPlayback, - enableConnect: enableConnect, - connectPort: connectPort, - cacheMusic: cacheMusic, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - Value albumColorSync = const Value.absent(), - Value amoledDarkTheme = const Value.absent(), - Value checkUpdate = const Value.absent(), - Value normalizeAudio = const Value.absent(), - Value showSystemTrayIcon = const Value.absent(), - Value systemTitleBar = const Value.absent(), - Value skipNonMusic = const Value.absent(), - Value closeBehavior = const Value.absent(), - Value accentColorScheme = const Value.absent(), - Value layoutMode = const Value.absent(), - Value locale = const Value.absent(), - Value market = const Value.absent(), - Value searchMode = const Value.absent(), - Value downloadLocation = const Value.absent(), - Value> localLibraryLocation = const Value.absent(), - Value themeMode = const Value.absent(), - Value audioSourceId = const Value.absent(), - Value youtubeClientEngine = - const Value.absent(), - Value discordPresence = const Value.absent(), - Value endlessPlayback = const Value.absent(), - Value enableConnect = const Value.absent(), - Value connectPort = const Value.absent(), - Value cacheMusic = const Value.absent(), - }) => - PreferencesTableCompanion.insert( - id: id, - albumColorSync: albumColorSync, - amoledDarkTheme: amoledDarkTheme, - checkUpdate: checkUpdate, - normalizeAudio: normalizeAudio, - showSystemTrayIcon: showSystemTrayIcon, - systemTitleBar: systemTitleBar, - skipNonMusic: skipNonMusic, - closeBehavior: closeBehavior, - accentColorScheme: accentColorScheme, - layoutMode: layoutMode, - locale: locale, - market: market, - searchMode: searchMode, - downloadLocation: downloadLocation, - localLibraryLocation: localLibraryLocation, - themeMode: themeMode, - audioSourceId: audioSourceId, - youtubeClientEngine: youtubeClientEngine, - discordPresence: discordPresence, - endlessPlayback: endlessPlayback, - enableConnect: enableConnect, - connectPort: connectPort, - cacheMusic: cacheMusic, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$PreferencesTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $PreferencesTableTable, - PreferencesTableData, - $$PreferencesTableTableFilterComposer, - $$PreferencesTableTableOrderingComposer, - $$PreferencesTableTableAnnotationComposer, - $$PreferencesTableTableCreateCompanionBuilder, - $$PreferencesTableTableUpdateCompanionBuilder, - ( - PreferencesTableData, - BaseReferences<_$AppDatabase, $PreferencesTableTable, - PreferencesTableData> - ), - PreferencesTableData, - PrefetchHooks Function()>; -typedef $$ScrobblerTableTableCreateCompanionBuilder = ScrobblerTableCompanion - Function({ - Value id, - Value createdAt, - required String username, - required DecryptedText passwordHash, -}); -typedef $$ScrobblerTableTableUpdateCompanionBuilder = ScrobblerTableCompanion - Function({ - Value id, - Value createdAt, - Value username, - Value passwordHash, -}); - -class $$ScrobblerTableTableFilterComposer - extends Composer<_$AppDatabase, $ScrobblerTableTable> { - $$ScrobblerTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnFilters(column)); - - ColumnFilters get username => $composableBuilder( - column: $table.username, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get passwordHash => $composableBuilder( - column: $table.passwordHash, - builder: (column) => ColumnWithTypeConverterFilters(column)); -} - -class $$ScrobblerTableTableOrderingComposer - extends Composer<_$AppDatabase, $ScrobblerTableTable> { - $$ScrobblerTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get username => $composableBuilder( - column: $table.username, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get passwordHash => $composableBuilder( - column: $table.passwordHash, - builder: (column) => ColumnOrderings(column)); -} - -class $$ScrobblerTableTableAnnotationComposer - extends Composer<_$AppDatabase, $ScrobblerTableTable> { - $$ScrobblerTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - GeneratedColumn get username => - $composableBuilder(column: $table.username, builder: (column) => column); - - GeneratedColumnWithTypeConverter get passwordHash => - $composableBuilder( - column: $table.passwordHash, builder: (column) => column); -} - -class $$ScrobblerTableTableTableManager extends RootTableManager< - _$AppDatabase, - $ScrobblerTableTable, - ScrobblerTableData, - $$ScrobblerTableTableFilterComposer, - $$ScrobblerTableTableOrderingComposer, - $$ScrobblerTableTableAnnotationComposer, - $$ScrobblerTableTableCreateCompanionBuilder, - $$ScrobblerTableTableUpdateCompanionBuilder, - ( - ScrobblerTableData, - BaseReferences<_$AppDatabase, $ScrobblerTableTable, ScrobblerTableData> - ), - ScrobblerTableData, - PrefetchHooks Function()> { - $$ScrobblerTableTableTableManager( - _$AppDatabase db, $ScrobblerTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$ScrobblerTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$ScrobblerTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$ScrobblerTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - Value username = const Value.absent(), - Value passwordHash = const Value.absent(), - }) => - ScrobblerTableCompanion( - id: id, - createdAt: createdAt, - username: username, - passwordHash: passwordHash, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - required String username, - required DecryptedText passwordHash, - }) => - ScrobblerTableCompanion.insert( - id: id, - createdAt: createdAt, - username: username, - passwordHash: passwordHash, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$ScrobblerTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $ScrobblerTableTable, - ScrobblerTableData, - $$ScrobblerTableTableFilterComposer, - $$ScrobblerTableTableOrderingComposer, - $$ScrobblerTableTableAnnotationComposer, - $$ScrobblerTableTableCreateCompanionBuilder, - $$ScrobblerTableTableUpdateCompanionBuilder, - ( - ScrobblerTableData, - BaseReferences<_$AppDatabase, $ScrobblerTableTable, ScrobblerTableData> - ), - ScrobblerTableData, - PrefetchHooks Function()>; -typedef $$SkipSegmentTableTableCreateCompanionBuilder - = SkipSegmentTableCompanion Function({ - Value id, - required int start, - required int end, - required String trackId, - Value createdAt, -}); -typedef $$SkipSegmentTableTableUpdateCompanionBuilder - = SkipSegmentTableCompanion Function({ - Value id, - Value start, - Value end, - Value trackId, - Value createdAt, -}); - -class $$SkipSegmentTableTableFilterComposer - extends Composer<_$AppDatabase, $SkipSegmentTableTable> { - $$SkipSegmentTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get start => $composableBuilder( - column: $table.start, builder: (column) => ColumnFilters(column)); - - ColumnFilters get end => $composableBuilder( - column: $table.end, builder: (column) => ColumnFilters(column)); - - ColumnFilters get trackId => $composableBuilder( - column: $table.trackId, builder: (column) => ColumnFilters(column)); - - ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnFilters(column)); -} - -class $$SkipSegmentTableTableOrderingComposer - extends Composer<_$AppDatabase, $SkipSegmentTableTable> { - $$SkipSegmentTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get start => $composableBuilder( - column: $table.start, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get end => $composableBuilder( - column: $table.end, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get trackId => $composableBuilder( - column: $table.trackId, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnOrderings(column)); -} - -class $$SkipSegmentTableTableAnnotationComposer - extends Composer<_$AppDatabase, $SkipSegmentTableTable> { - $$SkipSegmentTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get start => - $composableBuilder(column: $table.start, builder: (column) => column); - - GeneratedColumn get end => - $composableBuilder(column: $table.end, builder: (column) => column); - - GeneratedColumn get trackId => - $composableBuilder(column: $table.trackId, builder: (column) => column); - - GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); -} - -class $$SkipSegmentTableTableTableManager extends RootTableManager< - _$AppDatabase, - $SkipSegmentTableTable, - SkipSegmentTableData, - $$SkipSegmentTableTableFilterComposer, - $$SkipSegmentTableTableOrderingComposer, - $$SkipSegmentTableTableAnnotationComposer, - $$SkipSegmentTableTableCreateCompanionBuilder, - $$SkipSegmentTableTableUpdateCompanionBuilder, - ( - SkipSegmentTableData, - BaseReferences<_$AppDatabase, $SkipSegmentTableTable, - SkipSegmentTableData> - ), - SkipSegmentTableData, - PrefetchHooks Function()> { - $$SkipSegmentTableTableTableManager( - _$AppDatabase db, $SkipSegmentTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$SkipSegmentTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$SkipSegmentTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$SkipSegmentTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value start = const Value.absent(), - Value end = const Value.absent(), - Value trackId = const Value.absent(), - Value createdAt = const Value.absent(), - }) => - SkipSegmentTableCompanion( - id: id, - start: start, - end: end, - trackId: trackId, - createdAt: createdAt, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required int start, - required int end, - required String trackId, - Value createdAt = const Value.absent(), - }) => - SkipSegmentTableCompanion.insert( - id: id, - start: start, - end: end, - trackId: trackId, - createdAt: createdAt, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$SkipSegmentTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $SkipSegmentTableTable, - SkipSegmentTableData, - $$SkipSegmentTableTableFilterComposer, - $$SkipSegmentTableTableOrderingComposer, - $$SkipSegmentTableTableAnnotationComposer, - $$SkipSegmentTableTableCreateCompanionBuilder, - $$SkipSegmentTableTableUpdateCompanionBuilder, - ( - SkipSegmentTableData, - BaseReferences<_$AppDatabase, $SkipSegmentTableTable, - SkipSegmentTableData> - ), - SkipSegmentTableData, - PrefetchHooks Function()>; -typedef $$SourceMatchTableTableCreateCompanionBuilder - = SourceMatchTableCompanion Function({ - Value id, - required String trackId, - Value sourceInfo, - required String sourceType, - Value createdAt, -}); -typedef $$SourceMatchTableTableUpdateCompanionBuilder - = SourceMatchTableCompanion Function({ - Value id, - Value trackId, - Value sourceInfo, - Value sourceType, - Value createdAt, -}); - -class $$SourceMatchTableTableFilterComposer - extends Composer<_$AppDatabase, $SourceMatchTableTable> { - $$SourceMatchTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get trackId => $composableBuilder( - column: $table.trackId, builder: (column) => ColumnFilters(column)); - - ColumnFilters get sourceInfo => $composableBuilder( - column: $table.sourceInfo, builder: (column) => ColumnFilters(column)); - - ColumnFilters get sourceType => $composableBuilder( - column: $table.sourceType, builder: (column) => ColumnFilters(column)); - - ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnFilters(column)); -} - -class $$SourceMatchTableTableOrderingComposer - extends Composer<_$AppDatabase, $SourceMatchTableTable> { - $$SourceMatchTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get trackId => $composableBuilder( - column: $table.trackId, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get sourceInfo => $composableBuilder( - column: $table.sourceInfo, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get sourceType => $composableBuilder( - column: $table.sourceType, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnOrderings(column)); -} - -class $$SourceMatchTableTableAnnotationComposer - extends Composer<_$AppDatabase, $SourceMatchTableTable> { - $$SourceMatchTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get trackId => - $composableBuilder(column: $table.trackId, builder: (column) => column); - - GeneratedColumn get sourceInfo => $composableBuilder( - column: $table.sourceInfo, builder: (column) => column); - - GeneratedColumn get sourceType => $composableBuilder( - column: $table.sourceType, builder: (column) => column); - - GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); -} - -class $$SourceMatchTableTableTableManager extends RootTableManager< - _$AppDatabase, - $SourceMatchTableTable, - SourceMatchTableData, - $$SourceMatchTableTableFilterComposer, - $$SourceMatchTableTableOrderingComposer, - $$SourceMatchTableTableAnnotationComposer, - $$SourceMatchTableTableCreateCompanionBuilder, - $$SourceMatchTableTableUpdateCompanionBuilder, - ( - SourceMatchTableData, - BaseReferences<_$AppDatabase, $SourceMatchTableTable, - SourceMatchTableData> - ), - SourceMatchTableData, - PrefetchHooks Function()> { - $$SourceMatchTableTableTableManager( - _$AppDatabase db, $SourceMatchTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$SourceMatchTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$SourceMatchTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$SourceMatchTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value trackId = const Value.absent(), - Value sourceInfo = const Value.absent(), - Value sourceType = const Value.absent(), - Value createdAt = const Value.absent(), - }) => - SourceMatchTableCompanion( - id: id, - trackId: trackId, - sourceInfo: sourceInfo, - sourceType: sourceType, - createdAt: createdAt, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required String trackId, - Value sourceInfo = const Value.absent(), - required String sourceType, - Value createdAt = const Value.absent(), - }) => - SourceMatchTableCompanion.insert( - id: id, - trackId: trackId, - sourceInfo: sourceInfo, - sourceType: sourceType, - createdAt: createdAt, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$SourceMatchTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $SourceMatchTableTable, - SourceMatchTableData, - $$SourceMatchTableTableFilterComposer, - $$SourceMatchTableTableOrderingComposer, - $$SourceMatchTableTableAnnotationComposer, - $$SourceMatchTableTableCreateCompanionBuilder, - $$SourceMatchTableTableUpdateCompanionBuilder, - ( - SourceMatchTableData, - BaseReferences<_$AppDatabase, $SourceMatchTableTable, - SourceMatchTableData> - ), - SourceMatchTableData, - PrefetchHooks Function()>; -typedef $$AudioPlayerStateTableTableCreateCompanionBuilder - = AudioPlayerStateTableCompanion Function({ - Value id, - required bool playing, - required PlaylistMode loopMode, - required bool shuffled, - required List collections, - Value> tracks, - Value currentIndex, -}); -typedef $$AudioPlayerStateTableTableUpdateCompanionBuilder - = AudioPlayerStateTableCompanion Function({ - Value id, - Value playing, - Value loopMode, - Value shuffled, - Value> collections, - Value> tracks, - Value currentIndex, -}); - -class $$AudioPlayerStateTableTableFilterComposer - extends Composer<_$AppDatabase, $AudioPlayerStateTableTable> { - $$AudioPlayerStateTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get playing => $composableBuilder( - column: $table.playing, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get loopMode => $composableBuilder( - column: $table.loopMode, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get shuffled => $composableBuilder( - column: $table.shuffled, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters, List, String> - get collections => $composableBuilder( - column: $table.collections, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters, - List, String> - get tracks => $composableBuilder( - column: $table.tracks, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get currentIndex => $composableBuilder( - column: $table.currentIndex, builder: (column) => ColumnFilters(column)); -} - -class $$AudioPlayerStateTableTableOrderingComposer - extends Composer<_$AppDatabase, $AudioPlayerStateTableTable> { - $$AudioPlayerStateTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get playing => $composableBuilder( - column: $table.playing, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get loopMode => $composableBuilder( - column: $table.loopMode, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get shuffled => $composableBuilder( - column: $table.shuffled, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get collections => $composableBuilder( - column: $table.collections, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get tracks => $composableBuilder( - column: $table.tracks, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get currentIndex => $composableBuilder( - column: $table.currentIndex, - builder: (column) => ColumnOrderings(column)); -} - -class $$AudioPlayerStateTableTableAnnotationComposer - extends Composer<_$AppDatabase, $AudioPlayerStateTableTable> { - $$AudioPlayerStateTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get playing => - $composableBuilder(column: $table.playing, builder: (column) => column); - - GeneratedColumnWithTypeConverter get loopMode => - $composableBuilder(column: $table.loopMode, builder: (column) => column); - - GeneratedColumn get shuffled => - $composableBuilder(column: $table.shuffled, builder: (column) => column); - - GeneratedColumnWithTypeConverter, String> get collections => - $composableBuilder( - column: $table.collections, builder: (column) => column); - - GeneratedColumnWithTypeConverter, String> - get tracks => $composableBuilder( - column: $table.tracks, builder: (column) => column); - - GeneratedColumn get currentIndex => $composableBuilder( - column: $table.currentIndex, builder: (column) => column); -} - -class $$AudioPlayerStateTableTableTableManager extends RootTableManager< - _$AppDatabase, - $AudioPlayerStateTableTable, - AudioPlayerStateTableData, - $$AudioPlayerStateTableTableFilterComposer, - $$AudioPlayerStateTableTableOrderingComposer, - $$AudioPlayerStateTableTableAnnotationComposer, - $$AudioPlayerStateTableTableCreateCompanionBuilder, - $$AudioPlayerStateTableTableUpdateCompanionBuilder, - ( - AudioPlayerStateTableData, - BaseReferences<_$AppDatabase, $AudioPlayerStateTableTable, - AudioPlayerStateTableData> - ), - AudioPlayerStateTableData, - PrefetchHooks Function()> { - $$AudioPlayerStateTableTableTableManager( - _$AppDatabase db, $AudioPlayerStateTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$AudioPlayerStateTableTableFilterComposer( - $db: db, $table: table), - createOrderingComposer: () => - $$AudioPlayerStateTableTableOrderingComposer( - $db: db, $table: table), - createComputedFieldComposer: () => - $$AudioPlayerStateTableTableAnnotationComposer( - $db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value playing = const Value.absent(), - Value loopMode = const Value.absent(), - Value shuffled = const Value.absent(), - Value> collections = const Value.absent(), - Value> tracks = const Value.absent(), - Value currentIndex = const Value.absent(), - }) => - AudioPlayerStateTableCompanion( - id: id, - playing: playing, - loopMode: loopMode, - shuffled: shuffled, - collections: collections, - tracks: tracks, - currentIndex: currentIndex, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required bool playing, - required PlaylistMode loopMode, - required bool shuffled, - required List collections, - Value> tracks = const Value.absent(), - Value currentIndex = const Value.absent(), - }) => - AudioPlayerStateTableCompanion.insert( - id: id, - playing: playing, - loopMode: loopMode, - shuffled: shuffled, - collections: collections, - tracks: tracks, - currentIndex: currentIndex, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$AudioPlayerStateTableTableProcessedTableManager - = ProcessedTableManager< - _$AppDatabase, - $AudioPlayerStateTableTable, - AudioPlayerStateTableData, - $$AudioPlayerStateTableTableFilterComposer, - $$AudioPlayerStateTableTableOrderingComposer, - $$AudioPlayerStateTableTableAnnotationComposer, - $$AudioPlayerStateTableTableCreateCompanionBuilder, - $$AudioPlayerStateTableTableUpdateCompanionBuilder, - ( - AudioPlayerStateTableData, - BaseReferences<_$AppDatabase, $AudioPlayerStateTableTable, - AudioPlayerStateTableData> - ), - AudioPlayerStateTableData, - PrefetchHooks Function()>; -typedef $$HistoryTableTableCreateCompanionBuilder = HistoryTableCompanion - Function({ - Value id, - Value createdAt, - required HistoryEntryType type, - required String itemId, - required Map data, -}); -typedef $$HistoryTableTableUpdateCompanionBuilder = HistoryTableCompanion - Function({ - Value id, - Value createdAt, - Value type, - Value itemId, - Value> data, -}); - -class $$HistoryTableTableFilterComposer - extends Composer<_$AppDatabase, $HistoryTableTable> { - $$HistoryTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get type => $composableBuilder( - column: $table.type, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get itemId => $composableBuilder( - column: $table.itemId, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters, Map, - String> - get data => $composableBuilder( - column: $table.data, - builder: (column) => ColumnWithTypeConverterFilters(column)); -} - -class $$HistoryTableTableOrderingComposer - extends Composer<_$AppDatabase, $HistoryTableTable> { - $$HistoryTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get type => $composableBuilder( - column: $table.type, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get itemId => $composableBuilder( - column: $table.itemId, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get data => $composableBuilder( - column: $table.data, builder: (column) => ColumnOrderings(column)); -} - -class $$HistoryTableTableAnnotationComposer - extends Composer<_$AppDatabase, $HistoryTableTable> { - $$HistoryTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - GeneratedColumnWithTypeConverter get type => - $composableBuilder(column: $table.type, builder: (column) => column); - - GeneratedColumn get itemId => - $composableBuilder(column: $table.itemId, builder: (column) => column); - - GeneratedColumnWithTypeConverter, String> get data => - $composableBuilder(column: $table.data, builder: (column) => column); -} - -class $$HistoryTableTableTableManager extends RootTableManager< - _$AppDatabase, - $HistoryTableTable, - HistoryTableData, - $$HistoryTableTableFilterComposer, - $$HistoryTableTableOrderingComposer, - $$HistoryTableTableAnnotationComposer, - $$HistoryTableTableCreateCompanionBuilder, - $$HistoryTableTableUpdateCompanionBuilder, - ( - HistoryTableData, - BaseReferences<_$AppDatabase, $HistoryTableTable, HistoryTableData> - ), - HistoryTableData, - PrefetchHooks Function()> { - $$HistoryTableTableTableManager(_$AppDatabase db, $HistoryTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$HistoryTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$HistoryTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$HistoryTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - Value type = const Value.absent(), - Value itemId = const Value.absent(), - Value> data = const Value.absent(), - }) => - HistoryTableCompanion( - id: id, - createdAt: createdAt, - type: type, - itemId: itemId, - data: data, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - required HistoryEntryType type, - required String itemId, - required Map data, - }) => - HistoryTableCompanion.insert( - id: id, - createdAt: createdAt, - type: type, - itemId: itemId, - data: data, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$HistoryTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $HistoryTableTable, - HistoryTableData, - $$HistoryTableTableFilterComposer, - $$HistoryTableTableOrderingComposer, - $$HistoryTableTableAnnotationComposer, - $$HistoryTableTableCreateCompanionBuilder, - $$HistoryTableTableUpdateCompanionBuilder, - ( - HistoryTableData, - BaseReferences<_$AppDatabase, $HistoryTableTable, HistoryTableData> - ), - HistoryTableData, - PrefetchHooks Function()>; -typedef $$LyricsTableTableCreateCompanionBuilder = LyricsTableCompanion - Function({ - Value id, - required String trackId, - required SubtitleSimple data, -}); -typedef $$LyricsTableTableUpdateCompanionBuilder = LyricsTableCompanion - Function({ - Value id, - Value trackId, - Value data, -}); - -class $$LyricsTableTableFilterComposer - extends Composer<_$AppDatabase, $LyricsTableTable> { - $$LyricsTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get trackId => $composableBuilder( - column: $table.trackId, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters - get data => $composableBuilder( - column: $table.data, - builder: (column) => ColumnWithTypeConverterFilters(column)); -} - -class $$LyricsTableTableOrderingComposer - extends Composer<_$AppDatabase, $LyricsTableTable> { - $$LyricsTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get trackId => $composableBuilder( - column: $table.trackId, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get data => $composableBuilder( - column: $table.data, builder: (column) => ColumnOrderings(column)); -} - -class $$LyricsTableTableAnnotationComposer - extends Composer<_$AppDatabase, $LyricsTableTable> { - $$LyricsTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get trackId => - $composableBuilder(column: $table.trackId, builder: (column) => column); - - GeneratedColumnWithTypeConverter get data => - $composableBuilder(column: $table.data, builder: (column) => column); -} - -class $$LyricsTableTableTableManager extends RootTableManager< - _$AppDatabase, - $LyricsTableTable, - LyricsTableData, - $$LyricsTableTableFilterComposer, - $$LyricsTableTableOrderingComposer, - $$LyricsTableTableAnnotationComposer, - $$LyricsTableTableCreateCompanionBuilder, - $$LyricsTableTableUpdateCompanionBuilder, - ( - LyricsTableData, - BaseReferences<_$AppDatabase, $LyricsTableTable, LyricsTableData> - ), - LyricsTableData, - PrefetchHooks Function()> { - $$LyricsTableTableTableManager(_$AppDatabase db, $LyricsTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$LyricsTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$LyricsTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$LyricsTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value trackId = const Value.absent(), - Value data = const Value.absent(), - }) => - LyricsTableCompanion( - id: id, - trackId: trackId, - data: data, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required String trackId, - required SubtitleSimple data, - }) => - LyricsTableCompanion.insert( - id: id, - trackId: trackId, - data: data, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$LyricsTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $LyricsTableTable, - LyricsTableData, - $$LyricsTableTableFilterComposer, - $$LyricsTableTableOrderingComposer, - $$LyricsTableTableAnnotationComposer, - $$LyricsTableTableCreateCompanionBuilder, - $$LyricsTableTableUpdateCompanionBuilder, - ( - LyricsTableData, - BaseReferences<_$AppDatabase, $LyricsTableTable, LyricsTableData> - ), - LyricsTableData, - PrefetchHooks Function()>; -typedef $$PluginsTableTableCreateCompanionBuilder = PluginsTableCompanion - Function({ - Value id, - required String name, - required String description, - required String version, - required String author, - required String entryPoint, - required List apis, - required List abilities, - Value selectedForMetadata, - Value selectedForAudioSource, - Value repository, - Value pluginApiVersion, -}); -typedef $$PluginsTableTableUpdateCompanionBuilder = PluginsTableCompanion - Function({ - Value id, - Value name, - Value description, - Value version, - Value author, - Value entryPoint, - Value> apis, - Value> abilities, - Value selectedForMetadata, - Value selectedForAudioSource, - Value repository, - Value pluginApiVersion, -}); - -class $$PluginsTableTableFilterComposer - extends Composer<_$AppDatabase, $PluginsTableTable> { - $$PluginsTableTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnFilters get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnFilters(column)); - - ColumnFilters get name => $composableBuilder( - column: $table.name, builder: (column) => ColumnFilters(column)); - - ColumnFilters get description => $composableBuilder( - column: $table.description, builder: (column) => ColumnFilters(column)); - - ColumnFilters get version => $composableBuilder( - column: $table.version, builder: (column) => ColumnFilters(column)); - - ColumnFilters get author => $composableBuilder( - column: $table.author, builder: (column) => ColumnFilters(column)); - - ColumnFilters get entryPoint => $composableBuilder( - column: $table.entryPoint, builder: (column) => ColumnFilters(column)); - - ColumnWithTypeConverterFilters, List, String> get apis => - $composableBuilder( - column: $table.apis, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnWithTypeConverterFilters, List, String> - get abilities => $composableBuilder( - column: $table.abilities, - builder: (column) => ColumnWithTypeConverterFilters(column)); - - ColumnFilters get selectedForMetadata => $composableBuilder( - column: $table.selectedForMetadata, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get selectedForAudioSource => $composableBuilder( - column: $table.selectedForAudioSource, - builder: (column) => ColumnFilters(column)); - - ColumnFilters get repository => $composableBuilder( - column: $table.repository, builder: (column) => ColumnFilters(column)); - - ColumnFilters get pluginApiVersion => $composableBuilder( - column: $table.pluginApiVersion, - builder: (column) => ColumnFilters(column)); -} - -class $$PluginsTableTableOrderingComposer - extends Composer<_$AppDatabase, $PluginsTableTable> { - $$PluginsTableTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - ColumnOrderings get id => $composableBuilder( - column: $table.id, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get name => $composableBuilder( - column: $table.name, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get description => $composableBuilder( - column: $table.description, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get version => $composableBuilder( - column: $table.version, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get author => $composableBuilder( - column: $table.author, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get entryPoint => $composableBuilder( - column: $table.entryPoint, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get apis => $composableBuilder( - column: $table.apis, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get abilities => $composableBuilder( - column: $table.abilities, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get selectedForMetadata => $composableBuilder( - column: $table.selectedForMetadata, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get selectedForAudioSource => $composableBuilder( - column: $table.selectedForAudioSource, - builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get repository => $composableBuilder( - column: $table.repository, builder: (column) => ColumnOrderings(column)); - - ColumnOrderings get pluginApiVersion => $composableBuilder( - column: $table.pluginApiVersion, - builder: (column) => ColumnOrderings(column)); -} - -class $$PluginsTableTableAnnotationComposer - extends Composer<_$AppDatabase, $PluginsTableTable> { - $$PluginsTableTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - GeneratedColumn get description => $composableBuilder( - column: $table.description, builder: (column) => column); - - GeneratedColumn get version => - $composableBuilder(column: $table.version, builder: (column) => column); - - GeneratedColumn get author => - $composableBuilder(column: $table.author, builder: (column) => column); - - GeneratedColumn get entryPoint => $composableBuilder( - column: $table.entryPoint, builder: (column) => column); - - GeneratedColumnWithTypeConverter, String> get apis => - $composableBuilder(column: $table.apis, builder: (column) => column); - - GeneratedColumnWithTypeConverter, String> get abilities => - $composableBuilder(column: $table.abilities, builder: (column) => column); - - GeneratedColumn get selectedForMetadata => $composableBuilder( - column: $table.selectedForMetadata, builder: (column) => column); - - GeneratedColumn get selectedForAudioSource => $composableBuilder( - column: $table.selectedForAudioSource, builder: (column) => column); - - GeneratedColumn get repository => $composableBuilder( - column: $table.repository, builder: (column) => column); - - GeneratedColumn get pluginApiVersion => $composableBuilder( - column: $table.pluginApiVersion, builder: (column) => column); -} - -class $$PluginsTableTableTableManager extends RootTableManager< - _$AppDatabase, - $PluginsTableTable, - PluginsTableData, - $$PluginsTableTableFilterComposer, - $$PluginsTableTableOrderingComposer, - $$PluginsTableTableAnnotationComposer, - $$PluginsTableTableCreateCompanionBuilder, - $$PluginsTableTableUpdateCompanionBuilder, - ( - PluginsTableData, - BaseReferences<_$AppDatabase, $PluginsTableTable, PluginsTableData> - ), - PluginsTableData, - PrefetchHooks Function()> { - $$PluginsTableTableTableManager(_$AppDatabase db, $PluginsTableTable table) - : super(TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - $$PluginsTableTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - $$PluginsTableTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - $$PluginsTableTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value name = const Value.absent(), - Value description = const Value.absent(), - Value version = const Value.absent(), - Value author = const Value.absent(), - Value entryPoint = const Value.absent(), - Value> apis = const Value.absent(), - Value> abilities = const Value.absent(), - Value selectedForMetadata = const Value.absent(), - Value selectedForAudioSource = const Value.absent(), - Value repository = const Value.absent(), - Value pluginApiVersion = const Value.absent(), - }) => - PluginsTableCompanion( - id: id, - name: name, - description: description, - version: version, - author: author, - entryPoint: entryPoint, - apis: apis, - abilities: abilities, - selectedForMetadata: selectedForMetadata, - selectedForAudioSource: selectedForAudioSource, - repository: repository, - pluginApiVersion: pluginApiVersion, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required String name, - required String description, - required String version, - required String author, - required String entryPoint, - required List apis, - required List abilities, - Value selectedForMetadata = const Value.absent(), - Value selectedForAudioSource = const Value.absent(), - Value repository = const Value.absent(), - Value pluginApiVersion = const Value.absent(), - }) => - PluginsTableCompanion.insert( - id: id, - name: name, - description: description, - version: version, - author: author, - entryPoint: entryPoint, - apis: apis, - abilities: abilities, - selectedForMetadata: selectedForMetadata, - selectedForAudioSource: selectedForAudioSource, - repository: repository, - pluginApiVersion: pluginApiVersion, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$PluginsTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $PluginsTableTable, - PluginsTableData, - $$PluginsTableTableFilterComposer, - $$PluginsTableTableOrderingComposer, - $$PluginsTableTableAnnotationComposer, - $$PluginsTableTableCreateCompanionBuilder, - $$PluginsTableTableUpdateCompanionBuilder, - ( - PluginsTableData, - BaseReferences<_$AppDatabase, $PluginsTableTable, PluginsTableData> - ), - PluginsTableData, - PrefetchHooks Function()>; - -class $AppDatabaseManager { - final _$AppDatabase _db; - $AppDatabaseManager(this._db); - $$AuthenticationTableTableTableManager get authenticationTable => - $$AuthenticationTableTableTableManager(_db, _db.authenticationTable); - $$BlacklistTableTableTableManager get blacklistTable => - $$BlacklistTableTableTableManager(_db, _db.blacklistTable); - $$PreferencesTableTableTableManager get preferencesTable => - $$PreferencesTableTableTableManager(_db, _db.preferencesTable); - $$ScrobblerTableTableTableManager get scrobblerTable => - $$ScrobblerTableTableTableManager(_db, _db.scrobblerTable); - $$SkipSegmentTableTableTableManager get skipSegmentTable => - $$SkipSegmentTableTableTableManager(_db, _db.skipSegmentTable); - $$SourceMatchTableTableTableManager get sourceMatchTable => - $$SourceMatchTableTableTableManager(_db, _db.sourceMatchTable); - $$AudioPlayerStateTableTableTableManager get audioPlayerStateTable => - $$AudioPlayerStateTableTableTableManager(_db, _db.audioPlayerStateTable); - $$HistoryTableTableTableManager get historyTable => - $$HistoryTableTableTableManager(_db, _db.historyTable); - $$LyricsTableTableTableManager get lyricsTable => - $$LyricsTableTableTableManager(_db, _db.lyricsTable); - $$PluginsTableTableTableManager get pluginsTable => - $$PluginsTableTableTableManager(_db, _db.pluginsTable); -} diff --git a/lib/models/database/database.steps.dart b/lib/models/database/database.steps.dart deleted file mode 100644 index 42cbdf6d..00000000 --- a/lib/models/database/database.steps.dart +++ /dev/null @@ -1,2828 +0,0 @@ -// dart format width=80 -import 'package:drift/internal/versioned_schema.dart' as i0; -import 'package:drift/drift.dart' as i1; -import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import -import 'package:flutter/material.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/market.dart'; - -// GENERATED BY drift_dev, DO NOT MODIFY. -final class Schema2 extends i0.VersionedSchema { - Schema2({required super.database}) : super(version: 2); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - playlistTable, - playlistMediaTable, - historyTable, - lyricsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape2 preferencesTable = Shape2( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_16, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape6 audioPlayerStateTable = Shape6( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape7 playlistTable = Shape7( - source: i0.VersionedTable( - entityName: 'playlist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_44, - _column_45, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape8 playlistMediaTable = Shape8( - source: i0.VersionedTable( - entityName: 'playlist_media_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_46, - _column_47, - _column_48, - _column_49, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -class Shape0 extends i0.VersionedTable { - Shape0({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get cookie => - columnsByName['cookie']! as i1.GeneratedColumn; - i1.GeneratedColumn get accessToken => - columnsByName['access_token']! as i1.GeneratedColumn; - i1.GeneratedColumn get expiration => - columnsByName['expiration']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_0(String aliasedName) => - i1.GeneratedColumn('id', aliasedName, false, - hasAutoIncrement: true, - type: i1.DriftSqlType.int, - defaultConstraints: - i1.GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); -i1.GeneratedColumn _column_1(String aliasedName) => - i1.GeneratedColumn('cookie', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_2(String aliasedName) => - i1.GeneratedColumn('access_token', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_3(String aliasedName) => - i1.GeneratedColumn('expiration', aliasedName, false, - type: i1.DriftSqlType.dateTime); - -class Shape1 extends i0.VersionedTable { - Shape1({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get name => - columnsByName['name']! as i1.GeneratedColumn; - i1.GeneratedColumn get elementType => - columnsByName['element_type']! as i1.GeneratedColumn; - i1.GeneratedColumn get elementId => - columnsByName['element_id']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_4(String aliasedName) => - i1.GeneratedColumn('name', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_5(String aliasedName) => - i1.GeneratedColumn('element_type', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_6(String aliasedName) => - i1.GeneratedColumn('element_id', aliasedName, false, - type: i1.DriftSqlType.string); - -class Shape2 extends i0.VersionedTable { - Shape2({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioQuality => - columnsByName['audio_quality']! as i1.GeneratedColumn; - i1.GeneratedColumn get albumColorSync => - columnsByName['album_color_sync']! as i1.GeneratedColumn; - i1.GeneratedColumn get amoledDarkTheme => - columnsByName['amoled_dark_theme']! as i1.GeneratedColumn; - i1.GeneratedColumn get checkUpdate => - columnsByName['check_update']! as i1.GeneratedColumn; - i1.GeneratedColumn get normalizeAudio => - columnsByName['normalize_audio']! as i1.GeneratedColumn; - i1.GeneratedColumn get showSystemTrayIcon => - columnsByName['show_system_tray_icon']! as i1.GeneratedColumn; - i1.GeneratedColumn get systemTitleBar => - columnsByName['system_title_bar']! as i1.GeneratedColumn; - i1.GeneratedColumn get skipNonMusic => - columnsByName['skip_non_music']! as i1.GeneratedColumn; - i1.GeneratedColumn get closeBehavior => - columnsByName['close_behavior']! as i1.GeneratedColumn; - i1.GeneratedColumn get accentColorScheme => - columnsByName['accent_color_scheme']! as i1.GeneratedColumn; - i1.GeneratedColumn get layoutMode => - columnsByName['layout_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get locale => - columnsByName['locale']! as i1.GeneratedColumn; - i1.GeneratedColumn get market => - columnsByName['market']! as i1.GeneratedColumn; - i1.GeneratedColumn get searchMode => - columnsByName['search_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadLocation => - columnsByName['download_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get localLibraryLocation => - columnsByName['local_library_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get pipedInstance => - columnsByName['piped_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get invidiousInstance => - columnsByName['invidious_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get themeMode => - columnsByName['theme_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioSource => - columnsByName['audio_source']! as i1.GeneratedColumn; - i1.GeneratedColumn get streamMusicCodec => - columnsByName['stream_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadMusicCodec => - columnsByName['download_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get discordPresence => - columnsByName['discord_presence']! as i1.GeneratedColumn; - i1.GeneratedColumn get endlessPlayback => - columnsByName['endless_playback']! as i1.GeneratedColumn; - i1.GeneratedColumn get enableConnect => - columnsByName['enable_connect']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_7(String aliasedName) => - i1.GeneratedColumn('audio_quality', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: Constant("high")); -i1.GeneratedColumn _column_8(String aliasedName) => - i1.GeneratedColumn('album_color_sync', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("album_color_sync" IN (0, 1))'), - defaultValue: const Constant(true)); -i1.GeneratedColumn _column_9(String aliasedName) => - i1.GeneratedColumn('amoled_dark_theme', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("amoled_dark_theme" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_10(String aliasedName) => - i1.GeneratedColumn('check_update', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("check_update" IN (0, 1))'), - defaultValue: const Constant(true)); -i1.GeneratedColumn _column_11(String aliasedName) => - i1.GeneratedColumn('normalize_audio', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("normalize_audio" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_12(String aliasedName) => - i1.GeneratedColumn('show_system_tray_icon', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("show_system_tray_icon" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_13(String aliasedName) => - i1.GeneratedColumn('system_title_bar', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("system_title_bar" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_14(String aliasedName) => - i1.GeneratedColumn('skip_non_music', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("skip_non_music" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_15(String aliasedName) => - i1.GeneratedColumn('close_behavior', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: Constant(CloseBehavior.close.name)); -i1.GeneratedColumn _column_16(String aliasedName) => - i1.GeneratedColumn('accent_color_scheme', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: const Constant("Blue:0xFF2196F3")); -i1.GeneratedColumn _column_17(String aliasedName) => - i1.GeneratedColumn('layout_mode', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: Constant(LayoutMode.adaptive.name)); -i1.GeneratedColumn _column_18(String aliasedName) => - i1.GeneratedColumn('locale', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: - const Constant('{"languageCode":"system","countryCode":"system"}')); -i1.GeneratedColumn _column_19(String aliasedName) => - i1.GeneratedColumn('market', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: Constant(Market.US.name)); -i1.GeneratedColumn _column_20(String aliasedName) => - i1.GeneratedColumn('search_mode', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: Constant(SearchMode.youtube.name)); -i1.GeneratedColumn _column_21(String aliasedName) => - i1.GeneratedColumn('download_location', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: const Constant("")); -i1.GeneratedColumn _column_22(String aliasedName) => - i1.GeneratedColumn('local_library_location', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: const Constant("")); -i1.GeneratedColumn _column_23(String aliasedName) => - i1.GeneratedColumn('piped_instance', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: const Constant("https://pipedapi.kavin.rocks")); -i1.GeneratedColumn _column_24(String aliasedName) => - i1.GeneratedColumn('invidious_instance', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: const Constant("https://inv.nadeko.net")); -i1.GeneratedColumn _column_25(String aliasedName) => - i1.GeneratedColumn('theme_mode', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: Constant(ThemeMode.system.name)); -i1.GeneratedColumn _column_26(String aliasedName) => - i1.GeneratedColumn('audio_source', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: Constant("youtube")); -i1.GeneratedColumn _column_27(String aliasedName) => - i1.GeneratedColumn('stream_music_codec', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: Constant("weba")); -i1.GeneratedColumn _column_28(String aliasedName) => - i1.GeneratedColumn('download_music_codec', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: Constant("m4a")); -i1.GeneratedColumn _column_29(String aliasedName) => - i1.GeneratedColumn('discord_presence', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("discord_presence" IN (0, 1))'), - defaultValue: const Constant(true)); -i1.GeneratedColumn _column_30(String aliasedName) => - i1.GeneratedColumn('endless_playback', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("endless_playback" IN (0, 1))'), - defaultValue: const Constant(true)); -i1.GeneratedColumn _column_31(String aliasedName) => - i1.GeneratedColumn('enable_connect', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("enable_connect" IN (0, 1))'), - defaultValue: const Constant(false)); - -class Shape3 extends i0.VersionedTable { - Shape3({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get createdAt => - columnsByName['created_at']! as i1.GeneratedColumn; - i1.GeneratedColumn get username => - columnsByName['username']! as i1.GeneratedColumn; - i1.GeneratedColumn get passwordHash => - columnsByName['password_hash']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_32(String aliasedName) => - i1.GeneratedColumn('created_at', aliasedName, false, - type: i1.DriftSqlType.dateTime, defaultValue: currentDateAndTime); -i1.GeneratedColumn _column_33(String aliasedName) => - i1.GeneratedColumn('username', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_34(String aliasedName) => - i1.GeneratedColumn('password_hash', aliasedName, false, - type: i1.DriftSqlType.string); - -class Shape4 extends i0.VersionedTable { - Shape4({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get start => - columnsByName['start']! as i1.GeneratedColumn; - i1.GeneratedColumn get end => - columnsByName['end']! as i1.GeneratedColumn; - i1.GeneratedColumn get trackId => - columnsByName['track_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get createdAt => - columnsByName['created_at']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_35(String aliasedName) => - i1.GeneratedColumn('start', aliasedName, false, - type: i1.DriftSqlType.int); -i1.GeneratedColumn _column_36(String aliasedName) => - i1.GeneratedColumn('end', aliasedName, false, - type: i1.DriftSqlType.int); -i1.GeneratedColumn _column_37(String aliasedName) => - i1.GeneratedColumn('track_id', aliasedName, false, - type: i1.DriftSqlType.string); - -class Shape5 extends i0.VersionedTable { - Shape5({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get trackId => - columnsByName['track_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get sourceId => - columnsByName['source_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get sourceType => - columnsByName['source_type']! as i1.GeneratedColumn; - i1.GeneratedColumn get createdAt => - columnsByName['created_at']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_38(String aliasedName) => - i1.GeneratedColumn('source_id', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_39(String aliasedName) => - i1.GeneratedColumn('source_type', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: Constant("youtube")); - -class Shape6 extends i0.VersionedTable { - Shape6({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get playing => - columnsByName['playing']! as i1.GeneratedColumn; - i1.GeneratedColumn get loopMode => - columnsByName['loop_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get shuffled => - columnsByName['shuffled']! as i1.GeneratedColumn; - i1.GeneratedColumn get collections => - columnsByName['collections']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_40(String aliasedName) => - i1.GeneratedColumn('playing', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("playing" IN (0, 1))')); -i1.GeneratedColumn _column_41(String aliasedName) => - i1.GeneratedColumn('loop_mode', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_42(String aliasedName) => - i1.GeneratedColumn('shuffled', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("shuffled" IN (0, 1))')); -i1.GeneratedColumn _column_43(String aliasedName) => - i1.GeneratedColumn('collections', aliasedName, false, - type: i1.DriftSqlType.string); - -class Shape7 extends i0.VersionedTable { - Shape7({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioPlayerStateId => - columnsByName['audio_player_state_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get index => - columnsByName['index']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_44(String aliasedName) => - i1.GeneratedColumn('audio_player_state_id', aliasedName, false, - type: i1.DriftSqlType.int, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'REFERENCES audio_player_state_table (id)')); -i1.GeneratedColumn _column_45(String aliasedName) => - i1.GeneratedColumn('index', aliasedName, false, - type: i1.DriftSqlType.int); - -class Shape8 extends i0.VersionedTable { - Shape8({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get playlistId => - columnsByName['playlist_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get uri => - columnsByName['uri']! as i1.GeneratedColumn; - i1.GeneratedColumn get extras => - columnsByName['extras']! as i1.GeneratedColumn; - i1.GeneratedColumn get httpHeaders => - columnsByName['http_headers']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_46(String aliasedName) => - i1.GeneratedColumn('playlist_id', aliasedName, false, - type: i1.DriftSqlType.int, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'REFERENCES playlist_table (id)')); -i1.GeneratedColumn _column_47(String aliasedName) => - i1.GeneratedColumn('uri', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_48(String aliasedName) => - i1.GeneratedColumn('extras', aliasedName, true, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_49(String aliasedName) => - i1.GeneratedColumn('http_headers', aliasedName, true, - type: i1.DriftSqlType.string); - -class Shape9 extends i0.VersionedTable { - Shape9({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get createdAt => - columnsByName['created_at']! as i1.GeneratedColumn; - i1.GeneratedColumn get type => - columnsByName['type']! as i1.GeneratedColumn; - i1.GeneratedColumn get itemId => - columnsByName['item_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get data => - columnsByName['data']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_50(String aliasedName) => - i1.GeneratedColumn('type', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_51(String aliasedName) => - i1.GeneratedColumn('item_id', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_52(String aliasedName) => - i1.GeneratedColumn('data', aliasedName, false, - type: i1.DriftSqlType.string); - -class Shape10 extends i0.VersionedTable { - Shape10({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get trackId => - columnsByName['track_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get data => - columnsByName['data']! as i1.GeneratedColumn; -} - -final class Schema3 extends i0.VersionedSchema { - Schema3({required super.database}) : super(version: 3); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - playlistTable, - playlistMediaTable, - historyTable, - lyricsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape11 preferencesTable = Shape11( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_16, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape6 audioPlayerStateTable = Shape6( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape7 playlistTable = Shape7( - source: i0.VersionedTable( - entityName: 'playlist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_44, - _column_45, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape8 playlistMediaTable = Shape8( - source: i0.VersionedTable( - entityName: 'playlist_media_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_46, - _column_47, - _column_48, - _column_49, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -class Shape11 extends i0.VersionedTable { - Shape11({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioQuality => - columnsByName['audio_quality']! as i1.GeneratedColumn; - i1.GeneratedColumn get albumColorSync => - columnsByName['album_color_sync']! as i1.GeneratedColumn; - i1.GeneratedColumn get amoledDarkTheme => - columnsByName['amoled_dark_theme']! as i1.GeneratedColumn; - i1.GeneratedColumn get checkUpdate => - columnsByName['check_update']! as i1.GeneratedColumn; - i1.GeneratedColumn get normalizeAudio => - columnsByName['normalize_audio']! as i1.GeneratedColumn; - i1.GeneratedColumn get showSystemTrayIcon => - columnsByName['show_system_tray_icon']! as i1.GeneratedColumn; - i1.GeneratedColumn get systemTitleBar => - columnsByName['system_title_bar']! as i1.GeneratedColumn; - i1.GeneratedColumn get skipNonMusic => - columnsByName['skip_non_music']! as i1.GeneratedColumn; - i1.GeneratedColumn get closeBehavior => - columnsByName['close_behavior']! as i1.GeneratedColumn; - i1.GeneratedColumn get accentColorScheme => - columnsByName['accent_color_scheme']! as i1.GeneratedColumn; - i1.GeneratedColumn get layoutMode => - columnsByName['layout_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get locale => - columnsByName['locale']! as i1.GeneratedColumn; - i1.GeneratedColumn get market => - columnsByName['market']! as i1.GeneratedColumn; - i1.GeneratedColumn get searchMode => - columnsByName['search_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadLocation => - columnsByName['download_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get localLibraryLocation => - columnsByName['local_library_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get pipedInstance => - columnsByName['piped_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get invidiousInstance => - columnsByName['invidious_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get themeMode => - columnsByName['theme_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioSource => - columnsByName['audio_source']! as i1.GeneratedColumn; - i1.GeneratedColumn get streamMusicCodec => - columnsByName['stream_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadMusicCodec => - columnsByName['download_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get discordPresence => - columnsByName['discord_presence']! as i1.GeneratedColumn; - i1.GeneratedColumn get endlessPlayback => - columnsByName['endless_playback']! as i1.GeneratedColumn; - i1.GeneratedColumn get enableConnect => - columnsByName['enable_connect']! as i1.GeneratedColumn; - i1.GeneratedColumn get cacheMusic => - columnsByName['cache_music']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_53(String aliasedName) => - i1.GeneratedColumn('cache_music', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("cache_music" IN (0, 1))'), - defaultValue: const Constant(true)); - -final class Schema4 extends i0.VersionedSchema { - Schema4({required super.database}) : super(version: 4); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - playlistTable, - playlistMediaTable, - historyTable, - lyricsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape12 preferencesTable = Shape12( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_16, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_54, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape6 audioPlayerStateTable = Shape6( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape7 playlistTable = Shape7( - source: i0.VersionedTable( - entityName: 'playlist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_44, - _column_45, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape8 playlistMediaTable = Shape8( - source: i0.VersionedTable( - entityName: 'playlist_media_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_46, - _column_47, - _column_48, - _column_49, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -class Shape12 extends i0.VersionedTable { - Shape12({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioQuality => - columnsByName['audio_quality']! as i1.GeneratedColumn; - i1.GeneratedColumn get albumColorSync => - columnsByName['album_color_sync']! as i1.GeneratedColumn; - i1.GeneratedColumn get amoledDarkTheme => - columnsByName['amoled_dark_theme']! as i1.GeneratedColumn; - i1.GeneratedColumn get checkUpdate => - columnsByName['check_update']! as i1.GeneratedColumn; - i1.GeneratedColumn get normalizeAudio => - columnsByName['normalize_audio']! as i1.GeneratedColumn; - i1.GeneratedColumn get showSystemTrayIcon => - columnsByName['show_system_tray_icon']! as i1.GeneratedColumn; - i1.GeneratedColumn get systemTitleBar => - columnsByName['system_title_bar']! as i1.GeneratedColumn; - i1.GeneratedColumn get skipNonMusic => - columnsByName['skip_non_music']! as i1.GeneratedColumn; - i1.GeneratedColumn get closeBehavior => - columnsByName['close_behavior']! as i1.GeneratedColumn; - i1.GeneratedColumn get accentColorScheme => - columnsByName['accent_color_scheme']! as i1.GeneratedColumn; - i1.GeneratedColumn get layoutMode => - columnsByName['layout_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get locale => - columnsByName['locale']! as i1.GeneratedColumn; - i1.GeneratedColumn get market => - columnsByName['market']! as i1.GeneratedColumn; - i1.GeneratedColumn get searchMode => - columnsByName['search_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadLocation => - columnsByName['download_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get localLibraryLocation => - columnsByName['local_library_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get pipedInstance => - columnsByName['piped_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get invidiousInstance => - columnsByName['invidious_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get themeMode => - columnsByName['theme_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioSource => - columnsByName['audio_source']! as i1.GeneratedColumn; - i1.GeneratedColumn get youtubeClientEngine => - columnsByName['youtube_client_engine']! as i1.GeneratedColumn; - i1.GeneratedColumn get streamMusicCodec => - columnsByName['stream_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadMusicCodec => - columnsByName['download_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get discordPresence => - columnsByName['discord_presence']! as i1.GeneratedColumn; - i1.GeneratedColumn get endlessPlayback => - columnsByName['endless_playback']! as i1.GeneratedColumn; - i1.GeneratedColumn get enableConnect => - columnsByName['enable_connect']! as i1.GeneratedColumn; - i1.GeneratedColumn get cacheMusic => - columnsByName['cache_music']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_54(String aliasedName) => - i1.GeneratedColumn('youtube_client_engine', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: Constant(YoutubeClientEngine.youtubeExplode.name)); - -final class Schema5 extends i0.VersionedSchema { - Schema5({required super.database}) : super(version: 5); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - playlistTable, - playlistMediaTable, - historyTable, - lyricsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape12 preferencesTable = Shape12( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_55, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_54, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape6 audioPlayerStateTable = Shape6( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape7 playlistTable = Shape7( - source: i0.VersionedTable( - entityName: 'playlist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_44, - _column_45, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape8 playlistMediaTable = Shape8( - source: i0.VersionedTable( - entityName: 'playlist_media_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_46, - _column_47, - _column_48, - _column_49, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -i1.GeneratedColumn _column_55(String aliasedName) => - i1.GeneratedColumn('accent_color_scheme', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: const Constant("Orange:0xFFf97315")); - -final class Schema6 extends i0.VersionedSchema { - Schema6({required super.database}) : super(version: 6); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - playlistTable, - playlistMediaTable, - historyTable, - lyricsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape13 preferencesTable = Shape13( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_55, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_54, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_56, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape6 audioPlayerStateTable = Shape6( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape7 playlistTable = Shape7( - source: i0.VersionedTable( - entityName: 'playlist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_44, - _column_45, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape8 playlistMediaTable = Shape8( - source: i0.VersionedTable( - entityName: 'playlist_media_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_46, - _column_47, - _column_48, - _column_49, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -class Shape13 extends i0.VersionedTable { - Shape13({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioQuality => - columnsByName['audio_quality']! as i1.GeneratedColumn; - i1.GeneratedColumn get albumColorSync => - columnsByName['album_color_sync']! as i1.GeneratedColumn; - i1.GeneratedColumn get amoledDarkTheme => - columnsByName['amoled_dark_theme']! as i1.GeneratedColumn; - i1.GeneratedColumn get checkUpdate => - columnsByName['check_update']! as i1.GeneratedColumn; - i1.GeneratedColumn get normalizeAudio => - columnsByName['normalize_audio']! as i1.GeneratedColumn; - i1.GeneratedColumn get showSystemTrayIcon => - columnsByName['show_system_tray_icon']! as i1.GeneratedColumn; - i1.GeneratedColumn get systemTitleBar => - columnsByName['system_title_bar']! as i1.GeneratedColumn; - i1.GeneratedColumn get skipNonMusic => - columnsByName['skip_non_music']! as i1.GeneratedColumn; - i1.GeneratedColumn get closeBehavior => - columnsByName['close_behavior']! as i1.GeneratedColumn; - i1.GeneratedColumn get accentColorScheme => - columnsByName['accent_color_scheme']! as i1.GeneratedColumn; - i1.GeneratedColumn get layoutMode => - columnsByName['layout_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get locale => - columnsByName['locale']! as i1.GeneratedColumn; - i1.GeneratedColumn get market => - columnsByName['market']! as i1.GeneratedColumn; - i1.GeneratedColumn get searchMode => - columnsByName['search_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadLocation => - columnsByName['download_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get localLibraryLocation => - columnsByName['local_library_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get pipedInstance => - columnsByName['piped_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get invidiousInstance => - columnsByName['invidious_instance']! as i1.GeneratedColumn; - i1.GeneratedColumn get themeMode => - columnsByName['theme_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioSource => - columnsByName['audio_source']! as i1.GeneratedColumn; - i1.GeneratedColumn get youtubeClientEngine => - columnsByName['youtube_client_engine']! as i1.GeneratedColumn; - i1.GeneratedColumn get streamMusicCodec => - columnsByName['stream_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadMusicCodec => - columnsByName['download_music_codec']! as i1.GeneratedColumn; - i1.GeneratedColumn get discordPresence => - columnsByName['discord_presence']! as i1.GeneratedColumn; - i1.GeneratedColumn get endlessPlayback => - columnsByName['endless_playback']! as i1.GeneratedColumn; - i1.GeneratedColumn get enableConnect => - columnsByName['enable_connect']! as i1.GeneratedColumn; - i1.GeneratedColumn get connectPort => - columnsByName['connect_port']! as i1.GeneratedColumn; - i1.GeneratedColumn get cacheMusic => - columnsByName['cache_music']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_56(String aliasedName) => - i1.GeneratedColumn('connect_port', aliasedName, false, - type: i1.DriftSqlType.int, defaultValue: const Constant(-1)); - -final class Schema7 extends i0.VersionedSchema { - Schema7({required super.database}) : super(version: 7); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - historyTable, - lyricsTable, - metadataPluginsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape13 preferencesTable = Shape13( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_55, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_54, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_56, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape14 audioPlayerStateTable = Shape14( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - _column_57, - _column_58, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape15 metadataPluginsTable = Shape15( - source: i0.VersionedTable( - entityName: 'metadata_plugins_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_59, - _column_60, - _column_61, - _column_62, - _column_63, - _column_64, - _column_65, - _column_66, - _column_67, - _column_68, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -class Shape14 extends i0.VersionedTable { - Shape14({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get playing => - columnsByName['playing']! as i1.GeneratedColumn; - i1.GeneratedColumn get loopMode => - columnsByName['loop_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get shuffled => - columnsByName['shuffled']! as i1.GeneratedColumn; - i1.GeneratedColumn get collections => - columnsByName['collections']! as i1.GeneratedColumn; - i1.GeneratedColumn get tracks => - columnsByName['tracks']! as i1.GeneratedColumn; - i1.GeneratedColumn get currentIndex => - columnsByName['current_index']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_57(String aliasedName) => - i1.GeneratedColumn('tracks', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: const Constant("[]")); -i1.GeneratedColumn _column_58(String aliasedName) => - i1.GeneratedColumn('current_index', aliasedName, false, - type: i1.DriftSqlType.int, defaultValue: const Constant(0)); - -class Shape15 extends i0.VersionedTable { - Shape15({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get name => - columnsByName['name']! as i1.GeneratedColumn; - i1.GeneratedColumn get description => - columnsByName['description']! as i1.GeneratedColumn; - i1.GeneratedColumn get version => - columnsByName['version']! as i1.GeneratedColumn; - i1.GeneratedColumn get author => - columnsByName['author']! as i1.GeneratedColumn; - i1.GeneratedColumn get entryPoint => - columnsByName['entry_point']! as i1.GeneratedColumn; - i1.GeneratedColumn get apis => - columnsByName['apis']! as i1.GeneratedColumn; - i1.GeneratedColumn get abilities => - columnsByName['abilities']! as i1.GeneratedColumn; - i1.GeneratedColumn get selected => - columnsByName['selected']! as i1.GeneratedColumn; - i1.GeneratedColumn get repository => - columnsByName['repository']! as i1.GeneratedColumn; - i1.GeneratedColumn get pluginApiVersion => - columnsByName['plugin_api_version']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_59(String aliasedName) => - i1.GeneratedColumn('name', aliasedName, false, - additionalChecks: i1.GeneratedColumn.checkTextLength( - minTextLength: 1, maxTextLength: 50), - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_60(String aliasedName) => - i1.GeneratedColumn('description', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_61(String aliasedName) => - i1.GeneratedColumn('version', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_62(String aliasedName) => - i1.GeneratedColumn('author', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_63(String aliasedName) => - i1.GeneratedColumn('entry_point', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_64(String aliasedName) => - i1.GeneratedColumn('apis', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_65(String aliasedName) => - i1.GeneratedColumn('abilities', aliasedName, false, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_66(String aliasedName) => - i1.GeneratedColumn('selected', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("selected" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_67(String aliasedName) => - i1.GeneratedColumn('repository', aliasedName, true, - type: i1.DriftSqlType.string); -i1.GeneratedColumn _column_68(String aliasedName) => - i1.GeneratedColumn('plugin_api_version', aliasedName, false, - type: i1.DriftSqlType.string); - -final class Schema8 extends i0.VersionedSchema { - Schema8({required super.database}) : super(version: 8); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - historyTable, - lyricsTable, - metadataPluginsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape13 preferencesTable = Shape13( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_69, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_54, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_56, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape14 audioPlayerStateTable = Shape14( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - _column_57, - _column_58, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape15 metadataPluginsTable = Shape15( - source: i0.VersionedTable( - entityName: 'metadata_plugins_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_59, - _column_60, - _column_61, - _column_62, - _column_63, - _column_64, - _column_65, - _column_66, - _column_67, - _column_70, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -i1.GeneratedColumn _column_69(String aliasedName) => - i1.GeneratedColumn('accent_color_scheme', aliasedName, false, - type: i1.DriftSqlType.string, - defaultValue: const Constant("Slate:0xff64748b")); -i1.GeneratedColumn _column_70(String aliasedName) => - i1.GeneratedColumn('plugin_api_version', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: const Constant('1.0.0')); - -final class Schema9 extends i0.VersionedSchema { - Schema9({required super.database}) : super(version: 9); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - historyTable, - lyricsTable, - pluginsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape13 preferencesTable = Shape13( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_7, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_69, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_23, - _column_24, - _column_25, - _column_26, - _column_54, - _column_27, - _column_28, - _column_29, - _column_30, - _column_31, - _column_56, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape5 sourceMatchTable = Shape5( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_38, - _column_39, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape14 audioPlayerStateTable = Shape14( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - _column_57, - _column_58, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape16 pluginsTable = Shape16( - source: i0.VersionedTable( - entityName: 'plugins_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_59, - _column_60, - _column_61, - _column_62, - _column_63, - _column_64, - _column_65, - _column_71, - _column_72, - _column_67, - _column_73, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)'); -} - -class Shape16 extends i0.VersionedTable { - Shape16({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get name => - columnsByName['name']! as i1.GeneratedColumn; - i1.GeneratedColumn get description => - columnsByName['description']! as i1.GeneratedColumn; - i1.GeneratedColumn get version => - columnsByName['version']! as i1.GeneratedColumn; - i1.GeneratedColumn get author => - columnsByName['author']! as i1.GeneratedColumn; - i1.GeneratedColumn get entryPoint => - columnsByName['entry_point']! as i1.GeneratedColumn; - i1.GeneratedColumn get apis => - columnsByName['apis']! as i1.GeneratedColumn; - i1.GeneratedColumn get abilities => - columnsByName['abilities']! as i1.GeneratedColumn; - i1.GeneratedColumn get selectedForMetadata => - columnsByName['selected_for_metadata']! as i1.GeneratedColumn; - i1.GeneratedColumn get selectedForAudioSource => - columnsByName['selected_for_audio_source']! as i1.GeneratedColumn; - i1.GeneratedColumn get repository => - columnsByName['repository']! as i1.GeneratedColumn; - i1.GeneratedColumn get pluginApiVersion => - columnsByName['plugin_api_version']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_71(String aliasedName) => - i1.GeneratedColumn('selected_for_metadata', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("selected_for_metadata" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_72(String aliasedName) => - i1.GeneratedColumn('selected_for_audio_source', aliasedName, false, - type: i1.DriftSqlType.bool, - defaultConstraints: i1.GeneratedColumn.constraintIsAlways( - 'CHECK ("selected_for_audio_source" IN (0, 1))'), - defaultValue: const Constant(false)); -i1.GeneratedColumn _column_73(String aliasedName) => - i1.GeneratedColumn('plugin_api_version', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: const Constant('2.0.0')); - -final class Schema10 extends i0.VersionedSchema { - Schema10({required super.database}) : super(version: 10); - @override - late final List entities = [ - authenticationTable, - blacklistTable, - preferencesTable, - scrobblerTable, - skipSegmentTable, - sourceMatchTable, - audioPlayerStateTable, - historyTable, - lyricsTable, - pluginsTable, - uniqueBlacklist, - uniqTrackMatch, - ]; - late final Shape0 authenticationTable = Shape0( - source: i0.VersionedTable( - entityName: 'authentication_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_1, - _column_2, - _column_3, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape1 blacklistTable = Shape1( - source: i0.VersionedTable( - entityName: 'blacklist_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_4, - _column_5, - _column_6, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape17 preferencesTable = Shape17( - source: i0.VersionedTable( - entityName: 'preferences_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_8, - _column_9, - _column_10, - _column_11, - _column_12, - _column_13, - _column_14, - _column_15, - _column_69, - _column_17, - _column_18, - _column_19, - _column_20, - _column_21, - _column_22, - _column_25, - _column_74, - _column_54, - _column_29, - _column_30, - _column_31, - _column_56, - _column_53, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape3 scrobblerTable = Shape3( - source: i0.VersionedTable( - entityName: 'scrobbler_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_33, - _column_34, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape4 skipSegmentTable = Shape4( - source: i0.VersionedTable( - entityName: 'skip_segment_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_35, - _column_36, - _column_37, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape18 sourceMatchTable = Shape18( - source: i0.VersionedTable( - entityName: 'source_match_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_75, - _column_76, - _column_32, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape14 audioPlayerStateTable = Shape14( - source: i0.VersionedTable( - entityName: 'audio_player_state_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_40, - _column_41, - _column_42, - _column_43, - _column_57, - _column_58, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape9 historyTable = Shape9( - source: i0.VersionedTable( - entityName: 'history_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_32, - _column_50, - _column_51, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape10 lyricsTable = Shape10( - source: i0.VersionedTable( - entityName: 'lyrics_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_37, - _column_52, - ], - attachedDatabase: database, - ), - alias: null); - late final Shape16 pluginsTable = Shape16( - source: i0.VersionedTable( - entityName: 'plugins_table', - withoutRowId: false, - isStrict: false, - tableConstraints: [], - columns: [ - _column_0, - _column_59, - _column_60, - _column_61, - _column_62, - _column_63, - _column_64, - _column_65, - _column_71, - _column_72, - _column_67, - _column_73, - ], - attachedDatabase: database, - ), - alias: null); - final i1.Index uniqueBlacklist = i1.Index('unique_blacklist', - 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); - final i1.Index uniqTrackMatch = i1.Index('uniq_track_match', - 'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_info, source_type)'); -} - -class Shape17 extends i0.VersionedTable { - Shape17({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get albumColorSync => - columnsByName['album_color_sync']! as i1.GeneratedColumn; - i1.GeneratedColumn get amoledDarkTheme => - columnsByName['amoled_dark_theme']! as i1.GeneratedColumn; - i1.GeneratedColumn get checkUpdate => - columnsByName['check_update']! as i1.GeneratedColumn; - i1.GeneratedColumn get normalizeAudio => - columnsByName['normalize_audio']! as i1.GeneratedColumn; - i1.GeneratedColumn get showSystemTrayIcon => - columnsByName['show_system_tray_icon']! as i1.GeneratedColumn; - i1.GeneratedColumn get systemTitleBar => - columnsByName['system_title_bar']! as i1.GeneratedColumn; - i1.GeneratedColumn get skipNonMusic => - columnsByName['skip_non_music']! as i1.GeneratedColumn; - i1.GeneratedColumn get closeBehavior => - columnsByName['close_behavior']! as i1.GeneratedColumn; - i1.GeneratedColumn get accentColorScheme => - columnsByName['accent_color_scheme']! as i1.GeneratedColumn; - i1.GeneratedColumn get layoutMode => - columnsByName['layout_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get locale => - columnsByName['locale']! as i1.GeneratedColumn; - i1.GeneratedColumn get market => - columnsByName['market']! as i1.GeneratedColumn; - i1.GeneratedColumn get searchMode => - columnsByName['search_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get downloadLocation => - columnsByName['download_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get localLibraryLocation => - columnsByName['local_library_location']! as i1.GeneratedColumn; - i1.GeneratedColumn get themeMode => - columnsByName['theme_mode']! as i1.GeneratedColumn; - i1.GeneratedColumn get audioSourceId => - columnsByName['audio_source_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get youtubeClientEngine => - columnsByName['youtube_client_engine']! as i1.GeneratedColumn; - i1.GeneratedColumn get discordPresence => - columnsByName['discord_presence']! as i1.GeneratedColumn; - i1.GeneratedColumn get endlessPlayback => - columnsByName['endless_playback']! as i1.GeneratedColumn; - i1.GeneratedColumn get enableConnect => - columnsByName['enable_connect']! as i1.GeneratedColumn; - i1.GeneratedColumn get connectPort => - columnsByName['connect_port']! as i1.GeneratedColumn; - i1.GeneratedColumn get cacheMusic => - columnsByName['cache_music']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_74(String aliasedName) => - i1.GeneratedColumn('audio_source_id', aliasedName, true, - type: i1.DriftSqlType.string); - -class Shape18 extends i0.VersionedTable { - Shape18({required super.source, required super.alias}) : super.aliased(); - i1.GeneratedColumn get id => - columnsByName['id']! as i1.GeneratedColumn; - i1.GeneratedColumn get trackId => - columnsByName['track_id']! as i1.GeneratedColumn; - i1.GeneratedColumn get sourceInfo => - columnsByName['source_info']! as i1.GeneratedColumn; - i1.GeneratedColumn get sourceType => - columnsByName['source_type']! as i1.GeneratedColumn; - i1.GeneratedColumn get createdAt => - columnsByName['created_at']! as i1.GeneratedColumn; -} - -i1.GeneratedColumn _column_75(String aliasedName) => - i1.GeneratedColumn('source_info', aliasedName, false, - type: i1.DriftSqlType.string, defaultValue: const Constant("{}")); -i1.GeneratedColumn _column_76(String aliasedName) => - i1.GeneratedColumn('source_type', aliasedName, false, - type: i1.DriftSqlType.string); -i0.MigrationStepWithVersion migrationSteps({ - required Future Function(i1.Migrator m, Schema2 schema) from1To2, - required Future Function(i1.Migrator m, Schema3 schema) from2To3, - required Future Function(i1.Migrator m, Schema4 schema) from3To4, - required Future Function(i1.Migrator m, Schema5 schema) from4To5, - required Future Function(i1.Migrator m, Schema6 schema) from5To6, - required Future Function(i1.Migrator m, Schema7 schema) from6To7, - required Future Function(i1.Migrator m, Schema8 schema) from7To8, - required Future Function(i1.Migrator m, Schema9 schema) from8To9, - required Future Function(i1.Migrator m, Schema10 schema) from9To10, -}) { - return (currentVersion, database) async { - switch (currentVersion) { - case 1: - final schema = Schema2(database: database); - final migrator = i1.Migrator(database, schema); - await from1To2(migrator, schema); - return 2; - case 2: - final schema = Schema3(database: database); - final migrator = i1.Migrator(database, schema); - await from2To3(migrator, schema); - return 3; - case 3: - final schema = Schema4(database: database); - final migrator = i1.Migrator(database, schema); - await from3To4(migrator, schema); - return 4; - case 4: - final schema = Schema5(database: database); - final migrator = i1.Migrator(database, schema); - await from4To5(migrator, schema); - return 5; - case 5: - final schema = Schema6(database: database); - final migrator = i1.Migrator(database, schema); - await from5To6(migrator, schema); - return 6; - case 6: - final schema = Schema7(database: database); - final migrator = i1.Migrator(database, schema); - await from6To7(migrator, schema); - return 7; - case 7: - final schema = Schema8(database: database); - final migrator = i1.Migrator(database, schema); - await from7To8(migrator, schema); - return 8; - case 8: - final schema = Schema9(database: database); - final migrator = i1.Migrator(database, schema); - await from8To9(migrator, schema); - return 9; - case 9: - final schema = Schema10(database: database); - final migrator = i1.Migrator(database, schema); - await from9To10(migrator, schema); - return 10; - default: - throw ArgumentError.value('Unknown migration from $currentVersion'); - } - }; -} - -i1.OnUpgrade stepByStep({ - required Future Function(i1.Migrator m, Schema2 schema) from1To2, - required Future Function(i1.Migrator m, Schema3 schema) from2To3, - required Future Function(i1.Migrator m, Schema4 schema) from3To4, - required Future Function(i1.Migrator m, Schema5 schema) from4To5, - required Future Function(i1.Migrator m, Schema6 schema) from5To6, - required Future Function(i1.Migrator m, Schema7 schema) from6To7, - required Future Function(i1.Migrator m, Schema8 schema) from7To8, - required Future Function(i1.Migrator m, Schema9 schema) from8To9, - required Future Function(i1.Migrator m, Schema10 schema) from9To10, -}) => - i0.VersionedSchema.stepByStepHelper( - step: migrationSteps( - from1To2: from1To2, - from2To3: from2To3, - from3To4: from3To4, - from4To5: from4To5, - from5To6: from5To6, - from6To7: from6To7, - from7To8: from7To8, - from8To9: from8To9, - from9To10: from9To10, - )); diff --git a/lib/models/database/tables/audio_player_state.dart b/lib/models/database/tables/audio_player_state.dart deleted file mode 100644 index bd570da7..00000000 --- a/lib/models/database/tables/audio_player_state.dart +++ /dev/null @@ -1,34 +0,0 @@ -part of '../database.dart'; - -class AudioPlayerStateTable extends Table { - IntColumn get id => integer().autoIncrement()(); - BoolColumn get playing => boolean()(); - TextColumn get loopMode => textEnum()(); - BoolColumn get shuffled => boolean()(); - TextColumn get collections => text().map(const StringListConverter())(); - TextColumn get tracks => text() - .map(const SpotubeTrackObjectListConverter()) - .withDefault(const Constant("[]"))(); - IntColumn get currentIndex => integer().withDefault(const Constant(0))(); -} - -class SpotubeTrackObjectListConverter - extends TypeConverter, String> { - const SpotubeTrackObjectListConverter(); - - @override - List fromSql(String fromDb) { - final raw = (jsonDecode(fromDb) as List).cast(); - - return raw - .map((e) => SpotubeTrackObject.fromJson(e.cast())) - .toList(); - } - - @override - String toSql(List value) { - return jsonEncode( - value.map((e) => e.toJson()).toList(), - ); - } -} diff --git a/lib/models/database/tables/authentication.dart b/lib/models/database/tables/authentication.dart deleted file mode 100644 index 96041952..00000000 --- a/lib/models/database/tables/authentication.dart +++ /dev/null @@ -1,8 +0,0 @@ -part of '../database.dart'; - -class AuthenticationTable extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get cookie => text().map(EncryptedTextConverter())(); - TextColumn get accessToken => text().map(EncryptedTextConverter())(); - DateTimeColumn get expiration => dateTime()(); -} diff --git a/lib/models/database/tables/blacklist.dart b/lib/models/database/tables/blacklist.dart deleted file mode 100644 index 8a8d9dee..00000000 --- a/lib/models/database/tables/blacklist.dart +++ /dev/null @@ -1,18 +0,0 @@ -part of '../database.dart'; - -enum BlacklistedType { - artist, - track; -} - -@TableIndex( - name: "unique_blacklist", - unique: true, - columns: {#elementType, #elementId}, -) -class BlacklistTable extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get name => text()(); - TextColumn get elementType => textEnum()(); - TextColumn get elementId => text()(); -} diff --git a/lib/models/database/tables/history.dart b/lib/models/database/tables/history.dart deleted file mode 100644 index f074e248..00000000 --- a/lib/models/database/tables/history.dart +++ /dev/null @@ -1,31 +0,0 @@ -part of '../database.dart'; - -enum HistoryEntryType { - playlist, - album, - track, -} - -class HistoryTable extends Table { - IntColumn get id => integer().autoIncrement()(); - DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)(); - TextColumn get type => textEnum()(); - TextColumn get itemId => text()(); - TextColumn get data => - text().map(const MapTypeConverter())(); -} - -extension HistoryItemParseExtension on HistoryTableData { - SpotubeSimplePlaylistObject? get playlist => - type == HistoryEntryType.playlist && !data.containsKey("external_urls") - ? SpotubeSimplePlaylistObject.fromJson(data) - : null; - SpotubeSimpleAlbumObject? get album => - type == HistoryEntryType.album && !data.containsKey("external_urls") - ? SpotubeSimpleAlbumObject.fromJson(data) - : null; - SpotubeTrackObject? get track => - type == HistoryEntryType.track && !data.containsKey("external_urls") - ? SpotubeTrackObject.fromJson(data) - : null; -} diff --git a/lib/models/database/tables/lyrics.dart b/lib/models/database/tables/lyrics.dart deleted file mode 100644 index 7c4c7f8f..00000000 --- a/lib/models/database/tables/lyrics.dart +++ /dev/null @@ -1,8 +0,0 @@ -part of '../database.dart'; - -class LyricsTable extends Table { - IntColumn get id => integer().autoIncrement()(); - - TextColumn get trackId => text()(); - TextColumn get data => text().map(SubtitleTypeConverter())(); -} diff --git a/lib/models/database/tables/metadata_plugins.dart b/lib/models/database/tables/metadata_plugins.dart deleted file mode 100644 index 3447497d..00000000 --- a/lib/models/database/tables/metadata_plugins.dart +++ /dev/null @@ -1,19 +0,0 @@ -part of '../database.dart'; - -class PluginsTable extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get name => text().withLength(min: 1, max: 50)(); - TextColumn get description => text()(); - TextColumn get version => text()(); - TextColumn get author => text()(); - TextColumn get entryPoint => text()(); - TextColumn get apis => text().map(const StringListConverter())(); - TextColumn get abilities => text().map(const StringListConverter())(); - BoolColumn get selectedForMetadata => - boolean().withDefault(const Constant(false))(); - BoolColumn get selectedForAudioSource => - boolean().withDefault(const Constant(false))(); - TextColumn get repository => text().nullable()(); - TextColumn get pluginApiVersion => - text().withDefault(const Constant('2.0.0'))(); -} diff --git a/lib/models/database/tables/preferences.dart b/lib/models/database/tables/preferences.dart deleted file mode 100644 index 3029e2a8..00000000 --- a/lib/models/database/tables/preferences.dart +++ /dev/null @@ -1,124 +0,0 @@ -part of '../database.dart'; - -enum LayoutMode { - compact, - extended, - adaptive, -} - -enum CloseBehavior { - minimizeToTray, - close, -} - -enum YoutubeClientEngine { - ytDlp("yt-dlp"), - youtubeExplode("YouTubeExplode"), - newPipe("NewPipe"); - - final String label; - - const YoutubeClientEngine(this.label); - - bool isAvailableForPlatform() { - return switch (this) { - YoutubeClientEngine.youtubeExplode => - YouTubeExplodeEngine.isAvailableForPlatform, - YoutubeClientEngine.ytDlp => YtDlpEngine.isAvailableForPlatform, - YoutubeClientEngine.newPipe => NewPipeEngine.isAvailableForPlatform, - }; - } -} - -enum SearchMode { - youtube._("YouTube"), - youtubeMusic._("YouTube Music"); - - final String label; - - const SearchMode._(this.label); - - factory SearchMode.fromString(String key) { - return SearchMode.values.firstWhere((e) => e.name == key); - } -} - -class PreferencesTable extends Table { - IntColumn get id => integer().autoIncrement()(); - BoolColumn get albumColorSync => - boolean().withDefault(const Constant(true))(); - BoolColumn get amoledDarkTheme => - boolean().withDefault(const Constant(false))(); - BoolColumn get checkUpdate => boolean().withDefault(const Constant(true))(); - BoolColumn get normalizeAudio => - boolean().withDefault(const Constant(false))(); - BoolColumn get showSystemTrayIcon => - boolean().withDefault(const Constant(false))(); - BoolColumn get systemTitleBar => - boolean().withDefault(const Constant(false))(); - BoolColumn get skipNonMusic => boolean().withDefault(const Constant(false))(); - TextColumn get closeBehavior => textEnum() - .withDefault(Constant(CloseBehavior.close.name))(); - TextColumn get accentColorScheme => text() - .withDefault(const Constant("Slate:0xff64748b")) - .map(const SpotubeColorConverter())(); - TextColumn get layoutMode => - textEnum().withDefault(Constant(LayoutMode.adaptive.name))(); - TextColumn get locale => text() - .withDefault( - const Constant('{"languageCode":"system","countryCode":"system"}'), - ) - .map(const LocaleConverter())(); - TextColumn get market => - textEnum().withDefault(Constant(Market.US.name))(); - TextColumn get searchMode => - textEnum().withDefault(Constant(SearchMode.youtube.name))(); - TextColumn get downloadLocation => text().withDefault(const Constant(""))(); - TextColumn get localLibraryLocation => - text().withDefault(const Constant("")).map(const StringListConverter())(); - TextColumn get themeMode => - textEnum().withDefault(Constant(ThemeMode.system.name))(); - TextColumn get audioSourceId => text().nullable()(); - TextColumn get youtubeClientEngine => textEnum() - .withDefault(Constant(YoutubeClientEngine.youtubeExplode.name))(); - BoolColumn get discordPresence => - boolean().withDefault(const Constant(true))(); - BoolColumn get endlessPlayback => - boolean().withDefault(const Constant(true))(); - BoolColumn get enableConnect => - boolean().withDefault(const Constant(false))(); - IntColumn get connectPort => integer().withDefault(const Constant(-1))(); - BoolColumn get cacheMusic => boolean().withDefault(const Constant(true))(); - - // Default values as PreferencesTableData - static PreferencesTableData defaults() { - return PreferencesTableData( - id: 0, - albumColorSync: true, - amoledDarkTheme: false, - checkUpdate: true, - normalizeAudio: false, - showSystemTrayIcon: false, - systemTitleBar: false, - skipNonMusic: false, - closeBehavior: CloseBehavior.close, - accentColorScheme: SpotubeColor(Colors.slate.value, name: "Slate"), - layoutMode: LayoutMode.adaptive, - locale: const Locale("system", "system"), - market: Market.US, - searchMode: SearchMode.youtube, - downloadLocation: "", - localLibraryLocation: [], - themeMode: ThemeMode.system, - audioSourceId: null, - youtubeClientEngine: kIsIOS - ? YoutubeClientEngine.youtubeExplode - : YoutubeClientEngine.newPipe, - discordPresence: true, - endlessPlayback: true, - enableConnect: false, - cacheMusic: true, - connectPort: -1, - ); - } -} diff --git a/lib/models/database/tables/scrobbler.dart b/lib/models/database/tables/scrobbler.dart deleted file mode 100644 index 481c441e..00000000 --- a/lib/models/database/tables/scrobbler.dart +++ /dev/null @@ -1,8 +0,0 @@ -part of '../database.dart'; - -class ScrobblerTable extends Table { - IntColumn get id => integer().autoIncrement()(); - DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)(); - TextColumn get username => text()(); - TextColumn get passwordHash => text().map(EncryptedTextConverter())(); -} diff --git a/lib/models/database/tables/skip_segment.dart b/lib/models/database/tables/skip_segment.dart deleted file mode 100644 index 719f2617..00000000 --- a/lib/models/database/tables/skip_segment.dart +++ /dev/null @@ -1,9 +0,0 @@ -part of '../database.dart'; - -class SkipSegmentTable extends Table { - IntColumn get id => integer().autoIncrement()(); - IntColumn get start => integer()(); - IntColumn get end => integer()(); - TextColumn get trackId => text()(); - DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)(); -} diff --git a/lib/models/database/tables/source_match.dart b/lib/models/database/tables/source_match.dart deleted file mode 100644 index 66a4959c..00000000 --- a/lib/models/database/tables/source_match.dart +++ /dev/null @@ -1,9 +0,0 @@ -part of '../database.dart'; - -class SourceMatchTable extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get trackId => text()(); - TextColumn get sourceInfo => text().withDefault(const Constant("{}"))(); - TextColumn get sourceType => text()(); - DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)(); -} diff --git a/lib/models/database/typeconverters/color.dart b/lib/models/database/typeconverters/color.dart deleted file mode 100644 index 513921a2..00000000 --- a/lib/models/database/typeconverters/color.dart +++ /dev/null @@ -1,29 +0,0 @@ -part of '../database.dart'; - -class ColorConverter extends TypeConverter { - const ColorConverter(); - - @override - Color fromSql(int fromDb) { - return Color(fromDb); - } - - @override - int toSql(Color value) { - return value.toARGB32(); - } -} - -class SpotubeColorConverter extends TypeConverter { - const SpotubeColorConverter(); - - @override - SpotubeColor fromSql(String fromDb) { - return SpotubeColor.fromString(fromDb); - } - - @override - String toSql(SpotubeColor value) { - return value.toString(); - } -} diff --git a/lib/models/database/typeconverters/encrypted_text.dart b/lib/models/database/typeconverters/encrypted_text.dart deleted file mode 100644 index 6afa8210..00000000 --- a/lib/models/database/typeconverters/encrypted_text.dart +++ /dev/null @@ -1,44 +0,0 @@ -part of '../database.dart'; - -class DecryptedText { - final String value; - const DecryptedText(this.value); - - static Encrypter? _encrypter; - - factory DecryptedText.decrypted(String value) { - _encrypter ??= Encrypter( - Salsa20( - Key.fromUtf8(EncryptedKvStoreService.encryptionKeySync), - ), - ); - - return DecryptedText( - _encrypter!.decrypt( - Encrypted.fromBase64(value), - iv: KVStoreService.ivKey, - ), - ); - } - - String encrypt() { - _encrypter ??= Encrypter( - Salsa20( - Key.fromUtf8(EncryptedKvStoreService.encryptionKeySync), - ), - ); - return _encrypter!.encrypt(value, iv: KVStoreService.ivKey).base64; - } -} - -class EncryptedTextConverter extends TypeConverter { - @override - DecryptedText fromSql(String fromDb) { - return DecryptedText.decrypted(fromDb); - } - - @override - String toSql(DecryptedText value) { - return value.encrypt(); - } -} diff --git a/lib/models/database/typeconverters/locale.dart b/lib/models/database/typeconverters/locale.dart deleted file mode 100644 index c460088e..00000000 --- a/lib/models/database/typeconverters/locale.dart +++ /dev/null @@ -1,19 +0,0 @@ -part of '../database.dart'; - -class LocaleConverter extends TypeConverter { - const LocaleConverter(); - - @override - Locale fromSql(String fromDb) { - final rawMap = jsonDecode(fromDb) as Map; - return Locale(rawMap["languageCode"], rawMap["countryCode"]); - } - - @override - String toSql(Locale value) { - return jsonEncode({ - "languageCode": value.languageCode, - "countryCode": value.countryCode, - }); - } -} diff --git a/lib/models/database/typeconverters/map.dart b/lib/models/database/typeconverters/map.dart deleted file mode 100644 index 0b0ff7e0..00000000 --- a/lib/models/database/typeconverters/map.dart +++ /dev/null @@ -1,15 +0,0 @@ -part of '../database.dart'; - -class MapTypeConverter extends TypeConverter, String> { - const MapTypeConverter(); - - @override - fromSql(String fromDb) { - return json.decode(fromDb) as Map; - } - - @override - toSql(value) { - return json.encode(value); - } -} diff --git a/lib/models/database/typeconverters/map_list.dart b/lib/models/database/typeconverters/map_list.dart deleted file mode 100644 index b92e781d..00000000 --- a/lib/models/database/typeconverters/map_list.dart +++ /dev/null @@ -1,20 +0,0 @@ -part of '../database.dart'; - -class MapListConverter - extends TypeConverter>, String> { - const MapListConverter(); - - @override - List> fromSql(String fromDb) { - return fromDb - .split(",") - .where((e) => e.isNotEmpty) - .map((e) => json.decode(e) as Map) - .toList(); - } - - @override - String toSql(List> value) { - return value.map((e) => json.encode(e)).join(","); - } -} diff --git a/lib/models/database/typeconverters/string_list.dart b/lib/models/database/typeconverters/string_list.dart deleted file mode 100644 index 466ae4c4..00000000 --- a/lib/models/database/typeconverters/string_list.dart +++ /dev/null @@ -1,15 +0,0 @@ -part of '../database.dart'; - -class StringListConverter extends TypeConverter, String> { - const StringListConverter(); - - @override - List fromSql(String fromDb) { - return fromDb.split(",").where((e) => e.isNotEmpty).toList(); - } - - @override - String toSql(List value) { - return value.join(","); - } -} diff --git a/lib/models/database/typeconverters/subtitle.dart b/lib/models/database/typeconverters/subtitle.dart deleted file mode 100644 index 25fa4ad5..00000000 --- a/lib/models/database/typeconverters/subtitle.dart +++ /dev/null @@ -1,13 +0,0 @@ -part of '../database.dart'; - -class SubtitleTypeConverter extends TypeConverter { - @override - SubtitleSimple fromSql(String fromDb) { - return SubtitleSimple.fromJson(jsonDecode(fromDb)); - } - - @override - String toSql(SubtitleSimple value) { - return jsonEncode(value.toJson()); - } -} diff --git a/lib/models/lyrics.dart b/lib/models/lyrics.dart deleted file mode 100644 index f6457287..00000000 --- a/lib/models/lyrics.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'package:lrc/lrc.dart'; - -class SubtitleSimple { - Uri uri; - String name; - List lyrics; - int rating; - String provider; - - SubtitleSimple({ - required this.uri, - required this.name, - required this.lyrics, - required this.rating, - required this.provider, - }); - - factory SubtitleSimple.fromJson(Map json) { - return SubtitleSimple( - uri: Uri.parse(json["uri"] as String), - name: json["name"] as String, - lyrics: (json["lyrics"] as List) - .map((e) => LyricSlice.fromJson(e as Map)) - .toList(), - rating: json["rating"] as int, - provider: json["provider"] as String? ?? "unknown", - ); - } - - Map toJson() { - return { - "uri": uri.toString(), - "name": name, - "lyrics": lyrics.map((e) => e.toJson()).toList(), - "rating": rating, - "provider": provider, - }; - } -} - -class LyricSlice { - Duration time; - String text; - - LyricSlice({required this.time, required this.text}); - - factory LyricSlice.fromLrcLine(LrcLine line) { - return LyricSlice( - time: line.timestamp, - text: line.lyrics.trim(), - ); - } - - factory LyricSlice.fromJson(Map json) { - return LyricSlice( - time: Duration(milliseconds: json["time"]), - text: json["text"] as String, - ); - } - - Map toJson() { - return { - "time": time.inMilliseconds, - "text": text, - }; - } - - @override - String toString() { - return "LyricsSlice({time: $time, text: $text})"; - } -} diff --git a/lib/models/metadata/album.dart b/lib/models/metadata/album.dart deleted file mode 100644 index bc9022de..00000000 --- a/lib/models/metadata/album.dart +++ /dev/null @@ -1,42 +0,0 @@ -part of 'metadata.dart'; - -enum SpotubeAlbumType { - album, - single, - compilation, -} - -@freezed -class SpotubeFullAlbumObject with _$SpotubeFullAlbumObject { - factory SpotubeFullAlbumObject({ - required String id, - required String name, - required List artists, - @Default([]) List images, - required String releaseDate, - required String externalUri, - required int totalTracks, - required SpotubeAlbumType albumType, - String? recordLabel, - List? genres, - }) = _SpotubeFullAlbumObject; - - factory SpotubeFullAlbumObject.fromJson(Map json) => - _$SpotubeFullAlbumObjectFromJson(json); -} - -@freezed -class SpotubeSimpleAlbumObject with _$SpotubeSimpleAlbumObject { - factory SpotubeSimpleAlbumObject({ - required String id, - required String name, - required String externalUri, - required List artists, - @Default([]) List images, - required SpotubeAlbumType albumType, - String? releaseDate, - }) = _SpotubeSimpleAlbumObject; - - factory SpotubeSimpleAlbumObject.fromJson(Map json) => - _$SpotubeSimpleAlbumObjectFromJson(json); -} diff --git a/lib/models/metadata/artist.dart b/lib/models/metadata/artist.dart deleted file mode 100644 index 24d8f55c..00000000 --- a/lib/models/metadata/artist.dart +++ /dev/null @@ -1,41 +0,0 @@ -part of 'metadata.dart'; - -@freezed -class SpotubeFullArtistObject with _$SpotubeFullArtistObject { - factory SpotubeFullArtistObject({ - required String id, - required String name, - required String externalUri, - @Default([]) List images, - List? genres, - int? followers, - }) = _SpotubeFullArtistObject; - - factory SpotubeFullArtistObject.fromJson(Map json) => - _$SpotubeFullArtistObjectFromJson(json); -} - -@freezed -class SpotubeSimpleArtistObject with _$SpotubeSimpleArtistObject { - factory SpotubeSimpleArtistObject({ - required String id, - required String name, - required String externalUri, - List? images, - }) = _SpotubeSimpleArtistObject; - - factory SpotubeSimpleArtistObject.fromJson(Map json) => - _$SpotubeSimpleArtistObjectFromJson(json); -} - -extension SpotubeFullArtistObjectAsString on List { - String asString() { - return map((e) => e.name).join(", "); - } -} - -extension SpotubeSimpleArtistObjectAsString on List { - String asString() { - return map((e) => e.name).join(", "); - } -} diff --git a/lib/models/metadata/audio_source.dart b/lib/models/metadata/audio_source.dart deleted file mode 100644 index 4fb790ea..00000000 --- a/lib/models/metadata/audio_source.dart +++ /dev/null @@ -1,110 +0,0 @@ -part of 'metadata.dart'; - -final oneOptionalDecimalFormatter = NumberFormat('0.#', 'en_US'); - -enum SpotubeMediaCompressionType { - lossy, - lossless, -} - -@Freezed(unionKey: 'type') -class SpotubeAudioSourceContainerPreset - with _$SpotubeAudioSourceContainerPreset { - const SpotubeAudioSourceContainerPreset._(); - - @FreezedUnionValue("lossy") - factory SpotubeAudioSourceContainerPreset.lossy({ - required SpotubeMediaCompressionType type, - required String name, - required List qualities, - }) = SpotubeAudioSourceContainerPresetLossy; - - @FreezedUnionValue("lossless") - factory SpotubeAudioSourceContainerPreset.lossless({ - required SpotubeMediaCompressionType type, - required String name, - required List qualities, - }) = SpotubeAudioSourceContainerPresetLossless; - - factory SpotubeAudioSourceContainerPreset.fromJson( - Map json) => - _$SpotubeAudioSourceContainerPresetFromJson(json); - - String getFileExtension() { - return switch (name) { - "mp4" => "m4a", - "webm" => "weba", - _ => name, - }; - } -} - -@freezed -class SpotubeAudioLossyContainerQuality - with _$SpotubeAudioLossyContainerQuality { - const SpotubeAudioLossyContainerQuality._(); - - factory SpotubeAudioLossyContainerQuality({ - required int bitrate, // bits per second - }) = _SpotubeAudioLossyContainerQuality; - - factory SpotubeAudioLossyContainerQuality.fromJson( - Map json) => - _$SpotubeAudioLossyContainerQualityFromJson(json); - - @override - toString() { - return "${oneOptionalDecimalFormatter.format(bitrate / 1000)}kbps"; - } -} - -@freezed -class SpotubeAudioLosslessContainerQuality - with _$SpotubeAudioLosslessContainerQuality { - const SpotubeAudioLosslessContainerQuality._(); - - factory SpotubeAudioLosslessContainerQuality({ - required int bitDepth, // bit - required int sampleRate, // hz - }) = _SpotubeAudioLosslessContainerQuality; - - factory SpotubeAudioLosslessContainerQuality.fromJson( - Map json) => - _$SpotubeAudioLosslessContainerQualityFromJson(json); - - @override - toString() { - return "${bitDepth}bit • ${oneOptionalDecimalFormatter.format(sampleRate / 1000)}kHz"; - } -} - -@freezed -class SpotubeAudioSourceMatchObject with _$SpotubeAudioSourceMatchObject { - factory SpotubeAudioSourceMatchObject({ - required String id, - required String title, - required List artists, - required Duration duration, - String? thumbnail, - required String externalUri, - }) = _SpotubeAudioSourceMatchObject; - - factory SpotubeAudioSourceMatchObject.fromJson(Map json) => - _$SpotubeAudioSourceMatchObjectFromJson(json); -} - -@freezed -class SpotubeAudioSourceStreamObject with _$SpotubeAudioSourceStreamObject { - factory SpotubeAudioSourceStreamObject({ - required String url, - required String container, - required SpotubeMediaCompressionType type, - String? codec, - double? bitrate, - int? bitDepth, - double? sampleRate, - }) = _SpotubeAudioSourceStreamObject; - - factory SpotubeAudioSourceStreamObject.fromJson(Map json) => - _$SpotubeAudioSourceStreamObjectFromJson(json); -} diff --git a/lib/models/metadata/browse.dart b/lib/models/metadata/browse.dart deleted file mode 100644 index e2a69181..00000000 --- a/lib/models/metadata/browse.dart +++ /dev/null @@ -1,21 +0,0 @@ -part of 'metadata.dart'; - -@Freezed(genericArgumentFactories: true) -class SpotubeBrowseSectionObject with _$SpotubeBrowseSectionObject { - factory SpotubeBrowseSectionObject({ - required String id, - required String title, - required String externalUri, - required bool browseMore, - required List items, - }) = _SpotubeBrowseSectionObject; - - factory SpotubeBrowseSectionObject.fromJson( - Map json, - T Function(Map json) fromJsonT, - ) => - _$SpotubeBrowseSectionObjectFromJson( - json, - (json) => fromJsonT(json as Map), - ); -} diff --git a/lib/models/metadata/fields.dart b/lib/models/metadata/fields.dart deleted file mode 100644 index 11d6656d..00000000 --- a/lib/models/metadata/fields.dart +++ /dev/null @@ -1,26 +0,0 @@ -part of 'metadata.dart'; - -enum FormFieldVariant { text, password, number } - -@Freezed(unionKey: 'objectType') -class MetadataFormFieldObject with _$MetadataFormFieldObject { - @FreezedUnionValue("input") - factory MetadataFormFieldObject.input({ - required String objectType, - required String id, - @Default(FormFieldVariant.text) FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex, - }) = MetadataFormFieldInputObject; - - @FreezedUnionValue("text") - factory MetadataFormFieldObject.text({ - required String objectType, - required String text, - }) = MetadataFormFieldTextObject; - - factory MetadataFormFieldObject.fromJson(Map json) => - _$MetadataFormFieldObjectFromJson(json); -} diff --git a/lib/models/metadata/image.dart b/lib/models/metadata/image.dart deleted file mode 100644 index 9a4ee026..00000000 --- a/lib/models/metadata/image.dart +++ /dev/null @@ -1,95 +0,0 @@ -part of 'metadata.dart'; - -@freezed -class SpotubeImageObject with _$SpotubeImageObject { - factory SpotubeImageObject({ - required String url, - int? width, - int? height, - }) = _SpotubeImageObject; - - factory SpotubeImageObject.fromJson(Map json) => - _$SpotubeImageObjectFromJson(json); -} - -enum ImagePlaceholder { - albumArt, - artist, - collection, - online, -} - -final placeholderUrlMap = { - ImagePlaceholder.albumArt: Assets.images.albumPlaceholder.path, - ImagePlaceholder.artist: Assets.images.userPlaceholder.path, - ImagePlaceholder.collection: Assets.images.placeholder.path, - ImagePlaceholder.online: - "https://avatars.dicebear.com/api/bottts/${PrimitiveUtils.uuid.v4()}.png", -}; - -extension SpotubeImageExtensions on List? { - /// Returns the URL of the image at the specified index. - String asUrlString({ - int index = 1, - required ImagePlaceholder placeholder, - }) { - final sortedImage = - this?.sorted((a, b) => (a.width ?? 0).compareTo(b.width ?? 0)); - - return sortedImage != null && sortedImage.isNotEmpty - ? sortedImage[ - index > sortedImage.length - 1 ? sortedImage.length - 1 : index] - .url - : placeholderUrlMap[placeholder]!; - } - - Uri asUri({ - int index = 1, - required ImagePlaceholder placeholder, - }) { - final url = asUrlString(placeholder: placeholder, index: index); - if (url.startsWith("http")) { - return Uri.parse(url); - } - return Uri.file(url); - } - - String smallest(ImagePlaceholder placeholder) { - final sortedImage = this?.sorted((a, b) { - final widthComparison = (a.width ?? 0).compareTo(b.width ?? 0); - if (widthComparison != 0) return widthComparison; - return (a.height ?? 0).compareTo(b.height ?? 0); - }); - - return sortedImage != null && sortedImage.isNotEmpty - ? sortedImage.first.url - : placeholderUrlMap[placeholder]!; - } - - String from200PxTo300PxOrSmallestImage([ - ImagePlaceholder placeholder = ImagePlaceholder.albumArt, - ]) { - final placeholderUrl = placeholderUrlMap[placeholder]!; - - // Sort images by width and height to find the smallest one - final sortedImage = this?.sorted((a, b) { - final widthComparison = (a.width ?? 0).compareTo(b.width ?? 0); - if (widthComparison != 0) return widthComparison; - return (a.height ?? 0).compareTo(b.height ?? 0); - }); - - return sortedImage != null && sortedImage.isNotEmpty - ? sortedImage.firstWhere( - (image) { - final width = image.width ?? 0; - final height = image.height ?? 0; - return width >= 200 && - height >= 200 && - width <= 300 && - height <= 300; - }, - orElse: () => sortedImage.first, - ).url - : placeholderUrl; - } -} diff --git a/lib/models/metadata/market.dart b/lib/models/metadata/market.dart deleted file mode 100644 index caaef957..00000000 --- a/lib/models/metadata/market.dart +++ /dev/null @@ -1,252 +0,0 @@ -enum Market { - AD, - AE, - AF, - AG, - AI, - AL, - AM, - AO, - AQ, - AR, - AS, - AT, - AU, - AW, - AX, - AZ, - BA, - BB, - BD, - BE, - BF, - BG, - BH, - BI, - BJ, - BL, - BM, - BN, - BO, - BQ, - BR, - BS, - BT, - BV, - BW, - BY, - BZ, - CA, - CC, - CD, - CF, - CG, - CH, - CI, - CK, - CL, - CM, - CN, - CO, - CR, - CU, - CV, - CW, - CX, - CY, - CZ, - DE, - DJ, - DK, - DM, - DO, - DZ, - EC, - EE, - EG, - EH, - ER, - ES, - ET, - FI, - FJ, - FK, - FM, - FO, - FR, - GA, - GB, - GD, - GE, - GF, - GG, - GH, - GI, - GL, - GM, - GN, - GP, - GQ, - GR, - GS, - GT, - GU, - GW, - GY, - HK, - HM, - HN, - HR, - HT, - HU, - ID, - IE, - IL, - IM, - IN, - IO, - IQ, - IR, - IS, - IT, - JE, - JM, - JO, - JP, - KE, - KG, - KH, - KI, - KM, - KN, - KP, - KR, - KW, - KY, - KZ, - LA, - LB, - LC, - LI, - LK, - LR, - LS, - LT, - LU, - LV, - LY, - MA, - MC, - MD, - ME, - MF, - MG, - MH, - MK, - ML, - MM, - MN, - MO, - MP, - MQ, - MR, - MS, - MT, - MU, - MV, - MW, - MX, - MY, - MZ, - NA, - NC, - NE, - NF, - NG, - NI, - NL, - NO, - NP, - NR, - NU, - NZ, - OM, - PA, - PE, - PF, - PG, - PH, - PK, - PL, - PM, - PN, - PR, - PS, - PT, - PW, - PY, - QA, - RE, - RO, - RS, - RU, - RW, - SA, - SB, - SC, - SD, - SE, - SG, - SH, - SI, - SJ, - SK, - SL, - SM, - SN, - SO, - SR, - SS, - ST, - SV, - SX, - SY, - SZ, - TC, - TD, - TF, - TG, - TH, - TJ, - TK, - TL, - TM, - TN, - TO, - TR, - TT, - TV, - TW, - TZ, - UA, - UG, - UM, - US, - UY, - UZ, - VA, - VC, - VE, - VG, - VI, - VN, - VU, - WF, - WS, - XK, - YE, - YT, - ZA, - ZM, - ZW, -} diff --git a/lib/models/metadata/metadata.dart b/lib/models/metadata/metadata.dart deleted file mode 100644 index e68bcd14..00000000 --- a/lib/models/metadata/metadata.dart +++ /dev/null @@ -1,32 +0,0 @@ -library metadata_objects; - -import 'dart:io'; -import 'dart:typed_data'; - -import 'package:collection/collection.dart'; -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:intl/intl.dart'; -import 'package:metadata_god/metadata_god.dart'; -import 'package:mime/mime.dart'; -import 'package:path/path.dart'; -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/utils/primitive_utils.dart'; - -part 'metadata.g.dart'; -part 'metadata.freezed.dart'; - -part 'audio_source.dart'; -part 'album.dart'; -part 'artist.dart'; -part 'browse.dart'; -part 'fields.dart'; -part 'image.dart'; -part 'pagination.dart'; -part 'playlist.dart'; -part 'search.dart'; -part 'track.dart'; -part 'user.dart'; - -part 'plugin.dart'; -part 'repository.dart'; diff --git a/lib/models/metadata/metadata.freezed.dart b/lib/models/metadata/metadata.freezed.dart deleted file mode 100644 index fee1cbc2..00000000 --- a/lib/models/metadata/metadata.freezed.dart +++ /dev/null @@ -1,6774 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'metadata.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -SpotubeAudioSourceContainerPreset _$SpotubeAudioSourceContainerPresetFromJson( - Map json) { - switch (json['type']) { - case 'lossy': - return SpotubeAudioSourceContainerPresetLossy.fromJson(json); - case 'lossless': - return SpotubeAudioSourceContainerPresetLossless.fromJson(json); - - default: - throw CheckedFromJsonException( - json, - 'type', - 'SpotubeAudioSourceContainerPreset', - 'Invalid union type "${json['type']}"!'); - } -} - -/// @nodoc -mixin _$SpotubeAudioSourceContainerPreset { - SpotubeMediaCompressionType get type => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - List get qualities => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(SpotubeMediaCompressionType type, String name, - List qualities) - lossy, - required TResult Function(SpotubeMediaCompressionType type, String name, - List qualities) - lossless, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossy, - TResult? Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossless, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossy, - TResult Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossless, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SpotubeAudioSourceContainerPresetLossy value) - lossy, - required TResult Function(SpotubeAudioSourceContainerPresetLossless value) - lossless, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SpotubeAudioSourceContainerPresetLossy value)? lossy, - TResult? Function(SpotubeAudioSourceContainerPresetLossless value)? - lossless, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SpotubeAudioSourceContainerPresetLossy value)? lossy, - TResult Function(SpotubeAudioSourceContainerPresetLossless value)? lossless, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - /// Serializes this SpotubeAudioSourceContainerPreset to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeAudioSourceContainerPresetCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeAudioSourceContainerPresetCopyWith<$Res> { - factory $SpotubeAudioSourceContainerPresetCopyWith( - SpotubeAudioSourceContainerPreset value, - $Res Function(SpotubeAudioSourceContainerPreset) then) = - _$SpotubeAudioSourceContainerPresetCopyWithImpl<$Res, - SpotubeAudioSourceContainerPreset>; - @useResult - $Res call({SpotubeMediaCompressionType type, String name}); -} - -/// @nodoc -class _$SpotubeAudioSourceContainerPresetCopyWithImpl<$Res, - $Val extends SpotubeAudioSourceContainerPreset> - implements $SpotubeAudioSourceContainerPresetCopyWith<$Res> { - _$SpotubeAudioSourceContainerPresetCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? type = null, - Object? name = null, - }) { - return _then(_value.copyWith( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SpotubeMediaCompressionType, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeAudioSourceContainerPresetLossyImplCopyWith<$Res> - implements $SpotubeAudioSourceContainerPresetCopyWith<$Res> { - factory _$$SpotubeAudioSourceContainerPresetLossyImplCopyWith( - _$SpotubeAudioSourceContainerPresetLossyImpl value, - $Res Function(_$SpotubeAudioSourceContainerPresetLossyImpl) then) = - __$$SpotubeAudioSourceContainerPresetLossyImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {SpotubeMediaCompressionType type, - String name, - List qualities}); -} - -/// @nodoc -class __$$SpotubeAudioSourceContainerPresetLossyImplCopyWithImpl<$Res> - extends _$SpotubeAudioSourceContainerPresetCopyWithImpl<$Res, - _$SpotubeAudioSourceContainerPresetLossyImpl> - implements _$$SpotubeAudioSourceContainerPresetLossyImplCopyWith<$Res> { - __$$SpotubeAudioSourceContainerPresetLossyImplCopyWithImpl( - _$SpotubeAudioSourceContainerPresetLossyImpl _value, - $Res Function(_$SpotubeAudioSourceContainerPresetLossyImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? type = null, - Object? name = null, - Object? qualities = null, - }) { - return _then(_$SpotubeAudioSourceContainerPresetLossyImpl( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SpotubeMediaCompressionType, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - qualities: null == qualities - ? _value._qualities - : qualities // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeAudioSourceContainerPresetLossyImpl - extends SpotubeAudioSourceContainerPresetLossy { - _$SpotubeAudioSourceContainerPresetLossyImpl( - {required this.type, - required this.name, - required final List qualities}) - : _qualities = qualities, - super._(); - - factory _$SpotubeAudioSourceContainerPresetLossyImpl.fromJson( - Map json) => - _$$SpotubeAudioSourceContainerPresetLossyImplFromJson(json); - - @override - final SpotubeMediaCompressionType type; - @override - final String name; - final List _qualities; - @override - List get qualities { - if (_qualities is EqualUnmodifiableListView) return _qualities; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_qualities); - } - - @override - String toString() { - return 'SpotubeAudioSourceContainerPreset.lossy(type: $type, name: $name, qualities: $qualities)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeAudioSourceContainerPresetLossyImpl && - (identical(other.type, type) || other.type == type) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality() - .equals(other._qualities, _qualities)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, type, name, const DeepCollectionEquality().hash(_qualities)); - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeAudioSourceContainerPresetLossyImplCopyWith< - _$SpotubeAudioSourceContainerPresetLossyImpl> - get copyWith => - __$$SpotubeAudioSourceContainerPresetLossyImplCopyWithImpl< - _$SpotubeAudioSourceContainerPresetLossyImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(SpotubeMediaCompressionType type, String name, - List qualities) - lossy, - required TResult Function(SpotubeMediaCompressionType type, String name, - List qualities) - lossless, - }) { - return lossy(type, name, qualities); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossy, - TResult? Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossless, - }) { - return lossy?.call(type, name, qualities); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossy, - TResult Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossless, - required TResult orElse(), - }) { - if (lossy != null) { - return lossy(type, name, qualities); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SpotubeAudioSourceContainerPresetLossy value) - lossy, - required TResult Function(SpotubeAudioSourceContainerPresetLossless value) - lossless, - }) { - return lossy(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SpotubeAudioSourceContainerPresetLossy value)? lossy, - TResult? Function(SpotubeAudioSourceContainerPresetLossless value)? - lossless, - }) { - return lossy?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SpotubeAudioSourceContainerPresetLossy value)? lossy, - TResult Function(SpotubeAudioSourceContainerPresetLossless value)? lossless, - required TResult orElse(), - }) { - if (lossy != null) { - return lossy(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$SpotubeAudioSourceContainerPresetLossyImplToJson( - this, - ); - } -} - -abstract class SpotubeAudioSourceContainerPresetLossy - extends SpotubeAudioSourceContainerPreset { - factory SpotubeAudioSourceContainerPresetLossy( - {required final SpotubeMediaCompressionType type, - required final String name, - required final List qualities}) = - _$SpotubeAudioSourceContainerPresetLossyImpl; - SpotubeAudioSourceContainerPresetLossy._() : super._(); - - factory SpotubeAudioSourceContainerPresetLossy.fromJson( - Map json) = - _$SpotubeAudioSourceContainerPresetLossyImpl.fromJson; - - @override - SpotubeMediaCompressionType get type; - @override - String get name; - @override - List get qualities; - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeAudioSourceContainerPresetLossyImplCopyWith< - _$SpotubeAudioSourceContainerPresetLossyImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SpotubeAudioSourceContainerPresetLosslessImplCopyWith<$Res> - implements $SpotubeAudioSourceContainerPresetCopyWith<$Res> { - factory _$$SpotubeAudioSourceContainerPresetLosslessImplCopyWith( - _$SpotubeAudioSourceContainerPresetLosslessImpl value, - $Res Function(_$SpotubeAudioSourceContainerPresetLosslessImpl) then) = - __$$SpotubeAudioSourceContainerPresetLosslessImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {SpotubeMediaCompressionType type, - String name, - List qualities}); -} - -/// @nodoc -class __$$SpotubeAudioSourceContainerPresetLosslessImplCopyWithImpl<$Res> - extends _$SpotubeAudioSourceContainerPresetCopyWithImpl<$Res, - _$SpotubeAudioSourceContainerPresetLosslessImpl> - implements _$$SpotubeAudioSourceContainerPresetLosslessImplCopyWith<$Res> { - __$$SpotubeAudioSourceContainerPresetLosslessImplCopyWithImpl( - _$SpotubeAudioSourceContainerPresetLosslessImpl _value, - $Res Function(_$SpotubeAudioSourceContainerPresetLosslessImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? type = null, - Object? name = null, - Object? qualities = null, - }) { - return _then(_$SpotubeAudioSourceContainerPresetLosslessImpl( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SpotubeMediaCompressionType, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - qualities: null == qualities - ? _value._qualities - : qualities // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeAudioSourceContainerPresetLosslessImpl - extends SpotubeAudioSourceContainerPresetLossless { - _$SpotubeAudioSourceContainerPresetLosslessImpl( - {required this.type, - required this.name, - required final List qualities}) - : _qualities = qualities, - super._(); - - factory _$SpotubeAudioSourceContainerPresetLosslessImpl.fromJson( - Map json) => - _$$SpotubeAudioSourceContainerPresetLosslessImplFromJson(json); - - @override - final SpotubeMediaCompressionType type; - @override - final String name; - final List _qualities; - @override - List get qualities { - if (_qualities is EqualUnmodifiableListView) return _qualities; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_qualities); - } - - @override - String toString() { - return 'SpotubeAudioSourceContainerPreset.lossless(type: $type, name: $name, qualities: $qualities)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeAudioSourceContainerPresetLosslessImpl && - (identical(other.type, type) || other.type == type) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality() - .equals(other._qualities, _qualities)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, type, name, const DeepCollectionEquality().hash(_qualities)); - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeAudioSourceContainerPresetLosslessImplCopyWith< - _$SpotubeAudioSourceContainerPresetLosslessImpl> - get copyWith => - __$$SpotubeAudioSourceContainerPresetLosslessImplCopyWithImpl< - _$SpotubeAudioSourceContainerPresetLosslessImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(SpotubeMediaCompressionType type, String name, - List qualities) - lossy, - required TResult Function(SpotubeMediaCompressionType type, String name, - List qualities) - lossless, - }) { - return lossless(type, name, qualities); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossy, - TResult? Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossless, - }) { - return lossless?.call(type, name, qualities); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossy, - TResult Function(SpotubeMediaCompressionType type, String name, - List qualities)? - lossless, - required TResult orElse(), - }) { - if (lossless != null) { - return lossless(type, name, qualities); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SpotubeAudioSourceContainerPresetLossy value) - lossy, - required TResult Function(SpotubeAudioSourceContainerPresetLossless value) - lossless, - }) { - return lossless(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SpotubeAudioSourceContainerPresetLossy value)? lossy, - TResult? Function(SpotubeAudioSourceContainerPresetLossless value)? - lossless, - }) { - return lossless?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SpotubeAudioSourceContainerPresetLossy value)? lossy, - TResult Function(SpotubeAudioSourceContainerPresetLossless value)? lossless, - required TResult orElse(), - }) { - if (lossless != null) { - return lossless(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$SpotubeAudioSourceContainerPresetLosslessImplToJson( - this, - ); - } -} - -abstract class SpotubeAudioSourceContainerPresetLossless - extends SpotubeAudioSourceContainerPreset { - factory SpotubeAudioSourceContainerPresetLossless( - {required final SpotubeMediaCompressionType type, - required final String name, - required final List - qualities}) = _$SpotubeAudioSourceContainerPresetLosslessImpl; - SpotubeAudioSourceContainerPresetLossless._() : super._(); - - factory SpotubeAudioSourceContainerPresetLossless.fromJson( - Map json) = - _$SpotubeAudioSourceContainerPresetLosslessImpl.fromJson; - - @override - SpotubeMediaCompressionType get type; - @override - String get name; - @override - List get qualities; - - /// Create a copy of SpotubeAudioSourceContainerPreset - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeAudioSourceContainerPresetLosslessImplCopyWith< - _$SpotubeAudioSourceContainerPresetLosslessImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeAudioLossyContainerQuality _$SpotubeAudioLossyContainerQualityFromJson( - Map json) { - return _SpotubeAudioLossyContainerQuality.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeAudioLossyContainerQuality { - int get bitrate => throw _privateConstructorUsedError; - - /// Serializes this SpotubeAudioLossyContainerQuality to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeAudioLossyContainerQuality - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeAudioLossyContainerQualityCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeAudioLossyContainerQualityCopyWith<$Res> { - factory $SpotubeAudioLossyContainerQualityCopyWith( - SpotubeAudioLossyContainerQuality value, - $Res Function(SpotubeAudioLossyContainerQuality) then) = - _$SpotubeAudioLossyContainerQualityCopyWithImpl<$Res, - SpotubeAudioLossyContainerQuality>; - @useResult - $Res call({int bitrate}); -} - -/// @nodoc -class _$SpotubeAudioLossyContainerQualityCopyWithImpl<$Res, - $Val extends SpotubeAudioLossyContainerQuality> - implements $SpotubeAudioLossyContainerQualityCopyWith<$Res> { - _$SpotubeAudioLossyContainerQualityCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeAudioLossyContainerQuality - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? bitrate = null, - }) { - return _then(_value.copyWith( - bitrate: null == bitrate - ? _value.bitrate - : bitrate // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeAudioLossyContainerQualityImplCopyWith<$Res> - implements $SpotubeAudioLossyContainerQualityCopyWith<$Res> { - factory _$$SpotubeAudioLossyContainerQualityImplCopyWith( - _$SpotubeAudioLossyContainerQualityImpl value, - $Res Function(_$SpotubeAudioLossyContainerQualityImpl) then) = - __$$SpotubeAudioLossyContainerQualityImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int bitrate}); -} - -/// @nodoc -class __$$SpotubeAudioLossyContainerQualityImplCopyWithImpl<$Res> - extends _$SpotubeAudioLossyContainerQualityCopyWithImpl<$Res, - _$SpotubeAudioLossyContainerQualityImpl> - implements _$$SpotubeAudioLossyContainerQualityImplCopyWith<$Res> { - __$$SpotubeAudioLossyContainerQualityImplCopyWithImpl( - _$SpotubeAudioLossyContainerQualityImpl _value, - $Res Function(_$SpotubeAudioLossyContainerQualityImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeAudioLossyContainerQuality - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? bitrate = null, - }) { - return _then(_$SpotubeAudioLossyContainerQualityImpl( - bitrate: null == bitrate - ? _value.bitrate - : bitrate // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeAudioLossyContainerQualityImpl - extends _SpotubeAudioLossyContainerQuality { - _$SpotubeAudioLossyContainerQualityImpl({required this.bitrate}) : super._(); - - factory _$SpotubeAudioLossyContainerQualityImpl.fromJson( - Map json) => - _$$SpotubeAudioLossyContainerQualityImplFromJson(json); - - @override - final int bitrate; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeAudioLossyContainerQualityImpl && - (identical(other.bitrate, bitrate) || other.bitrate == bitrate)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, bitrate); - - /// Create a copy of SpotubeAudioLossyContainerQuality - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeAudioLossyContainerQualityImplCopyWith< - _$SpotubeAudioLossyContainerQualityImpl> - get copyWith => __$$SpotubeAudioLossyContainerQualityImplCopyWithImpl< - _$SpotubeAudioLossyContainerQualityImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeAudioLossyContainerQualityImplToJson( - this, - ); - } -} - -abstract class _SpotubeAudioLossyContainerQuality - extends SpotubeAudioLossyContainerQuality { - factory _SpotubeAudioLossyContainerQuality({required final int bitrate}) = - _$SpotubeAudioLossyContainerQualityImpl; - _SpotubeAudioLossyContainerQuality._() : super._(); - - factory _SpotubeAudioLossyContainerQuality.fromJson( - Map json) = - _$SpotubeAudioLossyContainerQualityImpl.fromJson; - - @override - int get bitrate; - - /// Create a copy of SpotubeAudioLossyContainerQuality - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeAudioLossyContainerQualityImplCopyWith< - _$SpotubeAudioLossyContainerQualityImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeAudioLosslessContainerQuality - _$SpotubeAudioLosslessContainerQualityFromJson(Map json) { - return _SpotubeAudioLosslessContainerQuality.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeAudioLosslessContainerQuality { - int get bitDepth => throw _privateConstructorUsedError; // bit - int get sampleRate => throw _privateConstructorUsedError; - - /// Serializes this SpotubeAudioLosslessContainerQuality to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeAudioLosslessContainerQuality - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeAudioLosslessContainerQualityCopyWith< - SpotubeAudioLosslessContainerQuality> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeAudioLosslessContainerQualityCopyWith<$Res> { - factory $SpotubeAudioLosslessContainerQualityCopyWith( - SpotubeAudioLosslessContainerQuality value, - $Res Function(SpotubeAudioLosslessContainerQuality) then) = - _$SpotubeAudioLosslessContainerQualityCopyWithImpl<$Res, - SpotubeAudioLosslessContainerQuality>; - @useResult - $Res call({int bitDepth, int sampleRate}); -} - -/// @nodoc -class _$SpotubeAudioLosslessContainerQualityCopyWithImpl<$Res, - $Val extends SpotubeAudioLosslessContainerQuality> - implements $SpotubeAudioLosslessContainerQualityCopyWith<$Res> { - _$SpotubeAudioLosslessContainerQualityCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeAudioLosslessContainerQuality - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? bitDepth = null, - Object? sampleRate = null, - }) { - return _then(_value.copyWith( - bitDepth: null == bitDepth - ? _value.bitDepth - : bitDepth // ignore: cast_nullable_to_non_nullable - as int, - sampleRate: null == sampleRate - ? _value.sampleRate - : sampleRate // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeAudioLosslessContainerQualityImplCopyWith<$Res> - implements $SpotubeAudioLosslessContainerQualityCopyWith<$Res> { - factory _$$SpotubeAudioLosslessContainerQualityImplCopyWith( - _$SpotubeAudioLosslessContainerQualityImpl value, - $Res Function(_$SpotubeAudioLosslessContainerQualityImpl) then) = - __$$SpotubeAudioLosslessContainerQualityImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int bitDepth, int sampleRate}); -} - -/// @nodoc -class __$$SpotubeAudioLosslessContainerQualityImplCopyWithImpl<$Res> - extends _$SpotubeAudioLosslessContainerQualityCopyWithImpl<$Res, - _$SpotubeAudioLosslessContainerQualityImpl> - implements _$$SpotubeAudioLosslessContainerQualityImplCopyWith<$Res> { - __$$SpotubeAudioLosslessContainerQualityImplCopyWithImpl( - _$SpotubeAudioLosslessContainerQualityImpl _value, - $Res Function(_$SpotubeAudioLosslessContainerQualityImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeAudioLosslessContainerQuality - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? bitDepth = null, - Object? sampleRate = null, - }) { - return _then(_$SpotubeAudioLosslessContainerQualityImpl( - bitDepth: null == bitDepth - ? _value.bitDepth - : bitDepth // ignore: cast_nullable_to_non_nullable - as int, - sampleRate: null == sampleRate - ? _value.sampleRate - : sampleRate // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeAudioLosslessContainerQualityImpl - extends _SpotubeAudioLosslessContainerQuality { - _$SpotubeAudioLosslessContainerQualityImpl( - {required this.bitDepth, required this.sampleRate}) - : super._(); - - factory _$SpotubeAudioLosslessContainerQualityImpl.fromJson( - Map json) => - _$$SpotubeAudioLosslessContainerQualityImplFromJson(json); - - @override - final int bitDepth; -// bit - @override - final int sampleRate; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeAudioLosslessContainerQualityImpl && - (identical(other.bitDepth, bitDepth) || - other.bitDepth == bitDepth) && - (identical(other.sampleRate, sampleRate) || - other.sampleRate == sampleRate)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, bitDepth, sampleRate); - - /// Create a copy of SpotubeAudioLosslessContainerQuality - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeAudioLosslessContainerQualityImplCopyWith< - _$SpotubeAudioLosslessContainerQualityImpl> - get copyWith => __$$SpotubeAudioLosslessContainerQualityImplCopyWithImpl< - _$SpotubeAudioLosslessContainerQualityImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeAudioLosslessContainerQualityImplToJson( - this, - ); - } -} - -abstract class _SpotubeAudioLosslessContainerQuality - extends SpotubeAudioLosslessContainerQuality { - factory _SpotubeAudioLosslessContainerQuality( - {required final int bitDepth, required final int sampleRate}) = - _$SpotubeAudioLosslessContainerQualityImpl; - _SpotubeAudioLosslessContainerQuality._() : super._(); - - factory _SpotubeAudioLosslessContainerQuality.fromJson( - Map json) = - _$SpotubeAudioLosslessContainerQualityImpl.fromJson; - - @override - int get bitDepth; // bit - @override - int get sampleRate; - - /// Create a copy of SpotubeAudioLosslessContainerQuality - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeAudioLosslessContainerQualityImplCopyWith< - _$SpotubeAudioLosslessContainerQualityImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeAudioSourceMatchObject _$SpotubeAudioSourceMatchObjectFromJson( - Map json) { - return _SpotubeAudioSourceMatchObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeAudioSourceMatchObject { - String get id => throw _privateConstructorUsedError; - String get title => throw _privateConstructorUsedError; - List get artists => throw _privateConstructorUsedError; - Duration get duration => throw _privateConstructorUsedError; - String? get thumbnail => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - - /// Serializes this SpotubeAudioSourceMatchObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeAudioSourceMatchObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeAudioSourceMatchObjectCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeAudioSourceMatchObjectCopyWith<$Res> { - factory $SpotubeAudioSourceMatchObjectCopyWith( - SpotubeAudioSourceMatchObject value, - $Res Function(SpotubeAudioSourceMatchObject) then) = - _$SpotubeAudioSourceMatchObjectCopyWithImpl<$Res, - SpotubeAudioSourceMatchObject>; - @useResult - $Res call( - {String id, - String title, - List artists, - Duration duration, - String? thumbnail, - String externalUri}); -} - -/// @nodoc -class _$SpotubeAudioSourceMatchObjectCopyWithImpl<$Res, - $Val extends SpotubeAudioSourceMatchObject> - implements $SpotubeAudioSourceMatchObjectCopyWith<$Res> { - _$SpotubeAudioSourceMatchObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeAudioSourceMatchObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? title = null, - Object? artists = null, - Object? duration = null, - Object? thumbnail = freezed, - Object? externalUri = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value.artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as Duration, - thumbnail: freezed == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as String?, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeAudioSourceMatchObjectImplCopyWith<$Res> - implements $SpotubeAudioSourceMatchObjectCopyWith<$Res> { - factory _$$SpotubeAudioSourceMatchObjectImplCopyWith( - _$SpotubeAudioSourceMatchObjectImpl value, - $Res Function(_$SpotubeAudioSourceMatchObjectImpl) then) = - __$$SpotubeAudioSourceMatchObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String title, - List artists, - Duration duration, - String? thumbnail, - String externalUri}); -} - -/// @nodoc -class __$$SpotubeAudioSourceMatchObjectImplCopyWithImpl<$Res> - extends _$SpotubeAudioSourceMatchObjectCopyWithImpl<$Res, - _$SpotubeAudioSourceMatchObjectImpl> - implements _$$SpotubeAudioSourceMatchObjectImplCopyWith<$Res> { - __$$SpotubeAudioSourceMatchObjectImplCopyWithImpl( - _$SpotubeAudioSourceMatchObjectImpl _value, - $Res Function(_$SpotubeAudioSourceMatchObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeAudioSourceMatchObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? title = null, - Object? artists = null, - Object? duration = null, - Object? thumbnail = freezed, - Object? externalUri = null, - }) { - return _then(_$SpotubeAudioSourceMatchObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value._artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as Duration, - thumbnail: freezed == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as String?, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeAudioSourceMatchObjectImpl - implements _SpotubeAudioSourceMatchObject { - _$SpotubeAudioSourceMatchObjectImpl( - {required this.id, - required this.title, - required final List artists, - required this.duration, - this.thumbnail, - required this.externalUri}) - : _artists = artists; - - factory _$SpotubeAudioSourceMatchObjectImpl.fromJson( - Map json) => - _$$SpotubeAudioSourceMatchObjectImplFromJson(json); - - @override - final String id; - @override - final String title; - final List _artists; - @override - List get artists { - if (_artists is EqualUnmodifiableListView) return _artists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_artists); - } - - @override - final Duration duration; - @override - final String? thumbnail; - @override - final String externalUri; - - @override - String toString() { - return 'SpotubeAudioSourceMatchObject(id: $id, title: $title, artists: $artists, duration: $duration, thumbnail: $thumbnail, externalUri: $externalUri)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeAudioSourceMatchObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.title, title) || other.title == title) && - const DeepCollectionEquality().equals(other._artists, _artists) && - (identical(other.duration, duration) || - other.duration == duration) && - (identical(other.thumbnail, thumbnail) || - other.thumbnail == thumbnail) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - title, - const DeepCollectionEquality().hash(_artists), - duration, - thumbnail, - externalUri); - - /// Create a copy of SpotubeAudioSourceMatchObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeAudioSourceMatchObjectImplCopyWith< - _$SpotubeAudioSourceMatchObjectImpl> - get copyWith => __$$SpotubeAudioSourceMatchObjectImplCopyWithImpl< - _$SpotubeAudioSourceMatchObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeAudioSourceMatchObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeAudioSourceMatchObject - implements SpotubeAudioSourceMatchObject { - factory _SpotubeAudioSourceMatchObject( - {required final String id, - required final String title, - required final List artists, - required final Duration duration, - final String? thumbnail, - required final String externalUri}) = _$SpotubeAudioSourceMatchObjectImpl; - - factory _SpotubeAudioSourceMatchObject.fromJson(Map json) = - _$SpotubeAudioSourceMatchObjectImpl.fromJson; - - @override - String get id; - @override - String get title; - @override - List get artists; - @override - Duration get duration; - @override - String? get thumbnail; - @override - String get externalUri; - - /// Create a copy of SpotubeAudioSourceMatchObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeAudioSourceMatchObjectImplCopyWith< - _$SpotubeAudioSourceMatchObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeAudioSourceStreamObject _$SpotubeAudioSourceStreamObjectFromJson( - Map json) { - return _SpotubeAudioSourceStreamObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeAudioSourceStreamObject { - String get url => throw _privateConstructorUsedError; - String get container => throw _privateConstructorUsedError; - SpotubeMediaCompressionType get type => throw _privateConstructorUsedError; - String? get codec => throw _privateConstructorUsedError; - double? get bitrate => throw _privateConstructorUsedError; - int? get bitDepth => throw _privateConstructorUsedError; - double? get sampleRate => throw _privateConstructorUsedError; - - /// Serializes this SpotubeAudioSourceStreamObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeAudioSourceStreamObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeAudioSourceStreamObjectCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeAudioSourceStreamObjectCopyWith<$Res> { - factory $SpotubeAudioSourceStreamObjectCopyWith( - SpotubeAudioSourceStreamObject value, - $Res Function(SpotubeAudioSourceStreamObject) then) = - _$SpotubeAudioSourceStreamObjectCopyWithImpl<$Res, - SpotubeAudioSourceStreamObject>; - @useResult - $Res call( - {String url, - String container, - SpotubeMediaCompressionType type, - String? codec, - double? bitrate, - int? bitDepth, - double? sampleRate}); -} - -/// @nodoc -class _$SpotubeAudioSourceStreamObjectCopyWithImpl<$Res, - $Val extends SpotubeAudioSourceStreamObject> - implements $SpotubeAudioSourceStreamObjectCopyWith<$Res> { - _$SpotubeAudioSourceStreamObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeAudioSourceStreamObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? container = null, - Object? type = null, - Object? codec = freezed, - Object? bitrate = freezed, - Object? bitDepth = freezed, - Object? sampleRate = freezed, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - container: null == container - ? _value.container - : container // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SpotubeMediaCompressionType, - codec: freezed == codec - ? _value.codec - : codec // ignore: cast_nullable_to_non_nullable - as String?, - bitrate: freezed == bitrate - ? _value.bitrate - : bitrate // ignore: cast_nullable_to_non_nullable - as double?, - bitDepth: freezed == bitDepth - ? _value.bitDepth - : bitDepth // ignore: cast_nullable_to_non_nullable - as int?, - sampleRate: freezed == sampleRate - ? _value.sampleRate - : sampleRate // ignore: cast_nullable_to_non_nullable - as double?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeAudioSourceStreamObjectImplCopyWith<$Res> - implements $SpotubeAudioSourceStreamObjectCopyWith<$Res> { - factory _$$SpotubeAudioSourceStreamObjectImplCopyWith( - _$SpotubeAudioSourceStreamObjectImpl value, - $Res Function(_$SpotubeAudioSourceStreamObjectImpl) then) = - __$$SpotubeAudioSourceStreamObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String url, - String container, - SpotubeMediaCompressionType type, - String? codec, - double? bitrate, - int? bitDepth, - double? sampleRate}); -} - -/// @nodoc -class __$$SpotubeAudioSourceStreamObjectImplCopyWithImpl<$Res> - extends _$SpotubeAudioSourceStreamObjectCopyWithImpl<$Res, - _$SpotubeAudioSourceStreamObjectImpl> - implements _$$SpotubeAudioSourceStreamObjectImplCopyWith<$Res> { - __$$SpotubeAudioSourceStreamObjectImplCopyWithImpl( - _$SpotubeAudioSourceStreamObjectImpl _value, - $Res Function(_$SpotubeAudioSourceStreamObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeAudioSourceStreamObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? container = null, - Object? type = null, - Object? codec = freezed, - Object? bitrate = freezed, - Object? bitDepth = freezed, - Object? sampleRate = freezed, - }) { - return _then(_$SpotubeAudioSourceStreamObjectImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - container: null == container - ? _value.container - : container // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SpotubeMediaCompressionType, - codec: freezed == codec - ? _value.codec - : codec // ignore: cast_nullable_to_non_nullable - as String?, - bitrate: freezed == bitrate - ? _value.bitrate - : bitrate // ignore: cast_nullable_to_non_nullable - as double?, - bitDepth: freezed == bitDepth - ? _value.bitDepth - : bitDepth // ignore: cast_nullable_to_non_nullable - as int?, - sampleRate: freezed == sampleRate - ? _value.sampleRate - : sampleRate // ignore: cast_nullable_to_non_nullable - as double?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeAudioSourceStreamObjectImpl - implements _SpotubeAudioSourceStreamObject { - _$SpotubeAudioSourceStreamObjectImpl( - {required this.url, - required this.container, - required this.type, - this.codec, - this.bitrate, - this.bitDepth, - this.sampleRate}); - - factory _$SpotubeAudioSourceStreamObjectImpl.fromJson( - Map json) => - _$$SpotubeAudioSourceStreamObjectImplFromJson(json); - - @override - final String url; - @override - final String container; - @override - final SpotubeMediaCompressionType type; - @override - final String? codec; - @override - final double? bitrate; - @override - final int? bitDepth; - @override - final double? sampleRate; - - @override - String toString() { - return 'SpotubeAudioSourceStreamObject(url: $url, container: $container, type: $type, codec: $codec, bitrate: $bitrate, bitDepth: $bitDepth, sampleRate: $sampleRate)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeAudioSourceStreamObjectImpl && - (identical(other.url, url) || other.url == url) && - (identical(other.container, container) || - other.container == container) && - (identical(other.type, type) || other.type == type) && - (identical(other.codec, codec) || other.codec == codec) && - (identical(other.bitrate, bitrate) || other.bitrate == bitrate) && - (identical(other.bitDepth, bitDepth) || - other.bitDepth == bitDepth) && - (identical(other.sampleRate, sampleRate) || - other.sampleRate == sampleRate)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, url, container, type, codec, bitrate, bitDepth, sampleRate); - - /// Create a copy of SpotubeAudioSourceStreamObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeAudioSourceStreamObjectImplCopyWith< - _$SpotubeAudioSourceStreamObjectImpl> - get copyWith => __$$SpotubeAudioSourceStreamObjectImplCopyWithImpl< - _$SpotubeAudioSourceStreamObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeAudioSourceStreamObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeAudioSourceStreamObject - implements SpotubeAudioSourceStreamObject { - factory _SpotubeAudioSourceStreamObject( - {required final String url, - required final String container, - required final SpotubeMediaCompressionType type, - final String? codec, - final double? bitrate, - final int? bitDepth, - final double? sampleRate}) = _$SpotubeAudioSourceStreamObjectImpl; - - factory _SpotubeAudioSourceStreamObject.fromJson(Map json) = - _$SpotubeAudioSourceStreamObjectImpl.fromJson; - - @override - String get url; - @override - String get container; - @override - SpotubeMediaCompressionType get type; - @override - String? get codec; - @override - double? get bitrate; - @override - int? get bitDepth; - @override - double? get sampleRate; - - /// Create a copy of SpotubeAudioSourceStreamObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeAudioSourceStreamObjectImplCopyWith< - _$SpotubeAudioSourceStreamObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeFullAlbumObject _$SpotubeFullAlbumObjectFromJson( - Map json) { - return _SpotubeFullAlbumObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeFullAlbumObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - List get artists => - throw _privateConstructorUsedError; - List get images => throw _privateConstructorUsedError; - String get releaseDate => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - int get totalTracks => throw _privateConstructorUsedError; - SpotubeAlbumType get albumType => throw _privateConstructorUsedError; - String? get recordLabel => throw _privateConstructorUsedError; - List? get genres => throw _privateConstructorUsedError; - - /// Serializes this SpotubeFullAlbumObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeFullAlbumObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeFullAlbumObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeFullAlbumObjectCopyWith<$Res> { - factory $SpotubeFullAlbumObjectCopyWith(SpotubeFullAlbumObject value, - $Res Function(SpotubeFullAlbumObject) then) = - _$SpotubeFullAlbumObjectCopyWithImpl<$Res, SpotubeFullAlbumObject>; - @useResult - $Res call( - {String id, - String name, - List artists, - List images, - String releaseDate, - String externalUri, - int totalTracks, - SpotubeAlbumType albumType, - String? recordLabel, - List? genres}); -} - -/// @nodoc -class _$SpotubeFullAlbumObjectCopyWithImpl<$Res, - $Val extends SpotubeFullAlbumObject> - implements $SpotubeFullAlbumObjectCopyWith<$Res> { - _$SpotubeFullAlbumObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeFullAlbumObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? artists = null, - Object? images = null, - Object? releaseDate = null, - Object? externalUri = null, - Object? totalTracks = null, - Object? albumType = null, - Object? recordLabel = freezed, - Object? genres = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value.artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - releaseDate: null == releaseDate - ? _value.releaseDate - : releaseDate // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - totalTracks: null == totalTracks - ? _value.totalTracks - : totalTracks // ignore: cast_nullable_to_non_nullable - as int, - albumType: null == albumType - ? _value.albumType - : albumType // ignore: cast_nullable_to_non_nullable - as SpotubeAlbumType, - recordLabel: freezed == recordLabel - ? _value.recordLabel - : recordLabel // ignore: cast_nullable_to_non_nullable - as String?, - genres: freezed == genres - ? _value.genres - : genres // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeFullAlbumObjectImplCopyWith<$Res> - implements $SpotubeFullAlbumObjectCopyWith<$Res> { - factory _$$SpotubeFullAlbumObjectImplCopyWith( - _$SpotubeFullAlbumObjectImpl value, - $Res Function(_$SpotubeFullAlbumObjectImpl) then) = - __$$SpotubeFullAlbumObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - List artists, - List images, - String releaseDate, - String externalUri, - int totalTracks, - SpotubeAlbumType albumType, - String? recordLabel, - List? genres}); -} - -/// @nodoc -class __$$SpotubeFullAlbumObjectImplCopyWithImpl<$Res> - extends _$SpotubeFullAlbumObjectCopyWithImpl<$Res, - _$SpotubeFullAlbumObjectImpl> - implements _$$SpotubeFullAlbumObjectImplCopyWith<$Res> { - __$$SpotubeFullAlbumObjectImplCopyWithImpl( - _$SpotubeFullAlbumObjectImpl _value, - $Res Function(_$SpotubeFullAlbumObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeFullAlbumObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? artists = null, - Object? images = null, - Object? releaseDate = null, - Object? externalUri = null, - Object? totalTracks = null, - Object? albumType = null, - Object? recordLabel = freezed, - Object? genres = freezed, - }) { - return _then(_$SpotubeFullAlbumObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value._artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - releaseDate: null == releaseDate - ? _value.releaseDate - : releaseDate // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - totalTracks: null == totalTracks - ? _value.totalTracks - : totalTracks // ignore: cast_nullable_to_non_nullable - as int, - albumType: null == albumType - ? _value.albumType - : albumType // ignore: cast_nullable_to_non_nullable - as SpotubeAlbumType, - recordLabel: freezed == recordLabel - ? _value.recordLabel - : recordLabel // ignore: cast_nullable_to_non_nullable - as String?, - genres: freezed == genres - ? _value._genres - : genres // ignore: cast_nullable_to_non_nullable - as List?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeFullAlbumObjectImpl implements _SpotubeFullAlbumObject { - _$SpotubeFullAlbumObjectImpl( - {required this.id, - required this.name, - required final List artists, - final List images = const [], - required this.releaseDate, - required this.externalUri, - required this.totalTracks, - required this.albumType, - this.recordLabel, - final List? genres}) - : _artists = artists, - _images = images, - _genres = genres; - - factory _$SpotubeFullAlbumObjectImpl.fromJson(Map json) => - _$$SpotubeFullAlbumObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - final List _artists; - @override - List get artists { - if (_artists is EqualUnmodifiableListView) return _artists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_artists); - } - - final List _images; - @override - @JsonKey() - List get images { - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_images); - } - - @override - final String releaseDate; - @override - final String externalUri; - @override - final int totalTracks; - @override - final SpotubeAlbumType albumType; - @override - final String? recordLabel; - final List? _genres; - @override - List? get genres { - final value = _genres; - if (value == null) return null; - if (_genres is EqualUnmodifiableListView) return _genres; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - String toString() { - return 'SpotubeFullAlbumObject(id: $id, name: $name, artists: $artists, images: $images, releaseDate: $releaseDate, externalUri: $externalUri, totalTracks: $totalTracks, albumType: $albumType, recordLabel: $recordLabel, genres: $genres)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeFullAlbumObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality().equals(other._artists, _artists) && - const DeepCollectionEquality().equals(other._images, _images) && - (identical(other.releaseDate, releaseDate) || - other.releaseDate == releaseDate) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - (identical(other.totalTracks, totalTracks) || - other.totalTracks == totalTracks) && - (identical(other.albumType, albumType) || - other.albumType == albumType) && - (identical(other.recordLabel, recordLabel) || - other.recordLabel == recordLabel) && - const DeepCollectionEquality().equals(other._genres, _genres)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - const DeepCollectionEquality().hash(_artists), - const DeepCollectionEquality().hash(_images), - releaseDate, - externalUri, - totalTracks, - albumType, - recordLabel, - const DeepCollectionEquality().hash(_genres)); - - /// Create a copy of SpotubeFullAlbumObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeFullAlbumObjectImplCopyWith<_$SpotubeFullAlbumObjectImpl> - get copyWith => __$$SpotubeFullAlbumObjectImplCopyWithImpl< - _$SpotubeFullAlbumObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeFullAlbumObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeFullAlbumObject implements SpotubeFullAlbumObject { - factory _SpotubeFullAlbumObject( - {required final String id, - required final String name, - required final List artists, - final List images, - required final String releaseDate, - required final String externalUri, - required final int totalTracks, - required final SpotubeAlbumType albumType, - final String? recordLabel, - final List? genres}) = _$SpotubeFullAlbumObjectImpl; - - factory _SpotubeFullAlbumObject.fromJson(Map json) = - _$SpotubeFullAlbumObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - List get artists; - @override - List get images; - @override - String get releaseDate; - @override - String get externalUri; - @override - int get totalTracks; - @override - SpotubeAlbumType get albumType; - @override - String? get recordLabel; - @override - List? get genres; - - /// Create a copy of SpotubeFullAlbumObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeFullAlbumObjectImplCopyWith<_$SpotubeFullAlbumObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeSimpleAlbumObject _$SpotubeSimpleAlbumObjectFromJson( - Map json) { - return _SpotubeSimpleAlbumObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeSimpleAlbumObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - List get artists => - throw _privateConstructorUsedError; - List get images => throw _privateConstructorUsedError; - SpotubeAlbumType get albumType => throw _privateConstructorUsedError; - String? get releaseDate => throw _privateConstructorUsedError; - - /// Serializes this SpotubeSimpleAlbumObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeSimpleAlbumObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeSimpleAlbumObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeSimpleAlbumObjectCopyWith<$Res> { - factory $SpotubeSimpleAlbumObjectCopyWith(SpotubeSimpleAlbumObject value, - $Res Function(SpotubeSimpleAlbumObject) then) = - _$SpotubeSimpleAlbumObjectCopyWithImpl<$Res, SpotubeSimpleAlbumObject>; - @useResult - $Res call( - {String id, - String name, - String externalUri, - List artists, - List images, - SpotubeAlbumType albumType, - String? releaseDate}); -} - -/// @nodoc -class _$SpotubeSimpleAlbumObjectCopyWithImpl<$Res, - $Val extends SpotubeSimpleAlbumObject> - implements $SpotubeSimpleAlbumObjectCopyWith<$Res> { - _$SpotubeSimpleAlbumObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeSimpleAlbumObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? artists = null, - Object? images = null, - Object? albumType = null, - Object? releaseDate = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value.artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - albumType: null == albumType - ? _value.albumType - : albumType // ignore: cast_nullable_to_non_nullable - as SpotubeAlbumType, - releaseDate: freezed == releaseDate - ? _value.releaseDate - : releaseDate // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeSimpleAlbumObjectImplCopyWith<$Res> - implements $SpotubeSimpleAlbumObjectCopyWith<$Res> { - factory _$$SpotubeSimpleAlbumObjectImplCopyWith( - _$SpotubeSimpleAlbumObjectImpl value, - $Res Function(_$SpotubeSimpleAlbumObjectImpl) then) = - __$$SpotubeSimpleAlbumObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String externalUri, - List artists, - List images, - SpotubeAlbumType albumType, - String? releaseDate}); -} - -/// @nodoc -class __$$SpotubeSimpleAlbumObjectImplCopyWithImpl<$Res> - extends _$SpotubeSimpleAlbumObjectCopyWithImpl<$Res, - _$SpotubeSimpleAlbumObjectImpl> - implements _$$SpotubeSimpleAlbumObjectImplCopyWith<$Res> { - __$$SpotubeSimpleAlbumObjectImplCopyWithImpl( - _$SpotubeSimpleAlbumObjectImpl _value, - $Res Function(_$SpotubeSimpleAlbumObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeSimpleAlbumObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? artists = null, - Object? images = null, - Object? albumType = null, - Object? releaseDate = freezed, - }) { - return _then(_$SpotubeSimpleAlbumObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value._artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - albumType: null == albumType - ? _value.albumType - : albumType // ignore: cast_nullable_to_non_nullable - as SpotubeAlbumType, - releaseDate: freezed == releaseDate - ? _value.releaseDate - : releaseDate // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeSimpleAlbumObjectImpl implements _SpotubeSimpleAlbumObject { - _$SpotubeSimpleAlbumObjectImpl( - {required this.id, - required this.name, - required this.externalUri, - required final List artists, - final List images = const [], - required this.albumType, - this.releaseDate}) - : _artists = artists, - _images = images; - - factory _$SpotubeSimpleAlbumObjectImpl.fromJson(Map json) => - _$$SpotubeSimpleAlbumObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String externalUri; - final List _artists; - @override - List get artists { - if (_artists is EqualUnmodifiableListView) return _artists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_artists); - } - - final List _images; - @override - @JsonKey() - List get images { - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_images); - } - - @override - final SpotubeAlbumType albumType; - @override - final String? releaseDate; - - @override - String toString() { - return 'SpotubeSimpleAlbumObject(id: $id, name: $name, externalUri: $externalUri, artists: $artists, images: $images, albumType: $albumType, releaseDate: $releaseDate)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeSimpleAlbumObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - const DeepCollectionEquality().equals(other._artists, _artists) && - const DeepCollectionEquality().equals(other._images, _images) && - (identical(other.albumType, albumType) || - other.albumType == albumType) && - (identical(other.releaseDate, releaseDate) || - other.releaseDate == releaseDate)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - externalUri, - const DeepCollectionEquality().hash(_artists), - const DeepCollectionEquality().hash(_images), - albumType, - releaseDate); - - /// Create a copy of SpotubeSimpleAlbumObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeSimpleAlbumObjectImplCopyWith<_$SpotubeSimpleAlbumObjectImpl> - get copyWith => __$$SpotubeSimpleAlbumObjectImplCopyWithImpl< - _$SpotubeSimpleAlbumObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeSimpleAlbumObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeSimpleAlbumObject implements SpotubeSimpleAlbumObject { - factory _SpotubeSimpleAlbumObject( - {required final String id, - required final String name, - required final String externalUri, - required final List artists, - final List images, - required final SpotubeAlbumType albumType, - final String? releaseDate}) = _$SpotubeSimpleAlbumObjectImpl; - - factory _SpotubeSimpleAlbumObject.fromJson(Map json) = - _$SpotubeSimpleAlbumObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get externalUri; - @override - List get artists; - @override - List get images; - @override - SpotubeAlbumType get albumType; - @override - String? get releaseDate; - - /// Create a copy of SpotubeSimpleAlbumObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeSimpleAlbumObjectImplCopyWith<_$SpotubeSimpleAlbumObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeFullArtistObject _$SpotubeFullArtistObjectFromJson( - Map json) { - return _SpotubeFullArtistObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeFullArtistObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - List get images => throw _privateConstructorUsedError; - List? get genres => throw _privateConstructorUsedError; - int? get followers => throw _privateConstructorUsedError; - - /// Serializes this SpotubeFullArtistObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeFullArtistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeFullArtistObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeFullArtistObjectCopyWith<$Res> { - factory $SpotubeFullArtistObjectCopyWith(SpotubeFullArtistObject value, - $Res Function(SpotubeFullArtistObject) then) = - _$SpotubeFullArtistObjectCopyWithImpl<$Res, SpotubeFullArtistObject>; - @useResult - $Res call( - {String id, - String name, - String externalUri, - List images, - List? genres, - int? followers}); -} - -/// @nodoc -class _$SpotubeFullArtistObjectCopyWithImpl<$Res, - $Val extends SpotubeFullArtistObject> - implements $SpotubeFullArtistObjectCopyWith<$Res> { - _$SpotubeFullArtistObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeFullArtistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? images = null, - Object? genres = freezed, - Object? followers = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - genres: freezed == genres - ? _value.genres - : genres // ignore: cast_nullable_to_non_nullable - as List?, - followers: freezed == followers - ? _value.followers - : followers // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeFullArtistObjectImplCopyWith<$Res> - implements $SpotubeFullArtistObjectCopyWith<$Res> { - factory _$$SpotubeFullArtistObjectImplCopyWith( - _$SpotubeFullArtistObjectImpl value, - $Res Function(_$SpotubeFullArtistObjectImpl) then) = - __$$SpotubeFullArtistObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String externalUri, - List images, - List? genres, - int? followers}); -} - -/// @nodoc -class __$$SpotubeFullArtistObjectImplCopyWithImpl<$Res> - extends _$SpotubeFullArtistObjectCopyWithImpl<$Res, - _$SpotubeFullArtistObjectImpl> - implements _$$SpotubeFullArtistObjectImplCopyWith<$Res> { - __$$SpotubeFullArtistObjectImplCopyWithImpl( - _$SpotubeFullArtistObjectImpl _value, - $Res Function(_$SpotubeFullArtistObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeFullArtistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? images = null, - Object? genres = freezed, - Object? followers = freezed, - }) { - return _then(_$SpotubeFullArtistObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - genres: freezed == genres - ? _value._genres - : genres // ignore: cast_nullable_to_non_nullable - as List?, - followers: freezed == followers - ? _value.followers - : followers // ignore: cast_nullable_to_non_nullable - as int?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeFullArtistObjectImpl implements _SpotubeFullArtistObject { - _$SpotubeFullArtistObjectImpl( - {required this.id, - required this.name, - required this.externalUri, - final List images = const [], - final List? genres, - this.followers}) - : _images = images, - _genres = genres; - - factory _$SpotubeFullArtistObjectImpl.fromJson(Map json) => - _$$SpotubeFullArtistObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String externalUri; - final List _images; - @override - @JsonKey() - List get images { - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_images); - } - - final List? _genres; - @override - List? get genres { - final value = _genres; - if (value == null) return null; - if (_genres is EqualUnmodifiableListView) return _genres; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final int? followers; - - @override - String toString() { - return 'SpotubeFullArtistObject(id: $id, name: $name, externalUri: $externalUri, images: $images, genres: $genres, followers: $followers)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeFullArtistObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - const DeepCollectionEquality().equals(other._images, _images) && - const DeepCollectionEquality().equals(other._genres, _genres) && - (identical(other.followers, followers) || - other.followers == followers)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - externalUri, - const DeepCollectionEquality().hash(_images), - const DeepCollectionEquality().hash(_genres), - followers); - - /// Create a copy of SpotubeFullArtistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeFullArtistObjectImplCopyWith<_$SpotubeFullArtistObjectImpl> - get copyWith => __$$SpotubeFullArtistObjectImplCopyWithImpl< - _$SpotubeFullArtistObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeFullArtistObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeFullArtistObject implements SpotubeFullArtistObject { - factory _SpotubeFullArtistObject( - {required final String id, - required final String name, - required final String externalUri, - final List images, - final List? genres, - final int? followers}) = _$SpotubeFullArtistObjectImpl; - - factory _SpotubeFullArtistObject.fromJson(Map json) = - _$SpotubeFullArtistObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get externalUri; - @override - List get images; - @override - List? get genres; - @override - int? get followers; - - /// Create a copy of SpotubeFullArtistObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeFullArtistObjectImplCopyWith<_$SpotubeFullArtistObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeSimpleArtistObject _$SpotubeSimpleArtistObjectFromJson( - Map json) { - return _SpotubeSimpleArtistObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeSimpleArtistObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - List? get images => throw _privateConstructorUsedError; - - /// Serializes this SpotubeSimpleArtistObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeSimpleArtistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeSimpleArtistObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeSimpleArtistObjectCopyWith<$Res> { - factory $SpotubeSimpleArtistObjectCopyWith(SpotubeSimpleArtistObject value, - $Res Function(SpotubeSimpleArtistObject) then) = - _$SpotubeSimpleArtistObjectCopyWithImpl<$Res, SpotubeSimpleArtistObject>; - @useResult - $Res call( - {String id, - String name, - String externalUri, - List? images}); -} - -/// @nodoc -class _$SpotubeSimpleArtistObjectCopyWithImpl<$Res, - $Val extends SpotubeSimpleArtistObject> - implements $SpotubeSimpleArtistObjectCopyWith<$Res> { - _$SpotubeSimpleArtistObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeSimpleArtistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? images = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - images: freezed == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeSimpleArtistObjectImplCopyWith<$Res> - implements $SpotubeSimpleArtistObjectCopyWith<$Res> { - factory _$$SpotubeSimpleArtistObjectImplCopyWith( - _$SpotubeSimpleArtistObjectImpl value, - $Res Function(_$SpotubeSimpleArtistObjectImpl) then) = - __$$SpotubeSimpleArtistObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String externalUri, - List? images}); -} - -/// @nodoc -class __$$SpotubeSimpleArtistObjectImplCopyWithImpl<$Res> - extends _$SpotubeSimpleArtistObjectCopyWithImpl<$Res, - _$SpotubeSimpleArtistObjectImpl> - implements _$$SpotubeSimpleArtistObjectImplCopyWith<$Res> { - __$$SpotubeSimpleArtistObjectImplCopyWithImpl( - _$SpotubeSimpleArtistObjectImpl _value, - $Res Function(_$SpotubeSimpleArtistObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeSimpleArtistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? images = freezed, - }) { - return _then(_$SpotubeSimpleArtistObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - images: freezed == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeSimpleArtistObjectImpl implements _SpotubeSimpleArtistObject { - _$SpotubeSimpleArtistObjectImpl( - {required this.id, - required this.name, - required this.externalUri, - final List? images}) - : _images = images; - - factory _$SpotubeSimpleArtistObjectImpl.fromJson(Map json) => - _$$SpotubeSimpleArtistObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String externalUri; - final List? _images; - @override - List? get images { - final value = _images; - if (value == null) return null; - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - String toString() { - return 'SpotubeSimpleArtistObject(id: $id, name: $name, externalUri: $externalUri, images: $images)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeSimpleArtistObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - const DeepCollectionEquality().equals(other._images, _images)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, id, name, externalUri, - const DeepCollectionEquality().hash(_images)); - - /// Create a copy of SpotubeSimpleArtistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeSimpleArtistObjectImplCopyWith<_$SpotubeSimpleArtistObjectImpl> - get copyWith => __$$SpotubeSimpleArtistObjectImplCopyWithImpl< - _$SpotubeSimpleArtistObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeSimpleArtistObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeSimpleArtistObject implements SpotubeSimpleArtistObject { - factory _SpotubeSimpleArtistObject( - {required final String id, - required final String name, - required final String externalUri, - final List? images}) = - _$SpotubeSimpleArtistObjectImpl; - - factory _SpotubeSimpleArtistObject.fromJson(Map json) = - _$SpotubeSimpleArtistObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get externalUri; - @override - List? get images; - - /// Create a copy of SpotubeSimpleArtistObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeSimpleArtistObjectImplCopyWith<_$SpotubeSimpleArtistObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeBrowseSectionObject _$SpotubeBrowseSectionObjectFromJson( - Map json, T Function(Object?) fromJsonT) { - return _SpotubeBrowseSectionObject.fromJson(json, fromJsonT); -} - -/// @nodoc -mixin _$SpotubeBrowseSectionObject { - String get id => throw _privateConstructorUsedError; - String get title => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - bool get browseMore => throw _privateConstructorUsedError; - List get items => throw _privateConstructorUsedError; - - /// Serializes this SpotubeBrowseSectionObject to a JSON map. - Map toJson(Object? Function(T) toJsonT) => - throw _privateConstructorUsedError; - - /// Create a copy of SpotubeBrowseSectionObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeBrowseSectionObjectCopyWith> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeBrowseSectionObjectCopyWith { - factory $SpotubeBrowseSectionObjectCopyWith( - SpotubeBrowseSectionObject value, - $Res Function(SpotubeBrowseSectionObject) then) = - _$SpotubeBrowseSectionObjectCopyWithImpl>; - @useResult - $Res call( - {String id, - String title, - String externalUri, - bool browseMore, - List items}); -} - -/// @nodoc -class _$SpotubeBrowseSectionObjectCopyWithImpl> - implements $SpotubeBrowseSectionObjectCopyWith { - _$SpotubeBrowseSectionObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeBrowseSectionObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? title = null, - Object? externalUri = null, - Object? browseMore = null, - Object? items = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - browseMore: null == browseMore - ? _value.browseMore - : browseMore // ignore: cast_nullable_to_non_nullable - as bool, - items: null == items - ? _value.items - : items // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeBrowseSectionObjectImplCopyWith - implements $SpotubeBrowseSectionObjectCopyWith { - factory _$$SpotubeBrowseSectionObjectImplCopyWith( - _$SpotubeBrowseSectionObjectImpl value, - $Res Function(_$SpotubeBrowseSectionObjectImpl) then) = - __$$SpotubeBrowseSectionObjectImplCopyWithImpl; - @override - @useResult - $Res call( - {String id, - String title, - String externalUri, - bool browseMore, - List items}); -} - -/// @nodoc -class __$$SpotubeBrowseSectionObjectImplCopyWithImpl - extends _$SpotubeBrowseSectionObjectCopyWithImpl> - implements _$$SpotubeBrowseSectionObjectImplCopyWith { - __$$SpotubeBrowseSectionObjectImplCopyWithImpl( - _$SpotubeBrowseSectionObjectImpl _value, - $Res Function(_$SpotubeBrowseSectionObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeBrowseSectionObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? title = null, - Object? externalUri = null, - Object? browseMore = null, - Object? items = null, - }) { - return _then(_$SpotubeBrowseSectionObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - browseMore: null == browseMore - ? _value.browseMore - : browseMore // ignore: cast_nullable_to_non_nullable - as bool, - items: null == items - ? _value._items - : items // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable(genericArgumentFactories: true) -class _$SpotubeBrowseSectionObjectImpl - implements _SpotubeBrowseSectionObject { - _$SpotubeBrowseSectionObjectImpl( - {required this.id, - required this.title, - required this.externalUri, - required this.browseMore, - required final List items}) - : _items = items; - - factory _$SpotubeBrowseSectionObjectImpl.fromJson( - Map json, T Function(Object?) fromJsonT) => - _$$SpotubeBrowseSectionObjectImplFromJson(json, fromJsonT); - - @override - final String id; - @override - final String title; - @override - final String externalUri; - @override - final bool browseMore; - final List _items; - @override - List get items { - if (_items is EqualUnmodifiableListView) return _items; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_items); - } - - @override - String toString() { - return 'SpotubeBrowseSectionObject<$T>(id: $id, title: $title, externalUri: $externalUri, browseMore: $browseMore, items: $items)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeBrowseSectionObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.title, title) || other.title == title) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - (identical(other.browseMore, browseMore) || - other.browseMore == browseMore) && - const DeepCollectionEquality().equals(other._items, _items)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, id, title, externalUri, - browseMore, const DeepCollectionEquality().hash(_items)); - - /// Create a copy of SpotubeBrowseSectionObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeBrowseSectionObjectImplCopyWith> - get copyWith => __$$SpotubeBrowseSectionObjectImplCopyWithImpl>(this, _$identity); - - @override - Map toJson(Object? Function(T) toJsonT) { - return _$$SpotubeBrowseSectionObjectImplToJson(this, toJsonT); - } -} - -abstract class _SpotubeBrowseSectionObject - implements SpotubeBrowseSectionObject { - factory _SpotubeBrowseSectionObject( - {required final String id, - required final String title, - required final String externalUri, - required final bool browseMore, - required final List items}) = _$SpotubeBrowseSectionObjectImpl; - - factory _SpotubeBrowseSectionObject.fromJson( - Map json, T Function(Object?) fromJsonT) = - _$SpotubeBrowseSectionObjectImpl.fromJson; - - @override - String get id; - @override - String get title; - @override - String get externalUri; - @override - bool get browseMore; - @override - List get items; - - /// Create a copy of SpotubeBrowseSectionObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeBrowseSectionObjectImplCopyWith> - get copyWith => throw _privateConstructorUsedError; -} - -MetadataFormFieldObject _$MetadataFormFieldObjectFromJson( - Map json) { - switch (json['objectType']) { - case 'input': - return MetadataFormFieldInputObject.fromJson(json); - case 'text': - return MetadataFormFieldTextObject.fromJson(json); - - default: - throw CheckedFromJsonException( - json, - 'objectType', - 'MetadataFormFieldObject', - 'Invalid union type "${json['objectType']}"!'); - } -} - -/// @nodoc -mixin _$MetadataFormFieldObject { - String get objectType => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex) - input, - required TResult Function(String objectType, String text) text, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex)? - input, - TResult? Function(String objectType, String text)? text, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex)? - input, - TResult Function(String objectType, String text)? text, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(MetadataFormFieldInputObject value) input, - required TResult Function(MetadataFormFieldTextObject value) text, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(MetadataFormFieldInputObject value)? input, - TResult? Function(MetadataFormFieldTextObject value)? text, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(MetadataFormFieldInputObject value)? input, - TResult Function(MetadataFormFieldTextObject value)? text, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - /// Serializes this MetadataFormFieldObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $MetadataFormFieldObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MetadataFormFieldObjectCopyWith<$Res> { - factory $MetadataFormFieldObjectCopyWith(MetadataFormFieldObject value, - $Res Function(MetadataFormFieldObject) then) = - _$MetadataFormFieldObjectCopyWithImpl<$Res, MetadataFormFieldObject>; - @useResult - $Res call({String objectType}); -} - -/// @nodoc -class _$MetadataFormFieldObjectCopyWithImpl<$Res, - $Val extends MetadataFormFieldObject> - implements $MetadataFormFieldObjectCopyWith<$Res> { - _$MetadataFormFieldObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? objectType = null, - }) { - return _then(_value.copyWith( - objectType: null == objectType - ? _value.objectType - : objectType // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$MetadataFormFieldInputObjectImplCopyWith<$Res> - implements $MetadataFormFieldObjectCopyWith<$Res> { - factory _$$MetadataFormFieldInputObjectImplCopyWith( - _$MetadataFormFieldInputObjectImpl value, - $Res Function(_$MetadataFormFieldInputObjectImpl) then) = - __$$MetadataFormFieldInputObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex}); -} - -/// @nodoc -class __$$MetadataFormFieldInputObjectImplCopyWithImpl<$Res> - extends _$MetadataFormFieldObjectCopyWithImpl<$Res, - _$MetadataFormFieldInputObjectImpl> - implements _$$MetadataFormFieldInputObjectImplCopyWith<$Res> { - __$$MetadataFormFieldInputObjectImplCopyWithImpl( - _$MetadataFormFieldInputObjectImpl _value, - $Res Function(_$MetadataFormFieldInputObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? objectType = null, - Object? id = null, - Object? variant = null, - Object? placeholder = freezed, - Object? defaultValue = freezed, - Object? required = freezed, - Object? regex = freezed, - }) { - return _then(_$MetadataFormFieldInputObjectImpl( - objectType: null == objectType - ? _value.objectType - : objectType // ignore: cast_nullable_to_non_nullable - as String, - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - variant: null == variant - ? _value.variant - : variant // ignore: cast_nullable_to_non_nullable - as FormFieldVariant, - placeholder: freezed == placeholder - ? _value.placeholder - : placeholder // ignore: cast_nullable_to_non_nullable - as String?, - defaultValue: freezed == defaultValue - ? _value.defaultValue - : defaultValue // ignore: cast_nullable_to_non_nullable - as String?, - required: freezed == required - ? _value.required - : required // ignore: cast_nullable_to_non_nullable - as bool?, - regex: freezed == regex - ? _value.regex - : regex // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$MetadataFormFieldInputObjectImpl - implements MetadataFormFieldInputObject { - _$MetadataFormFieldInputObjectImpl( - {required this.objectType, - required this.id, - this.variant = FormFieldVariant.text, - this.placeholder, - this.defaultValue, - this.required, - this.regex}); - - factory _$MetadataFormFieldInputObjectImpl.fromJson( - Map json) => - _$$MetadataFormFieldInputObjectImplFromJson(json); - - @override - final String objectType; - @override - final String id; - @override - @JsonKey() - final FormFieldVariant variant; - @override - final String? placeholder; - @override - final String? defaultValue; - @override - final bool? required; - @override - final String? regex; - - @override - String toString() { - return 'MetadataFormFieldObject.input(objectType: $objectType, id: $id, variant: $variant, placeholder: $placeholder, defaultValue: $defaultValue, required: $required, regex: $regex)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MetadataFormFieldInputObjectImpl && - (identical(other.objectType, objectType) || - other.objectType == objectType) && - (identical(other.id, id) || other.id == id) && - (identical(other.variant, variant) || other.variant == variant) && - (identical(other.placeholder, placeholder) || - other.placeholder == placeholder) && - (identical(other.defaultValue, defaultValue) || - other.defaultValue == defaultValue) && - (identical(other.required, required) || - other.required == required) && - (identical(other.regex, regex) || other.regex == regex)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, objectType, id, variant, - placeholder, defaultValue, required, regex); - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$MetadataFormFieldInputObjectImplCopyWith< - _$MetadataFormFieldInputObjectImpl> - get copyWith => __$$MetadataFormFieldInputObjectImplCopyWithImpl< - _$MetadataFormFieldInputObjectImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex) - input, - required TResult Function(String objectType, String text) text, - }) { - return input( - objectType, id, variant, placeholder, defaultValue, required, regex); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex)? - input, - TResult? Function(String objectType, String text)? text, - }) { - return input?.call( - objectType, id, variant, placeholder, defaultValue, required, regex); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex)? - input, - TResult Function(String objectType, String text)? text, - required TResult orElse(), - }) { - if (input != null) { - return input( - objectType, id, variant, placeholder, defaultValue, required, regex); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(MetadataFormFieldInputObject value) input, - required TResult Function(MetadataFormFieldTextObject value) text, - }) { - return input(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(MetadataFormFieldInputObject value)? input, - TResult? Function(MetadataFormFieldTextObject value)? text, - }) { - return input?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(MetadataFormFieldInputObject value)? input, - TResult Function(MetadataFormFieldTextObject value)? text, - required TResult orElse(), - }) { - if (input != null) { - return input(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$MetadataFormFieldInputObjectImplToJson( - this, - ); - } -} - -abstract class MetadataFormFieldInputObject implements MetadataFormFieldObject { - factory MetadataFormFieldInputObject( - {required final String objectType, - required final String id, - final FormFieldVariant variant, - final String? placeholder, - final String? defaultValue, - final bool? required, - final String? regex}) = _$MetadataFormFieldInputObjectImpl; - - factory MetadataFormFieldInputObject.fromJson(Map json) = - _$MetadataFormFieldInputObjectImpl.fromJson; - - @override - String get objectType; - String get id; - FormFieldVariant get variant; - String? get placeholder; - String? get defaultValue; - bool? get required; - String? get regex; - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$MetadataFormFieldInputObjectImplCopyWith< - _$MetadataFormFieldInputObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$MetadataFormFieldTextObjectImplCopyWith<$Res> - implements $MetadataFormFieldObjectCopyWith<$Res> { - factory _$$MetadataFormFieldTextObjectImplCopyWith( - _$MetadataFormFieldTextObjectImpl value, - $Res Function(_$MetadataFormFieldTextObjectImpl) then) = - __$$MetadataFormFieldTextObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String objectType, String text}); -} - -/// @nodoc -class __$$MetadataFormFieldTextObjectImplCopyWithImpl<$Res> - extends _$MetadataFormFieldObjectCopyWithImpl<$Res, - _$MetadataFormFieldTextObjectImpl> - implements _$$MetadataFormFieldTextObjectImplCopyWith<$Res> { - __$$MetadataFormFieldTextObjectImplCopyWithImpl( - _$MetadataFormFieldTextObjectImpl _value, - $Res Function(_$MetadataFormFieldTextObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? objectType = null, - Object? text = null, - }) { - return _then(_$MetadataFormFieldTextObjectImpl( - objectType: null == objectType - ? _value.objectType - : objectType // ignore: cast_nullable_to_non_nullable - as String, - text: null == text - ? _value.text - : text // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$MetadataFormFieldTextObjectImpl implements MetadataFormFieldTextObject { - _$MetadataFormFieldTextObjectImpl( - {required this.objectType, required this.text}); - - factory _$MetadataFormFieldTextObjectImpl.fromJson( - Map json) => - _$$MetadataFormFieldTextObjectImplFromJson(json); - - @override - final String objectType; - @override - final String text; - - @override - String toString() { - return 'MetadataFormFieldObject.text(objectType: $objectType, text: $text)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MetadataFormFieldTextObjectImpl && - (identical(other.objectType, objectType) || - other.objectType == objectType) && - (identical(other.text, text) || other.text == text)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, objectType, text); - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$MetadataFormFieldTextObjectImplCopyWith<_$MetadataFormFieldTextObjectImpl> - get copyWith => __$$MetadataFormFieldTextObjectImplCopyWithImpl< - _$MetadataFormFieldTextObjectImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex) - input, - required TResult Function(String objectType, String text) text, - }) { - return text(objectType, this.text); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex)? - input, - TResult? Function(String objectType, String text)? text, - }) { - return text?.call(objectType, this.text); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - String objectType, - String id, - FormFieldVariant variant, - String? placeholder, - String? defaultValue, - bool? required, - String? regex)? - input, - TResult Function(String objectType, String text)? text, - required TResult orElse(), - }) { - if (text != null) { - return text(objectType, this.text); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(MetadataFormFieldInputObject value) input, - required TResult Function(MetadataFormFieldTextObject value) text, - }) { - return text(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(MetadataFormFieldInputObject value)? input, - TResult? Function(MetadataFormFieldTextObject value)? text, - }) { - return text?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(MetadataFormFieldInputObject value)? input, - TResult Function(MetadataFormFieldTextObject value)? text, - required TResult orElse(), - }) { - if (text != null) { - return text(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$MetadataFormFieldTextObjectImplToJson( - this, - ); - } -} - -abstract class MetadataFormFieldTextObject implements MetadataFormFieldObject { - factory MetadataFormFieldTextObject( - {required final String objectType, - required final String text}) = _$MetadataFormFieldTextObjectImpl; - - factory MetadataFormFieldTextObject.fromJson(Map json) = - _$MetadataFormFieldTextObjectImpl.fromJson; - - @override - String get objectType; - String get text; - - /// Create a copy of MetadataFormFieldObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$MetadataFormFieldTextObjectImplCopyWith<_$MetadataFormFieldTextObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeImageObject _$SpotubeImageObjectFromJson(Map json) { - return _SpotubeImageObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeImageObject { - String get url => throw _privateConstructorUsedError; - int? get width => throw _privateConstructorUsedError; - int? get height => throw _privateConstructorUsedError; - - /// Serializes this SpotubeImageObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeImageObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeImageObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeImageObjectCopyWith<$Res> { - factory $SpotubeImageObjectCopyWith( - SpotubeImageObject value, $Res Function(SpotubeImageObject) then) = - _$SpotubeImageObjectCopyWithImpl<$Res, SpotubeImageObject>; - @useResult - $Res call({String url, int? width, int? height}); -} - -/// @nodoc -class _$SpotubeImageObjectCopyWithImpl<$Res, $Val extends SpotubeImageObject> - implements $SpotubeImageObjectCopyWith<$Res> { - _$SpotubeImageObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeImageObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? width = freezed, - Object? height = freezed, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeImageObjectImplCopyWith<$Res> - implements $SpotubeImageObjectCopyWith<$Res> { - factory _$$SpotubeImageObjectImplCopyWith(_$SpotubeImageObjectImpl value, - $Res Function(_$SpotubeImageObjectImpl) then) = - __$$SpotubeImageObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String url, int? width, int? height}); -} - -/// @nodoc -class __$$SpotubeImageObjectImplCopyWithImpl<$Res> - extends _$SpotubeImageObjectCopyWithImpl<$Res, _$SpotubeImageObjectImpl> - implements _$$SpotubeImageObjectImplCopyWith<$Res> { - __$$SpotubeImageObjectImplCopyWithImpl(_$SpotubeImageObjectImpl _value, - $Res Function(_$SpotubeImageObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeImageObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? width = freezed, - Object? height = freezed, - }) { - return _then(_$SpotubeImageObjectImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int?, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeImageObjectImpl implements _SpotubeImageObject { - _$SpotubeImageObjectImpl({required this.url, this.width, this.height}); - - factory _$SpotubeImageObjectImpl.fromJson(Map json) => - _$$SpotubeImageObjectImplFromJson(json); - - @override - final String url; - @override - final int? width; - @override - final int? height; - - @override - String toString() { - return 'SpotubeImageObject(url: $url, width: $width, height: $height)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeImageObjectImpl && - (identical(other.url, url) || other.url == url) && - (identical(other.width, width) || other.width == width) && - (identical(other.height, height) || other.height == height)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, url, width, height); - - /// Create a copy of SpotubeImageObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeImageObjectImplCopyWith<_$SpotubeImageObjectImpl> get copyWith => - __$$SpotubeImageObjectImplCopyWithImpl<_$SpotubeImageObjectImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SpotubeImageObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeImageObject implements SpotubeImageObject { - factory _SpotubeImageObject( - {required final String url, - final int? width, - final int? height}) = _$SpotubeImageObjectImpl; - - factory _SpotubeImageObject.fromJson(Map json) = - _$SpotubeImageObjectImpl.fromJson; - - @override - String get url; - @override - int? get width; - @override - int? get height; - - /// Create a copy of SpotubeImageObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeImageObjectImplCopyWith<_$SpotubeImageObjectImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SpotubePaginationResponseObject _$SpotubePaginationResponseObjectFromJson( - Map json, T Function(Object?) fromJsonT) { - return _SpotubePaginationResponseObject.fromJson(json, fromJsonT); -} - -/// @nodoc -mixin _$SpotubePaginationResponseObject { - int get limit => throw _privateConstructorUsedError; - int? get nextOffset => throw _privateConstructorUsedError; - int get total => throw _privateConstructorUsedError; - bool get hasMore => throw _privateConstructorUsedError; - List get items => throw _privateConstructorUsedError; - - /// Serializes this SpotubePaginationResponseObject to a JSON map. - Map toJson(Object? Function(T) toJsonT) => - throw _privateConstructorUsedError; - - /// Create a copy of SpotubePaginationResponseObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubePaginationResponseObjectCopyWith> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubePaginationResponseObjectCopyWith { - factory $SpotubePaginationResponseObjectCopyWith( - SpotubePaginationResponseObject value, - $Res Function(SpotubePaginationResponseObject) then) = - _$SpotubePaginationResponseObjectCopyWithImpl>; - @useResult - $Res call( - {int limit, int? nextOffset, int total, bool hasMore, List items}); -} - -/// @nodoc -class _$SpotubePaginationResponseObjectCopyWithImpl> - implements $SpotubePaginationResponseObjectCopyWith { - _$SpotubePaginationResponseObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubePaginationResponseObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? limit = null, - Object? nextOffset = freezed, - Object? total = null, - Object? hasMore = null, - Object? items = null, - }) { - return _then(_value.copyWith( - limit: null == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - nextOffset: freezed == nextOffset - ? _value.nextOffset - : nextOffset // ignore: cast_nullable_to_non_nullable - as int?, - total: null == total - ? _value.total - : total // ignore: cast_nullable_to_non_nullable - as int, - hasMore: null == hasMore - ? _value.hasMore - : hasMore // ignore: cast_nullable_to_non_nullable - as bool, - items: null == items - ? _value.items - : items // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubePaginationResponseObjectImplCopyWith - implements $SpotubePaginationResponseObjectCopyWith { - factory _$$SpotubePaginationResponseObjectImplCopyWith( - _$SpotubePaginationResponseObjectImpl value, - $Res Function(_$SpotubePaginationResponseObjectImpl) then) = - __$$SpotubePaginationResponseObjectImplCopyWithImpl; - @override - @useResult - $Res call( - {int limit, int? nextOffset, int total, bool hasMore, List items}); -} - -/// @nodoc -class __$$SpotubePaginationResponseObjectImplCopyWithImpl - extends _$SpotubePaginationResponseObjectCopyWithImpl> - implements _$$SpotubePaginationResponseObjectImplCopyWith { - __$$SpotubePaginationResponseObjectImplCopyWithImpl( - _$SpotubePaginationResponseObjectImpl _value, - $Res Function(_$SpotubePaginationResponseObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubePaginationResponseObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? limit = null, - Object? nextOffset = freezed, - Object? total = null, - Object? hasMore = null, - Object? items = null, - }) { - return _then(_$SpotubePaginationResponseObjectImpl( - limit: null == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - nextOffset: freezed == nextOffset - ? _value.nextOffset - : nextOffset // ignore: cast_nullable_to_non_nullable - as int?, - total: null == total - ? _value.total - : total // ignore: cast_nullable_to_non_nullable - as int, - hasMore: null == hasMore - ? _value.hasMore - : hasMore // ignore: cast_nullable_to_non_nullable - as bool, - items: null == items - ? _value._items - : items // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable(genericArgumentFactories: true) -class _$SpotubePaginationResponseObjectImpl - implements _SpotubePaginationResponseObject { - _$SpotubePaginationResponseObjectImpl( - {required this.limit, - required this.nextOffset, - required this.total, - required this.hasMore, - required final List items}) - : _items = items; - - factory _$SpotubePaginationResponseObjectImpl.fromJson( - Map json, T Function(Object?) fromJsonT) => - _$$SpotubePaginationResponseObjectImplFromJson(json, fromJsonT); - - @override - final int limit; - @override - final int? nextOffset; - @override - final int total; - @override - final bool hasMore; - final List _items; - @override - List get items { - if (_items is EqualUnmodifiableListView) return _items; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_items); - } - - @override - String toString() { - return 'SpotubePaginationResponseObject<$T>(limit: $limit, nextOffset: $nextOffset, total: $total, hasMore: $hasMore, items: $items)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubePaginationResponseObjectImpl && - (identical(other.limit, limit) || other.limit == limit) && - (identical(other.nextOffset, nextOffset) || - other.nextOffset == nextOffset) && - (identical(other.total, total) || other.total == total) && - (identical(other.hasMore, hasMore) || other.hasMore == hasMore) && - const DeepCollectionEquality().equals(other._items, _items)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, limit, nextOffset, total, - hasMore, const DeepCollectionEquality().hash(_items)); - - /// Create a copy of SpotubePaginationResponseObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubePaginationResponseObjectImplCopyWith> - get copyWith => __$$SpotubePaginationResponseObjectImplCopyWithImpl>(this, _$identity); - - @override - Map toJson(Object? Function(T) toJsonT) { - return _$$SpotubePaginationResponseObjectImplToJson(this, toJsonT); - } -} - -abstract class _SpotubePaginationResponseObject - implements SpotubePaginationResponseObject { - factory _SpotubePaginationResponseObject( - {required final int limit, - required final int? nextOffset, - required final int total, - required final bool hasMore, - required final List items}) = _$SpotubePaginationResponseObjectImpl; - - factory _SpotubePaginationResponseObject.fromJson( - Map json, T Function(Object?) fromJsonT) = - _$SpotubePaginationResponseObjectImpl.fromJson; - - @override - int get limit; - @override - int? get nextOffset; - @override - int get total; - @override - bool get hasMore; - @override - List get items; - - /// Create a copy of SpotubePaginationResponseObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubePaginationResponseObjectImplCopyWith> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeFullPlaylistObject _$SpotubeFullPlaylistObjectFromJson( - Map json) { - return _SpotubeFullPlaylistObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeFullPlaylistObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - SpotubeUserObject get owner => throw _privateConstructorUsedError; - List get images => throw _privateConstructorUsedError; - List get collaborators => - throw _privateConstructorUsedError; - bool get collaborative => throw _privateConstructorUsedError; - bool get public => throw _privateConstructorUsedError; - - /// Serializes this SpotubeFullPlaylistObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeFullPlaylistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeFullPlaylistObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeFullPlaylistObjectCopyWith<$Res> { - factory $SpotubeFullPlaylistObjectCopyWith(SpotubeFullPlaylistObject value, - $Res Function(SpotubeFullPlaylistObject) then) = - _$SpotubeFullPlaylistObjectCopyWithImpl<$Res, SpotubeFullPlaylistObject>; - @useResult - $Res call( - {String id, - String name, - String description, - String externalUri, - SpotubeUserObject owner, - List images, - List collaborators, - bool collaborative, - bool public}); - - $SpotubeUserObjectCopyWith<$Res> get owner; -} - -/// @nodoc -class _$SpotubeFullPlaylistObjectCopyWithImpl<$Res, - $Val extends SpotubeFullPlaylistObject> - implements $SpotubeFullPlaylistObjectCopyWith<$Res> { - _$SpotubeFullPlaylistObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeFullPlaylistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? description = null, - Object? externalUri = null, - Object? owner = null, - Object? images = null, - Object? collaborators = null, - Object? collaborative = null, - Object? public = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - owner: null == owner - ? _value.owner - : owner // ignore: cast_nullable_to_non_nullable - as SpotubeUserObject, - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - collaborators: null == collaborators - ? _value.collaborators - : collaborators // ignore: cast_nullable_to_non_nullable - as List, - collaborative: null == collaborative - ? _value.collaborative - : collaborative // ignore: cast_nullable_to_non_nullable - as bool, - public: null == public - ? _value.public - : public // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } - - /// Create a copy of SpotubeFullPlaylistObject - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SpotubeUserObjectCopyWith<$Res> get owner { - return $SpotubeUserObjectCopyWith<$Res>(_value.owner, (value) { - return _then(_value.copyWith(owner: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SpotubeFullPlaylistObjectImplCopyWith<$Res> - implements $SpotubeFullPlaylistObjectCopyWith<$Res> { - factory _$$SpotubeFullPlaylistObjectImplCopyWith( - _$SpotubeFullPlaylistObjectImpl value, - $Res Function(_$SpotubeFullPlaylistObjectImpl) then) = - __$$SpotubeFullPlaylistObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String description, - String externalUri, - SpotubeUserObject owner, - List images, - List collaborators, - bool collaborative, - bool public}); - - @override - $SpotubeUserObjectCopyWith<$Res> get owner; -} - -/// @nodoc -class __$$SpotubeFullPlaylistObjectImplCopyWithImpl<$Res> - extends _$SpotubeFullPlaylistObjectCopyWithImpl<$Res, - _$SpotubeFullPlaylistObjectImpl> - implements _$$SpotubeFullPlaylistObjectImplCopyWith<$Res> { - __$$SpotubeFullPlaylistObjectImplCopyWithImpl( - _$SpotubeFullPlaylistObjectImpl _value, - $Res Function(_$SpotubeFullPlaylistObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeFullPlaylistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? description = null, - Object? externalUri = null, - Object? owner = null, - Object? images = null, - Object? collaborators = null, - Object? collaborative = null, - Object? public = null, - }) { - return _then(_$SpotubeFullPlaylistObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - owner: null == owner - ? _value.owner - : owner // ignore: cast_nullable_to_non_nullable - as SpotubeUserObject, - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - collaborators: null == collaborators - ? _value._collaborators - : collaborators // ignore: cast_nullable_to_non_nullable - as List, - collaborative: null == collaborative - ? _value.collaborative - : collaborative // ignore: cast_nullable_to_non_nullable - as bool, - public: null == public - ? _value.public - : public // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeFullPlaylistObjectImpl implements _SpotubeFullPlaylistObject { - _$SpotubeFullPlaylistObjectImpl( - {required this.id, - required this.name, - required this.description, - required this.externalUri, - required this.owner, - final List images = const [], - final List collaborators = const [], - this.collaborative = false, - this.public = false}) - : _images = images, - _collaborators = collaborators; - - factory _$SpotubeFullPlaylistObjectImpl.fromJson(Map json) => - _$$SpotubeFullPlaylistObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String description; - @override - final String externalUri; - @override - final SpotubeUserObject owner; - final List _images; - @override - @JsonKey() - List get images { - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_images); - } - - final List _collaborators; - @override - @JsonKey() - List get collaborators { - if (_collaborators is EqualUnmodifiableListView) return _collaborators; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_collaborators); - } - - @override - @JsonKey() - final bool collaborative; - @override - @JsonKey() - final bool public; - - @override - String toString() { - return 'SpotubeFullPlaylistObject(id: $id, name: $name, description: $description, externalUri: $externalUri, owner: $owner, images: $images, collaborators: $collaborators, collaborative: $collaborative, public: $public)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeFullPlaylistObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.description, description) || - other.description == description) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - (identical(other.owner, owner) || other.owner == owner) && - const DeepCollectionEquality().equals(other._images, _images) && - const DeepCollectionEquality() - .equals(other._collaborators, _collaborators) && - (identical(other.collaborative, collaborative) || - other.collaborative == collaborative) && - (identical(other.public, public) || other.public == public)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - description, - externalUri, - owner, - const DeepCollectionEquality().hash(_images), - const DeepCollectionEquality().hash(_collaborators), - collaborative, - public); - - /// Create a copy of SpotubeFullPlaylistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeFullPlaylistObjectImplCopyWith<_$SpotubeFullPlaylistObjectImpl> - get copyWith => __$$SpotubeFullPlaylistObjectImplCopyWithImpl< - _$SpotubeFullPlaylistObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeFullPlaylistObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeFullPlaylistObject implements SpotubeFullPlaylistObject { - factory _SpotubeFullPlaylistObject( - {required final String id, - required final String name, - required final String description, - required final String externalUri, - required final SpotubeUserObject owner, - final List images, - final List collaborators, - final bool collaborative, - final bool public}) = _$SpotubeFullPlaylistObjectImpl; - - factory _SpotubeFullPlaylistObject.fromJson(Map json) = - _$SpotubeFullPlaylistObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get description; - @override - String get externalUri; - @override - SpotubeUserObject get owner; - @override - List get images; - @override - List get collaborators; - @override - bool get collaborative; - @override - bool get public; - - /// Create a copy of SpotubeFullPlaylistObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeFullPlaylistObjectImplCopyWith<_$SpotubeFullPlaylistObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeSimplePlaylistObject _$SpotubeSimplePlaylistObjectFromJson( - Map json) { - return _SpotubeSimplePlaylistObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeSimplePlaylistObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - SpotubeUserObject get owner => throw _privateConstructorUsedError; - List get images => throw _privateConstructorUsedError; - - /// Serializes this SpotubeSimplePlaylistObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeSimplePlaylistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeSimplePlaylistObjectCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeSimplePlaylistObjectCopyWith<$Res> { - factory $SpotubeSimplePlaylistObjectCopyWith( - SpotubeSimplePlaylistObject value, - $Res Function(SpotubeSimplePlaylistObject) then) = - _$SpotubeSimplePlaylistObjectCopyWithImpl<$Res, - SpotubeSimplePlaylistObject>; - @useResult - $Res call( - {String id, - String name, - String description, - String externalUri, - SpotubeUserObject owner, - List images}); - - $SpotubeUserObjectCopyWith<$Res> get owner; -} - -/// @nodoc -class _$SpotubeSimplePlaylistObjectCopyWithImpl<$Res, - $Val extends SpotubeSimplePlaylistObject> - implements $SpotubeSimplePlaylistObjectCopyWith<$Res> { - _$SpotubeSimplePlaylistObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeSimplePlaylistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? description = null, - Object? externalUri = null, - Object? owner = null, - Object? images = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - owner: null == owner - ? _value.owner - : owner // ignore: cast_nullable_to_non_nullable - as SpotubeUserObject, - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } - - /// Create a copy of SpotubeSimplePlaylistObject - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SpotubeUserObjectCopyWith<$Res> get owner { - return $SpotubeUserObjectCopyWith<$Res>(_value.owner, (value) { - return _then(_value.copyWith(owner: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SpotubeSimplePlaylistObjectImplCopyWith<$Res> - implements $SpotubeSimplePlaylistObjectCopyWith<$Res> { - factory _$$SpotubeSimplePlaylistObjectImplCopyWith( - _$SpotubeSimplePlaylistObjectImpl value, - $Res Function(_$SpotubeSimplePlaylistObjectImpl) then) = - __$$SpotubeSimplePlaylistObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String description, - String externalUri, - SpotubeUserObject owner, - List images}); - - @override - $SpotubeUserObjectCopyWith<$Res> get owner; -} - -/// @nodoc -class __$$SpotubeSimplePlaylistObjectImplCopyWithImpl<$Res> - extends _$SpotubeSimplePlaylistObjectCopyWithImpl<$Res, - _$SpotubeSimplePlaylistObjectImpl> - implements _$$SpotubeSimplePlaylistObjectImplCopyWith<$Res> { - __$$SpotubeSimplePlaylistObjectImplCopyWithImpl( - _$SpotubeSimplePlaylistObjectImpl _value, - $Res Function(_$SpotubeSimplePlaylistObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeSimplePlaylistObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? description = null, - Object? externalUri = null, - Object? owner = null, - Object? images = null, - }) { - return _then(_$SpotubeSimplePlaylistObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - owner: null == owner - ? _value.owner - : owner // ignore: cast_nullable_to_non_nullable - as SpotubeUserObject, - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeSimplePlaylistObjectImpl - implements _SpotubeSimplePlaylistObject { - _$SpotubeSimplePlaylistObjectImpl( - {required this.id, - required this.name, - required this.description, - required this.externalUri, - required this.owner, - final List images = const []}) - : _images = images; - - factory _$SpotubeSimplePlaylistObjectImpl.fromJson( - Map json) => - _$$SpotubeSimplePlaylistObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String description; - @override - final String externalUri; - @override - final SpotubeUserObject owner; - final List _images; - @override - @JsonKey() - List get images { - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_images); - } - - @override - String toString() { - return 'SpotubeSimplePlaylistObject(id: $id, name: $name, description: $description, externalUri: $externalUri, owner: $owner, images: $images)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeSimplePlaylistObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.description, description) || - other.description == description) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - (identical(other.owner, owner) || other.owner == owner) && - const DeepCollectionEquality().equals(other._images, _images)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, id, name, description, - externalUri, owner, const DeepCollectionEquality().hash(_images)); - - /// Create a copy of SpotubeSimplePlaylistObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeSimplePlaylistObjectImplCopyWith<_$SpotubeSimplePlaylistObjectImpl> - get copyWith => __$$SpotubeSimplePlaylistObjectImplCopyWithImpl< - _$SpotubeSimplePlaylistObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeSimplePlaylistObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeSimplePlaylistObject - implements SpotubeSimplePlaylistObject { - factory _SpotubeSimplePlaylistObject( - {required final String id, - required final String name, - required final String description, - required final String externalUri, - required final SpotubeUserObject owner, - final List images}) = - _$SpotubeSimplePlaylistObjectImpl; - - factory _SpotubeSimplePlaylistObject.fromJson(Map json) = - _$SpotubeSimplePlaylistObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get description; - @override - String get externalUri; - @override - SpotubeUserObject get owner; - @override - List get images; - - /// Create a copy of SpotubeSimplePlaylistObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeSimplePlaylistObjectImplCopyWith<_$SpotubeSimplePlaylistObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeSearchResponseObject _$SpotubeSearchResponseObjectFromJson( - Map json) { - return _SpotubeSearchResponseObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeSearchResponseObject { - List get albums => - throw _privateConstructorUsedError; - List get artists => - throw _privateConstructorUsedError; - List get playlists => - throw _privateConstructorUsedError; - List get tracks => throw _privateConstructorUsedError; - - /// Serializes this SpotubeSearchResponseObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeSearchResponseObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeSearchResponseObjectCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeSearchResponseObjectCopyWith<$Res> { - factory $SpotubeSearchResponseObjectCopyWith( - SpotubeSearchResponseObject value, - $Res Function(SpotubeSearchResponseObject) then) = - _$SpotubeSearchResponseObjectCopyWithImpl<$Res, - SpotubeSearchResponseObject>; - @useResult - $Res call( - {List albums, - List artists, - List playlists, - List tracks}); -} - -/// @nodoc -class _$SpotubeSearchResponseObjectCopyWithImpl<$Res, - $Val extends SpotubeSearchResponseObject> - implements $SpotubeSearchResponseObjectCopyWith<$Res> { - _$SpotubeSearchResponseObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeSearchResponseObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? albums = null, - Object? artists = null, - Object? playlists = null, - Object? tracks = null, - }) { - return _then(_value.copyWith( - albums: null == albums - ? _value.albums - : albums // ignore: cast_nullable_to_non_nullable - as List, - artists: null == artists - ? _value.artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - playlists: null == playlists - ? _value.playlists - : playlists // ignore: cast_nullable_to_non_nullable - as List, - tracks: null == tracks - ? _value.tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeSearchResponseObjectImplCopyWith<$Res> - implements $SpotubeSearchResponseObjectCopyWith<$Res> { - factory _$$SpotubeSearchResponseObjectImplCopyWith( - _$SpotubeSearchResponseObjectImpl value, - $Res Function(_$SpotubeSearchResponseObjectImpl) then) = - __$$SpotubeSearchResponseObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {List albums, - List artists, - List playlists, - List tracks}); -} - -/// @nodoc -class __$$SpotubeSearchResponseObjectImplCopyWithImpl<$Res> - extends _$SpotubeSearchResponseObjectCopyWithImpl<$Res, - _$SpotubeSearchResponseObjectImpl> - implements _$$SpotubeSearchResponseObjectImplCopyWith<$Res> { - __$$SpotubeSearchResponseObjectImplCopyWithImpl( - _$SpotubeSearchResponseObjectImpl _value, - $Res Function(_$SpotubeSearchResponseObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeSearchResponseObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? albums = null, - Object? artists = null, - Object? playlists = null, - Object? tracks = null, - }) { - return _then(_$SpotubeSearchResponseObjectImpl( - albums: null == albums - ? _value._albums - : albums // ignore: cast_nullable_to_non_nullable - as List, - artists: null == artists - ? _value._artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - playlists: null == playlists - ? _value._playlists - : playlists // ignore: cast_nullable_to_non_nullable - as List, - tracks: null == tracks - ? _value._tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeSearchResponseObjectImpl - implements _SpotubeSearchResponseObject { - _$SpotubeSearchResponseObjectImpl( - {required final List albums, - required final List artists, - required final List playlists, - required final List tracks}) - : _albums = albums, - _artists = artists, - _playlists = playlists, - _tracks = tracks; - - factory _$SpotubeSearchResponseObjectImpl.fromJson( - Map json) => - _$$SpotubeSearchResponseObjectImplFromJson(json); - - final List _albums; - @override - List get albums { - if (_albums is EqualUnmodifiableListView) return _albums; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_albums); - } - - final List _artists; - @override - List get artists { - if (_artists is EqualUnmodifiableListView) return _artists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_artists); - } - - final List _playlists; - @override - List get playlists { - if (_playlists is EqualUnmodifiableListView) return _playlists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_playlists); - } - - final List _tracks; - @override - List get tracks { - if (_tracks is EqualUnmodifiableListView) return _tracks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tracks); - } - - @override - String toString() { - return 'SpotubeSearchResponseObject(albums: $albums, artists: $artists, playlists: $playlists, tracks: $tracks)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeSearchResponseObjectImpl && - const DeepCollectionEquality().equals(other._albums, _albums) && - const DeepCollectionEquality().equals(other._artists, _artists) && - const DeepCollectionEquality() - .equals(other._playlists, _playlists) && - const DeepCollectionEquality().equals(other._tracks, _tracks)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_albums), - const DeepCollectionEquality().hash(_artists), - const DeepCollectionEquality().hash(_playlists), - const DeepCollectionEquality().hash(_tracks)); - - /// Create a copy of SpotubeSearchResponseObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeSearchResponseObjectImplCopyWith<_$SpotubeSearchResponseObjectImpl> - get copyWith => __$$SpotubeSearchResponseObjectImplCopyWithImpl< - _$SpotubeSearchResponseObjectImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpotubeSearchResponseObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeSearchResponseObject - implements SpotubeSearchResponseObject { - factory _SpotubeSearchResponseObject( - {required final List albums, - required final List artists, - required final List playlists, - required final List tracks}) = - _$SpotubeSearchResponseObjectImpl; - - factory _SpotubeSearchResponseObject.fromJson(Map json) = - _$SpotubeSearchResponseObjectImpl.fromJson; - - @override - List get albums; - @override - List get artists; - @override - List get playlists; - @override - List get tracks; - - /// Create a copy of SpotubeSearchResponseObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeSearchResponseObjectImplCopyWith<_$SpotubeSearchResponseObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeTrackObject _$SpotubeTrackObjectFromJson(Map json) { - switch (json['runtimeType']) { - case 'local': - return SpotubeLocalTrackObject.fromJson(json); - case 'full': - return SpotubeFullTrackObject.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'runtimeType', 'SpotubeTrackObject', - 'Invalid union type "${json['runtimeType']}"!'); - } -} - -/// @nodoc -mixin _$SpotubeTrackObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - List get artists => - throw _privateConstructorUsedError; - SpotubeSimpleAlbumObject get album => throw _privateConstructorUsedError; - int get durationMs => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path) - local, - required TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit) - full, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path)? - local, - TResult? Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit)? - full, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path)? - local, - TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit)? - full, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SpotubeLocalTrackObject value) local, - required TResult Function(SpotubeFullTrackObject value) full, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SpotubeLocalTrackObject value)? local, - TResult? Function(SpotubeFullTrackObject value)? full, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SpotubeLocalTrackObject value)? local, - TResult Function(SpotubeFullTrackObject value)? full, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - /// Serializes this SpotubeTrackObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeTrackObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeTrackObjectCopyWith<$Res> { - factory $SpotubeTrackObjectCopyWith( - SpotubeTrackObject value, $Res Function(SpotubeTrackObject) then) = - _$SpotubeTrackObjectCopyWithImpl<$Res, SpotubeTrackObject>; - @useResult - $Res call( - {String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs}); - - $SpotubeSimpleAlbumObjectCopyWith<$Res> get album; -} - -/// @nodoc -class _$SpotubeTrackObjectCopyWithImpl<$Res, $Val extends SpotubeTrackObject> - implements $SpotubeTrackObjectCopyWith<$Res> { - _$SpotubeTrackObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? artists = null, - Object? album = null, - Object? durationMs = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value.artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - album: null == album - ? _value.album - : album // ignore: cast_nullable_to_non_nullable - as SpotubeSimpleAlbumObject, - durationMs: null == durationMs - ? _value.durationMs - : durationMs // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SpotubeSimpleAlbumObjectCopyWith<$Res> get album { - return $SpotubeSimpleAlbumObjectCopyWith<$Res>(_value.album, (value) { - return _then(_value.copyWith(album: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SpotubeLocalTrackObjectImplCopyWith<$Res> - implements $SpotubeTrackObjectCopyWith<$Res> { - factory _$$SpotubeLocalTrackObjectImplCopyWith( - _$SpotubeLocalTrackObjectImpl value, - $Res Function(_$SpotubeLocalTrackObjectImpl) then) = - __$$SpotubeLocalTrackObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path}); - - @override - $SpotubeSimpleAlbumObjectCopyWith<$Res> get album; -} - -/// @nodoc -class __$$SpotubeLocalTrackObjectImplCopyWithImpl<$Res> - extends _$SpotubeTrackObjectCopyWithImpl<$Res, - _$SpotubeLocalTrackObjectImpl> - implements _$$SpotubeLocalTrackObjectImplCopyWith<$Res> { - __$$SpotubeLocalTrackObjectImplCopyWithImpl( - _$SpotubeLocalTrackObjectImpl _value, - $Res Function(_$SpotubeLocalTrackObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? artists = null, - Object? album = null, - Object? durationMs = null, - Object? path = null, - }) { - return _then(_$SpotubeLocalTrackObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value._artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - album: null == album - ? _value.album - : album // ignore: cast_nullable_to_non_nullable - as SpotubeSimpleAlbumObject, - durationMs: null == durationMs - ? _value.durationMs - : durationMs // ignore: cast_nullable_to_non_nullable - as int, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeLocalTrackObjectImpl implements SpotubeLocalTrackObject { - _$SpotubeLocalTrackObjectImpl( - {required this.id, - required this.name, - required this.externalUri, - final List artists = const [], - required this.album, - required this.durationMs, - required this.path, - final String? $type}) - : _artists = artists, - $type = $type ?? 'local'; - - factory _$SpotubeLocalTrackObjectImpl.fromJson(Map json) => - _$$SpotubeLocalTrackObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String externalUri; - final List _artists; - @override - @JsonKey() - List get artists { - if (_artists is EqualUnmodifiableListView) return _artists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_artists); - } - - @override - final SpotubeSimpleAlbumObject album; - @override - final int durationMs; - @override - final String path; - - @JsonKey(name: 'runtimeType') - final String $type; - - @override - String toString() { - return 'SpotubeTrackObject.local(id: $id, name: $name, externalUri: $externalUri, artists: $artists, album: $album, durationMs: $durationMs, path: $path)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeLocalTrackObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - const DeepCollectionEquality().equals(other._artists, _artists) && - (identical(other.album, album) || other.album == album) && - (identical(other.durationMs, durationMs) || - other.durationMs == durationMs) && - (identical(other.path, path) || other.path == path)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, id, name, externalUri, - const DeepCollectionEquality().hash(_artists), album, durationMs, path); - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeLocalTrackObjectImplCopyWith<_$SpotubeLocalTrackObjectImpl> - get copyWith => __$$SpotubeLocalTrackObjectImplCopyWithImpl< - _$SpotubeLocalTrackObjectImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path) - local, - required TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit) - full, - }) { - return local(id, name, externalUri, artists, album, durationMs, path); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path)? - local, - TResult? Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit)? - full, - }) { - return local?.call(id, name, externalUri, artists, album, durationMs, path); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path)? - local, - TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit)? - full, - required TResult orElse(), - }) { - if (local != null) { - return local(id, name, externalUri, artists, album, durationMs, path); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SpotubeLocalTrackObject value) local, - required TResult Function(SpotubeFullTrackObject value) full, - }) { - return local(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SpotubeLocalTrackObject value)? local, - TResult? Function(SpotubeFullTrackObject value)? full, - }) { - return local?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SpotubeLocalTrackObject value)? local, - TResult Function(SpotubeFullTrackObject value)? full, - required TResult orElse(), - }) { - if (local != null) { - return local(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$SpotubeLocalTrackObjectImplToJson( - this, - ); - } -} - -abstract class SpotubeLocalTrackObject implements SpotubeTrackObject { - factory SpotubeLocalTrackObject( - {required final String id, - required final String name, - required final String externalUri, - final List artists, - required final SpotubeSimpleAlbumObject album, - required final int durationMs, - required final String path}) = _$SpotubeLocalTrackObjectImpl; - - factory SpotubeLocalTrackObject.fromJson(Map json) = - _$SpotubeLocalTrackObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get externalUri; - @override - List get artists; - @override - SpotubeSimpleAlbumObject get album; - @override - int get durationMs; - String get path; - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeLocalTrackObjectImplCopyWith<_$SpotubeLocalTrackObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SpotubeFullTrackObjectImplCopyWith<$Res> - implements $SpotubeTrackObjectCopyWith<$Res> { - factory _$$SpotubeFullTrackObjectImplCopyWith( - _$SpotubeFullTrackObjectImpl value, - $Res Function(_$SpotubeFullTrackObjectImpl) then) = - __$$SpotubeFullTrackObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit}); - - @override - $SpotubeSimpleAlbumObjectCopyWith<$Res> get album; -} - -/// @nodoc -class __$$SpotubeFullTrackObjectImplCopyWithImpl<$Res> - extends _$SpotubeTrackObjectCopyWithImpl<$Res, _$SpotubeFullTrackObjectImpl> - implements _$$SpotubeFullTrackObjectImplCopyWith<$Res> { - __$$SpotubeFullTrackObjectImplCopyWithImpl( - _$SpotubeFullTrackObjectImpl _value, - $Res Function(_$SpotubeFullTrackObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? externalUri = null, - Object? artists = null, - Object? album = null, - Object? durationMs = null, - Object? isrc = null, - Object? explicit = null, - }) { - return _then(_$SpotubeFullTrackObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - artists: null == artists - ? _value._artists - : artists // ignore: cast_nullable_to_non_nullable - as List, - album: null == album - ? _value.album - : album // ignore: cast_nullable_to_non_nullable - as SpotubeSimpleAlbumObject, - durationMs: null == durationMs - ? _value.durationMs - : durationMs // ignore: cast_nullable_to_non_nullable - as int, - isrc: null == isrc - ? _value.isrc - : isrc // ignore: cast_nullable_to_non_nullable - as String, - explicit: null == explicit - ? _value.explicit - : explicit // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeFullTrackObjectImpl implements SpotubeFullTrackObject { - _$SpotubeFullTrackObjectImpl( - {required this.id, - required this.name, - required this.externalUri, - final List artists = const [], - required this.album, - required this.durationMs, - required this.isrc, - required this.explicit, - final String? $type}) - : _artists = artists, - $type = $type ?? 'full'; - - factory _$SpotubeFullTrackObjectImpl.fromJson(Map json) => - _$$SpotubeFullTrackObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - @override - final String externalUri; - final List _artists; - @override - @JsonKey() - List get artists { - if (_artists is EqualUnmodifiableListView) return _artists; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_artists); - } - - @override - final SpotubeSimpleAlbumObject album; - @override - final int durationMs; - @override - final String isrc; - @override - final bool explicit; - - @JsonKey(name: 'runtimeType') - final String $type; - - @override - String toString() { - return 'SpotubeTrackObject.full(id: $id, name: $name, externalUri: $externalUri, artists: $artists, album: $album, durationMs: $durationMs, isrc: $isrc, explicit: $explicit)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeFullTrackObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri) && - const DeepCollectionEquality().equals(other._artists, _artists) && - (identical(other.album, album) || other.album == album) && - (identical(other.durationMs, durationMs) || - other.durationMs == durationMs) && - (identical(other.isrc, isrc) || other.isrc == isrc) && - (identical(other.explicit, explicit) || - other.explicit == explicit)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - externalUri, - const DeepCollectionEquality().hash(_artists), - album, - durationMs, - isrc, - explicit); - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeFullTrackObjectImplCopyWith<_$SpotubeFullTrackObjectImpl> - get copyWith => __$$SpotubeFullTrackObjectImplCopyWithImpl< - _$SpotubeFullTrackObjectImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path) - local, - required TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit) - full, - }) { - return full( - id, name, externalUri, artists, album, durationMs, isrc, explicit); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path)? - local, - TResult? Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit)? - full, - }) { - return full?.call( - id, name, externalUri, artists, album, durationMs, isrc, explicit); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String path)? - local, - TResult Function( - String id, - String name, - String externalUri, - List artists, - SpotubeSimpleAlbumObject album, - int durationMs, - String isrc, - bool explicit)? - full, - required TResult orElse(), - }) { - if (full != null) { - return full( - id, name, externalUri, artists, album, durationMs, isrc, explicit); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SpotubeLocalTrackObject value) local, - required TResult Function(SpotubeFullTrackObject value) full, - }) { - return full(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SpotubeLocalTrackObject value)? local, - TResult? Function(SpotubeFullTrackObject value)? full, - }) { - return full?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SpotubeLocalTrackObject value)? local, - TResult Function(SpotubeFullTrackObject value)? full, - required TResult orElse(), - }) { - if (full != null) { - return full(this); - } - return orElse(); - } - - @override - Map toJson() { - return _$$SpotubeFullTrackObjectImplToJson( - this, - ); - } -} - -abstract class SpotubeFullTrackObject implements SpotubeTrackObject { - factory SpotubeFullTrackObject( - {required final String id, - required final String name, - required final String externalUri, - final List artists, - required final SpotubeSimpleAlbumObject album, - required final int durationMs, - required final String isrc, - required final bool explicit}) = _$SpotubeFullTrackObjectImpl; - - factory SpotubeFullTrackObject.fromJson(Map json) = - _$SpotubeFullTrackObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - String get externalUri; - @override - List get artists; - @override - SpotubeSimpleAlbumObject get album; - @override - int get durationMs; - String get isrc; - bool get explicit; - - /// Create a copy of SpotubeTrackObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeFullTrackObjectImplCopyWith<_$SpotubeFullTrackObjectImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SpotubeUserObject _$SpotubeUserObjectFromJson(Map json) { - return _SpotubeUserObject.fromJson(json); -} - -/// @nodoc -mixin _$SpotubeUserObject { - String get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - List get images => throw _privateConstructorUsedError; - String get externalUri => throw _privateConstructorUsedError; - - /// Serializes this SpotubeUserObject to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SpotubeUserObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpotubeUserObjectCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SpotubeUserObjectCopyWith<$Res> { - factory $SpotubeUserObjectCopyWith( - SpotubeUserObject value, $Res Function(SpotubeUserObject) then) = - _$SpotubeUserObjectCopyWithImpl<$Res, SpotubeUserObject>; - @useResult - $Res call( - {String id, - String name, - List images, - String externalUri}); -} - -/// @nodoc -class _$SpotubeUserObjectCopyWithImpl<$Res, $Val extends SpotubeUserObject> - implements $SpotubeUserObjectCopyWith<$Res> { - _$SpotubeUserObjectCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SpotubeUserObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? images = null, - Object? externalUri = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SpotubeUserObjectImplCopyWith<$Res> - implements $SpotubeUserObjectCopyWith<$Res> { - factory _$$SpotubeUserObjectImplCopyWith(_$SpotubeUserObjectImpl value, - $Res Function(_$SpotubeUserObjectImpl) then) = - __$$SpotubeUserObjectImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String name, - List images, - String externalUri}); -} - -/// @nodoc -class __$$SpotubeUserObjectImplCopyWithImpl<$Res> - extends _$SpotubeUserObjectCopyWithImpl<$Res, _$SpotubeUserObjectImpl> - implements _$$SpotubeUserObjectImplCopyWith<$Res> { - __$$SpotubeUserObjectImplCopyWithImpl(_$SpotubeUserObjectImpl _value, - $Res Function(_$SpotubeUserObjectImpl) _then) - : super(_value, _then); - - /// Create a copy of SpotubeUserObject - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? images = null, - Object? externalUri = null, - }) { - return _then(_$SpotubeUserObjectImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - externalUri: null == externalUri - ? _value.externalUri - : externalUri // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SpotubeUserObjectImpl implements _SpotubeUserObject { - _$SpotubeUserObjectImpl( - {required this.id, - required this.name, - final List images = const [], - required this.externalUri}) - : _images = images; - - factory _$SpotubeUserObjectImpl.fromJson(Map json) => - _$$SpotubeUserObjectImplFromJson(json); - - @override - final String id; - @override - final String name; - final List _images; - @override - @JsonKey() - List get images { - if (_images is EqualUnmodifiableListView) return _images; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_images); - } - - @override - final String externalUri; - - @override - String toString() { - return 'SpotubeUserObject(id: $id, name: $name, images: $images, externalUri: $externalUri)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpotubeUserObjectImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality().equals(other._images, _images) && - (identical(other.externalUri, externalUri) || - other.externalUri == externalUri)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, id, name, - const DeepCollectionEquality().hash(_images), externalUri); - - /// Create a copy of SpotubeUserObject - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpotubeUserObjectImplCopyWith<_$SpotubeUserObjectImpl> get copyWith => - __$$SpotubeUserObjectImplCopyWithImpl<_$SpotubeUserObjectImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SpotubeUserObjectImplToJson( - this, - ); - } -} - -abstract class _SpotubeUserObject implements SpotubeUserObject { - factory _SpotubeUserObject( - {required final String id, - required final String name, - final List images, - required final String externalUri}) = _$SpotubeUserObjectImpl; - - factory _SpotubeUserObject.fromJson(Map json) = - _$SpotubeUserObjectImpl.fromJson; - - @override - String get id; - @override - String get name; - @override - List get images; - @override - String get externalUri; - - /// Create a copy of SpotubeUserObject - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpotubeUserObjectImplCopyWith<_$SpotubeUserObjectImpl> get copyWith => - throw _privateConstructorUsedError; -} - -PluginConfiguration _$PluginConfigurationFromJson(Map json) { - return _PluginConfiguration.fromJson(json); -} - -/// @nodoc -mixin _$PluginConfiguration { - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get version => throw _privateConstructorUsedError; - String get author => throw _privateConstructorUsedError; - String get entryPoint => throw _privateConstructorUsedError; - String get pluginApiVersion => throw _privateConstructorUsedError; - List get apis => throw _privateConstructorUsedError; - List get abilities => throw _privateConstructorUsedError; - String? get repository => throw _privateConstructorUsedError; - - /// Serializes this PluginConfiguration to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of PluginConfiguration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $PluginConfigurationCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PluginConfigurationCopyWith<$Res> { - factory $PluginConfigurationCopyWith( - PluginConfiguration value, $Res Function(PluginConfiguration) then) = - _$PluginConfigurationCopyWithImpl<$Res, PluginConfiguration>; - @useResult - $Res call( - {String name, - String description, - String version, - String author, - String entryPoint, - String pluginApiVersion, - List apis, - List abilities, - String? repository}); -} - -/// @nodoc -class _$PluginConfigurationCopyWithImpl<$Res, $Val extends PluginConfiguration> - implements $PluginConfigurationCopyWith<$Res> { - _$PluginConfigurationCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of PluginConfiguration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? description = null, - Object? version = null, - Object? author = null, - Object? entryPoint = null, - Object? pluginApiVersion = null, - Object? apis = null, - Object? abilities = null, - Object? repository = freezed, - }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as String, - entryPoint: null == entryPoint - ? _value.entryPoint - : entryPoint // ignore: cast_nullable_to_non_nullable - as String, - pluginApiVersion: null == pluginApiVersion - ? _value.pluginApiVersion - : pluginApiVersion // ignore: cast_nullable_to_non_nullable - as String, - apis: null == apis - ? _value.apis - : apis // ignore: cast_nullable_to_non_nullable - as List, - abilities: null == abilities - ? _value.abilities - : abilities // ignore: cast_nullable_to_non_nullable - as List, - repository: freezed == repository - ? _value.repository - : repository // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$PluginConfigurationImplCopyWith<$Res> - implements $PluginConfigurationCopyWith<$Res> { - factory _$$PluginConfigurationImplCopyWith(_$PluginConfigurationImpl value, - $Res Function(_$PluginConfigurationImpl) then) = - __$$PluginConfigurationImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String name, - String description, - String version, - String author, - String entryPoint, - String pluginApiVersion, - List apis, - List abilities, - String? repository}); -} - -/// @nodoc -class __$$PluginConfigurationImplCopyWithImpl<$Res> - extends _$PluginConfigurationCopyWithImpl<$Res, _$PluginConfigurationImpl> - implements _$$PluginConfigurationImplCopyWith<$Res> { - __$$PluginConfigurationImplCopyWithImpl(_$PluginConfigurationImpl _value, - $Res Function(_$PluginConfigurationImpl) _then) - : super(_value, _then); - - /// Create a copy of PluginConfiguration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? description = null, - Object? version = null, - Object? author = null, - Object? entryPoint = null, - Object? pluginApiVersion = null, - Object? apis = null, - Object? abilities = null, - Object? repository = freezed, - }) { - return _then(_$PluginConfigurationImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as String, - entryPoint: null == entryPoint - ? _value.entryPoint - : entryPoint // ignore: cast_nullable_to_non_nullable - as String, - pluginApiVersion: null == pluginApiVersion - ? _value.pluginApiVersion - : pluginApiVersion // ignore: cast_nullable_to_non_nullable - as String, - apis: null == apis - ? _value._apis - : apis // ignore: cast_nullable_to_non_nullable - as List, - abilities: null == abilities - ? _value._abilities - : abilities // ignore: cast_nullable_to_non_nullable - as List, - repository: freezed == repository - ? _value.repository - : repository // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$PluginConfigurationImpl extends _PluginConfiguration { - _$PluginConfigurationImpl( - {required this.name, - required this.description, - required this.version, - required this.author, - required this.entryPoint, - required this.pluginApiVersion, - final List apis = const [], - final List abilities = const [], - this.repository}) - : _apis = apis, - _abilities = abilities, - super._(); - - factory _$PluginConfigurationImpl.fromJson(Map json) => - _$$PluginConfigurationImplFromJson(json); - - @override - final String name; - @override - final String description; - @override - final String version; - @override - final String author; - @override - final String entryPoint; - @override - final String pluginApiVersion; - final List _apis; - @override - @JsonKey() - List get apis { - if (_apis is EqualUnmodifiableListView) return _apis; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_apis); - } - - final List _abilities; - @override - @JsonKey() - List get abilities { - if (_abilities is EqualUnmodifiableListView) return _abilities; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_abilities); - } - - @override - final String? repository; - - @override - String toString() { - return 'PluginConfiguration(name: $name, description: $description, version: $version, author: $author, entryPoint: $entryPoint, pluginApiVersion: $pluginApiVersion, apis: $apis, abilities: $abilities, repository: $repository)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PluginConfigurationImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.description, description) || - other.description == description) && - (identical(other.version, version) || other.version == version) && - (identical(other.author, author) || other.author == author) && - (identical(other.entryPoint, entryPoint) || - other.entryPoint == entryPoint) && - (identical(other.pluginApiVersion, pluginApiVersion) || - other.pluginApiVersion == pluginApiVersion) && - const DeepCollectionEquality().equals(other._apis, _apis) && - const DeepCollectionEquality() - .equals(other._abilities, _abilities) && - (identical(other.repository, repository) || - other.repository == repository)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - name, - description, - version, - author, - entryPoint, - pluginApiVersion, - const DeepCollectionEquality().hash(_apis), - const DeepCollectionEquality().hash(_abilities), - repository); - - /// Create a copy of PluginConfiguration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$PluginConfigurationImplCopyWith<_$PluginConfigurationImpl> get copyWith => - __$$PluginConfigurationImplCopyWithImpl<_$PluginConfigurationImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$PluginConfigurationImplToJson( - this, - ); - } -} - -abstract class _PluginConfiguration extends PluginConfiguration { - factory _PluginConfiguration( - {required final String name, - required final String description, - required final String version, - required final String author, - required final String entryPoint, - required final String pluginApiVersion, - final List apis, - final List abilities, - final String? repository}) = _$PluginConfigurationImpl; - _PluginConfiguration._() : super._(); - - factory _PluginConfiguration.fromJson(Map json) = - _$PluginConfigurationImpl.fromJson; - - @override - String get name; - @override - String get description; - @override - String get version; - @override - String get author; - @override - String get entryPoint; - @override - String get pluginApiVersion; - @override - List get apis; - @override - List get abilities; - @override - String? get repository; - - /// Create a copy of PluginConfiguration - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$PluginConfigurationImplCopyWith<_$PluginConfigurationImpl> get copyWith => - throw _privateConstructorUsedError; -} - -PluginUpdateAvailable _$PluginUpdateAvailableFromJson( - Map json) { - return _PluginUpdateAvailable.fromJson(json); -} - -/// @nodoc -mixin _$PluginUpdateAvailable { - String get downloadUrl => throw _privateConstructorUsedError; - String get version => throw _privateConstructorUsedError; - String? get changelog => throw _privateConstructorUsedError; - - /// Serializes this PluginUpdateAvailable to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of PluginUpdateAvailable - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $PluginUpdateAvailableCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PluginUpdateAvailableCopyWith<$Res> { - factory $PluginUpdateAvailableCopyWith(PluginUpdateAvailable value, - $Res Function(PluginUpdateAvailable) then) = - _$PluginUpdateAvailableCopyWithImpl<$Res, PluginUpdateAvailable>; - @useResult - $Res call({String downloadUrl, String version, String? changelog}); -} - -/// @nodoc -class _$PluginUpdateAvailableCopyWithImpl<$Res, - $Val extends PluginUpdateAvailable> - implements $PluginUpdateAvailableCopyWith<$Res> { - _$PluginUpdateAvailableCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of PluginUpdateAvailable - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? downloadUrl = null, - Object? version = null, - Object? changelog = freezed, - }) { - return _then(_value.copyWith( - downloadUrl: null == downloadUrl - ? _value.downloadUrl - : downloadUrl // ignore: cast_nullable_to_non_nullable - as String, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String, - changelog: freezed == changelog - ? _value.changelog - : changelog // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$PluginUpdateAvailableImplCopyWith<$Res> - implements $PluginUpdateAvailableCopyWith<$Res> { - factory _$$PluginUpdateAvailableImplCopyWith( - _$PluginUpdateAvailableImpl value, - $Res Function(_$PluginUpdateAvailableImpl) then) = - __$$PluginUpdateAvailableImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String downloadUrl, String version, String? changelog}); -} - -/// @nodoc -class __$$PluginUpdateAvailableImplCopyWithImpl<$Res> - extends _$PluginUpdateAvailableCopyWithImpl<$Res, - _$PluginUpdateAvailableImpl> - implements _$$PluginUpdateAvailableImplCopyWith<$Res> { - __$$PluginUpdateAvailableImplCopyWithImpl(_$PluginUpdateAvailableImpl _value, - $Res Function(_$PluginUpdateAvailableImpl) _then) - : super(_value, _then); - - /// Create a copy of PluginUpdateAvailable - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? downloadUrl = null, - Object? version = null, - Object? changelog = freezed, - }) { - return _then(_$PluginUpdateAvailableImpl( - downloadUrl: null == downloadUrl - ? _value.downloadUrl - : downloadUrl // ignore: cast_nullable_to_non_nullable - as String, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String, - changelog: freezed == changelog - ? _value.changelog - : changelog // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$PluginUpdateAvailableImpl implements _PluginUpdateAvailable { - _$PluginUpdateAvailableImpl( - {required this.downloadUrl, required this.version, this.changelog}); - - factory _$PluginUpdateAvailableImpl.fromJson(Map json) => - _$$PluginUpdateAvailableImplFromJson(json); - - @override - final String downloadUrl; - @override - final String version; - @override - final String? changelog; - - @override - String toString() { - return 'PluginUpdateAvailable(downloadUrl: $downloadUrl, version: $version, changelog: $changelog)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PluginUpdateAvailableImpl && - (identical(other.downloadUrl, downloadUrl) || - other.downloadUrl == downloadUrl) && - (identical(other.version, version) || other.version == version) && - (identical(other.changelog, changelog) || - other.changelog == changelog)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, downloadUrl, version, changelog); - - /// Create a copy of PluginUpdateAvailable - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$PluginUpdateAvailableImplCopyWith<_$PluginUpdateAvailableImpl> - get copyWith => __$$PluginUpdateAvailableImplCopyWithImpl< - _$PluginUpdateAvailableImpl>(this, _$identity); - - @override - Map toJson() { - return _$$PluginUpdateAvailableImplToJson( - this, - ); - } -} - -abstract class _PluginUpdateAvailable implements PluginUpdateAvailable { - factory _PluginUpdateAvailable( - {required final String downloadUrl, - required final String version, - final String? changelog}) = _$PluginUpdateAvailableImpl; - - factory _PluginUpdateAvailable.fromJson(Map json) = - _$PluginUpdateAvailableImpl.fromJson; - - @override - String get downloadUrl; - @override - String get version; - @override - String? get changelog; - - /// Create a copy of PluginUpdateAvailable - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$PluginUpdateAvailableImplCopyWith<_$PluginUpdateAvailableImpl> - get copyWith => throw _privateConstructorUsedError; -} - -MetadataPluginRepository _$MetadataPluginRepositoryFromJson( - Map json) { - return _MetadataPluginRepository.fromJson(json); -} - -/// @nodoc -mixin _$MetadataPluginRepository { - String get name => throw _privateConstructorUsedError; - String get owner => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get repoUrl => throw _privateConstructorUsedError; - List get topics => throw _privateConstructorUsedError; - - /// Serializes this MetadataPluginRepository to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of MetadataPluginRepository - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $MetadataPluginRepositoryCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MetadataPluginRepositoryCopyWith<$Res> { - factory $MetadataPluginRepositoryCopyWith(MetadataPluginRepository value, - $Res Function(MetadataPluginRepository) then) = - _$MetadataPluginRepositoryCopyWithImpl<$Res, MetadataPluginRepository>; - @useResult - $Res call( - {String name, - String owner, - String description, - String repoUrl, - List topics}); -} - -/// @nodoc -class _$MetadataPluginRepositoryCopyWithImpl<$Res, - $Val extends MetadataPluginRepository> - implements $MetadataPluginRepositoryCopyWith<$Res> { - _$MetadataPluginRepositoryCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of MetadataPluginRepository - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? owner = null, - Object? description = null, - Object? repoUrl = null, - Object? topics = null, - }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - owner: null == owner - ? _value.owner - : owner // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - repoUrl: null == repoUrl - ? _value.repoUrl - : repoUrl // ignore: cast_nullable_to_non_nullable - as String, - topics: null == topics - ? _value.topics - : topics // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$MetadataPluginRepositoryImplCopyWith<$Res> - implements $MetadataPluginRepositoryCopyWith<$Res> { - factory _$$MetadataPluginRepositoryImplCopyWith( - _$MetadataPluginRepositoryImpl value, - $Res Function(_$MetadataPluginRepositoryImpl) then) = - __$$MetadataPluginRepositoryImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String name, - String owner, - String description, - String repoUrl, - List topics}); -} - -/// @nodoc -class __$$MetadataPluginRepositoryImplCopyWithImpl<$Res> - extends _$MetadataPluginRepositoryCopyWithImpl<$Res, - _$MetadataPluginRepositoryImpl> - implements _$$MetadataPluginRepositoryImplCopyWith<$Res> { - __$$MetadataPluginRepositoryImplCopyWithImpl( - _$MetadataPluginRepositoryImpl _value, - $Res Function(_$MetadataPluginRepositoryImpl) _then) - : super(_value, _then); - - /// Create a copy of MetadataPluginRepository - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? owner = null, - Object? description = null, - Object? repoUrl = null, - Object? topics = null, - }) { - return _then(_$MetadataPluginRepositoryImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - owner: null == owner - ? _value.owner - : owner // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - repoUrl: null == repoUrl - ? _value.repoUrl - : repoUrl // ignore: cast_nullable_to_non_nullable - as String, - topics: null == topics - ? _value._topics - : topics // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$MetadataPluginRepositoryImpl implements _MetadataPluginRepository { - _$MetadataPluginRepositoryImpl( - {required this.name, - required this.owner, - required this.description, - required this.repoUrl, - required final List topics}) - : _topics = topics; - - factory _$MetadataPluginRepositoryImpl.fromJson(Map json) => - _$$MetadataPluginRepositoryImplFromJson(json); - - @override - final String name; - @override - final String owner; - @override - final String description; - @override - final String repoUrl; - final List _topics; - @override - List get topics { - if (_topics is EqualUnmodifiableListView) return _topics; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_topics); - } - - @override - String toString() { - return 'MetadataPluginRepository(name: $name, owner: $owner, description: $description, repoUrl: $repoUrl, topics: $topics)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MetadataPluginRepositoryImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.owner, owner) || other.owner == owner) && - (identical(other.description, description) || - other.description == description) && - (identical(other.repoUrl, repoUrl) || other.repoUrl == repoUrl) && - const DeepCollectionEquality().equals(other._topics, _topics)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, owner, description, - repoUrl, const DeepCollectionEquality().hash(_topics)); - - /// Create a copy of MetadataPluginRepository - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$MetadataPluginRepositoryImplCopyWith<_$MetadataPluginRepositoryImpl> - get copyWith => __$$MetadataPluginRepositoryImplCopyWithImpl< - _$MetadataPluginRepositoryImpl>(this, _$identity); - - @override - Map toJson() { - return _$$MetadataPluginRepositoryImplToJson( - this, - ); - } -} - -abstract class _MetadataPluginRepository implements MetadataPluginRepository { - factory _MetadataPluginRepository( - {required final String name, - required final String owner, - required final String description, - required final String repoUrl, - required final List topics}) = _$MetadataPluginRepositoryImpl; - - factory _MetadataPluginRepository.fromJson(Map json) = - _$MetadataPluginRepositoryImpl.fromJson; - - @override - String get name; - @override - String get owner; - @override - String get description; - @override - String get repoUrl; - @override - List get topics; - - /// Create a copy of MetadataPluginRepository - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$MetadataPluginRepositoryImplCopyWith<_$MetadataPluginRepositoryImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/models/metadata/metadata.g.dart b/lib/models/metadata/metadata.g.dart deleted file mode 100644 index 56783d80..00000000 --- a/lib/models/metadata/metadata.g.dart +++ /dev/null @@ -1,618 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'metadata.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$SpotubeAudioSourceContainerPresetLossyImpl - _$$SpotubeAudioSourceContainerPresetLossyImplFromJson(Map json) => - _$SpotubeAudioSourceContainerPresetLossyImpl( - type: $enumDecode(_$SpotubeMediaCompressionTypeEnumMap, json['type']), - name: json['name'] as String, - qualities: (json['qualities'] as List) - .map((e) => SpotubeAudioLossyContainerQuality.fromJson( - Map.from(e as Map))) - .toList(), - ); - -Map _$$SpotubeAudioSourceContainerPresetLossyImplToJson( - _$SpotubeAudioSourceContainerPresetLossyImpl instance) => - { - 'type': _$SpotubeMediaCompressionTypeEnumMap[instance.type]!, - 'name': instance.name, - 'qualities': instance.qualities.map((e) => e.toJson()).toList(), - }; - -const _$SpotubeMediaCompressionTypeEnumMap = { - SpotubeMediaCompressionType.lossy: 'lossy', - SpotubeMediaCompressionType.lossless: 'lossless', -}; - -_$SpotubeAudioSourceContainerPresetLosslessImpl - _$$SpotubeAudioSourceContainerPresetLosslessImplFromJson(Map json) => - _$SpotubeAudioSourceContainerPresetLosslessImpl( - type: $enumDecode(_$SpotubeMediaCompressionTypeEnumMap, json['type']), - name: json['name'] as String, - qualities: (json['qualities'] as List) - .map((e) => SpotubeAudioLosslessContainerQuality.fromJson( - Map.from(e as Map))) - .toList(), - ); - -Map _$$SpotubeAudioSourceContainerPresetLosslessImplToJson( - _$SpotubeAudioSourceContainerPresetLosslessImpl instance) => - { - 'type': _$SpotubeMediaCompressionTypeEnumMap[instance.type]!, - 'name': instance.name, - 'qualities': instance.qualities.map((e) => e.toJson()).toList(), - }; - -_$SpotubeAudioLossyContainerQualityImpl - _$$SpotubeAudioLossyContainerQualityImplFromJson(Map json) => - _$SpotubeAudioLossyContainerQualityImpl( - bitrate: (json['bitrate'] as num).toInt(), - ); - -Map _$$SpotubeAudioLossyContainerQualityImplToJson( - _$SpotubeAudioLossyContainerQualityImpl instance) => - { - 'bitrate': instance.bitrate, - }; - -_$SpotubeAudioLosslessContainerQualityImpl - _$$SpotubeAudioLosslessContainerQualityImplFromJson(Map json) => - _$SpotubeAudioLosslessContainerQualityImpl( - bitDepth: (json['bitDepth'] as num).toInt(), - sampleRate: (json['sampleRate'] as num).toInt(), - ); - -Map _$$SpotubeAudioLosslessContainerQualityImplToJson( - _$SpotubeAudioLosslessContainerQualityImpl instance) => - { - 'bitDepth': instance.bitDepth, - 'sampleRate': instance.sampleRate, - }; - -_$SpotubeAudioSourceMatchObjectImpl - _$$SpotubeAudioSourceMatchObjectImplFromJson(Map json) => - _$SpotubeAudioSourceMatchObjectImpl( - id: json['id'] as String, - title: json['title'] as String, - artists: (json['artists'] as List) - .map((e) => e as String) - .toList(), - duration: Duration(microseconds: (json['duration'] as num).toInt()), - thumbnail: json['thumbnail'] as String?, - externalUri: json['externalUri'] as String, - ); - -Map _$$SpotubeAudioSourceMatchObjectImplToJson( - _$SpotubeAudioSourceMatchObjectImpl instance) => - { - 'id': instance.id, - 'title': instance.title, - 'artists': instance.artists, - 'duration': instance.duration.inMicroseconds, - 'thumbnail': instance.thumbnail, - 'externalUri': instance.externalUri, - }; - -_$SpotubeAudioSourceStreamObjectImpl - _$$SpotubeAudioSourceStreamObjectImplFromJson(Map json) => - _$SpotubeAudioSourceStreamObjectImpl( - url: json['url'] as String, - container: json['container'] as String, - type: $enumDecode(_$SpotubeMediaCompressionTypeEnumMap, json['type']), - codec: json['codec'] as String?, - bitrate: (json['bitrate'] as num?)?.toDouble(), - bitDepth: (json['bitDepth'] as num?)?.toInt(), - sampleRate: (json['sampleRate'] as num?)?.toDouble(), - ); - -Map _$$SpotubeAudioSourceStreamObjectImplToJson( - _$SpotubeAudioSourceStreamObjectImpl instance) => - { - 'url': instance.url, - 'container': instance.container, - 'type': _$SpotubeMediaCompressionTypeEnumMap[instance.type]!, - 'codec': instance.codec, - 'bitrate': instance.bitrate, - 'bitDepth': instance.bitDepth, - 'sampleRate': instance.sampleRate, - }; - -_$SpotubeFullAlbumObjectImpl _$$SpotubeFullAlbumObjectImplFromJson(Map json) => - _$SpotubeFullAlbumObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - artists: (json['artists'] as List) - .map((e) => SpotubeSimpleArtistObject.fromJson( - Map.from(e as Map))) - .toList(), - images: (json['images'] as List?) - ?.map((e) => SpotubeImageObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - releaseDate: json['releaseDate'] as String, - externalUri: json['externalUri'] as String, - totalTracks: (json['totalTracks'] as num).toInt(), - albumType: $enumDecode(_$SpotubeAlbumTypeEnumMap, json['albumType']), - recordLabel: json['recordLabel'] as String?, - genres: - (json['genres'] as List?)?.map((e) => e as String).toList(), - ); - -Map _$$SpotubeFullAlbumObjectImplToJson( - _$SpotubeFullAlbumObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'artists': instance.artists.map((e) => e.toJson()).toList(), - 'images': instance.images.map((e) => e.toJson()).toList(), - 'releaseDate': instance.releaseDate, - 'externalUri': instance.externalUri, - 'totalTracks': instance.totalTracks, - 'albumType': _$SpotubeAlbumTypeEnumMap[instance.albumType]!, - 'recordLabel': instance.recordLabel, - 'genres': instance.genres, - }; - -const _$SpotubeAlbumTypeEnumMap = { - SpotubeAlbumType.album: 'album', - SpotubeAlbumType.single: 'single', - SpotubeAlbumType.compilation: 'compilation', -}; - -_$SpotubeSimpleAlbumObjectImpl _$$SpotubeSimpleAlbumObjectImplFromJson( - Map json) => - _$SpotubeSimpleAlbumObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - externalUri: json['externalUri'] as String, - artists: (json['artists'] as List) - .map((e) => SpotubeSimpleArtistObject.fromJson( - Map.from(e as Map))) - .toList(), - images: (json['images'] as List?) - ?.map((e) => SpotubeImageObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - albumType: $enumDecode(_$SpotubeAlbumTypeEnumMap, json['albumType']), - releaseDate: json['releaseDate'] as String?, - ); - -Map _$$SpotubeSimpleAlbumObjectImplToJson( - _$SpotubeSimpleAlbumObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'externalUri': instance.externalUri, - 'artists': instance.artists.map((e) => e.toJson()).toList(), - 'images': instance.images.map((e) => e.toJson()).toList(), - 'albumType': _$SpotubeAlbumTypeEnumMap[instance.albumType]!, - 'releaseDate': instance.releaseDate, - }; - -_$SpotubeFullArtistObjectImpl _$$SpotubeFullArtistObjectImplFromJson( - Map json) => - _$SpotubeFullArtistObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - externalUri: json['externalUri'] as String, - images: (json['images'] as List?) - ?.map((e) => SpotubeImageObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - genres: - (json['genres'] as List?)?.map((e) => e as String).toList(), - followers: (json['followers'] as num?)?.toInt(), - ); - -Map _$$SpotubeFullArtistObjectImplToJson( - _$SpotubeFullArtistObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'externalUri': instance.externalUri, - 'images': instance.images.map((e) => e.toJson()).toList(), - 'genres': instance.genres, - 'followers': instance.followers, - }; - -_$SpotubeSimpleArtistObjectImpl _$$SpotubeSimpleArtistObjectImplFromJson( - Map json) => - _$SpotubeSimpleArtistObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - externalUri: json['externalUri'] as String, - images: (json['images'] as List?) - ?.map((e) => - SpotubeImageObject.fromJson(Map.from(e as Map))) - .toList(), - ); - -Map _$$SpotubeSimpleArtistObjectImplToJson( - _$SpotubeSimpleArtistObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'externalUri': instance.externalUri, - 'images': instance.images?.map((e) => e.toJson()).toList(), - }; - -_$SpotubeBrowseSectionObjectImpl - _$$SpotubeBrowseSectionObjectImplFromJson( - Map json, - T Function(Object? json) fromJsonT, -) => - _$SpotubeBrowseSectionObjectImpl( - id: json['id'] as String, - title: json['title'] as String, - externalUri: json['externalUri'] as String, - browseMore: json['browseMore'] as bool, - items: (json['items'] as List).map(fromJsonT).toList(), - ); - -Map _$$SpotubeBrowseSectionObjectImplToJson( - _$SpotubeBrowseSectionObjectImpl instance, - Object? Function(T value) toJsonT, -) => - { - 'id': instance.id, - 'title': instance.title, - 'externalUri': instance.externalUri, - 'browseMore': instance.browseMore, - 'items': instance.items.map(toJsonT).toList(), - }; - -_$MetadataFormFieldInputObjectImpl _$$MetadataFormFieldInputObjectImplFromJson( - Map json) => - _$MetadataFormFieldInputObjectImpl( - objectType: json['objectType'] as String, - id: json['id'] as String, - variant: - $enumDecodeNullable(_$FormFieldVariantEnumMap, json['variant']) ?? - FormFieldVariant.text, - placeholder: json['placeholder'] as String?, - defaultValue: json['defaultValue'] as String?, - required: json['required'] as bool?, - regex: json['regex'] as String?, - ); - -Map _$$MetadataFormFieldInputObjectImplToJson( - _$MetadataFormFieldInputObjectImpl instance) => - { - 'objectType': instance.objectType, - 'id': instance.id, - 'variant': _$FormFieldVariantEnumMap[instance.variant]!, - 'placeholder': instance.placeholder, - 'defaultValue': instance.defaultValue, - 'required': instance.required, - 'regex': instance.regex, - }; - -const _$FormFieldVariantEnumMap = { - FormFieldVariant.text: 'text', - FormFieldVariant.password: 'password', - FormFieldVariant.number: 'number', -}; - -_$MetadataFormFieldTextObjectImpl _$$MetadataFormFieldTextObjectImplFromJson( - Map json) => - _$MetadataFormFieldTextObjectImpl( - objectType: json['objectType'] as String, - text: json['text'] as String, - ); - -Map _$$MetadataFormFieldTextObjectImplToJson( - _$MetadataFormFieldTextObjectImpl instance) => - { - 'objectType': instance.objectType, - 'text': instance.text, - }; - -_$SpotubeImageObjectImpl _$$SpotubeImageObjectImplFromJson(Map json) => - _$SpotubeImageObjectImpl( - url: json['url'] as String, - width: (json['width'] as num?)?.toInt(), - height: (json['height'] as num?)?.toInt(), - ); - -Map _$$SpotubeImageObjectImplToJson( - _$SpotubeImageObjectImpl instance) => - { - 'url': instance.url, - 'width': instance.width, - 'height': instance.height, - }; - -_$SpotubePaginationResponseObjectImpl - _$$SpotubePaginationResponseObjectImplFromJson( - Map json, - T Function(Object? json) fromJsonT, -) => - _$SpotubePaginationResponseObjectImpl( - limit: (json['limit'] as num).toInt(), - nextOffset: (json['nextOffset'] as num?)?.toInt(), - total: (json['total'] as num).toInt(), - hasMore: json['hasMore'] as bool, - items: (json['items'] as List).map(fromJsonT).toList(), - ); - -Map _$$SpotubePaginationResponseObjectImplToJson( - _$SpotubePaginationResponseObjectImpl instance, - Object? Function(T value) toJsonT, -) => - { - 'limit': instance.limit, - 'nextOffset': instance.nextOffset, - 'total': instance.total, - 'hasMore': instance.hasMore, - 'items': instance.items.map(toJsonT).toList(), - }; - -_$SpotubeFullPlaylistObjectImpl _$$SpotubeFullPlaylistObjectImplFromJson( - Map json) => - _$SpotubeFullPlaylistObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - description: json['description'] as String, - externalUri: json['externalUri'] as String, - owner: SpotubeUserObject.fromJson( - Map.from(json['owner'] as Map)), - images: (json['images'] as List?) - ?.map((e) => SpotubeImageObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - collaborators: (json['collaborators'] as List?) - ?.map((e) => SpotubeUserObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - collaborative: json['collaborative'] as bool? ?? false, - public: json['public'] as bool? ?? false, - ); - -Map _$$SpotubeFullPlaylistObjectImplToJson( - _$SpotubeFullPlaylistObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'description': instance.description, - 'externalUri': instance.externalUri, - 'owner': instance.owner.toJson(), - 'images': instance.images.map((e) => e.toJson()).toList(), - 'collaborators': instance.collaborators.map((e) => e.toJson()).toList(), - 'collaborative': instance.collaborative, - 'public': instance.public, - }; - -_$SpotubeSimplePlaylistObjectImpl _$$SpotubeSimplePlaylistObjectImplFromJson( - Map json) => - _$SpotubeSimplePlaylistObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - description: json['description'] as String, - externalUri: json['externalUri'] as String, - owner: SpotubeUserObject.fromJson( - Map.from(json['owner'] as Map)), - images: (json['images'] as List?) - ?.map((e) => SpotubeImageObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - ); - -Map _$$SpotubeSimplePlaylistObjectImplToJson( - _$SpotubeSimplePlaylistObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'description': instance.description, - 'externalUri': instance.externalUri, - 'owner': instance.owner.toJson(), - 'images': instance.images.map((e) => e.toJson()).toList(), - }; - -_$SpotubeSearchResponseObjectImpl _$$SpotubeSearchResponseObjectImplFromJson( - Map json) => - _$SpotubeSearchResponseObjectImpl( - albums: (json['albums'] as List) - .map((e) => SpotubeSimpleAlbumObject.fromJson( - Map.from(e as Map))) - .toList(), - artists: (json['artists'] as List) - .map((e) => SpotubeFullArtistObject.fromJson( - Map.from(e as Map))) - .toList(), - playlists: (json['playlists'] as List) - .map((e) => SpotubeSimplePlaylistObject.fromJson( - Map.from(e as Map))) - .toList(), - tracks: (json['tracks'] as List) - .map((e) => SpotubeFullTrackObject.fromJson( - Map.from(e as Map))) - .toList(), - ); - -Map _$$SpotubeSearchResponseObjectImplToJson( - _$SpotubeSearchResponseObjectImpl instance) => - { - 'albums': instance.albums.map((e) => e.toJson()).toList(), - 'artists': instance.artists.map((e) => e.toJson()).toList(), - 'playlists': instance.playlists.map((e) => e.toJson()).toList(), - 'tracks': instance.tracks.map((e) => e.toJson()).toList(), - }; - -_$SpotubeLocalTrackObjectImpl _$$SpotubeLocalTrackObjectImplFromJson( - Map json) => - _$SpotubeLocalTrackObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - externalUri: json['externalUri'] as String, - artists: (json['artists'] as List?) - ?.map((e) => SpotubeSimpleArtistObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - album: SpotubeSimpleAlbumObject.fromJson( - Map.from(json['album'] as Map)), - durationMs: (json['durationMs'] as num).toInt(), - path: json['path'] as String, - $type: json['runtimeType'] as String?, - ); - -Map _$$SpotubeLocalTrackObjectImplToJson( - _$SpotubeLocalTrackObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'externalUri': instance.externalUri, - 'artists': instance.artists.map((e) => e.toJson()).toList(), - 'album': instance.album.toJson(), - 'durationMs': instance.durationMs, - 'path': instance.path, - 'runtimeType': instance.$type, - }; - -_$SpotubeFullTrackObjectImpl _$$SpotubeFullTrackObjectImplFromJson(Map json) => - _$SpotubeFullTrackObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - externalUri: json['externalUri'] as String, - artists: (json['artists'] as List?) - ?.map((e) => SpotubeSimpleArtistObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - album: SpotubeSimpleAlbumObject.fromJson( - Map.from(json['album'] as Map)), - durationMs: (json['durationMs'] as num).toInt(), - isrc: json['isrc'] as String, - explicit: json['explicit'] as bool, - $type: json['runtimeType'] as String?, - ); - -Map _$$SpotubeFullTrackObjectImplToJson( - _$SpotubeFullTrackObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'externalUri': instance.externalUri, - 'artists': instance.artists.map((e) => e.toJson()).toList(), - 'album': instance.album.toJson(), - 'durationMs': instance.durationMs, - 'isrc': instance.isrc, - 'explicit': instance.explicit, - 'runtimeType': instance.$type, - }; - -_$SpotubeUserObjectImpl _$$SpotubeUserObjectImplFromJson(Map json) => - _$SpotubeUserObjectImpl( - id: json['id'] as String, - name: json['name'] as String, - images: (json['images'] as List?) - ?.map((e) => SpotubeImageObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - externalUri: json['externalUri'] as String, - ); - -Map _$$SpotubeUserObjectImplToJson( - _$SpotubeUserObjectImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'images': instance.images.map((e) => e.toJson()).toList(), - 'externalUri': instance.externalUri, - }; - -_$PluginConfigurationImpl _$$PluginConfigurationImplFromJson(Map json) => - _$PluginConfigurationImpl( - name: json['name'] as String, - description: json['description'] as String, - version: json['version'] as String, - author: json['author'] as String, - entryPoint: json['entryPoint'] as String, - pluginApiVersion: json['pluginApiVersion'] as String, - apis: (json['apis'] as List?) - ?.map((e) => $enumDecode(_$PluginApisEnumMap, e)) - .toList() ?? - const [], - abilities: (json['abilities'] as List?) - ?.map((e) => $enumDecode(_$PluginAbilitiesEnumMap, e)) - .toList() ?? - const [], - repository: json['repository'] as String?, - ); - -Map _$$PluginConfigurationImplToJson( - _$PluginConfigurationImpl instance) => - { - 'name': instance.name, - 'description': instance.description, - 'version': instance.version, - 'author': instance.author, - 'entryPoint': instance.entryPoint, - 'pluginApiVersion': instance.pluginApiVersion, - 'apis': instance.apis.map((e) => _$PluginApisEnumMap[e]!).toList(), - 'abilities': - instance.abilities.map((e) => _$PluginAbilitiesEnumMap[e]!).toList(), - 'repository': instance.repository, - }; - -const _$PluginApisEnumMap = { - PluginApis.webview: 'webview', - PluginApis.localstorage: 'localstorage', - PluginApis.timezone: 'timezone', -}; - -const _$PluginAbilitiesEnumMap = { - PluginAbilities.authentication: 'authentication', - PluginAbilities.scrobbling: 'scrobbling', - PluginAbilities.metadata: 'metadata', - PluginAbilities.audioSource: 'audio-source', -}; - -_$PluginUpdateAvailableImpl _$$PluginUpdateAvailableImplFromJson(Map json) => - _$PluginUpdateAvailableImpl( - downloadUrl: json['downloadUrl'] as String, - version: json['version'] as String, - changelog: json['changelog'] as String?, - ); - -Map _$$PluginUpdateAvailableImplToJson( - _$PluginUpdateAvailableImpl instance) => - { - 'downloadUrl': instance.downloadUrl, - 'version': instance.version, - 'changelog': instance.changelog, - }; - -_$MetadataPluginRepositoryImpl _$$MetadataPluginRepositoryImplFromJson( - Map json) => - _$MetadataPluginRepositoryImpl( - name: json['name'] as String, - owner: json['owner'] as String, - description: json['description'] as String, - repoUrl: json['repoUrl'] as String, - topics: - (json['topics'] as List).map((e) => e as String).toList(), - ); - -Map _$$MetadataPluginRepositoryImplToJson( - _$MetadataPluginRepositoryImpl instance) => - { - 'name': instance.name, - 'owner': instance.owner, - 'description': instance.description, - 'repoUrl': instance.repoUrl, - 'topics': instance.topics, - }; diff --git a/lib/models/metadata/pagination.dart b/lib/models/metadata/pagination.dart deleted file mode 100644 index 093c1d2b..00000000 --- a/lib/models/metadata/pagination.dart +++ /dev/null @@ -1,22 +0,0 @@ -part of 'metadata.dart'; - -@Freezed(genericArgumentFactories: true) -class SpotubePaginationResponseObject - with _$SpotubePaginationResponseObject { - factory SpotubePaginationResponseObject({ - required int limit, - required int? nextOffset, - required int total, - required bool hasMore, - required List items, - }) = _SpotubePaginationResponseObject; - - factory SpotubePaginationResponseObject.fromJson( - Map json, - T Function(Map json) fromJsonT, - ) => - _$SpotubePaginationResponseObjectFromJson( - json, - (json) => fromJsonT(json as Map), - ); -} diff --git a/lib/models/metadata/playlist.dart b/lib/models/metadata/playlist.dart deleted file mode 100644 index 5bb8f1ae..00000000 --- a/lib/models/metadata/playlist.dart +++ /dev/null @@ -1,34 +0,0 @@ -part of 'metadata.dart'; - -@freezed -class SpotubeFullPlaylistObject with _$SpotubeFullPlaylistObject { - factory SpotubeFullPlaylistObject({ - required String id, - required String name, - required String description, - required String externalUri, - required SpotubeUserObject owner, - @Default([]) List images, - @Default([]) List collaborators, - @Default(false) bool collaborative, - @Default(false) bool public, - }) = _SpotubeFullPlaylistObject; - - factory SpotubeFullPlaylistObject.fromJson(Map json) => - _$SpotubeFullPlaylistObjectFromJson(json); -} - -@freezed -class SpotubeSimplePlaylistObject with _$SpotubeSimplePlaylistObject { - factory SpotubeSimplePlaylistObject({ - required String id, - required String name, - required String description, - required String externalUri, - required SpotubeUserObject owner, - @Default([]) List images, - }) = _SpotubeSimplePlaylistObject; - - factory SpotubeSimplePlaylistObject.fromJson(Map json) => - _$SpotubeSimplePlaylistObjectFromJson(json); -} diff --git a/lib/models/metadata/plugin.dart b/lib/models/metadata/plugin.dart deleted file mode 100644 index 6bc84160..00000000 --- a/lib/models/metadata/plugin.dart +++ /dev/null @@ -1,45 +0,0 @@ -part of 'metadata.dart'; - -enum PluginApis { webview, localstorage, timezone } - -enum PluginAbilities { - authentication, - scrobbling, - metadata, - @JsonValue('audio-source') - audioSource, -} - -@freezed -class PluginConfiguration with _$PluginConfiguration { - const PluginConfiguration._(); - - factory PluginConfiguration({ - required String name, - required String description, - required String version, - required String author, - required String entryPoint, - required String pluginApiVersion, - @Default([]) List apis, - @Default([]) List abilities, - String? repository, - }) = _PluginConfiguration; - - factory PluginConfiguration.fromJson(Map json) => - _$PluginConfigurationFromJson(json); - - String get slug => name.toLowerCase().replaceAll(RegExp(r'[^a-z0-9]+'), '-'); -} - -@freezed -class PluginUpdateAvailable with _$PluginUpdateAvailable { - factory PluginUpdateAvailable({ - required String downloadUrl, - required String version, - String? changelog, - }) = _PluginUpdateAvailable; - - factory PluginUpdateAvailable.fromJson(Map json) => - _$PluginUpdateAvailableFromJson(json); -} diff --git a/lib/models/metadata/repository.dart b/lib/models/metadata/repository.dart deleted file mode 100644 index 2a83f791..00000000 --- a/lib/models/metadata/repository.dart +++ /dev/null @@ -1,15 +0,0 @@ -part of './metadata.dart'; - -@freezed -class MetadataPluginRepository with _$MetadataPluginRepository { - factory MetadataPluginRepository({ - required String name, - required String owner, - required String description, - required String repoUrl, - required List topics, - }) = _MetadataPluginRepository; - - factory MetadataPluginRepository.fromJson(Map json) => - _$MetadataPluginRepositoryFromJson(json); -} diff --git a/lib/models/metadata/search.dart b/lib/models/metadata/search.dart deleted file mode 100644 index b39f063a..00000000 --- a/lib/models/metadata/search.dart +++ /dev/null @@ -1,14 +0,0 @@ -part of 'metadata.dart'; - -@freezed -class SpotubeSearchResponseObject with _$SpotubeSearchResponseObject { - factory SpotubeSearchResponseObject({ - required List albums, - required List artists, - required List playlists, - required List tracks, - }) = _SpotubeSearchResponseObject; - - factory SpotubeSearchResponseObject.fromJson(Map json) => - _$SpotubeSearchResponseObjectFromJson(json); -} diff --git a/lib/models/metadata/track.dart b/lib/models/metadata/track.dart deleted file mode 100644 index ecf7f0a2..00000000 --- a/lib/models/metadata/track.dart +++ /dev/null @@ -1,119 +0,0 @@ -part of 'metadata.dart'; - -@freezed -class SpotubeTrackObject with _$SpotubeTrackObject { - factory SpotubeTrackObject.local({ - required String id, - required String name, - required String externalUri, - @Default([]) List artists, - required SpotubeSimpleAlbumObject album, - required int durationMs, - required String path, - }) = SpotubeLocalTrackObject; - - factory SpotubeTrackObject.full({ - required String id, - required String name, - required String externalUri, - @Default([]) List artists, - required SpotubeSimpleAlbumObject album, - required int durationMs, - required String isrc, - required bool explicit, - }) = SpotubeFullTrackObject; - - factory SpotubeTrackObject.localTrackFromFile( - File file, { - Metadata? metadata, - String? art, - }) { - return SpotubeLocalTrackObject( - id: file.absolute.path, - name: metadata?.title ?? basenameWithoutExtension(file.path), - externalUri: "file://${file.absolute.path}", - artists: metadata?.artist?.split(",").map((a) { - return SpotubeSimpleArtistObject( - id: a.trim(), - name: a.trim(), - externalUri: "file://${file.absolute.path}", - ); - }).toList() ?? - [ - SpotubeSimpleArtistObject( - id: "unknown", - name: "Unknown Artist", - externalUri: "file://${file.absolute.path}", - ), - ], - album: SpotubeSimpleAlbumObject( - albumType: SpotubeAlbumType.album, - id: metadata?.album ?? "unknown", - name: metadata?.album ?? "Unknown Album", - externalUri: "file://${file.absolute.path}", - artists: [ - SpotubeSimpleArtistObject( - id: metadata?.albumArtist ?? "unknown", - name: metadata?.albumArtist ?? "Unknown Artist", - externalUri: "file://${file.absolute.path}", - ), - ], - releaseDate: - metadata?.year != null ? "${metadata!.year}-01-01" : "1970-01-01", - images: [ - if (art != null) - SpotubeImageObject( - url: art, - width: 300, - height: 300, - ), - ], - ), - durationMs: metadata?.durationMs?.toInt() ?? 0, - path: file.path, - ); - } - - factory SpotubeTrackObject.fromJson(Map json) => - _$SpotubeTrackObjectFromJson( - json.containsKey("path") - ? {...json, "runtimeType": "local"} - : {...json, "runtimeType": "full"}, - ); -} - -extension AsMediaListSpotubeTrackObject on Iterable { - List asMediaList() { - return map((track) => SpotubeMedia(track)).toList(); - } -} - -extension ToMetadataSpotubeFullTrackObject on SpotubeFullTrackObject { - Metadata toMetadata({ - required int fileLength, - Uint8List? imageBytes, - String? mimeType, - }) { - return Metadata( - title: name, - artist: artists.map((a) => a.name).join(", "), - album: album.name, - albumArtist: artists.map((a) => a.name).join(", "), - year: album.releaseDate == null - ? 1970 - : DateTime.tryParse(album.releaseDate!)?.year ?? - int.tryParse(album.releaseDate!) ?? - 1970, - durationMs: durationMs.toDouble(), - fileSize: BigInt.from(fileLength), - picture: imageBytes != null - ? Picture( - data: imageBytes, - mimeType: mimeType ?? - lookupMimeType("", headerBytes: imageBytes) ?? - "image/jpeg", - ) - : null, - ); - } -} diff --git a/lib/models/metadata/user.dart b/lib/models/metadata/user.dart deleted file mode 100644 index cd041f9c..00000000 --- a/lib/models/metadata/user.dart +++ /dev/null @@ -1,14 +0,0 @@ -part of 'metadata.dart'; - -@freezed -class SpotubeUserObject with _$SpotubeUserObject { - factory SpotubeUserObject({ - required final String id, - required final String name, - @Default([]) final List images, - required final String externalUri, - }) = _SpotubeUserObject; - - factory SpotubeUserObject.fromJson(Map json) => - _$SpotubeUserObjectFromJson(json); -} diff --git a/lib/models/parser/range_headers.dart b/lib/models/parser/range_headers.dart deleted file mode 100644 index 08025cbf..00000000 --- a/lib/models/parser/range_headers.dart +++ /dev/null @@ -1,71 +0,0 @@ -class ContentRangeHeader { - final int start; - final int end; - final int total; - - ContentRangeHeader(this.start, this.end, this.total); - - factory ContentRangeHeader.parse(String value) { - if (value.isEmpty) { - throw FormatException('Invalid Content-Range header: $value'); - } - - final parts = value.split(' '); - if (parts.length != 2) { - throw FormatException('Invalid Content-Range header: $value'); - } - - final rangeParts = parts[1].split('/'); - if (rangeParts.length != 2) { - throw FormatException('Invalid Content-Range header: $value'); - } - - final range = rangeParts[0].split('-'); - if (range.length != 2) { - throw FormatException('Invalid Content-Range header: $value'); - } - - return ContentRangeHeader( - int.parse(range[0]), - int.parse(range[1]), - int.parse(rangeParts[1]), - ); - } - - @override - String toString() { - return 'bytes $start-$end/$total'; - } -} - -class RangeHeader { - final int start; - final int? end; - - RangeHeader(this.start, this.end); - - factory RangeHeader.parse(String value) { - if (value.isEmpty) { - return RangeHeader(0, null); - } - - final parts = value.split('='); - if (parts.length != 2) { - throw FormatException('Invalid Range header: $value'); - } - - final ranges = parts[1].split('-'); - - return RangeHeader( - int.parse(ranges[0]), - ranges.elementAtOrNull(1) != null && ranges[1].isNotEmpty - ? int.parse(ranges[1]) - : null, - ); - } - - @override - String toString() { - return 'bytes=$start-${end ?? ""}'; - } -} diff --git a/lib/models/playback/track_sources.dart b/lib/models/playback/track_sources.dart deleted file mode 100644 index 677b34b8..00000000 --- a/lib/models/playback/track_sources.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -part 'track_sources.g.dart'; - -@JsonSerializable() -class BasicSourcedTrack { - final SpotubeFullTrackObject query; - final SpotubeAudioSourceMatchObject info; - final String source; - final List sources; - final List siblings; - BasicSourcedTrack({ - required this.query, - required this.source, - required this.info, - required this.sources, - this.siblings = const [], - }); - - factory BasicSourcedTrack.fromJson(Map json) => - _$BasicSourcedTrackFromJson(json); - Map toJson() => _$BasicSourcedTrackToJson(this); -} diff --git a/lib/models/playback/track_sources.g.dart b/lib/models/playback/track_sources.g.dart deleted file mode 100644 index 3088493a..00000000 --- a/lib/models/playback/track_sources.g.dart +++ /dev/null @@ -1,33 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'track_sources.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -BasicSourcedTrack _$BasicSourcedTrackFromJson(Map json) => BasicSourcedTrack( - query: SpotubeFullTrackObject.fromJson( - Map.from(json['query'] as Map)), - source: json['source'] as String, - info: SpotubeAudioSourceMatchObject.fromJson( - Map.from(json['info'] as Map)), - sources: (json['sources'] as List) - .map((e) => SpotubeAudioSourceStreamObject.fromJson( - Map.from(e as Map))) - .toList(), - siblings: (json['siblings'] as List?) - ?.map((e) => SpotubeAudioSourceMatchObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - ); - -Map _$BasicSourcedTrackToJson(BasicSourcedTrack instance) => - { - 'query': instance.query.toJson(), - 'info': instance.info.toJson(), - 'source': instance.source, - 'sources': instance.sources.map((e) => e.toJson()).toList(), - 'siblings': instance.siblings.map((e) => e.toJson()).toList(), - }; diff --git a/lib/modules/album/album_card.dart b/lib/modules/album/album_card.dart deleted file mode 100644 index 80dfd55b..00000000 --- a/lib/modules/album/album_card.dart +++ /dev/null @@ -1,188 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/playbutton_view/playbutton_card.dart'; -import 'package:spotube/components/playbutton_view/playbutton_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/querying_track_info.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/history/history.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/album.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -extension FormattedAlbumType on SpotubeAlbumType { - String get formatted => name.replaceFirst(name[0], name[0].toUpperCase()); -} - -class AlbumCard extends HookConsumerWidget { - final SpotubeSimpleAlbumObject album; - final bool _isTile; - const AlbumCard( - this.album, { - super.key, - }) : _isTile = false; - - const AlbumCard.tile( - this.album, { - super.key, - }) : _isTile = true; - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - final playing = - useStream(audioPlayer.playingStream).data ?? audioPlayer.isPlaying; - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final historyNotifier = ref.read(playbackHistoryActionsProvider); - final isFetchingActiveTrack = ref.watch(queryingTrackInfoProvider); - - final isPlaylistPlaying = useMemoized( - () => playlist.containsCollection(album.id), - [playlist, album.id], - ); - - final updating = useState(false); - - final fetchAllTrack = useCallback(() async { - await ref.read(metadataPluginAlbumTracksProvider(album.id).future); - return ref - .read(metadataPluginAlbumTracksProvider(album.id).notifier) - .fetchAll(); - }, [album.id, ref]); - - final imageUrl = useMemoized( - () => album.images.from200PxTo300PxOrSmallestImage( - ImagePlaceholder.collection, - ), - [album.images], - ); - - final isLoading = - (isPlaylistPlaying && isFetchingActiveTrack) || updating.value; - final description = "${album.albumType.name} • ${album.artists.asString()}"; - - final onTap = useCallback(() { - context.navigateTo(AlbumRoute(id: album.id, album: album)); - }, [context, album]); - - final onPlaybuttonPressed = useCallback(() async { - updating.value = true; - try { - if (isPlaylistPlaying) { - return playing ? audioPlayer.pause() : audioPlayer.resume(); - } - - final fetchedTracks = await fetchAllTrack(); - - if (fetchedTracks.isEmpty || !context.mounted) return; - - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - if (isRemoteDevice == null) return; - if (isRemoteDevice) { - final remotePlayback = ref.read(connectProvider.notifier); - await remotePlayback.load( - WebSocketLoadEventData.album( - tracks: fetchedTracks, - collection: album, - ), - ); - } else { - await playlistNotifier.load(fetchedTracks, autoPlay: true); - playlistNotifier.addCollection(album.id); - historyNotifier.addAlbums([album]); - } - } finally { - updating.value = false; - } - }, [ - isPlaylistPlaying, - playing, - audioPlayer, - fetchAllTrack, - context, - ref, - playlistNotifier, - album, - historyNotifier, - updating - ]); - - final onAddToQueuePressed = useCallback(() async { - if (isPlaylistPlaying) { - return; - } - - updating.value = true; - try { - final fetchedTracks = await fetchAllTrack(); - - if (fetchedTracks.isEmpty) return; - playlistNotifier.addTracks(fetchedTracks); - playlistNotifier.addCollection(album.id); - historyNotifier.addAlbums([album]); - if (context.mounted) { - showToast( - context: context, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - content: Text( - context.l10n.added_to_queue(fetchedTracks.length), - ), - trailing: Button.outline( - child: Text(context.l10n.undo), - onPressed: () { - playlistNotifier - .removeTracks(fetchedTracks.map((e) => e.id)); - }, - ), - ), - ); - }, - ); - } - } finally { - updating.value = false; - } - }, [ - isPlaylistPlaying, - updating.value, - fetchAllTrack, - playlistNotifier, - album.id, - historyNotifier, - album, - context - ]); - - if (_isTile) { - return PlaybuttonTile( - imageUrl: imageUrl, - isPlaying: isPlaylistPlaying, - isLoading: isLoading, - title: album.name, - description: description, - onTap: onTap, - onPlaybuttonPressed: onPlaybuttonPressed, - onAddToQueuePressed: onAddToQueuePressed, - ); - } - - return PlaybuttonCard( - imageUrl: imageUrl, - isPlaying: isPlaylistPlaying, - isLoading: isLoading, - title: album.name, - description: description, - onTap: onTap, - onPlaybuttonPressed: onPlaybuttonPressed, - onAddToQueuePressed: onAddToQueuePressed, - ); - } -} diff --git a/lib/modules/artist/artist_album_list.dart b/lib/modules/artist/artist_album_list.dart deleted file mode 100644 index 8d228905..00000000 --- a/lib/modules/artist/artist_album_list.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/artist/albums.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -class ArtistAlbumList extends HookConsumerWidget { - final String artistId; - - const ArtistAlbumList( - this.artistId, { - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final albumsQuery = ref.watch(metadataPluginArtistAlbumsProvider(artistId)); - final albumsQueryNotifier = - ref.watch(metadataPluginArtistAlbumsProvider(artistId).notifier); - - final albums = albumsQuery.asData?.value.items ?? []; - - final theme = Theme.of(context); - - return HorizontalPlaybuttonCardView( - isLoadingNextPage: albumsQuery.isLoadingNextPage, - hasNextPage: albumsQuery.asData?.value.hasMore ?? false, - items: albums, - onFetchMore: albumsQueryNotifier.fetchMore, - title: Text( - context.l10n.albums, - style: theme.typography.h4, - ), - ); - } -} diff --git a/lib/modules/artist/artist_card.dart b/lib/modules/artist/artist_card.dart deleted file mode 100644 index d9e01206..00000000 --- a/lib/modules/artist/artist_card.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:auto_size_text/auto_size_text.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -import 'package:spotube/provider/blacklist_provider.dart'; - -class ArtistCard extends HookConsumerWidget { - final SpotubeFullArtistObject artist; - const ArtistCard(this.artist, {super.key}); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final backgroundImage = UniversalImage.imageProvider( - artist.images.asUrlString( - placeholder: ImagePlaceholder.artist, - ), - ); - final isBlackListed = ref.watch( - blacklistProvider.select( - (blacklist) => blacklist.asData?.value.any( - (element) => element.elementId == artist.id, - ), - ), - ); - - return SizedBox( - width: 180, - child: Button.card( - onPressed: () { - context.navigateTo(ArtistRoute(artistId: artist.id)); - }, - child: Column( - children: [ - Avatar( - initials: artist.name.trim()[0].toUpperCase(), - provider: backgroundImage, - size: 130, - ), - const Gap(10), - AutoSizeText( - artist.name, - maxLines: 2, - textAlign: TextAlign.center, - overflow: TextOverflow.ellipsis, - style: theme.typography.bold, - ), - const Spacer(), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - if (isBlackListed == true) ...[ - DestructiveBadge( - child: Text(context.l10n.blacklisted.toUpperCase()), - ), - const Gap(5), - ], - SecondaryBadge( - child: Text(context.l10n.artist.toUpperCase()), - ) - ], - ) - ], - ), - ), - ); - } -} diff --git a/lib/modules/connect/connect_device.dart b/lib/modules/connect/connect_device.dart deleted file mode 100644 index 2c8d612b..00000000 --- a/lib/modules/connect/connect_device.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/connect/clients.dart'; - -class ConnectDeviceButton extends HookConsumerWidget { - final bool _sidebar; - const ConnectDeviceButton({super.key}) : _sidebar = false; - const ConnectDeviceButton.sidebar({super.key}) : _sidebar = true; - - @override - Widget build(BuildContext context, ref) { - final connectClients = ref.watch(connectClientsProvider); - - final hasServices = - connectClients.asData?.value.services.isNotEmpty == true; - - if (_sidebar) { - final mediaQuery = MediaQuery.sizeOf(context); - - if (mediaQuery.mdAndDown) { - return IconButton.ghost( - icon: const Icon(SpotubeIcons.speaker), - onPressed: () { - context.navigateTo(const ConnectRoute()); - }, - ); - } - - return SizedBox( - width: double.infinity, - child: Button.primary( - onPressed: () { - context.navigateTo(const ConnectRoute()); - }, - trailing: const Icon(SpotubeIcons.speaker), - child: Text( - "${context.l10n.devices}" - "${hasServices ? " (${connectClients.asData?.value.services.length})" : ""}", - ), - ), - ); - } - - return Row( - children: [ - SecondaryBadge( - onPressed: () { - context.navigateTo(const ConnectRoute()); - }, - style: const ButtonStyle.secondary(size: ButtonSize(.8)), - leading: connectClients.asData?.value.resolvedService != null - ? const Center( - child: DotItem( - size: 6, - borderRadius: 10, - color: Colors.green, - ), - ) - : null, - child: Text( - "${context.l10n.devices}" - "${hasServices ? " (${connectClients.asData?.value.services.length})" : ""}", - ), - ), - IconButton.primary( - icon: const Icon(SpotubeIcons.speaker), - onPressed: () { - context.navigateTo(const ConnectRoute()); - }, - ) - ], - ); - } -} diff --git a/lib/modules/connect/local_devices.dart b/lib/modules/connect/local_devices.dart deleted file mode 100644 index dc192e44..00000000 --- a/lib/modules/connect/local_devices.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -class ConnectPageLocalDevices extends HookWidget { - const ConnectPageLocalDevices({super.key}); - - @override - Widget build(BuildContext context) { - final ThemeData(:typography) = Theme.of(context); - final devicesFuture = useFuture(audioPlayer.devices); - final devicesStream = useStream(audioPlayer.devicesStream); - final selectedDeviceFuture = useFuture(audioPlayer.selectedDevice); - final selectedDeviceStream = useStream(audioPlayer.selectedDeviceStream); - - final devices = devicesStream.data ?? devicesFuture.data; - final selectedDevice = - selectedDeviceStream.data ?? selectedDeviceFuture.data; - - if (devices == null) { - return const SliverToBoxAdapter(child: SizedBox.shrink()); - } - - return SliverMainAxisGroup( - slivers: [ - const SliverGap(10), - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - sliver: SliverToBoxAdapter( - child: Text( - context.l10n.this_device, - style: typography.bold, - ), - ), - ), - const SliverGap(10), - SliverList.separated( - itemCount: devices.length, - separatorBuilder: (context, index) => const Gap(10), - itemBuilder: (context, index) { - final device = devices[index]; - - return ButtonTile( - selected: selectedDevice == device, - onPressed: () => audioPlayer.setAudioDevice(device), - leading: const Icon(SpotubeIcons.speaker), - title: Text(device.description), - subtitle: Text(device.name), - ); - }, - ), - const SliverGap(200) - ], - ); - } -} diff --git a/lib/modules/getting_started/blur_card.dart b/lib/modules/getting_started/blur_card.dart deleted file mode 100644 index 6434c0a3..00000000 --- a/lib/modules/getting_started/blur_card.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -class BlurCard extends HookConsumerWidget { - final Widget child; - const BlurCard({super.key, required this.child}); - - @override - Widget build(BuildContext context, ref) { - return Container( - margin: const EdgeInsets.all(16.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16), - ), - constraints: const BoxConstraints(maxWidth: 400), - clipBehavior: Clip.antiAlias, - child: SizedBox( - width: double.infinity, - child: SurfaceCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: child, - ), - ), - ), - ); - } -} diff --git a/lib/modules/home/sections/featured.dart b/lib/modules/home/sections/featured.dart deleted file mode 100644 index c65ebf89..00000000 --- a/lib/modules/home/sections/featured.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; - -@Deprecated( - "Later a featured playlists API will be added for metadata plugins.") -class HomeFeaturedSection extends HookConsumerWidget { - const HomeFeaturedSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - return const SizedBox.shrink(); - // final featuredPlaylists = ref.watch(featuredPlaylistsProvider); - // final featuredPlaylistsNotifier = - // ref.watch(featuredPlaylistsProvider.notifier); - - // if (featuredPlaylists.hasError) { - // return Column( - // mainAxisSize: MainAxisSize.min, - // children: [ - // Undraw( - // illustration: UndrawIllustration.fixingBugs, - // height: 200 * context.theme.scaling, - // color: context.theme.colorScheme.primary, - // ), - // Text(context.l10n.something_went_wrong).small().muted(), - // const Gap(8), - // ], - // ); - // } - - // return Skeletonizer( - // enabled: featuredPlaylists.isLoading, - // child: HorizontalPlaybuttonCardView( - // items: featuredPlaylists.asData?.value.items ?? [], - // title: Text(context.l10n.featured), - // isLoadingNextPage: featuredPlaylists.isLoadingNextPage, - // hasNextPage: featuredPlaylists.asData?.value.hasMore ?? false, - // onFetchMore: featuredPlaylistsNotifier.fetchMore, - // ), - // ); - } -} diff --git a/lib/modules/home/sections/new_releases.dart b/lib/modules/home/sections/new_releases.dart deleted file mode 100644 index be6d335d..00000000 --- a/lib/modules/home/sections/new_releases.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/album/releases.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -class HomeNewReleasesSection extends HookConsumerWidget { - const HomeNewReleasesSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - - final newReleases = ref.watch(metadataPluginAlbumReleasesProvider); - final newReleasesNotifier = - ref.read(metadataPluginAlbumReleasesProvider.notifier); - - if (authenticated.asData?.value != true || - newReleases.isLoading || - newReleases.asData?.value.items.isEmpty == true) { - return const SizedBox.shrink(); - } - - if (newReleases.error - case MetadataPluginException( - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - message: _, - )) { - return const SizedBox.shrink(); - } - - return HorizontalPlaybuttonCardView( - items: newReleases.asData?.value.items ?? [], - title: Text(context.l10n.new_releases), - isLoadingNextPage: newReleases.isLoadingNextPage, - hasNextPage: newReleases.asData?.value.hasMore ?? false, - onFetchMore: newReleasesNotifier.fetchMore, - error: newReleases.hasError - ? Center( - child: ErrorBox( - error: newReleases.error!, - onRetry: () { - ref.invalidate(metadataPluginAlbumReleasesProvider); - }, - ), - ) - : null, - ); - } -} diff --git a/lib/modules/home/sections/recent.dart b/lib/modules/home/sections/recent.dart deleted file mode 100644 index 5420ad55..00000000 --- a/lib/modules/home/sections/recent.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/provider/history/recent.dart'; - -class HomeRecentlyPlayedSection extends HookConsumerWidget { - const HomeRecentlyPlayedSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final history = ref.watch(recentlyPlayedItems); - final historyData = - history.asData?.value ?? FakeData.historyRecentlyPlayedItems; - - if (history.asData?.value.isEmpty == true) { - return const SizedBox(); - } - - return Skeletonizer( - enabled: history.isLoading, - child: HorizontalPlaybuttonCardView( - title: Text(context.l10n.recently_played), - items: [ - for (final item in historyData) - if (item.playlist != null) - item.playlist - else if (item.album != null) - item.album - ], - hasNextPage: false, - isLoadingNextPage: false, - onFetchMore: () {}, - ), - ); - } -} diff --git a/lib/modules/home/sections/sections.dart b/lib/modules/home/sections/sections.dart deleted file mode 100644 index 93055b74..00000000 --- a/lib/modules/home/sections/sections.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/fallbacks/no_default_metadata_plugin.dart'; -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/metadata_plugin/browse/sections.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; - -class HomePageBrowseSection extends HookConsumerWidget { - const HomePageBrowseSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final browseSections = ref.watch(metadataPluginBrowseSectionsProvider); - final sections = browseSections.asData?.value.items; - final ThemeData(:colorScheme) = Theme.of(context); - - if (browseSections.isLoading) { - return SliverToBoxAdapter( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 16, - children: [ - Undraw( - height: 200, - illustration: UndrawIllustration.process, - color: colorScheme.primary, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 8, - children: [ - const CircularProgressIndicator(), - Text(context.l10n.building_your_timeline).muted, - ], - ), - const Gap(16), - ], - ), - ); - } - - if (browseSections.error - case MetadataPluginException( - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - message: _, - )) { - return const SliverFillRemaining( - child: Center(child: NoDefaultMetadataPlugin()), - ); - } - - if (browseSections.hasError) { - return SliverFillRemaining( - child: Center( - child: ErrorBox( - error: browseSections.error!, - onRetry: () { - ref.invalidate(metadataPluginBrowseSectionsProvider); - }, - ), - ), - ); - } - - return SliverInfiniteList( - hasReachedMax: browseSections.asData?.value.hasMore == false, - isLoading: !browseSections.isLoading && browseSections.isLoadingNextPage, - onFetchData: () { - ref.read(metadataPluginBrowseSectionsProvider.notifier).fetchMore(); - }, - itemCount: sections?.length ?? 0, - itemBuilder: (context, index) { - final section = sections![index]; - if (section.items.isEmpty) return const SizedBox.shrink(); - - return HorizontalPlaybuttonCardView( - items: section.items, - title: Text(section.title), - hasNextPage: false, - isLoadingNextPage: false, - onFetchMore: () {}, - titleTrailing: section.browseMore - ? Button.text( - child: Text(context.l10n.browse_all), - onPressed: () { - context.navigateTo( - HomeBrowseSectionItemsRoute( - sectionId: section.id, - section: section, - ), - ); - }, - ) - : null, - ); - }, - ); - } -} diff --git a/lib/modules/library/local_folder/cache_export_dialog.dart b/lib/modules/library/local_folder/cache_export_dialog.dart deleted file mode 100644 index 4c86a8d5..00000000 --- a/lib/modules/library/local_folder/cache_export_dialog.dart +++ /dev/null @@ -1,138 +0,0 @@ -import 'dart:io'; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:path/path.dart' as path; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/services/logger/logger.dart'; - -const containers = ["m4a", "mp3", "mp4", "ogg", "wav", "flac"]; - -class LocalFolderCacheExportDialog extends HookConsumerWidget { - final Directory exportDir; - final Directory cacheDir; - const LocalFolderCacheExportDialog({ - super.key, - required this.exportDir, - required this.cacheDir, - }); - - @override - Widget build(BuildContext context, ref) { - final ThemeData(:typography, :colorScheme) = Theme.of(context); - - final files = useState>([]); - final filesExported = useState(0); - - useEffect(() { - final stream = cacheDir.list().where( - (event) => - event is File && - containers - .contains(path.extension(event.path).replaceAll(".", "")), - ); - - stream.listen( - (event) { - files.value = [...files.value, event as File]; - }, - onError: (e, stack) { - AppLogger.reportError(e, stack); - }, - ); - return null; - }, []); - - useEffect(() { - if (filesExported.value == files.value.length && - filesExported.value > 0) { - Navigator.of(context).pop(); - } - return null; - }, [filesExported.value, files.value]); - - final isExportInProgress = - filesExported.value > 0 && filesExported.value != files.value.length; - - return AlertDialog( - title: Text(context.l10n.export_cache_files), - content: AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: filesExported.value == 0 - ? Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - context.l10n.found_n_files(files.value.length.toString()), - ), - const Gap(10), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: context.l10n.export_cache_confirmation, - ), - TextSpan( - text: "\n${exportDir.path}?", - style: typography.small.copyWith( - color: colorScheme.mutedForeground, - ), - ), - ], - ), - ), - ], - ) - : Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - context.l10n.exported_n_out_of_m_files( - files.value.length.toString(), - filesExported.value.toString(), - ), - ), - const Gap(10), - LinearProgressIndicator( - value: filesExported.value / files.value.length, - ), - ], - ), - ), - actions: [ - Button.outline( - onPressed: isExportInProgress - ? null - : () { - Navigator.of(context).pop(); - }, - child: Text(context.l10n.cancel), - ), - Button.primary( - onPressed: isExportInProgress - ? null - : () async { - for (final file in files.value) { - try { - final destinationFile = File( - path.join(exportDir.path, path.basename(file.path)), - ); - - if (await destinationFile.exists()) { - await destinationFile.delete(); - } - await file.copy(destinationFile.path); - filesExported.value++; - } catch (e, stack) { - AppLogger.reportError(e, stack); - continue; - } - } - }, - child: Text(context.l10n.export), - ), - ], - ); - } -} diff --git a/lib/modules/library/local_folder/local_folder_item.dart b/lib/modules/library/local_folder/local_folder_item.dart deleted file mode 100644 index 8bed5f7f..00000000 --- a/lib/modules/library/local_folder/local_folder_item.dart +++ /dev/null @@ -1,154 +0,0 @@ -import 'dart:math'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:path/path.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/string.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/local_tracks/local_tracks_provider.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class LocalFolderItem extends HookConsumerWidget { - final String folder; - const LocalFolderItem({super.key, required this.folder}); - - @override - Widget build(BuildContext context, ref) { - final ThemeData(:colorScheme) = Theme.of(context); - final mediaQuery = MediaQuery.of(context); - - final downloadFolder = - ref.watch(userPreferencesProvider.select((s) => s.downloadLocation)); - final cacheFolder = useFuture(UserPreferencesNotifier.getMusicCacheDir()); - - final isDownloadFolder = folder == downloadFolder; - final isCacheFolder = folder == cacheFolder.data; - - final trackSnapshot = ref.watch( - localTracksProvider.select( - (s) => s.whenData((tracks) => tracks[folder]?.take(4).toList()), - ), - ); - - final tracks = trackSnapshot.value ?? []; - - return Button( - onPressed: () { - context.navigateTo( - LocalLibraryRoute( - location: folder, - isCache: isCacheFolder, - isDownloads: isDownloadFolder, - ), - ); - }, - style: ButtonVariance.card.copyWith( - padding: (context, states, value) { - return const EdgeInsets.all(8); - }, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (tracks.isEmpty) - Padding( - padding: const EdgeInsets.all(8.0), - child: Icon( - SpotubeIcons.folder, - size: mediaQuery.smAndDown - ? 95 - : mediaQuery.mdAndDown - ? 100 - : 142, - ), - ) - else - ClipRRect( - borderRadius: BorderRadius.circular(8), - child: GridView.builder( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: max((tracks.length / 2).ceil(), 2), - ), - itemCount: tracks.length, - itemBuilder: (context, index) { - final track = tracks[index]; - return UniversalImage( - path: track.album.images.asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - fit: BoxFit.cover, - ); - }, - ), - ), - const Gap(8), - Stack( - children: [ - Center( - child: Text( - isDownloadFolder - ? context.l10n.downloads - : isCacheFolder - ? context.l10n.cache_folder.capitalize() - : basename(folder), - style: const TextStyle(fontWeight: FontWeight.bold), - textAlign: TextAlign.center, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - if (!isDownloadFolder && !isCacheFolder) - Align( - alignment: Alignment.topRight, - child: IconButton.ghost( - icon: const Icon(Icons.more_vert), - size: ButtonSize.small, - onPressed: () { - showDropdown( - context: context, - builder: (context) { - return DropdownMenu( - children: [ - MenuButton( - leading: Icon(SpotubeIcons.folderRemove, - color: colorScheme.destructive), - child: - Text(context.l10n.remove_library_location), - onPressed: (context) { - final libraryLocations = ref - .read(userPreferencesProvider) - .localLibraryLocation; - ref - .read(userPreferencesProvider.notifier) - .setLocalLibraryLocation( - libraryLocations - .where((e) => e != folder) - .toList(), - ); - }, - ) - ], - ); - }, - ); - }, - ), - ), - ], - ), - const Spacer(), - ], - ), - ); - } -} diff --git a/lib/modules/library/user_downloads/download_item.dart b/lib/modules/library/user_downloads/download_item.dart deleted file mode 100644 index b1cd9f62..00000000 --- a/lib/modules/library/user_downloads/download_item.dart +++ /dev/null @@ -1,101 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; - -class DownloadItem extends HookConsumerWidget { - final DownloadTask task; - const DownloadItem({ - super.key, - required this.task, - }); - - @override - Widget build(BuildContext context, ref) { - final downloadManager = ref.watch(downloadManagerProvider.notifier); - - return ButtonTile( - style: ButtonVariance.ghost, - leading: Padding( - padding: const EdgeInsets.symmetric(horizontal: 5), - child: ClipRRect( - borderRadius: BorderRadius.circular(10), - child: UniversalImage( - height: 40, - width: 40, - path: task.track.album.images.asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - ), - ), - ), - title: Text(task.track.name), - subtitle: ArtistLink( - artists: task.track.artists, - mainAxisAlignment: WrapAlignment.start, - onOverflowArtistClick: () { - context.navigateTo(TrackRoute(trackId: task.track.id)); - }, - ), - trailing: switch (task.status) { - DownloadStatus.downloading => HookBuilder(builder: (context) { - return StreamBuilder( - stream: task.downloadedBytesStream, - builder: (context, asyncSnapshot) { - final progress = - task.totalSizeBytes == null || task.totalSizeBytes == 0 - ? 0 - : (asyncSnapshot.data ?? 0) / task.totalSizeBytes!; - - return Row( - children: [ - CircularProgressIndicator( - value: progress.toDouble(), - ), - const SizedBox(width: 10), - const SizedBox(width: 10), - IconButton.ghost( - icon: const Icon(SpotubeIcons.close), - onPressed: () { - downloadManager.cancel(task.track); - }), - ], - ); - }); - }), - DownloadStatus.failed || DownloadStatus.canceled => SizedBox( - width: 100, - child: Row( - children: [ - Icon( - SpotubeIcons.error, - color: Colors.red[400], - ), - const SizedBox(width: 10), - IconButton.ghost( - icon: const Icon(SpotubeIcons.refresh), - onPressed: () { - downloadManager.retry(task.track); - }, - ), - ], - ), - ), - DownloadStatus.completed => - Icon(SpotubeIcons.done, color: Colors.green[400]), - DownloadStatus.queued => IconButton.ghost( - icon: const Icon(SpotubeIcons.close), - onPressed: () { - downloadManager.cancel(task.track); - }), - }, - ); - } -} diff --git a/lib/modules/lyrics/use_synced_lyrics.dart b/lib/modules/lyrics/use_synced_lyrics.dart deleted file mode 100644 index cf929226..00000000 --- a/lib/modules/lyrics/use_synced_lyrics.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; - -int useSyncedLyrics( - WidgetRef ref, - Map lyricsMap, - int delay, -) { - final stream = audioPlayer.positionStream; - - final currentTime = useState(0); - - useEffect(() { - return stream.listen((pos) { - try { - if (lyricsMap.containsKey(pos.inSeconds + delay)) { - currentTime.value = pos.inSeconds + delay; - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }).cancel; - }, [lyricsMap, delay]); - - return (Duration(seconds: currentTime.value)).inSeconds; -} diff --git a/lib/modules/lyrics/zoom_controls.dart b/lib/modules/lyrics/zoom_controls.dart deleted file mode 100644 index b4eeb9d6..00000000 --- a/lib/modules/lyrics/zoom_controls.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; - -class ZoomControls extends HookWidget { - final int value; - final ValueChanged onChanged; - final int? min; - final int? max; - - final int interval; - final Icon increaseIcon; - final Icon decreaseIcon; - - final Axis direction; - final String unit; - - const ZoomControls({ - super.key, - required this.value, - required this.onChanged, - this.min, - this.max, - this.interval = 10, - this.increaseIcon = const Icon(SpotubeIcons.zoomIn), - this.decreaseIcon = const Icon(SpotubeIcons.zoomOut), - this.direction = Axis.horizontal, - this.unit = "%", - }); - - @override - Widget build(BuildContext context) { - final actions = [ - IconButton.ghost( - icon: decreaseIcon, - onPressed: () { - if (value == min) return; - onChanged(value - interval); - }, - ), - Text("$value$unit"), - IconButton.ghost( - icon: increaseIcon, - onPressed: () { - if (value == max) return; - onChanged(value + interval); - }, - ), - ]; - - return Container( - constraints: BoxConstraints( - maxHeight: direction == Axis.horizontal ? 50 : 200, - maxWidth: direction == Axis.vertical ? 50 : double.infinity, - ), - margin: const EdgeInsets.all(8), - child: SurfaceCard( - surfaceBlur: context.theme.surfaceBlur, - surfaceOpacity: context.theme.surfaceOpacity, - padding: EdgeInsets.zero, - child: direction == Axis.horizontal - ? Row( - mainAxisAlignment: MainAxisAlignment.end, - mainAxisSize: MainAxisSize.min, - children: actions, - ) - : Column( - mainAxisAlignment: MainAxisAlignment.end, - mainAxisSize: MainAxisSize.min, - verticalDirection: VerticalDirection.up, - children: actions, - ), - ), - ); - } -} diff --git a/lib/modules/metadata_plugins/installed_plugin.dart b/lib/modules/metadata_plugins/installed_plugin.dart deleted file mode 100644 index 7abda5ec..00000000 --- a/lib/modules/metadata_plugins/installed_plugin.dart +++ /dev/null @@ -1,405 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/markdown/markdown.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/metadata_plugins/plugin_update_available_dialog.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/core/support.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/updater/update_checker.dart'; -import 'package:url_launcher/url_launcher.dart'; - -final validAbilities = { - PluginAbilities.metadata: ("Metadata", SpotubeIcons.album), - PluginAbilities.audioSource: ("Audio Source", SpotubeIcons.music), -}; - -class MetadataInstalledPluginItem extends HookConsumerWidget { - final PluginConfiguration plugin; - final bool isDefaultMetadata; - final bool isDefaultAudioSource; - const MetadataInstalledPluginItem({ - super.key, - required this.plugin, - required this.isDefaultMetadata, - required this.isDefaultAudioSource, - }); - - @override - Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.sizeOf(context); - - final metadataPlugin = ref.watch(metadataPluginProvider); - final audioSourcePlugin = ref.watch(audioSourcePluginProvider); - final pluginSnapshot = switch ((isDefaultMetadata, isDefaultAudioSource)) { - (true, _) => metadataPlugin, - (false, true) => audioSourcePlugin, - _ => null, - }; - - final pluginsNotifier = ref.watch(metadataPluginsProvider.notifier); - - final requiresAuth = (isDefaultMetadata || isDefaultAudioSource) && - plugin.abilities.contains(PluginAbilities.authentication); - final supportsScrobbling = isDefaultMetadata && - plugin.abilities.contains(PluginAbilities.scrobbling); - - final isMetadataAuthenticatedSnapshot = - ref.watch(metadataPluginAuthenticatedProvider); - final isAudioSourceAuthenticatedSnapshot = - ref.watch(audioSourcePluginAuthenticatedProvider); - final isAuthenticated = (isDefaultMetadata && - isMetadataAuthenticatedSnapshot.asData?.value == true) || - (isDefaultAudioSource && - isAudioSourceAuthenticatedSnapshot.asData?.value == true); - - final metadataUpdateAvailable = - ref.watch(metadataPluginUpdateCheckerProvider); - final audioSourceUpdateAvailable = - ref.watch(audioSourcePluginUpdateCheckerProvider); - final updateAvailable = switch ((isDefaultMetadata, isDefaultAudioSource)) { - (true, _) => metadataUpdateAvailable, - (false, true) => audioSourceUpdateAvailable, - _ => null, - }; - final hasUpdate = updateAvailable?.asData?.value != null; - - return Card( - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisSize: MainAxisSize.min, - spacing: 12, - children: [ - FutureBuilder( - future: pluginsNotifier.getLogoPath(plugin), - builder: (context, snapshot) { - final repoUrl = plugin.repository != null - ? Uri.tryParse(plugin.repository!) - : null; - final repoOwner = repoUrl?.pathSegments.firstOrNull; - - final isOfficial = - repoUrl?.host == "github.com" && repoOwner == "KRTirtho"; - - return Basic( - leading: snapshot.hasData - ? ClipRRect( - borderRadius: BorderRadius.circular(8), - child: Image.file( - snapshot.data!, - width: 36, - height: 36, - ), - ) - : Container( - height: 36, - width: 36, - alignment: Alignment.center, - decoration: BoxDecoration( - color: context.theme.colorScheme.secondary, - borderRadius: BorderRadius.circular(8), - ), - child: const Icon(SpotubeIcons.plugin), - ), - title: Text(plugin.name), - subtitle: Column( - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 8, - children: [ - Text(plugin.description), - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - for (final ability in plugin.abilities) - if (validAbilities.keys.contains(ability)) - SecondaryBadge( - leading: Icon(validAbilities[ability]!.$2), - child: Text(validAbilities[ability]!.$1), - ), - ], - ), - if (repoUrl != null) - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - if (isOfficial) - PrimaryBadge( - leading: const Icon(SpotubeIcons.done), - child: Text(context.l10n.official), - ) - else ...[ - Text(context.l10n.author_name(plugin.author)), - Container( - padding: const EdgeInsets.symmetric( - horizontal: 6, - vertical: 2, - ), - decoration: BoxDecoration( - color: Colors.blue, - borderRadius: BorderRadius.circular(6), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - spacing: 4, - children: [ - const Icon(SpotubeIcons.warning, size: 14), - Text( - context.l10n.third_party, - style: const TextStyle(color: Colors.white), - ).xSmall - ], - ), - ), - ], - SecondaryBadge( - leading: const Icon(SpotubeIcons.connect), - child: Text(repoUrl.host), - onPressed: () { - launchUrl(repoUrl); - }, - ), - SecondaryBadge( - child: Padding( - padding: const EdgeInsets.all(1), - child: Text( - "${context.l10n.version}: ${plugin.version}", - ), - ), - ), - ], - ) - ], - ), - trailing: IconButton.ghost( - onPressed: () async { - await pluginsNotifier.removePlugin(plugin); - }, - icon: const Icon( - SpotubeIcons.trash, - color: Colors.red, - ), - ), - ); - }, - ), - if ((requiresAuth && !isAuthenticated) || - hasUpdate || - supportsScrobbling) - Container( - decoration: BoxDecoration( - color: context.theme.colorScheme.secondary, - borderRadius: BorderRadius.circular(8), - ), - padding: const EdgeInsets.all(12), - child: Column( - spacing: 12, - children: [ - if (requiresAuth && !isAuthenticated) - Row( - spacing: 8, - children: [ - const Icon(SpotubeIcons.warning, color: Colors.yellow), - Text(context.l10n.plugin_requires_authentication), - ], - ), - if (hasUpdate) - SizedBox( - width: double.infinity, - child: Basic( - leading: const Icon(SpotubeIcons.update), - title: Text(context.l10n.update_available), - subtitle: Text( - updateAvailable!.asData!.value!.version, - ), - trailing: Button.primary( - onPressed: () { - showDialog( - context: context, - builder: (context) => - MetadataPluginUpdateAvailableDialog( - plugin: plugin, - update: updateAvailable.asData!.value!, - ), - ); - }, - child: Text(context.l10n.update), - ), - ), - ), - if (supportsScrobbling) - SizedBox( - width: double.infinity, - child: Basic( - leading: const Icon(SpotubeIcons.info), - title: Text(context.l10n.supports_scrobbling), - subtitle: Text(context.l10n.plugin_scrobbling_info), - ), - ) - ], - ), - ), - Wrap( - spacing: 8, - runSpacing: 8, - alignment: WrapAlignment.spaceBetween, - children: [ - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - if (plugin.abilities.contains(PluginAbilities.metadata)) - Button.secondary( - enabled: !isDefaultMetadata, - onPressed: () async { - await pluginsNotifier.setDefaultMetadataPlugin(plugin); - }, - child: Text( - isDefaultMetadata - ? context.l10n.default_metadata_source - : context.l10n.set_default_metadata_source, - ), - ), - if (plugin.abilities.contains(PluginAbilities.audioSource)) - Button.secondary( - enabled: !isDefaultAudioSource, - onPressed: () async { - await pluginsNotifier - .setDefaultAudioSourcePlugin(plugin); - }, - child: Text( - isDefaultAudioSource - ? context.l10n.default_audio_source - : context.l10n.set_default_audio_source, - ), - ), - ], - ), - Row( - mainAxisSize: - mediaQuery.smAndUp ? MainAxisSize.min : MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - spacing: 8, - children: [ - if (isDefaultMetadata || isDefaultAudioSource) - Consumer(builder: (context, ref, _) { - final metadataSupportTextSnapshot = - ref.watch(metadataPluginSupportTextProvider); - final audioSourceSupportTextSnapshot = - ref.watch(audioSourcePluginSupportTextProvider); - - final supportTextSnapshot = - switch ((isDefaultMetadata, isDefaultAudioSource)) { - (true, _) => metadataSupportTextSnapshot, - (false, true) => audioSourceSupportTextSnapshot, - _ => null, - }; - - if ((supportTextSnapshot?.hasValue ?? false) && - supportTextSnapshot?.value == null) { - return const SizedBox.shrink(); - } - - final bgColor = - context.theme.brightness == Brightness.dark - ? const Color.fromARGB(255, 255, 145, 175) - : Colors.pink[600]; - final textColor = - context.theme.brightness == Brightness.dark - ? Colors.pink[700] - : Colors.pink[50]; - - final mediaQuery = MediaQuery.sizeOf(context); - - return Button( - style: ButtonVariance.secondary.copyWith( - decoration: (context, states, value) { - return value.copyWithIfBoxDecoration( - color: bgColor, - ); - }, - textStyle: (context, states, value) { - return value.copyWith( - color: textColor, - ); - }, - iconTheme: (context, states, value) { - return value.copyWith( - color: textColor, - ); - }, - ), - leading: const Icon(SpotubeIcons.heartFilled), - child: Text(context.l10n.support), - onPressed: () { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - title: Text( - context.l10n.support_plugin_development), - content: ConstrainedBox( - constraints: BoxConstraints( - maxHeight: mediaQuery.height * 0.8, - maxWidth: 720, - ), - child: SizedBox( - width: double.infinity, - child: SingleChildScrollView( - child: AppMarkdown( - data: supportTextSnapshot - ?.asData?.value ?? - "", - ), - ), - ), - ), - actions: [ - Button.secondary( - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text(context.l10n.close), - ), - ], - ); - }, - ); - }, - ); - }), - if ((isDefaultMetadata || isDefaultAudioSource) && - requiresAuth && - !isAuthenticated) - Button.primary( - onPressed: () async { - await pluginSnapshot?.asData?.value?.auth - .authenticate(); - }, - leading: const Icon(SpotubeIcons.login), - child: Text(context.l10n.login), - ) - else if ((isDefaultMetadata || isDefaultAudioSource) && - requiresAuth && - isAuthenticated) - Button.destructive( - onPressed: () async { - await pluginSnapshot?.asData?.value?.auth.logout(); - }, - leading: const Icon(SpotubeIcons.logout), - child: Text(context.l10n.logout), - ), - ], - ) - ], - ) - ], - ), - ); - } -} diff --git a/lib/modules/metadata_plugins/plugin_repository.dart b/lib/modules/metadata_plugins/plugin_repository.dart deleted file mode 100644 index 9bd71f0a..00000000 --- a/lib/modules/metadata_plugins/plugin_repository.dart +++ /dev/null @@ -1,237 +0,0 @@ -import 'package:flutter/gestures.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/markdown/markdown.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:url_launcher/url_launcher_string.dart'; -import 'package:change_case/change_case.dart'; - -final validTopics = { - "spotube-metadata-plugin": ("Metadata", SpotubeIcons.album), - "spotube-audio-source-plugin": ("Audio Source", SpotubeIcons.music), -}; - -class MetadataPluginRepositoryItem extends HookConsumerWidget { - final MetadataPluginRepository pluginRepo; - const MetadataPluginRepositoryItem({ - super.key, - required this.pluginRepo, - }); - - @override - Widget build(BuildContext context, ref) { - final pluginsNotifier = ref.watch(metadataPluginsProvider.notifier); - final host = useMemoized( - () => Uri.parse(pluginRepo.repoUrl).host, - [pluginRepo.repoUrl], - ); - final isInstalling = useState(false); - - return Card( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - spacing: 8, - children: [ - Basic( - title: Text( - pluginRepo.name.startsWith("spotube-plugin") - ? pluginRepo.name - .replaceFirst("spotube-plugin-", "") - .trim() - .toCapitalCase() - : pluginRepo.name.toCapitalCase(), - ), - subtitle: Text(pluginRepo.description), - trailing: Button.primary( - enabled: !isInstalling.value, - onPressed: () async { - try { - isInstalling.value = true; - final pluginConfig = await pluginsNotifier - .downloadAndCachePlugin(pluginRepo.repoUrl); - - if (!context.mounted) return; - final isOfficialPlugin = pluginRepo.owner == "KRTirtho"; - - final isAllowed = isOfficialPlugin - ? true - : await showDialog( - context: context, - builder: (context) { - final pluginAbilities = pluginConfig.apis - .map((e) => - context.l10n.can_access_name_api(e.name)) - .join("\n\n"); - - return AlertDialog( - title: Text( - context.l10n.do_you_want_to_install_this_plugin, - ), - content: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(context.l10n.third_party_plugin_warning), - const Gap(8), - FutureBuilder( - future: pluginsNotifier - .getLogoPath(pluginConfig), - builder: (context, snapshot) { - return Basic( - leading: snapshot.hasData - ? Image.file( - snapshot.data!, - width: 36, - height: 36, - ) - : Container( - height: 36, - width: 36, - alignment: Alignment.center, - decoration: BoxDecoration( - color: context.theme - .colorScheme.secondary, - borderRadius: - BorderRadius.circular(8), - ), - child: const Icon( - SpotubeIcons.plugin), - ), - title: Text(pluginConfig.name), - subtitle: - Text(pluginConfig.description), - ); - }, - ), - const Gap(8), - AppMarkdown( - data: - "**${context.l10n.author}**: ${pluginConfig.author}\n\n" - "**${context.l10n.repository}**: [${pluginConfig.repository ?? 'N/A'}](${pluginConfig.repository})\n\n\n\n" - "${context.l10n.this_plugin_can_do_following}:\n\n" - "$pluginAbilities", - ), - ], - ), - actions: [ - Button.secondary( - onPressed: () { - Navigator.of(context).pop(false); - }, - child: Text(context.l10n.decline), - ), - Button.primary( - onPressed: () { - Navigator.of(context).pop(true); - }, - child: Text(context.l10n.accept), - ), - ], - ); - }, - ); - - if (isAllowed != true) return; - await pluginsNotifier.addPlugin(pluginConfig); - } finally { - if (context.mounted) { - isInstalling.value = false; - } - } - }, - leading: isInstalling.value - ? SizedBox.square( - dimension: 20, - child: CircularProgressIndicator( - color: context.theme.colorScheme.primaryForeground, - ), - ) - : const Icon(SpotubeIcons.add), - child: Text(context.l10n.install), - ), - ), - if (pluginRepo.owner != "KRTirtho") - Text.rich( - TextSpan( - children: [ - TextSpan(text: context.l10n.source), - TextSpan( - text: pluginRepo.repoUrl.replaceAll("https://", ""), - style: const TextStyle( - color: Colors.blue, - decoration: TextDecoration.underline, - ), - recognizer: TapGestureRecognizer() - ..onTap = () async { - launchUrlString(pluginRepo.repoUrl); - }, - ), - ], - ), - style: context.theme.typography.xSmall, - ), - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - if (pluginRepo.owner == "KRTirtho") - PrimaryBadge( - leading: const Icon(SpotubeIcons.done), - child: Text(context.l10n.official), - ) - else ...[ - Text( - context.l10n.author_name(pluginRepo.owner), - style: context.theme.typography.xSmall, - ), - Container( - padding: const EdgeInsets.symmetric( - horizontal: 6, - vertical: 2, - ), - decoration: BoxDecoration( - color: Colors.blue, - borderRadius: BorderRadius.circular(6), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - spacing: 4, - children: [ - const Icon(SpotubeIcons.warning, size: 14), - Text( - context.l10n.third_party, - style: const TextStyle(color: Colors.white), - ).xSmall - ], - ), - ), - ], - for (final topic in pluginRepo.topics) - if (validTopics.keys.contains(topic)) - SecondaryBadge( - leading: Icon(validTopics[topic]!.$2), - child: Text(validTopics[topic]!.$1), - ), - SecondaryBadge( - leading: host == "github.com" - ? const Icon(SpotubeIcons.github) - : null, - child: Text(host), - onPressed: () { - launchUrlString(pluginRepo.repoUrl); - }, - ), - ], - ), - ], - ), - ); - } -} diff --git a/lib/modules/metadata_plugins/plugin_update_available_dialog.dart b/lib/modules/metadata_plugins/plugin_update_available_dialog.dart deleted file mode 100644 index d16a0a35..00000000 --- a/lib/modules/metadata_plugins/plugin_update_available_dialog.dart +++ /dev/null @@ -1,93 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/markdown/markdown.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; - -class MetadataPluginUpdateAvailableDialog extends HookConsumerWidget { - final PluginConfiguration plugin; - final PluginUpdateAvailable update; - const MetadataPluginUpdateAvailableDialog({ - super.key, - required this.plugin, - required this.update, - }); - - @override - Widget build(BuildContext context, ref) { - final isUpdating = useState(false); - - final showErrorSnackbar = useCallback( - (BuildContext context, String message) { - showToast( - context: context, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - leading: const Icon(SpotubeIcons.error, color: Colors.red), - title: Text(message), - leadingAlignment: Alignment.center, - trailing: IconButton.ghost( - size: ButtonSize.small, - icon: const Icon(SpotubeIcons.close), - onPressed: () { - overlay.close(); - }, - ), - ), - ); - }); - }, - [], - ); - - return AlertDialog( - title: const Text('Plugin update available'), - content: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 8, - children: [ - Text('${plugin.name} (${update.version}) available.'), - if (update.changelog != null && update.changelog!.isNotEmpty) - AppMarkdown( - data: '### Changelog: \n\n${update.changelog}', - ), - ], - ), - actions: [ - SecondaryButton( - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text('Dismiss'), - ), - PrimaryButton( - enabled: !isUpdating.value, - onPressed: () async { - isUpdating.value = true; - try { - await ref - .read(metadataPluginsProvider.notifier) - .updatePlugin(plugin, update); - if (context.mounted) { - Navigator.of(context).pop(); - } - } catch (e) { - if (context.mounted) { - showErrorSnackbar(context, e.toString()); - } - } finally { - if (context.mounted) { - isUpdating.value = false; - } - } - }, - child: const Text('Update'), - ), - ], - ); - } -} diff --git a/lib/modules/player/player.dart b/lib/modules/player/player.dart deleted file mode 100644 index 5ea690e0..00000000 --- a/lib/modules/player/player.dart +++ /dev/null @@ -1,275 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:sliding_up_panel/sliding_up_panel.dart'; - -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/framework/app_pop_scope.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/player/player_actions.dart'; -import 'package:spotube/modules/player/player_controls.dart'; -import 'package:spotube/modules/player/volume_slider.dart'; -import 'package:spotube/components/dialogs/track_details_dialog.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/root/spotube_navigation_bar.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/metadata_plugin/audio_source/quality_label.dart'; -import 'package:spotube/provider/server/active_track_sources.dart'; -import 'package:spotube/provider/volume_provider.dart'; - -class PlayerView extends HookConsumerWidget { - final PanelController panelController; - final ScrollController scrollController; - const PlayerView({ - super.key, - required this.panelController, - required this.scrollController, - }); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final sourcedCurrentTrack = ref.watch(activeTrackSourcesProvider); - final currentActiveTrack = - ref.watch(audioPlayerProvider.select((s) => s.activeTrack)); - final currentActiveTrackSource = sourcedCurrentTrack.asData?.value?.source; - final isLocalTrack = currentActiveTrack is SpotubeLocalTrackObject; - final mediaQuery = MediaQuery.sizeOf(context); - final qualityLabel = ref.watch(audioSourceQualityLabelProvider); - - final shouldHide = useState(true); - - ref.listen(navigationPanelHeight, (_, height) { - shouldHide.value = height.ceil() == 50; - }); - - if (shouldHide.value) { - return const SizedBox(); - } - - useEffect(() { - if (mediaQuery.lgAndUp) { - WidgetsBinding.instance.addPostFrameCallback((_) { - panelController.close(); - }); - } - return null; - }, [mediaQuery.lgAndUp]); - - String albumArt = useMemoized( - () => (currentActiveTrack?.album.images).asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - [currentActiveTrack?.album.images], - ); - - useEffect(() { - for (final renderView in WidgetsBinding.instance.renderViews) { - renderView.automaticSystemUiAdjustment = false; - } - - return () { - for (final renderView in WidgetsBinding.instance.renderViews) { - renderView.automaticSystemUiAdjustment = true; - } - }; - }, [panelController.isAttached && panelController.isPanelOpen]); - - return AppPopScope( - canPop: false, - onPopInvoked: (didPop) async { - await panelController.close(); - }, - child: SurfaceCard( - borderWidth: 0, - surfaceOpacity: 0.9, - padding: EdgeInsets.zero, - child: Scaffold( - backgroundColor: Colors.transparent, - headers: [ - SafeArea( - bottom: false, - child: TitleBar( - surfaceOpacity: 0, - surfaceBlur: 0, - leading: [ - IconButton.ghost( - size: const ButtonSize(1.2), - icon: const Icon(SpotubeIcons.angleDown), - onPressed: panelController.close, - ) - ], - trailing: [ - if (!isLocalTrack) - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.details), - ).call, - child: IconButton.ghost( - size: const ButtonSize(1.2), - icon: const Icon(SpotubeIcons.info), - onPressed: currentActiveTrackSource == null - ? null - : () { - showDialog( - context: context, - builder: (context) { - return TrackDetailsDialog( - track: currentActiveTrack - as SpotubeFullTrackObject, - ); - }); - }, - ), - ) - ], - ), - ), - ], - child: SingleChildScrollView( - controller: scrollController, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Container( - margin: const EdgeInsets.all(8), - constraints: - const BoxConstraints(maxHeight: 300, maxWidth: 300), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(100), - spreadRadius: 2, - blurRadius: 10, - offset: Offset.zero, - ), - ], - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(20), - child: UniversalImage( - path: albumArt, - placeholder: Assets.images.albumPlaceholder.path, - fit: BoxFit.cover, - ), - ), - ), - const SizedBox(height: 60), - Container( - padding: const EdgeInsets.symmetric(horizontal: 16), - alignment: Alignment.centerLeft, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AutoSizeText( - currentActiveTrack?.name ?? context.l10n.not_playing, - style: const TextStyle(fontSize: 22), - maxFontSize: 22, - maxLines: 1, - textAlign: TextAlign.start, - ), - if (isLocalTrack) - Text( - currentActiveTrack.artists.asString(), - style: theme.typography.normal - .copyWith(fontWeight: FontWeight.bold), - ) - else - ArtistLink( - artists: currentActiveTrack?.artists ?? [], - textStyle: theme.typography.normal - .copyWith(fontWeight: FontWeight.bold), - onRouteChange: (route) { - panelController.close(); - context.router.navigateNamed(route); - }, - onOverflowArtistClick: () => context.navigateTo( - TrackRoute( - trackId: currentActiveTrack!.id, - ), - ), - ), - ], - ), - ), - const SizedBox(height: 10), - const PlayerControls(), - const SizedBox(height: 25), - const PlayerActions( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - showQueue: false, - ), - const SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - const SizedBox(width: 10), - Expanded( - child: OutlineButton( - leading: const Icon(SpotubeIcons.queue), - child: Text(context.l10n.queue), - onPressed: () { - context.pushRoute(const PlayerQueueRoute()); - }, - ), - ), - const SizedBox(width: 10), - Expanded( - child: OutlineButton( - leading: const Icon(SpotubeIcons.music), - child: Text(context.l10n.lyrics), - onPressed: () { - context.pushRoute(const PlayerLyricsRoute()); - }, - ), - ), - const SizedBox(width: 10), - ], - ), - const SizedBox(height: 25), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Consumer(builder: (context, ref, _) { - final volume = ref.watch(volumeProvider); - return VolumeSlider( - fullWidth: true, - value: volume, - onChanged: (value) { - ref.read(volumeProvider.notifier).setVolume(value); - }, - ); - }), - ), - const Gap(25), - OutlineBadge( - style: const ButtonStyle.outline( - size: ButtonSize.normal, - density: ButtonDensity.dense, - shape: ButtonShape.rectangle, - ).copyWith( - textStyle: (context, states, value) { - return value.copyWith(fontWeight: FontWeight.w500); - }, - ), - leading: const Icon(SpotubeIcons.lightningOutlined), - child: Text(qualityLabel), - ) - ], - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/modules/player/player_actions.dart b/lib/modules/player/player_actions.dart deleted file mode 100644 index 9f8639ec..00000000 --- a/lib/modules/player/player_actions.dart +++ /dev/null @@ -1,276 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/player/player_queue.dart'; -import 'package:spotube/modules/player/sibling_tracks_sheet.dart'; -import 'package:spotube/components/adaptive/adaptive_pop_sheet_list.dart'; -import 'package:spotube/components/heart_button/heart_button.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/duration.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/local_tracks/local_tracks_provider.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/sleep_timer_provider.dart'; - -class PlayerActions extends HookConsumerWidget { - final MainAxisAlignment mainAxisAlignment; - final bool floatingQueue; - final bool showQueue; - final List? extraActions; - - const PlayerActions({ - this.mainAxisAlignment = MainAxisAlignment.center, - this.floatingQueue = true, - this.showQueue = true, - this.extraActions, - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - final isLocalTrack = playlist.activeTrack is SpotubeLocalTrackObject; - ref.watch(downloadManagerProvider); - final downloader = ref.watch(downloadManagerProvider.notifier); - final isInQueue = useMemoized(() { - if (playlist.activeTrack is! SpotubeFullTrackObject) return false; - final downloadTask = - downloader.getTaskByTrackId(playlist.activeTrack!.id); - return const [ - DownloadStatus.queued, - DownloadStatus.downloading, - ].contains(downloadTask?.status); - }, [ - playlist.activeTrack, - downloader, - ]); - - final localTracks = ref.watch(localTracksProvider).value; - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - final sleepTimer = ref.watch(sleepTimerProvider); - final sleepTimerNotifier = ref.watch(sleepTimerProvider.notifier); - - final isDownloaded = useMemoized(() { - return localTracks?.values.expand((e) => e).any( - (element) => - element.name == playlist.activeTrack?.name && - element.album.name == playlist.activeTrack?.album.name && - element.artists.asString() == - playlist.activeTrack?.artists.asString(), - ) == - true; - }, [localTracks, playlist.activeTrack]); - - final sleepTimerEntries = useMemoized( - () => { - context.l10n.mins(15): const Duration(minutes: 15), - context.l10n.mins(30): const Duration(minutes: 30), - context.l10n.hour(1): const Duration(hours: 1), - context.l10n.hour(2): const Duration(hours: 2), - }, - [context.l10n], - ); - - var customHoursEnabled = - sleepTimer == null || sleepTimerEntries.values.contains(sleepTimer); - return Row( - mainAxisAlignment: mainAxisAlignment, - children: [ - if (showQueue) - Tooltip( - tooltip: TooltipContainer(child: Text(context.l10n.queue)).call, - child: IconButton.ghost( - icon: const Icon(SpotubeIcons.queue), - enabled: playlist.activeTrack != null, - onPressed: () { - openDrawer( - context: context, - position: OverlayPosition.right, - transformBackdrop: false, - draggable: false, - surfaceBlur: context.theme.surfaceBlur, - surfaceOpacity: 0.7, - builder: (context) { - return Container( - constraints: const BoxConstraints(maxWidth: 800), - child: Consumer( - builder: (context, ref, _) { - final playlist = ref.watch(audioPlayerProvider); - final playlistNotifier = - ref.read(audioPlayerProvider.notifier); - - return PlayerQueue.fromAudioPlayerNotifier( - floating: true, - playlist: playlist, - notifier: playlistNotifier, - ); - }, - ), - ); - }, - ); - }, - ), - ), - if (!isLocalTrack) - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.alternative_track_sources), - ).call, - child: IconButton.ghost( - enabled: playlist.activeTrack != null, - icon: const Icon(SpotubeIcons.alternativeRoute), - onPressed: () { - final screenSize = MediaQuery.sizeOf(context); - if (screenSize.mdAndUp) { - showPopover( - alignment: Alignment.bottomCenter, - context: context, - builder: (context) { - return SurfaceCard( - padding: EdgeInsets.zero, - child: ConstrainedBox( - constraints: const BoxConstraints( - maxHeight: 600, - maxWidth: 500, - ), - child: SiblingTracksSheet(floating: floatingQueue), - ), - ); - }, - ); - } else { - context.pushRoute(const PlayerTrackSourcesRoute()); - } - }, - ), - ), - if (!kIsWeb && !isLocalTrack) - if (isInQueue) - const SizedBox( - height: 20, - width: 20, - child: CircularProgressIndicator( - size: 2, - ), - ) - else - Tooltip( - tooltip: - TooltipContainer(child: Text(context.l10n.download_track)) - .call, - child: IconButton.ghost( - icon: Icon( - isDownloaded ? SpotubeIcons.done : SpotubeIcons.download, - ), - onPressed: playlist.activeTrack != null - ? () => downloader.addToQueue( - playlist.activeTrack! as SpotubeFullTrackObject) - : null, - ), - ), - if (playlist.activeTrack != null && - !isLocalTrack && - authenticated.asData?.value == true) - TrackHeartButton(track: playlist.activeTrack!), - AdaptivePopSheetList( - tooltip: context.l10n.sleep_timer, - offset: Offset(0, -50 * (sleepTimerEntries.values.length + 2)), - headings: [ - Text(context.l10n.sleep_timer), - ], - icon: Icon( - SpotubeIcons.timer, - color: sleepTimer != null ? Colors.red : null, - ), - onSelected: (value) { - if (value == Duration.zero) { - sleepTimerNotifier.cancelSleepTimer(); - } else { - sleepTimerNotifier.setSleepTimer(value); - } - }, - items: (context) => [ - for (final entry in sleepTimerEntries.entries) - AdaptiveMenuButton( - value: entry.value, - enabled: sleepTimer != entry.value, - child: Text(entry.key), - ), - AdaptiveMenuButton( - enabled: customHoursEnabled, - onPressed: (context) async { - final currentTime = TimeOfDay.now(); - final time = await showDialog( - context: context, - builder: (context) => HookBuilder(builder: (context) { - final timeRef = useRef(null); - return AlertDialog( - trailing: IconButton.ghost( - size: ButtonSize.xSmall, - icon: const Icon(SpotubeIcons.close), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - title: Text( - ShadcnLocalizations.of(context).placeholderTimePicker, - ), - content: TimePickerDialog( - use24HourFormat: false, - initialValue: TimeOfDay.fromDateTime( - DateTime.now().add(sleepTimer ?? Duration.zero), - ), - onChanged: (value) => timeRef.value = value, - ), - actions: [ - Button.primary( - onPressed: () { - Navigator.of(context).pop(timeRef.value); - }, - child: Text(context.l10n.save), - ), - ], - ); - }), - ); - - if (time != null) { - sleepTimerNotifier.setSleepTimer( - Duration( - hours: (time.hour - currentTime.hour).abs(), - minutes: (time.minute - currentTime.minute).abs(), - ), - ); - } - }, - child: Text( - customHoursEnabled - ? context.l10n.custom_hours - : sleepTimer.format(abbreviated: true), - ), - ), - AdaptiveMenuButton( - value: Duration.zero, - enabled: sleepTimer != Duration.zero && sleepTimer != null, - child: Text( - context.l10n.cancel, - style: const TextStyle(color: Colors.green), - ), - ), - ], - ), - ...(extraActions ?? []) - ], - ); - } -} diff --git a/lib/modules/player/player_controls.dart b/lib/modules/player/player_controls.dart deleted file mode 100644 index 3da36bf8..00000000 --- a/lib/modules/player/player_controls.dart +++ /dev/null @@ -1,278 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:media_kit/media_kit.dart'; -import 'package:palette_generator/palette_generator.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/collections/intents.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/duration.dart'; -import 'package:spotube/modules/player/use_progress.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/audio_player/querying_track_info.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/utils/platform.dart'; - -class PlayerControls extends HookConsumerWidget { - final PaletteGenerator? palette; - final bool compact; - - const PlayerControls({ - this.palette, - this.compact = false, - super.key, - }); - - static FocusNode focusNode = FocusNode(); - - @override - Widget build(BuildContext context, ref) { - final shortcuts = useMemoized( - () => { - const SingleActivator(LogicalKeyboardKey.arrowRight): - SeekIntent(ref, true), - const SingleActivator(LogicalKeyboardKey.arrowLeft): - SeekIntent(ref, false), - }, - [ref]); - final actions = useMemoized( - () => { - SeekIntent: SeekAction(), - }, - []); - final isFetchingActiveTrack = ref.watch(queryingTrackInfoProvider); - - final playing = - useStream(audioPlayer.playingStream).data ?? audioPlayer.isPlaying; - final theme = Theme.of(context); - - final buttonSize = - kIsMobile ? const ButtonSize(1.5) : const ButtonSize(1.2); - - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - if (focusNode.canRequestFocus) { - focusNode.requestFocus(); - } - }, - child: FocusableActionDetector( - focusNode: focusNode, - shortcuts: shortcuts, - actions: actions, - child: Container( - constraints: const BoxConstraints(maxWidth: 600), - child: Column( - children: [ - if (!compact) - HookBuilder( - builder: (context) { - final mediaQuery = MediaQuery.sizeOf(context); - - final ( - :bufferProgress, - :duration, - :position, - :progressStatic - ) = useProgress(ref); - - final progress = useState( - useMemoized(() => progressStatic, []), - ); - - useEffect(() { - progress.value = progressStatic; - return null; - }, [progressStatic]); - - return Column( - children: [ - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.slide_to_seek), - ).call, - child: SizedBox( - width: mediaQuery.xlAndUp ? 600 : 500, - child: Slider( - hintValue: SliderValue.single(bufferProgress), - value: - SliderValue.single(progress.value.toDouble()), - onChanged: isFetchingActiveTrack - ? null - : (v) { - progress.value = v.value; - }, - onChangeEnd: (value) async { - await audioPlayer.seek( - Duration( - seconds: (value.value * duration.inSeconds) - .toInt(), - ), - ); - }, - ), - ), - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - position.toHumanReadableString(), - style: theme.typography.xSmall, - ), - Text( - duration.toHumanReadableString(), - style: theme.typography.xSmall, - ), - ], - ), - ), - ], - ); - }, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Consumer(builder: (context, ref, _) { - final shuffled = ref - .watch(audioPlayerProvider.select((s) => s.shuffled)); - return Tooltip( - tooltip: TooltipContainer( - child: Text( - shuffled - ? context.l10n.unshuffle_playlist - : context.l10n.shuffle_playlist, - ), - ).call, - child: IconButton( - size: buttonSize, - icon: Icon( - SpotubeIcons.shuffle, - color: shuffled ? theme.colorScheme.primary : null, - size: 22, - ), - variance: shuffled - ? ButtonVariance.secondary - : ButtonVariance.ghost, - onPressed: isFetchingActiveTrack - ? null - : () { - if (shuffled) { - audioPlayer.setShuffle(false); - } else { - audioPlayer.setShuffle(true); - } - }, - ), - ); - }), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.previous_track), - ).call, - child: IconButton.ghost( - size: buttonSize, - enabled: !isFetchingActiveTrack, - icon: const Icon(SpotubeIcons.skipBack), - onPressed: audioPlayer.skipToPrevious, - ), - ), - Tooltip( - tooltip: TooltipContainer( - child: Text( - playing - ? context.l10n.pause_playback - : context.l10n.resume_playback, - ), - ).call, - child: IconButton.primary( - size: buttonSize, - shape: ButtonShape.circle, - icon: isFetchingActiveTrack - ? const SizedBox( - height: 20, - width: 20, - child: CircularProgressIndicator(), - ) - : Icon( - playing ? SpotubeIcons.pause : SpotubeIcons.play, - ), - onPressed: isFetchingActiveTrack - ? null - : Actions.handler( - context, - PlayPauseIntent(ref), - ), - ), - ), - Tooltip( - tooltip: - TooltipContainer(child: Text(context.l10n.next_track)) - .call, - child: IconButton.ghost( - size: buttonSize, - icon: const Icon(SpotubeIcons.skipForward), - onPressed: - isFetchingActiveTrack ? null : audioPlayer.skipToNext, - ), - ), - Consumer(builder: (context, ref, _) { - final loopMode = ref - .watch(audioPlayerProvider.select((s) => s.loopMode)); - - return Tooltip( - tooltip: TooltipContainer( - child: Text( - loopMode == PlaylistMode.single - ? context.l10n.loop_track - : loopMode == PlaylistMode.loop - ? context.l10n.repeat_playlist - : "", - ), - ).call, - child: IconButton( - size: buttonSize, - icon: Icon( - loopMode == PlaylistMode.single - ? SpotubeIcons.repeatOne - : SpotubeIcons.repeat, - color: loopMode != PlaylistMode.none - ? theme.colorScheme.primary - : null, - ), - variance: loopMode == PlaylistMode.single || - loopMode == PlaylistMode.loop - ? ButtonVariance.secondary - : ButtonVariance.ghost, - onPressed: isFetchingActiveTrack - ? null - : () async { - await audioPlayer.setLoopMode( - switch (loopMode) { - PlaylistMode.loop => PlaylistMode.single, - PlaylistMode.single => PlaylistMode.none, - PlaylistMode.none => PlaylistMode.loop, - }, - ); - }, - ), - ); - }), - ], - ), - const SizedBox(height: 5) - ], - ), - ), - ), - ); - } -} diff --git a/lib/modules/player/player_overlay.dart b/lib/modules/player/player_overlay.dart deleted file mode 100644 index 3c3ff373..00000000 --- a/lib/modules/player/player_overlay.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:sliding_up_panel/sliding_up_panel.dart'; -import 'package:spotube/modules/player/player_overlay_collapsed.dart'; - -import 'package:spotube/modules/root/spotube_navigation_bar.dart'; -import 'package:spotube/modules/player/player.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; - -final playerOverlayControllerProvider = StateProvider((ref) { - return PanelController(); -}); - -class PlayerOverlay extends HookConsumerWidget { - final String albumArt; - - const PlayerOverlay({ - required this.albumArt, - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - final canShow = playlist.activeTrack != null; - - final screenSize = MediaQuery.sizeOf(context); - - final panelController = ref.watch(playerOverlayControllerProvider); - - return SlidingUpPanel( - maxHeight: screenSize.height, - backdropEnabled: false, - minHeight: canShow ? 63 : 0, - onPanelSlide: (position) { - final invertedPosition = 1 - position; - ref.read(navigationPanelHeight.notifier).state = 50 * invertedPosition; - }, - controller: panelController, - color: Colors.transparent, - parallaxEnabled: true, - renderPanelSheet: false, - header: SizedBox( - height: 63, - width: screenSize.width, - child: PlayerOverlayCollapsedSection(panelController: panelController), - ), - panelBuilder: (scrollController) => PlayerView( - panelController: panelController, - scrollController: scrollController, - ), - ); - } -} diff --git a/lib/modules/player/player_overlay_collapsed.dart b/lib/modules/player/player_overlay_collapsed.dart deleted file mode 100644 index d0961ade..00000000 --- a/lib/modules/player/player_overlay_collapsed.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:sliding_up_panel/sliding_up_panel.dart'; -import 'package:spotube/collections/intents.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/player/player_track_details.dart'; -import 'package:spotube/modules/root/spotube_navigation_bar.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/audio_player/querying_track_info.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -class PlayerOverlayCollapsedSection extends HookConsumerWidget { - final PanelController panelController; - const PlayerOverlayCollapsedSection({ - super.key, - required this.panelController, - }); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - final canShow = playlist.activeTrack != null; - - final isFetchingActiveTrack = ref.watch(queryingTrackInfoProvider); - final playing = - useStream(audioPlayer.playingStream).data ?? audioPlayer.isPlaying; - - final theme = Theme.of(context); - - final shouldShow = useState(true); - - ref.listen(navigationPanelHeight, (_, height) { - shouldShow.value = height.ceil() == 50; - }); - - return AnimatedSwitcher( - duration: const Duration(milliseconds: 250), - child: canShow && shouldShow.value - ? Padding( - padding: const EdgeInsets.all(5), - child: SurfaceCard( - surfaceBlur: theme.surfaceBlur, - surfaceOpacity: theme.surfaceOpacity, - padding: EdgeInsets.zero, - borderRadius: theme.borderRadiusLg, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: GestureDetector( - onTap: () { - panelController.open(); - }, - child: Container( - width: double.infinity, - color: Colors.transparent, - child: PlayerTrackDetails( - track: playlist.activeTrack, - color: theme.colorScheme.foreground, - ), - ), - ), - ), - Row( - children: [ - IconButton.ghost( - icon: const Icon(SpotubeIcons.skipBack), - onPressed: isFetchingActiveTrack - ? null - : audioPlayer.skipToPrevious, - ), - Consumer( - builder: (context, ref, _) { - return IconButton.ghost( - icon: isFetchingActiveTrack - ? const SizedBox( - height: 20, - width: 20, - child: CircularProgressIndicator(), - ) - : Icon( - playing - ? SpotubeIcons.pause - : SpotubeIcons.play, - ), - onPressed: Actions.handler( - context, - PlayPauseIntent(ref), - ), - ); - }, - ), - IconButton.ghost( - icon: const Icon(SpotubeIcons.skipForward), - onPressed: isFetchingActiveTrack - ? null - : audioPlayer.skipToNext, - ), - const Gap(5), - ], - ), - ], - ), - ), - ], - ), - ), - ) - : const SizedBox.shrink(), - ); - } -} diff --git a/lib/modules/player/player_queue.dart b/lib/modules/player/player_queue.dart deleted file mode 100644 index bfb7a2e3..00000000 --- a/lib/modules/player/player_queue.dart +++ /dev/null @@ -1,380 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:collection/collection.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; - -import 'package:scroll_to_index/scroll_to_index.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/dialogs/playlist_add_track_dialog.dart'; -import 'package:spotube/components/fallbacks/not_found.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/track_tile/track_tile.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_auto_scroll_controller.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/player/player_queue_actions.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/audio_player/state.dart'; - -class PlayerQueue extends HookConsumerWidget { - final bool floating; - final AudioPlayerState playlist; - - final Future Function(SpotubeTrackObject track) onJump; - final Future Function(String trackId) onRemove; - final Future Function(int oldIndex, int newIndex) onReorder; - final Future Function() onStop; - - const PlayerQueue({ - this.floating = true, - required this.playlist, - required this.onJump, - required this.onRemove, - required this.onReorder, - required this.onStop, - super.key, - }); - - PlayerQueue.fromAudioPlayerNotifier({ - this.floating = true, - required this.playlist, - required AudioPlayerNotifier notifier, - super.key, - }) : onJump = notifier.jumpToTrack, - onRemove = notifier.removeTrack, - onReorder = notifier.moveTrack, - onStop = notifier.stop; - - @override - Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.sizeOf(context); - - final controller = useAutoScrollController(); - final searchText = useState(''); - - final selectionMode = useState(false); - final selectedTrackIds = useState({}); - - final isSearching = useState(false); - - final tracks = playlist.tracks; - - final filteredTracks = useMemoized( - () { - if (searchText.value.isEmpty) { - return tracks; - } - return tracks - .map((e) => ( - weightedRatio( - '${e.name} - ${e.artists.asString()}', - searchText.value, - ), - e - )) - .sorted((a, b) => b.$1.compareTo(a.$1)) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList(); - }, - [tracks, searchText.value], - ); - - if (tracks.isEmpty) { - return const NotFound(); - } - - return Stack( - children: [ - LayoutBuilder( - builder: (context, constrains) { - final searchBar = ConstrainedBox( - constraints: BoxConstraints( - maxHeight: 40, - maxWidth: mediaQuery.smAndDown ? mediaQuery.width - 40 : 300, - ), - child: TextField( - onChanged: (value) { - searchText.value = value; - }, - placeholder: Text(context.l10n.search), - ), - ); - return CallbackShortcuts( - bindings: { - LogicalKeySet(LogicalKeyboardKey.escape): () { - if (!isSearching.value) { - Navigator.of(context).pop(); - } - isSearching.value = false; - searchText.value = ''; - } - }, - child: Column( - children: [ - if (isSearching.value && mediaQuery.smAndDown) - AppBar( - backgroundColor: Colors.transparent, - leading: [ - if (mediaQuery.smAndDown) - IconButton.ghost( - icon: const Icon( - Icons.arrow_back_ios_new_outlined, - ), - onPressed: () { - isSearching.value = false; - searchText.value = ''; - }, - ) - ], - surfaceBlur: 0, - surfaceOpacity: 0, - child: searchBar, - ) - else if (selectionMode.value) - AppBar( - backgroundColor: Colors.transparent, - surfaceBlur: 0, - surfaceOpacity: 0, - leading: [ - IconButton.ghost( - icon: const Icon(SpotubeIcons.close), - onPressed: () { - selectedTrackIds.value = {}; - selectionMode.value = false; - }, - ) - ], - title: SizedBox( - height: 30, - child: AutoSizeText( - '${selectedTrackIds.value.length} selected', - maxLines: 1, - ), - ), - trailing: [ - PlayerQueueActionButton( - builder: (context, close) => Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Gap(12), - ButtonTile( - style: const ButtonStyle.ghost(), - leading: - const Icon(SpotubeIcons.selectionCheck), - title: Text(context.l10n.select_all), - onPressed: () { - selectedTrackIds.value = - filteredTracks.map((t) => t.id).toSet(); - Navigator.pop(context); - }, - ), - ButtonTile( - style: const ButtonStyle.ghost(), - leading: const Icon(SpotubeIcons.playlistAdd), - title: Text(context.l10n.add_to_playlist), - onPressed: () async { - final selected = filteredTracks - .where((t) => - selectedTrackIds.value.contains(t.id)) - .toList(); - close(); - if (selected.isEmpty) return; - final res = await showDialog( - context: context, - builder: (context) => - PlaylistAddTrackDialog( - tracks: selected, - openFromPlaylist: null, - ), - ); - if (res == true) { - selectedTrackIds.value = {}; - selectionMode.value = false; - } - }, - ), - ButtonTile( - style: const ButtonStyle.ghost(), - leading: const Icon(SpotubeIcons.trash), - title: Text(context.l10n.remove_from_queue), - onPressed: () async { - final ids = selectedTrackIds.value.toList(); - close(); - if (ids.isEmpty) return; - await Future.wait( - ids.map((id) => onRemove(id))); - if (context.mounted) { - selectedTrackIds.value = {}; - selectionMode.value = false; - } - }, - ), - const Gap(12), - ], - ), - ), - ], - ) - else - AppBar( - trailingGap: 0, - backgroundColor: Colors.transparent, - surfaceBlur: 0, - surfaceOpacity: 0, - title: mediaQuery.mdAndUp || !isSearching.value - ? SizedBox( - height: 30, - child: AutoSizeText( - context.l10n.tracks_in_queue(tracks.length), - maxLines: 1, - ), - ) - : null, - trailing: [ - if (mediaQuery.mdAndUp) - searchBar - else - IconButton.ghost( - icon: const Icon(SpotubeIcons.filter), - onPressed: () { - isSearching.value = !isSearching.value; - }, - ), - if (!isSearching.value) ...[ - const SizedBox(width: 10), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.clear_all)) - .call, - child: IconButton.outline( - icon: const Icon(SpotubeIcons.playlistRemove), - onPressed: () { - onStop(); - closeDrawer(context); - }, - ), - ), - const Gap(5), - if (mediaQuery.smAndDown) - const BackButton(icon: SpotubeIcons.angleDown), - ], - ], - ), - const Divider(), - Expanded( - child: InterScrollbar( - controller: controller, - child: CustomScrollView( - controller: controller, - slivers: [ - const SliverGap(10), - SliverReorderableList( - onReorder: onReorder, - itemCount: filteredTracks.length, - onReorderStart: (index) { - HapticFeedback.selectionClick(); - }, - onReorderEnd: (index) { - HapticFeedback.selectionClick(); - }, - itemBuilder: (context, i) { - final track = filteredTracks.elementAt(i); - - void toggleSelection(String id) { - final s = {...selectedTrackIds.value}; - if (s.contains(id)) { - s.remove(id); - } else { - s.add(id); - } - selectedTrackIds.value = s; - if (selectedTrackIds.value.isEmpty) { - selectionMode.value = false; - } - } - - return AutoScrollTag( - key: ValueKey(i), - controller: controller, - index: i, - child: TrackTile( - playlist: playlist, - index: i, - track: track, - selectionMode: selectionMode.value, - selected: - selectedTrackIds.value.contains(track.id), - onChanged: selectionMode.value - ? (_) => toggleSelection(track.id) - : null, - onTap: () async { - if (selectionMode.value) { - toggleSelection(track.id); - return; - } - if (playlist.activeTrack?.id == track.id) { - return; - } - await onJump(track); - }, - onLongPress: () { - if (!selectionMode.value) { - selectionMode.value = true; - selectedTrackIds.value = {track.id}; - } else { - toggleSelection(track.id); - } - }, - leadingActions: [ - if (!isSearching.value && - searchText.value.isEmpty && - !selectionMode.value) - Padding( - padding: - const EdgeInsets.only(left: 8.0), - child: ReorderableDragStartListener( - index: i, - child: const Icon( - SpotubeIcons.dragHandle, - ), - ), - ), - ], - ), - ); - }, - ), - const SliverSafeArea(sliver: SliverGap(100)), - ], - ), - ), - ), - ], - ), - ); - }, - ), - Positioned( - right: 20, - bottom: 20, - child: IconButton.secondary( - icon: const Icon(SpotubeIcons.angleDown), - onPressed: () { - controller.scrollToIndex( - playlist.currentIndex, - preferPosition: AutoScrollPosition.middle, - ); - }, - ), - ) - ], - ); - } -} diff --git a/lib/modules/player/player_queue_actions.dart b/lib/modules/player/player_queue_actions.dart deleted file mode 100644 index 3d1666c2..00000000 --- a/lib/modules/player/player_queue_actions.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/constrains.dart'; - -class PlayerQueueActionButton extends StatelessWidget { - final Widget Function(BuildContext context, VoidCallback close) builder; - - const PlayerQueueActionButton({ - super.key, - required this.builder, - }); - - @override - Widget build(BuildContext context) { - return IconButton.ghost( - onPressed: () { - final mediaQuery = MediaQuery.sizeOf(context); - - if (mediaQuery.lgAndUp) { - showDropdown( - context: context, - builder: (context) { - return SizedBox( - width: 220 * context.theme.scaling, - child: Card( - padding: EdgeInsets.zero, - child: builder(context, () => closeOverlay(context)), - ), - ); - }, - ); - } else { - openSheet( - context: context, - builder: (context) => builder(context, () => closeSheet(context)), - position: OverlayPosition.bottom, - ); - } - }, - icon: const Icon(SpotubeIcons.moreHorizontal), - ); - } -} diff --git a/lib/modules/player/player_track_details.dart b/lib/modules/player/player_track_details.dart deleted file mode 100644 index c158aed3..00000000 --- a/lib/modules/player/player_track_details.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'package:auto_route/auto_route.dart'; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; - -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/links/link_text.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; - -class PlayerTrackDetails extends HookConsumerWidget { - final Color? color; - final SpotubeTrackObject? track; - const PlayerTrackDetails({super.key, this.color, this.track}); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); - final playback = ref.watch(audioPlayerProvider); - - return Row( - children: [ - if (playback.activeTrack != null) - Container( - padding: const EdgeInsets.all(6), - constraints: const BoxConstraints( - maxWidth: 80, - maxHeight: 80, - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(4), - child: UniversalImage( - path: (track?.album.images) - .asUrlString(placeholder: ImagePlaceholder.albumArt), - placeholder: Assets.images.albumPlaceholder.path, - ), - ), - ), - if (mediaQuery.mdAndDown) - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(height: 4), - Text( - playback.activeTrack?.name ?? "", - overflow: TextOverflow.ellipsis, - style: theme.typography.normal.copyWith( - color: color, - ), - ), - Text( - playback.activeTrack?.artists.asString() ?? "", - overflow: TextOverflow.ellipsis, - style: theme.typography.small.copyWith(color: color), - ) - ], - ), - ), - if (mediaQuery.lgAndUp) - Flexible( - flex: 1, - child: Column( - children: [ - LinkText( - playback.activeTrack?.name ?? "", - TrackRoute(trackId: playback.activeTrack?.id ?? ""), - push: true, - overflow: TextOverflow.ellipsis, - style: TextStyle(fontWeight: FontWeight.bold, color: color), - ), - ArtistLink( - artists: playback.activeTrack?.artists ?? [], - onRouteChange: (route) { - context.router.navigateNamed(route); - }, - onOverflowArtistClick: () => - context.navigateTo(TrackRoute(trackId: track!.id)), - ) - ], - ), - ), - ], - ); - } -} diff --git a/lib/modules/player/sibling_tracks_sheet.dart b/lib/modules/player/sibling_tracks_sheet.dart deleted file mode 100644 index b9bd7631..00000000 --- a/lib/modules/player/sibling_tracks_sheet.dart +++ /dev/null @@ -1,155 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/fallbacks/not_found.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/duration.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; - -class SiblingTracksSheet extends HookConsumerWidget { - final bool floating; - const SiblingTracksSheet({ - super.key, - this.floating = true, - }); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - - final activeTrack = - ref.watch(audioPlayerProvider.select((e) => e.activeTrack)); - - if (activeTrack == null || activeTrack is! SpotubeFullTrackObject) { - return const SafeArea(child: NotFound()); - } - - return HookBuilder(builder: (context) { - final sourcedTrack = ref.watch(sourcedTrackProvider(activeTrack)); - final sourcedTrackNotifier = - ref.watch(sourcedTrackProvider(activeTrack).notifier); - - final siblings = useMemoized>( - () => !sourcedTrack.isLoading - ? [ - if (sourcedTrack.asData?.value != null) - sourcedTrack.asData!.value.info, - ...?sourcedTrack.asData?.value.siblings, - ] - : [], - [sourcedTrack], - ); - - useEffect(() { - /// Populate sibling when active track changes - if (sourcedTrack.asData?.value != null && - sourcedTrack.asData?.value.siblings.isEmpty == true) { - sourcedTrackNotifier.copyWithSibling(); - } - return null; - }, [sourcedTrack]); - - return SafeArea( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 8.0, vertical: 16), - child: Row( - spacing: 5, - children: [ - AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: Text( - context.l10n.alternative_track_sources, - ).bold()), - ], - ), - ), - AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: sourcedTrack.isLoading - ? const SizedBox( - width: double.infinity, - child: LinearProgressIndicator(), - ) - : const SizedBox.shrink(), - ), - Expanded( - child: AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - transitionBuilder: (child, animation) => - FadeTransition(opacity: animation, child: child), - child: InterScrollbar( - controller: controller, - child: ListView.separated( - padding: const EdgeInsets.all(8.0), - controller: controller, - itemCount: siblings.length, - separatorBuilder: (context, index) => const Gap(8), - itemBuilder: (context, index) { - final sourceInfo = siblings[index]; - - return ButtonTile( - style: ButtonVariance.ghost, - padding: const EdgeInsets.symmetric(horizontal: 8), - title: Text( - sourceInfo.title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - leading: sourceInfo.thumbnail != null - ? UniversalImage( - path: sourceInfo.thumbnail!, - height: 60, - width: 60, - ) - : null, - trailing: - Text(sourceInfo.duration.toHumanReadableString()), - subtitle: Text( - sourceInfo.artists.join(", "), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - enabled: !sourcedTrack.isLoading, - selected: !sourcedTrack.isLoading && - sourceInfo.id == sourcedTrack.asData?.value.info.id, - onPressed: () async { - if (!sourcedTrack.isLoading && - sourceInfo.id != - sourcedTrack.asData?.value.info.id) { - await sourcedTrackNotifier - .swapWithSibling(sourceInfo); - await ref - .read(audioPlayerProvider.notifier) - .swapActiveSource(); - - if (context.mounted) { - if (MediaQuery.sizeOf(context).mdAndUp) { - closeOverlay(context); - } else { - closeDrawer(context); - } - } - } - }, - ); - }, - ), - ), - ), - ), - ], - ), - ); - }); - } -} diff --git a/lib/modules/player/use_progress.dart b/lib/modules/player/use_progress.dart deleted file mode 100644 index eaea638e..00000000 --- a/lib/modules/player/use_progress.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -({ - double progressStatic, - Duration position, - Duration duration, - double bufferProgress -}) useProgress(WidgetRef ref) { - final bufferProgress = - useStream(audioPlayer.bufferedPositionStream).data?.inSeconds ?? 0; - - final duration = useState(Duration.zero); - final position = useState(Duration.zero); - - final sliderMax = duration.value.inSeconds; - final sliderValue = position.value.inSeconds; - - useEffect(() { - duration.value = audioPlayer.duration; - - final durationSubscription = audioPlayer.durationStream.listen((event) { - duration.value = event; - }); - - position.value = audioPlayer.position; - - var lastPosition = position.value; - - // audioPlayer.positionStream is fired every 200ms and only 1s delay is - // enough. Thus only update the position if the difference is more than 1s - // Reduces CPU usage - final positionSubscription = audioPlayer.positionStream.listen((event) { - final diff = event.inMilliseconds - lastPosition.inMilliseconds; - if (event.inMilliseconds > 1000 && diff < 1000 && diff > 0) return; - - lastPosition = event; - position.value = event; - }); - - return () { - positionSubscription.cancel(); - durationSubscription.cancel(); - }; - }, []); - - return ( - progressStatic: - sliderMax == 0 || sliderValue > sliderMax ? 0 : sliderValue / sliderMax, - position: position.value, - duration: duration.value, - bufferProgress: sliderMax == 0 || bufferProgress > sliderMax - ? 0 - : bufferProgress / sliderMax, - ); -} diff --git a/lib/modules/player/volume_slider.dart b/lib/modules/player/volume_slider.dart deleted file mode 100644 index ee4ac9c5..00000000 --- a/lib/modules/player/volume_slider.dart +++ /dev/null @@ -1,74 +0,0 @@ -import 'package:flutter/gestures.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; - -class VolumeSlider extends HookConsumerWidget { - final bool fullWidth; - - final double value; - final ValueChanged onChanged; - - const VolumeSlider({ - super.key, - this.fullWidth = false, - required this.value, - required this.onChanged, - }); - - @override - Widget build(BuildContext context, ref) { - var slider = Listener( - onPointerSignal: (event) async { - if (event is PointerScrollEvent) { - if (event.scrollDelta.dy > 0) { - final newValue = value - .2; - onChanged(newValue < 0 ? 0 : newValue); - } else { - final newValue = value + .2; - onChanged(newValue > 1 ? 1 : newValue); - } - } - }, - child: SizedBox( - height: 20, - width: 100, - child: Slider( - min: 0, - max: 1, - value: SliderValue.single(value), - onChanged: (v) => onChanged(v.value), - ), - ), - ); - - return Row( - mainAxisAlignment: - !fullWidth ? MainAxisAlignment.center : MainAxisAlignment.start, - children: [ - IconButton( - variance: ButtonVariance.ghost, - icon: Icon( - value == 0 - ? SpotubeIcons.volumeMute - : value <= 0.2 - ? SpotubeIcons.volumeLow - : value <= 0.6 - ? SpotubeIcons.volumeMedium - : SpotubeIcons.volumeHigh, - size: 16, - ), - onPressed: () { - if (value == 0) { - onChanged(1); - } else { - onChanged(0); - } - }, - ), - if (fullWidth) Expanded(child: slider) else slider, - ], - ); - } -} diff --git a/lib/modules/playlist/playlist_card.dart b/lib/modules/playlist/playlist_card.dart deleted file mode 100644 index 1d221a33..00000000 --- a/lib/modules/playlist/playlist_card.dart +++ /dev/null @@ -1,224 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/playbutton_view/playbutton_card.dart'; -import 'package:spotube/components/playbutton_view/playbutton_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/querying_track_info.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/history/history.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/metadata_plugin/library/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/playlist.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -class PlaylistCard extends HookConsumerWidget { - final SpotubeSimplePlaylistObject playlist; - final bool _isTile; - - const PlaylistCard( - this.playlist, { - super.key, - }) : _isTile = false; - - const PlaylistCard.tile( - this.playlist, { - super.key, - }) : _isTile = true; - - @override - Widget build(BuildContext context, ref) { - final playlistQueue = ref.watch(audioPlayerProvider); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final isFetchingActiveTrack = ref.watch(queryingTrackInfoProvider); - final historyNotifier = ref.read(playbackHistoryActionsProvider); - - final playing = - useStream(audioPlayer.playingStream).data ?? audioPlayer.isPlaying; - - final isPlaylistPlaying = useMemoized( - () => playlistQueue.containsCollection(playlist.id), - [playlistQueue, playlist.id], - ); - - final updating = useState(false); - final me = ref.watch(metadataPluginUserProvider); - - final fetchInitialTracks = useCallback(() async { - if (playlist.id == 'user-liked-tracks') { - final tracks = await ref.read(metadataPluginSavedTracksProvider.future); - return tracks.items; - } - - final result = await ref - .read(metadataPluginPlaylistTracksProvider(playlist.id).future); - - return result.items; - }, [playlist.id, ref]); - - final fetchAllTracks = useCallback(() async { - await fetchInitialTracks(); - - if (playlist.id == 'user-liked-tracks') { - return ref.read(metadataPluginSavedTracksProvider.notifier).fetchAll(); - } - - return ref - .read(metadataPluginPlaylistTracksProvider(playlist.id).notifier) - .fetchAll(); - }, [playlist.id, ref, fetchInitialTracks]); - - final onTap = useCallback(() { - context.navigateTo(PlaylistRoute(id: playlist.id, playlist: playlist)); - }, [context, playlist]); - - final onPlaybuttonPressed = useCallback(() async { - try { - updating.value = true; - if (isPlaylistPlaying && playing) { - return audioPlayer.pause(); - } else if (isPlaylistPlaying && !playing) { - return audioPlayer.resume(); - } - - final fetchedInitialTracks = await fetchInitialTracks(); - - if (fetchedInitialTracks.isEmpty || !context.mounted) return; - - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - if (isRemoteDevice == null) return; - if (isRemoteDevice) { - final remotePlayback = ref.read(connectProvider.notifier); - final allTracks = await fetchAllTracks(); - await remotePlayback.load( - WebSocketLoadEventData.playlist( - tracks: allTracks, - collection: playlist, - ), - ); - } else { - await playlistNotifier.load(fetchedInitialTracks, autoPlay: true); - playlistNotifier.addCollection(playlist.id); - historyNotifier.addPlaylists([playlist]); - - final allTracks = await fetchAllTracks(); - - await playlistNotifier - .addTracks(allTracks.sublist(fetchedInitialTracks.length)); - } - } finally { - if (context.mounted) { - updating.value = false; - } - } - }, [ - isPlaylistPlaying, - playing, - fetchInitialTracks, - context, - showSelectDeviceDialog, - ref, - connectProvider, - fetchAllTracks, - playlistNotifier, - playlist.id, - historyNotifier, - playlist, - updating - ]); - - final onAddToQueuePressed = useCallback(() async { - updating.value = true; - try { - if (isPlaylistPlaying) return; - - final fetchedInitialTracks = await fetchAllTracks(); - - if (fetchedInitialTracks.isEmpty) return; - - playlistNotifier.addTracks(fetchedInitialTracks); - playlistNotifier.addCollection(playlist.id); - historyNotifier.addPlaylists([playlist]); - if (context.mounted) { - showToast( - context: context, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - content: Text( - context.l10n - .added_num_tracks_to_queue(fetchedInitialTracks.length), - ), - trailing: Button.outline( - child: Text(context.l10n.undo), - onPressed: () { - playlistNotifier - .removeTracks(fetchedInitialTracks.map((e) => e.id)); - }, - ), - ), - ); - }, - ); - } - } finally { - updating.value = false; - } - }, [ - isPlaylistPlaying, - fetchAllTracks, - playlistNotifier, - playlist.id, - historyNotifier, - playlist, - context, - updating - ]); - - final imageUrl = useMemoized( - () => playlist.images.from200PxTo300PxOrSmallestImage( - ImagePlaceholder.collection, - ), - [playlist.images], - ); - - final isLoading = - (isPlaylistPlaying && isFetchingActiveTrack) || updating.value; - final isOwner = playlist.owner.id == me.asData?.value?.id && - me.asData?.value?.id != null; - - if (_isTile) { - return PlaybuttonTile( - title: playlist.name, - description: playlist.description, - image: null, - imageUrl: imageUrl, - isPlaying: isPlaylistPlaying, - isLoading: isLoading, - isOwner: isOwner, - onTap: onTap, - onPlaybuttonPressed: onPlaybuttonPressed, - onAddToQueuePressed: onAddToQueuePressed, - ); - } - - return PlaybuttonCard( - title: playlist.name, - description: playlist.description, - image: null, - imageUrl: imageUrl, - isPlaying: isPlaylistPlaying, - isLoading: isLoading, - isOwner: isOwner, - onTap: onTap, - onPlaybuttonPressed: onPlaybuttonPressed, - onAddToQueuePressed: onAddToQueuePressed, - ); - } -} diff --git a/lib/modules/playlist/playlist_create_dialog.dart b/lib/modules/playlist/playlist_create_dialog.dart deleted file mode 100644 index 0fdcf081..00000000 --- a/lib/modules/playlist/playlist_create_dialog.dart +++ /dev/null @@ -1,307 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:auto_route/auto_route.dart'; -import 'package:collection/collection.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:path/path.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/form/checkbox_form_field.dart'; -import 'package:spotube/components/form/text_form_field.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/playlist/playlist.dart'; - -class PlaylistCreateDialog extends HookConsumerWidget { - /// Track ids to add to the playlist - final List trackIds; - final String? playlistId; - const PlaylistCreateDialog({ - super.key, - this.trackIds = const [], - this.playlistId, - }); - - @override - Widget build(BuildContext context, ref) { - final userPlaylists = ref.watch(metadataPluginSavedPlaylistsProvider); - final playlist = - ref.watch(metadataPluginPlaylistProvider(playlistId ?? "")); - final playlistNotifier = - ref.watch(metadataPluginPlaylistProvider(playlistId ?? "").notifier); - - final isSubmitting = useState(false); - - final formKey = useMemoized(() => GlobalKey(), []); - - final updatingPlaylist = useMemoized( - () => userPlaylists.asData?.value.items - .firstWhereOrNull((playlist) => playlist.id == playlistId), - [ - userPlaylists.asData?.value.items, - playlistId, - ], - ); - - final isUpdatingPlaylist = playlistId != null; - - final l10n = context.l10n; - final theme = Theme.of(context); - - useEffect(() { - if (playlist.asData?.value != null) { - formKey.currentState?.patchValue({ - 'playlistName': playlist.asData!.value.name, - 'description': playlist.asData!.value.description, - 'public': playlist.asData!.value.public, - 'collaborative': playlist.asData!.value.collaborative, - }); - } - - return; - }, [playlist]); - - final onError = useCallback((error) { - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - title: Text( - l10n.error(l10n.epic_failure), - style: theme.typography.normal.copyWith( - color: theme.colorScheme.destructive, - ), - ), - ), - ); - }, - ); - }, [l10n, theme]); - - Future onCreate() async { - if (!formKey.currentState!.saveAndValidate()) return; - - try { - isSubmitting.value = true; - final values = formKey.currentState!.value; - - final payload = ( - playlistName: values['playlistName'], - collaborative: values['collaborative'], - public: values['public'], - description: values['description'], - base64Image: (values['image'] as XFile?)?.path != null - ? await (values['image'] as XFile) - .readAsBytes() - .then((bytes) => base64Encode(bytes)) - : null, - ); - - if (isUpdatingPlaylist) { - await playlistNotifier.modify( - name: payload.playlistName, - description: payload.description, - public: payload.public, - collaborative: payload.collaborative, - onError: onError, - ); - } else { - await playlistNotifier.create( - name: payload.playlistName, - description: payload.description, - public: payload.public, - collaborative: payload.collaborative, - onError: onError, - ); - } - - if (trackIds.isNotEmpty) { - await playlistNotifier.addTracks(trackIds, onError); - } - } finally { - isSubmitting.value = false; - if (context.mounted && - !ref - .read(metadataPluginPlaylistProvider(playlistId ?? "")) - .hasError) { - context.router.maybePop( - await ref - .read(metadataPluginPlaylistProvider(playlistId ?? "").future), - ); - } - } - } - - return AlertDialog( - title: Text( - isUpdatingPlaylist - ? context.l10n.update_playlist - : context.l10n.create_a_playlist, - ), - actions: [ - Button.outline( - child: Text(context.l10n.cancel), - onPressed: () { - Navigator.pop(context); - }, - ), - Button.primary( - onPressed: onCreate, - enabled: !playlist.isLoading & !isSubmitting.value, - child: Text( - isUpdatingPlaylist ? context.l10n.update : context.l10n.create, - ), - ), - ], - content: Container( - width: MediaQuery.of(context).size.width, - constraints: const BoxConstraints(maxWidth: 500), - child: FormBuilder( - key: formKey, - initialValue: { - 'playlistName': updatingPlaylist?.name, - 'description': updatingPlaylist?.description, - 'public': playlist.asData?.value.public ?? false, - 'collaborative': playlist.asData?.value.collaborative ?? false, - }, - child: ListView( - shrinkWrap: true, - children: [ - FormBuilderField( - name: 'image', - validator: (value) { - if (value == null) return null; - final file = File(value.path); - - if (file.lengthSync() > 256000) { - return "Image size should be less than 256kb"; - } - - if (extension(file.path) != ".png") { - return "Image should be in PNG format"; - } - return null; - }, - builder: (field) { - return Column( - spacing: 10, - children: [ - UniversalImage( - path: field.value?.path ?? - (updatingPlaylist?.images).asUrlString( - placeholder: ImagePlaceholder.collection, - ), - height: 200, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Button.secondary( - leading: const Icon(SpotubeIcons.edit), - child: Text( - field.value?.path != null || - updatingPlaylist?.images != null - ? context.l10n.change_cover - : context.l10n.add_cover, - ), - onPressed: () async { - final imageFile = await ImagePicker().pickImage( - source: ImageSource.gallery, - ); - - if (imageFile != null) { - field.didChange(imageFile); - field.validate(); - field.save(); - } - }, - ), - const SizedBox(width: 10), - IconButton.destructive( - icon: const Icon(SpotubeIcons.trash), - enabled: field.value != null, - onPressed: () { - field.didChange(null); - field.validate(); - field.save(); - }, - ), - ], - ), - if (field.hasError) - Text( - field.errorText ?? "", - style: theme.typography.normal.copyWith( - color: theme.colorScheme.destructive, - ), - ) - ], - ); - }, - ), - const Gap(20), - TextFormBuilderField( - name: 'playlistName', - label: Text(context.l10n.playlist_name), - placeholder: Text(context.l10n.name_of_playlist), - validator: FormBuilderValidators.required(), - ), - const Gap(20), - TextFormBuilderField( - name: 'description', - label: Text(context.l10n.description), - validator: FormBuilderValidators.required(), - placeholder: Text(context.l10n.description), - keyboardType: TextInputType.multiline, - maxLines: 5, - ), - const Gap(20), - CheckboxFormBuilderField( - name: 'public', - trailing: Text(context.l10n.public), - ), - const Gap(10), - CheckboxFormBuilderField( - name: 'collaborative', - trailing: Text(context.l10n.collaborative), - ), - ], - ), - ), - ), - ); - } -} - -class PlaylistCreateDialogButton extends HookConsumerWidget { - const PlaylistCreateDialogButton({super.key}); - - showPlaylistDialog(BuildContext context) { - showDialog( - context: context, - alignment: Alignment.center, - builder: (context) => const ToastLayer( - child: PlaylistCreateDialog(), - ), - ); - } - - @override - Widget build(BuildContext context, ref) { - return Button.secondary( - leading: const Icon(SpotubeIcons.addFilled), - child: Text(context.l10n.playlist), - onPressed: () => showPlaylistDialog(context), - ); - } -} diff --git a/lib/modules/root/bottom_player.dart b/lib/modules/root/bottom_player.dart deleted file mode 100644 index 33497d8d..00000000 --- a/lib/modules/root/bottom_player.dart +++ /dev/null @@ -1,133 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/player/player_actions.dart'; -import 'package:spotube/modules/player/player_overlay.dart'; -import 'package:spotube/modules/player/player_track_details.dart'; -import 'package:spotube/modules/player/player_controls.dart'; -import 'package:spotube/modules/player/volume_slider.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -import 'package:spotube/provider/volume_provider.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; - -class BottomPlayer extends HookConsumerWidget { - const BottomPlayer({super.key}); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - final layoutMode = - ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); - - final mediaQuery = MediaQuery.of(context); - - String albumArt = useMemoized( - () => playlist.activeTrack?.album.images.isNotEmpty == true - ? (playlist.activeTrack?.album.images).asUrlString( - index: (playlist.activeTrack?.album.images.length ?? 1) - 1, - placeholder: ImagePlaceholder.albumArt, - ) - : Assets.images.albumPlaceholder.path, - [playlist.activeTrack?.album.images], - ); - - // returning an empty non spacious Container as the overlay will take - // place in the global overlay stack aka [_entries] - if (layoutMode == LayoutMode.compact || - ((mediaQuery.mdAndDown) && layoutMode == LayoutMode.adaptive)) { - return PlayerOverlay(albumArt: albumArt); - } - - return SurfaceCard( - borderRadius: BorderRadius.zero, - surfaceBlur: context.theme.surfaceBlur, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: PlayerTrackDetails(track: playlist.activeTrack), - ), - // controls - const Flexible( - flex: 3, - child: Padding( - padding: EdgeInsets.only(top: 5), - child: PlayerControls(), - ), - ), - // add to saved tracks - Column( - mainAxisSize: MainAxisSize.min, - children: [ - PlayerActions( - extraActions: [ - Tooltip( - tooltip: - TooltipContainer(child: Text(context.l10n.mini_player)) - .call, - child: IconButton( - variance: ButtonVariance.ghost, - icon: const Icon(SpotubeIcons.miniPlayer), - onPressed: () async { - if (!kIsDesktop) return; - - final prevSize = await windowManager.getSize(); - await windowManager.setMinimumSize( - const Size(300, 300), - ); - await windowManager.setAlwaysOnTop(true); - if (!kIsLinux) { - await windowManager.setHasShadow(false); - } - await windowManager.setAlignment(Alignment.topRight); - await windowManager.setSize(const Size(400, 500)); - await Future.delayed( - const Duration(milliseconds: 100), - () async { - if (context.mounted) { - context.navigateTo( - MiniLyricsRoute(prevSize: prevSize), - ); - } - }, - ); - }, - ), - ), - ], - ), - Container( - height: 40, - constraints: const BoxConstraints(maxWidth: 250), - padding: const EdgeInsets.only(right: 10), - child: Consumer(builder: (context, ref, _) { - final volume = ref.watch(volumeProvider); - return VolumeSlider( - fullWidth: true, - value: volume, - onChanged: (value) { - ref.read(volumeProvider.notifier).setVolume(value); - }, - ); - }), - ) - ], - ), - ], - ), - ); - } -} diff --git a/lib/modules/root/sidebar/sidebar.dart b/lib/modules/root/sidebar/sidebar.dart deleted file mode 100644 index 1538d624..00000000 --- a/lib/modules/root/sidebar/sidebar.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/collections/side_bar_tiles.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/root/sidebar/sidebar_footer.dart'; - -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class Sidebar extends HookConsumerWidget { - final Widget child; - - const Sidebar({ - required this.child, - super.key, - }); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final ThemeData(:colorScheme) = Theme.of(context); - final mediaQuery = MediaQuery.sizeOf(context); - - final layoutMode = - ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); - - final sidebarTileList = useMemoized( - () => getSidebarTileList(context.l10n), - [context.l10n], - ); - - final sidebarLibraryTileList = useMemoized( - () => getSidebarLibraryTileList(context.l10n), - [context.l10n], - ); - - final tileList = [...sidebarTileList, ...sidebarLibraryTileList]; - - final router = context.watchRouter; - - final selectedIndex = tileList.indexWhere( - (e) => router.currentPath.startsWith(e.pathPrefix), - ); - - if (layoutMode == LayoutMode.compact || - (mediaQuery.smAndDown && layoutMode == LayoutMode.adaptive)) { - return child; - } - - final navigationButtons = [ - NavigationLabel( - child: mediaQuery.lgAndUp - ? DefaultTextStyle( - style: TextStyle( - fontFamily: "Cookie", - fontSize: 30, - letterSpacing: 1.8, - color: colorScheme.foreground, - ), - child: const Text("Spotube"), - ) - : const Text(""), - ), - for (final tile in sidebarTileList) - NavigationButton( - style: router.currentPath.startsWith(tile.pathPrefix) - ? const ButtonStyle.secondary() - : null, - label: mediaQuery.lgAndUp ? Text(tile.title) : null, - child: Tooltip( - tooltip: TooltipContainer(child: Text(tile.title)).call, - child: Icon(tile.icon), - ), - onPressed: () { - context.navigateTo(tile.route); - }, - ), - const NavigationDivider(), - if (mediaQuery.lgAndUp) - NavigationLabel(child: Text(context.l10n.library)), - for (final tile in sidebarLibraryTileList) - NavigationButton( - style: router.currentPath.startsWith(tile.pathPrefix) - ? const ButtonStyle.secondary() - : null, - label: mediaQuery.lgAndUp ? Text(tile.title) : null, - onPressed: () { - context.navigateTo(tile.route); - }, - child: Tooltip( - tooltip: TooltipContainer(child: Text(tile.title)).call, - child: Icon(tile.icon), - ), - ), - ]; - - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - children: [ - Expanded( - child: mediaQuery.lgAndUp - ? NavigationSidebar( - index: selectedIndex, - onSelected: (index) { - final tile = tileList[index]; - context.navigateTo(tile.route); - }, - children: navigationButtons, - ) - : NavigationRail( - alignment: NavigationRailAlignment.start, - index: selectedIndex, - onSelected: (index) { - final tile = tileList[index]; - context.navigateTo(tile.route); - }, - children: navigationButtons, - ), - ), - const SidebarFooter(), - if (mediaQuery.lgAndUp) const Gap(130) else const Gap(65), - ], - ), - const VerticalDivider(), - Expanded(child: child), - ], - ); - } -} diff --git a/lib/modules/root/sidebar/sidebar_footer.dart b/lib/modules/root/sidebar/sidebar_footer.dart deleted file mode 100644 index 0f8ac9d8..00000000 --- a/lib/modules/root/sidebar/sidebar_footer.dart +++ /dev/null @@ -1,144 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart' show Badge; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/connect/connect_device.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; - -class SidebarFooter extends HookConsumerWidget implements NavigationBarItem { - const SidebarFooter({ - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final router = AutoRouter.of(context, watch: true); - final mediaQuery = MediaQuery.of(context); - final downloadCount = ref - .watch(downloadManagerProvider) - .where((e) => - e.status == DownloadStatus.downloading || - e.status == DownloadStatus.queued) - .length; - final userSnapshot = ref.watch(metadataPluginUserProvider); - final data = userSnapshot.asData?.value; - - final avatarImg = (data?.images).asUrlString( - index: (data?.images.length ?? 1) - 1, - placeholder: ImagePlaceholder.artist, - ); - - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - - if (mediaQuery.mdAndDown) { - return Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Badge( - isLabelVisible: downloadCount > 0, - label: Text(downloadCount.toString()), - child: IconButton( - variance: router.topRoute.name == UserDownloadsRoute.name - ? ButtonVariance.secondary - : ButtonVariance.ghost, - icon: const Icon(SpotubeIcons.download), - onPressed: () => context.navigateTo(const UserDownloadsRoute()), - ), - ), - const ConnectDeviceButton.sidebar(), - IconButton( - variance: ButtonVariance.ghost, - icon: const Icon(SpotubeIcons.settings), - onPressed: () => context.navigateTo(const SettingsRoute()), - ), - ], - ); - } - - return Container( - padding: const EdgeInsets.only(left: 12), - width: 180, - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - SizedBox( - width: double.infinity, - child: Button( - style: router.topRoute.name == UserDownloadsRoute.name - ? ButtonVariance.secondary - : ButtonVariance.outline, - onPressed: () { - context.navigateTo(const UserDownloadsRoute()); - }, - leading: const Icon(SpotubeIcons.download), - trailing: downloadCount > 0 - ? PrimaryBadge( - child: Text(downloadCount.toString()), - ) - : null, - child: Text(context.l10n.downloads), - ), - ), - const ConnectDeviceButton.sidebar(), - Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - if (authenticated.asData?.value == true && data == null) - const CircularProgressIndicator() - else if (data != null) - Flexible( - child: GestureDetector( - onTap: () { - context.navigateTo(const ProfileRoute()); - }, - child: Row( - children: [ - Avatar( - initials: Avatar.getInitials(data.name), - provider: UniversalImage.imageProvider(avatarImg), - ), - const SizedBox(width: 10), - Flexible( - child: Text( - data.name, - maxLines: 1, - softWrap: false, - overflow: TextOverflow.fade, - style: theme.typography.normal - .copyWith(fontWeight: FontWeight.bold), - ), - ), - ], - ), - ), - ), - IconButton( - variance: ButtonVariance.ghost, - icon: const Icon(SpotubeIcons.settings), - onPressed: () { - context.navigateTo(const SettingsRoute()); - }, - ), - ], - ), - ], - ), - ); - } - - @override - bool get selectable => false; -} diff --git a/lib/modules/root/spotube_navigation_bar.dart b/lib/modules/root/spotube_navigation_bar.dart deleted file mode 100644 index 47ea3ca3..00000000 --- a/lib/modules/root/spotube_navigation_bar.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'dart:math'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart' show Badge; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -import 'package:spotube/collections/side_bar_tiles.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -final navigationPanelHeight = StateProvider((ref) => 50); - -class SpotubeNavigationBar extends HookConsumerWidget { - const SpotubeNavigationBar({ - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.of(context); - - final downloadCount = ref - .watch(downloadManagerProvider) - .where((e) => - e.status == DownloadStatus.downloading || - e.status == DownloadStatus.queued) - .length; - final layoutMode = - ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); - - final navbarTileList = useMemoized( - () => getNavbarTileList(context.l10n), - [context.l10n], - ); - - final panelHeight = ref.watch(navigationPanelHeight); - - final router = context.watchRouter; - final selectedIndex = max( - 0, - navbarTileList.indexWhere( - (e) => router.currentPath.startsWith(e.pathPrefix), - ), - ); - - if (layoutMode == LayoutMode.extended || - (mediaQuery.mdAndUp && layoutMode == LayoutMode.adaptive) || - panelHeight < 10) { - return const SizedBox(); - } - - return AnimatedContainer( - duration: const Duration(milliseconds: 100), - height: panelHeight, - child: SingleChildScrollView( - child: Column( - children: [ - const Divider(), - NavigationBar( - index: selectedIndex, - surfaceBlur: context.theme.surfaceBlur, - surfaceOpacity: context.theme.surfaceOpacity, - children: [ - for (final tile in navbarTileList) - NavigationButton( - style: navbarTileList[selectedIndex] == tile - ? const ButtonStyle.fixed(density: ButtonDensity.icon) - : const ButtonStyle.muted(density: ButtonDensity.icon), - child: Badge( - isLabelVisible: tile.id == "library" && downloadCount > 0, - label: Text(downloadCount.toString()), - child: Icon(tile.icon), - ), - onPressed: () { - context.navigateTo(tile.route); - }, - ) - ], - ), - ], - ), - ), - ); - } -} diff --git a/lib/modules/root/update_dialog.dart b/lib/modules/root/update_dialog.dart deleted file mode 100644 index 4aa2fd13..00000000 --- a/lib/modules/root/update_dialog.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/links/anchor_button.dart'; -import 'package:url_launcher/url_launcher_string.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:version/version.dart'; - -class RootAppUpdateDialog extends StatelessWidget { - final Version? version; - final int? nightlyBuildNum; - - const RootAppUpdateDialog({super.key, this.version}) : nightlyBuildNum = null; - const RootAppUpdateDialog.nightly({super.key, required this.nightlyBuildNum}) - : version = null; - - @override - Widget build(BuildContext context) { - const url = "https://spotube.krtirtho.dev/downloads"; - const nightlyUrl = "https://spotube.krtirtho.dev/downloads/nightly"; - return AlertDialog( - title: Text(context.l10n.spotube_has_an_update), - actions: [ - Button.primary( - child: Text(context.l10n.download_now), - onPressed: () => launchUrlString( - nightlyBuildNum != null ? nightlyUrl : url, - mode: LaunchMode.externalApplication, - ), - ), - ], - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - nightlyBuildNum != null - ? context.l10n.nightly_version(nightlyBuildNum!) - : context.l10n.release_version(version!), - ), - if (nightlyBuildNum == null) - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(context.l10n.read_the_latest), - AnchorButton( - context.l10n.release_notes, - style: const TextStyle(color: Colors.blue), - onTap: () => launchUrlString( - url, - mode: LaunchMode.externalApplication, - ), - ), - ], - ), - ], - ), - ); - } -} diff --git a/lib/modules/root/use_global_subscriptions.dart b/lib/modules/root/use_global_subscriptions.dart deleted file mode 100644 index 9a492d31..00000000 --- a/lib/modules/root/use_global_subscriptions.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/metadata_plugins/plugin_update_available_dialog.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/updater/update_checker.dart'; -import 'package:spotube/provider/server/routes/connect.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/connectivity_adapter.dart'; -import 'package:spotube/utils/service_utils.dart'; - -void useGlobalSubscriptions(WidgetRef ref) { - final context = useContext(); - final theme = Theme.of(context); - final connectRoutes = ref.watch(serverConnectRoutesProvider); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) async { - ServiceUtils.checkForUpdates(context, ref); - - final pluginUpdate = - await ref.read(metadataPluginUpdateCheckerProvider.future); - - if (pluginUpdate != null) { - final pluginConfig = await ref.read(metadataPluginsProvider.future); - if (context.mounted) { - showDialog( - context: context, - builder: (context) => MetadataPluginUpdateAvailableDialog( - plugin: pluginConfig.defaultMetadataPluginConfig!, - update: pluginUpdate, - ), - ); - } - } - }); - - StreamSubscription? audioPlayerSubscription; - bool pausedByStream = false; - - final subscriptions = [ - ConnectionCheckerService.instance.onConnectivityChanged - .listen((connected) async { - audioPlayerSubscription?.cancel(); - - /// Pausing or resuming based on connectivity to avoid MPV skipping - /// audio while retrying to connect - if (audioPlayer.currentIndex >= 0) { - if (connected && audioPlayer.isPaused && pausedByStream) { - await audioPlayer.resume(); - pausedByStream = false; - } else if (!connected && audioPlayer.isPlaying) { - if ((audioPlayer.bufferedPosition - const Duration(seconds: 1)) <= - audioPlayer.position) { - await audioPlayer.pause(); - pausedByStream = true; - } else { - audioPlayerSubscription = - audioPlayer.positionStream.listen((position) async { - if (ConnectionCheckerService.instance.isConnectedSync) return; - - final bufferedPosition = - audioPlayer.bufferedPosition - const Duration(seconds: 1); - final duration = - audioPlayer.duration - const Duration(seconds: 1); - - if (bufferedPosition <= position || position >= duration) { - audioPlayer.pause(); - pausedByStream = true; - } - }); - } - } - } - - // Show notification for connection related issues - if (!context.mounted) return; - - showToast( - context: context, - location: ToastLocation.bottomCenter, - builder: (context, overlay) { - if (connected) { - return SurfaceCard( - child: Basic( - leading: const Icon(SpotubeIcons.wifi), - title: Text(context.l10n.connection_restored), - ), - ); - } - - return SurfaceCard( - fillColor: theme.colorScheme.destructive, - filled: true, - child: Basic( - leading: Icon( - SpotubeIcons.noWifi, - color: theme.colorScheme.destructiveForeground, - ), - trailing: Text( - context.l10n.you_are_offline, - style: TextStyle( - color: theme.colorScheme.destructiveForeground, - ), - ), - ), - ); - }, - ); - }), - connectRoutes.connectClientStream.listen((clientOrigin) { - if (!context.mounted) return; - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - fillColor: Colors.yellow[600], - filled: true, - child: Basic( - leading: const Icon( - SpotubeIcons.error, - color: Colors.black, - ), - title: Text( - context.l10n.connect_client_alert(clientOrigin), - style: const TextStyle(color: Colors.black), - ), - ), - ); - }, - ); - }) - ]; - - return () { - for (final subscription in subscriptions) { - subscription.cancel(); - } - }; - }, []); -} diff --git a/lib/modules/search/loading.dart b/lib/modules/search/loading.dart deleted file mode 100644 index 8ca2820f..00000000 --- a/lib/modules/search/loading.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/pages/search/search.dart'; - -class SearchPlaceholder extends HookConsumerWidget { - final AsyncValue snapshot; - final Widget child; - const SearchPlaceholder({ - super.key, - required this.child, - required this.snapshot, - }); - - @override - Widget build(BuildContext context, ref) { - final theme = context.theme; - final mediaQuery = MediaQuery.sizeOf(context); - - final searchTerm = ref.watch(searchTermStateProvider); - - return switch ((searchTerm.isEmpty, snapshot.isLoading)) { - (true, false) => Column( - children: [ - SizedBox( - height: mediaQuery.height * 0.2, - ), - Undraw( - illustration: UndrawIllustration.explore, - color: theme.colorScheme.primary, - height: 200 * theme.scaling, - ), - const SizedBox(height: 20), - Text(context.l10n.search_to_get_results).large(), - ], - ), - (false, true) => Container( - constraints: BoxConstraints( - maxWidth: - mediaQuery.lgAndUp ? mediaQuery.width * 0.5 : mediaQuery.width, - ), - padding: const EdgeInsets.symmetric( - horizontal: 20, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - context.l10n.crunching_results, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w900, - color: theme.colorScheme.foreground.withValues(alpha: 0.7), - ), - ), - const SizedBox(height: 20), - const LinearProgressIndicator(), - ], - ), - ), - _ => child, - }; - } -} diff --git a/lib/modules/search/sections/albums.dart b/lib/modules/search/sections/albums.dart deleted file mode 100644 index e8bc71fc..00000000 --- a/lib/modules/search/sections/albums.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/metadata_plugin/search/all.dart'; - -class SearchAlbumsSection extends HookConsumerWidget { - const SearchAlbumsSection({ - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final searchTerm = ref.watch(searchTermStateProvider); - final search = ref.watch(metadataPluginSearchAllProvider(searchTerm)); - final albums = search.asData?.value.albums ?? []; - - return HorizontalPlaybuttonCardView( - isLoadingNextPage: false, - hasNextPage: false, - items: albums, - onFetchMore: () {}, - title: Text(context.l10n.albums), - ); - } -} diff --git a/lib/modules/search/sections/artists.dart b/lib/modules/search/sections/artists.dart deleted file mode 100644 index 9da3702c..00000000 --- a/lib/modules/search/sections/artists.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/metadata_plugin/search/all.dart'; - -class SearchArtistsSection extends HookConsumerWidget { - const SearchArtistsSection({ - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final searchTerm = ref.watch(searchTermStateProvider); - final search = ref.watch(metadataPluginSearchAllProvider(searchTerm)); - - final artists = search.asData?.value.artists ?? []; - - return HorizontalPlaybuttonCardView( - isLoadingNextPage: false, - hasNextPage: false, - items: artists, - onFetchMore: () {}, - title: Text(context.l10n.artists), - ); - } -} diff --git a/lib/modules/search/sections/playlists.dart b/lib/modules/search/sections/playlists.dart deleted file mode 100644 index 7e03bdeb..00000000 --- a/lib/modules/search/sections/playlists.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/horizontal_playbutton_card_view/horizontal_playbutton_card_view.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/metadata_plugin/search/all.dart'; - -class SearchPlaylistsSection extends HookConsumerWidget { - const SearchPlaylistsSection({ - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final searchTerm = ref.watch(searchTermStateProvider); - final playlistsQuery = - ref.watch(metadataPluginSearchAllProvider(searchTerm)); - final playlists = playlistsQuery.asData?.value.playlists ?? []; - - return HorizontalPlaybuttonCardView( - isLoadingNextPage: false, - hasNextPage: false, - items: playlists, - onFetchMore: () {}, - title: Text(context.l10n.playlists), - ); - } -} diff --git a/lib/modules/search/sections/tracks.dart b/lib/modules/search/sections/tracks.dart deleted file mode 100644 index 6bc60045..00000000 --- a/lib/modules/search/sections/tracks.dart +++ /dev/null @@ -1,112 +0,0 @@ -import 'package:collection/collection.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/dialogs/prompt_dialog.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/track_tile/track_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/metadata_plugin/search/all.dart'; - -class SearchTracksSection extends HookConsumerWidget { - const SearchTracksSection({ - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final searchTerm = ref.watch(searchTermStateProvider); - final search = ref.watch(metadataPluginSearchAllProvider(searchTerm)); - final tracks = search.asData?.value.tracks ?? []; - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final playlist = ref.watch(audioPlayerProvider); - final theme = Theme.of(context); - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - if (tracks.isNotEmpty) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: Text( - context.l10n.songs, - style: theme.typography.h4, - ), - ), - if (search.isLoading) - const CircularProgressIndicator() - else - ...tracks.mapIndexed((i, track) { - return TrackTile( - index: i, - track: track, - playlist: playlist, - onTap: () async { - final isRemoteDevice = - await showSelectDeviceDialog(context, ref); - - if (isRemoteDevice == null) return; - - if (isRemoteDevice) { - final remotePlayback = ref.read(connectProvider.notifier); - final remotePlaylist = ref.read(queueProvider); - - final isTrackPlaying = - remotePlaylist.activeTrack?.id == track.id; - - if (!isTrackPlaying && context.mounted) { - final shouldPlay = (playlist.tracks.length) > 20 - ? await showPromptDialog( - context: context, - title: context.l10n.playing_track( - track.name, - ), - message: context.l10n.queue_clear_alert( - playlist.tracks.length, - ), - ) - : true; - - if (shouldPlay) { - await remotePlayback.load( - WebSocketLoadEventData.playlist( - tracks: [track], - ), - ); - } - } - } else { - final isTrackPlaying = playlist.activeTrack?.id == track.id; - if (!isTrackPlaying && context.mounted) { - final shouldPlay = (playlist.tracks.length) > 20 - ? await showPromptDialog( - context: context, - title: context.l10n.playing_track( - track.name, - ), - message: context.l10n.queue_clear_alert( - playlist.tracks.length, - ), - ) - : true; - - if (shouldPlay) { - await playlistNotifier.load( - [track], - autoPlay: true, - ); - } - } - } - }, - ); - }), - ], - ); - } -} diff --git a/lib/modules/settings/color_scheme_picker_dialog.dart b/lib/modules/settings/color_scheme_picker_dialog.dart deleted file mode 100644 index 9469ff00..00000000 --- a/lib/modules/settings/color_scheme_picker_dialog.dart +++ /dev/null @@ -1,154 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class SpotubeColor extends Color { - final String name; - - const SpotubeColor(super.color, {required this.name}); - - const SpotubeColor.from(super.value, {required this.name}); - - factory SpotubeColor.fromString(String string) { - final slices = string.split(":"); - return SpotubeColor(int.parse(slices.last), name: slices.first); - } - - @override - String toString() { - return "$name:${toARGB32()}"; - } -} - -final Set colorsMap = { - SpotubeColor(Colors.slate.value, name: "slate"), - SpotubeColor(Colors.gray.value, name: "gray"), - SpotubeColor(Colors.zinc.value, name: "zinc"), - SpotubeColor(Colors.neutral.value, name: "neutral"), - SpotubeColor(Colors.stone.value, name: "stone"), - SpotubeColor(Colors.red.value, name: "red"), - SpotubeColor(Colors.orange.value, name: "orange"), - SpotubeColor(Colors.yellow.value, name: "yellow"), - SpotubeColor(Colors.green.value, name: "green"), - SpotubeColor(Colors.blue.value, name: "blue"), - SpotubeColor(Colors.violet.value, name: "violet"), - SpotubeColor(Colors.rose.value, name: "rose"), -}; - -final colorSchemeMap = { - "slate": LegacyColorSchemes.slate, - "gray": LegacyColorSchemes.gray, - "zinc": LegacyColorSchemes.zinc, - "neutral": LegacyColorSchemes.neutral, - "stone": LegacyColorSchemes.stone, - "red": LegacyColorSchemes.red, - "orange": LegacyColorSchemes.orange, - "yellow": LegacyColorSchemes.yellow, - "green": LegacyColorSchemes.green, - "blue": LegacyColorSchemes.blue, - "violet": LegacyColorSchemes.violet, - "rose": LegacyColorSchemes.rose, -}; - -class ColorSchemePickerDialog extends HookConsumerWidget { - const ColorSchemePickerDialog({super.key}); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - - final scheme = preferences.accentColorScheme; - final active = useState( - colorsMap.firstWhereOrNull( - (element) { - return scheme.name == element.name; - }, - )?.name, - ); - - return AlertDialog( - title: Text( - context.l10n.pick_color_scheme, - style: TextStyle(color: context.theme.colorScheme.foreground), - ).large(), - actions: [ - Button.outline( - child: Text(context.l10n.cancel), - onPressed: () { - Navigator.pop(context); - }, - ), - Button.primary( - onPressed: () { - Navigator.pop(context); - }, - child: Text(context.l10n.save), - ), - ], - content: SizedBox( - height: 200, - width: 400, - child: Wrap( - spacing: 8, - runSpacing: 8, - children: colorsMap.map( - (color) { - return ColorChip( - name: color.name, - color: color, - isActive: color.name == active.value, - onPressed: () { - active.value = color.name; - preferencesNotifier.setAccentColorScheme( - colorsMap.firstWhere( - (element) { - return element.name == color.name; - }, - ), - ); - }, - ); - }, - ).toList(), - ), - ), - ); - } -} - -class ColorChip extends StatelessWidget { - final String name; - final Color color; - final bool isActive; - final VoidCallback onPressed; - const ColorChip({ - super.key, - required this.name, - required this.color, - required this.isActive, - required this.onPressed, - }); - - @override - Widget build(BuildContext context) { - return Chip( - leading: Container( - width: 20, - height: 20, - decoration: BoxDecoration( - color: color, - borderRadius: BorderRadius.circular(10), - ), - ), - onPressed: onPressed, - style: isActive ? ButtonVariance.primary : ButtonVariance.outline, - child: Text(name), - ); - } -} diff --git a/lib/modules/settings/playback/edit_connect_port_dialog.dart b/lib/modules/settings/playback/edit_connect_port_dialog.dart deleted file mode 100644 index 587f4388..00000000 --- a/lib/modules/settings/playback/edit_connect_port_dialog.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/form/text_form_field.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_shadcn_text_editing_controller.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class SettingsPlaybackEditConnectPortDialog extends HookConsumerWidget { - const SettingsPlaybackEditConnectPortDialog({super.key}); - - @override - Widget build(BuildContext context, ref) { - final connectPort = ref.watch( - userPreferencesProvider.select((s) => s.connectPort), - ); - final controller = useShadcnTextEditingController( - text: connectPort.toString(), - ); - final formKey = useMemoized(() => GlobalKey(), []); - - return ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 400), - child: Alert( - title: Text(context.l10n.edit_port).h4(), - content: FormBuilder( - key: formKey, - child: Column( - children: [ - const Gap(10), - TextFormBuilderField( - name: "port", - controller: controller, - placeholder: const Text("3000"), - validator: FormBuilderValidators.integer(radix: 10), - keyboardType: TextInputType.number, - inputFormatters: [ - // Allow only signed integers - TextInputFormatter.withFunction( - (oldValue, newValue) { - if (newValue.text.isEmpty) { - return const TextEditingValue(); - } - if (newValue.text.length == 1 && newValue.text == "-") { - return newValue; - } - - final intValue = int.tryParse(newValue.text); - if (intValue == null) { - return oldValue; - } - return newValue; - }, - ), - ], - ), - const Gap(5), - Text(context.l10n.port_helper_msg).small.muted, - const Gap(20), - Row( - children: [ - Expanded( - child: Button.secondary( - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text(context.l10n.cancel), - ), - ), - const Gap(10), - Expanded( - child: Button.primary( - onPressed: () { - if (!formKey.currentState!.saveAndValidate()) { - return; - } - final port = int.parse(controller.text); - ref - .read(userPreferencesProvider.notifier) - .setConnectPort(port); - Navigator.of(context).pop(); - }, - child: Text(context.l10n.save), - ), - ), - ], - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/modules/settings/playback/edit_instance_url_dialog.dart b/lib/modules/settings/playback/edit_instance_url_dialog.dart deleted file mode 100644 index b2dda411..00000000 --- a/lib/modules/settings/playback/edit_instance_url_dialog.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/form/text_form_field.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_shadcn_text_editing_controller.dart'; - -class SettingsPlaybackEditInstanceUrlDialog extends HookConsumerWidget { - final String title; - final String? initialValue; - final ValueChanged onSave; - - const SettingsPlaybackEditInstanceUrlDialog({ - super.key, - required this.title, - required this.onSave, - this.initialValue, - }); - - @override - Widget build(BuildContext context, ref) { - final controller = useShadcnTextEditingController( - text: initialValue, - ); - final formKey = useMemoized(() => GlobalKey(), []); - - return Alert( - title: Text(title).h4(), - content: FormBuilder( - key: formKey, - child: Column( - children: [ - const Gap(10), - TextFormBuilderField( - name: "url", - controller: controller, - placeholder: Text(title), - validator: FormBuilderValidators.url(), - ), - const Gap(10), - Row( - children: [ - Expanded( - child: Button.secondary( - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text(context.l10n.cancel), - ), - ), - const Gap(10), - Expanded( - child: Button.primary( - onPressed: () { - if (!formKey.currentState!.saveAndValidate()) { - return; - } - onSave( - controller.text, - ); - Navigator.of(context).pop(); - }, - child: Text(context.l10n.save), - ), - ), - ], - ) - ], - ), - ), - ); - } -} diff --git a/lib/modules/settings/section_card_with_heading.dart b/lib/modules/settings/section_card_with_heading.dart deleted file mode 100644 index c7bc1f26..00000000 --- a/lib/modules/settings/section_card_with_heading.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart' show ListTileTheme, ListTileThemeData; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide Theme, ThemeData; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -class SectionCardWithHeading extends StatelessWidget { - final String heading; - final List children; - const SectionCardWithHeading({ - super.key, - required this.heading, - required this.children, - }); - - @override - Widget build(BuildContext context) { - return ListTileTheme( - data: ListTileThemeData( - shape: RoundedRectangleBorder( - borderRadius: context.theme.borderRadiusLg, - side: BorderSide( - color: context.theme.colorScheme.border, - width: .5, - ), - ), - textColor: context.theme.colorScheme.foreground, - iconColor: context.theme.colorScheme.foreground, - selectedColor: context.theme.colorScheme.accent, - subtitleTextStyle: context.theme.typography.xSmall, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: Text( - heading, - style: context.theme.typography.large.copyWith( - color: context.theme.colorScheme.foreground, - ), - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: children, - ).gap(8.0), - ), - ], - ), - ); - } -} diff --git a/lib/modules/settings/youtube_engine_not_installed_dialog.dart b/lib/modules/settings/youtube_engine_not_installed_dialog.dart deleted file mode 100644 index b993dd1b..00000000 --- a/lib/modules/settings/youtube_engine_not_installed_dialog.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'dart:io'; - -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/form/text_form_field.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_shadcn_text_editing_controller.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:url_launcher/url_launcher.dart'; -import 'package:yt_dlp_dart/yt_dlp_dart.dart'; - -const engineDownloadUrls = { - YoutubeClientEngine.ytDlp: - "https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#installation", -}; - -class YouTubeEngineNotInstalledDialog extends HookConsumerWidget { - final YoutubeClientEngine engine; - const YouTubeEngineNotInstalledDialog({ - super.key, - required this.engine, - }); - - @override - Widget build(BuildContext context, ref) { - final controller = useShadcnTextEditingController(); - final formKey = useMemoized(() => GlobalKey(), []); - - return AlertDialog( - title: Row( - spacing: 8, - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(SpotubeIcons.error, color: Colors.red), - Text( - context.l10n.youtube_engine_not_installed_title(engine.label), - style: const TextStyle(color: Colors.red), - ), - ], - ), - content: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 400), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 8, - children: [ - Text( - context.l10n.youtube_engine_not_installed_message(engine.label), - ), - if (engineDownloadUrls[engine] != null) - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text("${context.l10n.download}:"), - Button.link( - child: Text(engineDownloadUrls[engine]!.split("?").first), - onPressed: () async { - launchUrl(Uri.parse(engineDownloadUrls[engine]!)); - }, - ), - ], - ), - Text(context.l10n.youtube_engine_set_path(engine.label)), - const Gap(8), - FormBuilder( - key: formKey, - child: TextFormBuilderField( - name: "path", - controller: controller, - placeholder: Text(switch (context.theme.platform) { - TargetPlatform.macOS => "e.g. /opt/homebrew/bin/yt-dlp", - TargetPlatform.windows => - r"e.g. C:\Program Files\yt-dlp\yt-dlp.exe", - _ => "e.g. /home/user/.local/bin/yt-dlp", - }), - ), - ), - if (kIsMacOS || kIsLinux) - Text(context.l10n.youtube_engine_unix_issue_message), - ], - ), - ), - actions: [ - Button.text( - onPressed: () { - if (!context.mounted) return; - Navigator.of(context).pop(false); - }, - child: Text(context.l10n.cancel), - ), - Button.secondary( - onPressed: () async { - if (controller.text.isNotEmpty) { - if (!await File(controller.text).exists() && context.mounted) { - formKey.currentState?.fields["path"] - ?.invalidate(context.l10n.file_not_found); - return; - } - await KVStoreService.setYoutubeEnginePath( - engine, - controller.text, - ); - if (engine == YoutubeClientEngine.ytDlp) { - await YtDlp.instance.setBinaryLocation(controller.text); - } - } - if (!context.mounted) return; - Navigator.of(context).pop(true); - }, - child: Text(context.l10n.save), - ), - ], - ); - } -} diff --git a/lib/modules/stats/common/album_item.dart b/lib/modules/stats/common/album_item.dart deleted file mode 100644 index 2ac73b91..00000000 --- a/lib/modules/stats/common/album_item.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/album/album_card.dart'; -import 'package:spotube/components/image/universal_image.dart'; - -class StatsAlbumItem extends StatelessWidget { - final SpotubeSimpleAlbumObject album; - final Widget info; - const StatsAlbumItem({super.key, required this.album, required this.info}); - - @override - Widget build(BuildContext context) { - return ButtonTile( - style: ButtonVariance.ghost, - leading: ClipRRect( - borderRadius: BorderRadius.circular(4), - child: UniversalImage( - path: (album.images).asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - width: 40, - height: 40, - ), - ), - title: Text(album.name), - subtitle: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text("${album.albumType.formatted} • "), - Flexible( - child: ArtistLink( - artists: album.artists, - mainAxisAlignment: WrapAlignment.start, - onOverflowArtistClick: () => - context.navigateTo(AlbumRoute(id: album.id, album: album)), - ), - ), - ], - ), - trailing: info, - onPressed: () { - context.navigateTo(AlbumRoute(id: album.id, album: album)); - }, - ); - } -} diff --git a/lib/modules/stats/common/artist_item.dart b/lib/modules/stats/common/artist_item.dart deleted file mode 100644 index 92d3b915..00000000 --- a/lib/modules/stats/common/artist_item.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class StatsArtistItem extends StatelessWidget { - final SpotubeSimpleArtistObject artist; - final Widget info; - const StatsArtistItem({ - super.key, - required this.artist, - required this.info, - }); - - @override - Widget build(BuildContext context) { - return ButtonTile( - style: ButtonVariance.ghost, - title: Text(artist.name), - leading: Avatar( - initials: artist.name.substring(0, 1), - provider: UniversalImage.imageProvider( - (artist.images).asUrlString( - placeholder: ImagePlaceholder.artist, - ), - ), - ), - trailing: info, - onPressed: () { - context.navigateTo(ArtistRoute(artistId: artist.id)); - }, - ); - } -} diff --git a/lib/modules/stats/common/playlist_item.dart b/lib/modules/stats/common/playlist_item.dart deleted file mode 100644 index 64abe7d5..00000000 --- a/lib/modules/stats/common/playlist_item.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/string.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class StatsPlaylistItem extends StatelessWidget { - final SpotubeSimplePlaylistObject playlist; - final Widget info; - const StatsPlaylistItem( - {super.key, required this.playlist, required this.info}); - - @override - Widget build(BuildContext context) { - return ButtonTile( - style: ButtonVariance.ghost, - leading: ClipRRect( - borderRadius: BorderRadius.circular(4), - child: UniversalImage( - path: (playlist.images).asUrlString( - placeholder: ImagePlaceholder.collection, - ), - width: 40, - height: 40, - ), - ), - title: Text(playlist.name), - subtitle: Text( - playlist.description.unescapeHtml(), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - trailing: info, - onPressed: () { - context.navigateTo(PlaylistRoute(id: playlist.id, playlist: playlist)); - }, - ); - } -} diff --git a/lib/modules/stats/common/track_item.dart b/lib/modules/stats/common/track_item.dart deleted file mode 100644 index eea3dd4b..00000000 --- a/lib/modules/stats/common/track_item.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class StatsTrackItem extends StatelessWidget { - final SpotubeTrackObject track; - final Widget info; - const StatsTrackItem({ - super.key, - required this.track, - required this.info, - }); - - @override - Widget build(BuildContext context) { - return ButtonTile( - style: ButtonVariance.ghost, - leading: ClipRRect( - borderRadius: BorderRadius.circular(4), - child: UniversalImage( - path: (track.album.images).asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - width: 40, - height: 40, - ), - ), - title: Text(track.name), - subtitle: ArtistLink( - artists: track.artists, - mainAxisAlignment: WrapAlignment.start, - onOverflowArtistClick: () { - context.navigateTo(TrackRoute(trackId: track.id)); - }, - ), - trailing: info, - onPressed: () { - context.navigateTo(TrackRoute(trackId: track.id)); - }, - ); - } -} diff --git a/lib/modules/stats/summary/summary.dart b/lib/modules/stats/summary/summary.dart deleted file mode 100644 index 30e68b1f..00000000 --- a/lib/modules/stats/summary/summary.dart +++ /dev/null @@ -1,102 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/modules/stats/summary/summary_card.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/history/summary.dart'; - -class StatsPageSummarySection extends HookConsumerWidget { - const StatsPageSummarySection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final summary = ref.watch(playbackHistorySummaryProvider); - final summaryData = summary.asData?.value ?? FakeData.historySummary; - - return Skeletonizer.sliver( - enabled: summary.isLoading, - child: SliverPadding( - padding: const EdgeInsets.all(10), - sliver: SliverLayoutBuilder(builder: (context, constrains) { - return SliverGrid( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: constrains.isXs - ? 2 - : constrains.smAndDown - ? 3 - : constrains.mdAndDown - ? 4 - : constrains.lgAndDown - ? 5 - : 6, - mainAxisSpacing: 10, - crossAxisSpacing: 10, - childAspectRatio: constrains.isXs ? 1.3 : 1.5, - ), - delegate: SliverChildListDelegate([ - SummaryCard( - title: summaryData.duration.inMinutes.toDouble(), - unit: context.l10n.summary_minutes, - description: context.l10n.summary_listened_to_music, - color: Colors.indigo, - onTap: () { - context.navigateTo(const StatsMinutesRoute()); - }, - ), - SummaryCard( - title: summaryData.tracks.toDouble(), - unit: context.l10n.summary_songs, - description: context.l10n.summary_streamed_overall, - color: Colors.blue, - onTap: () { - context.navigateTo(const StatsStreamsRoute()); - }, - ), - SummaryCard.unformatted( - title: usdFormatter.format(summaryData.fees.toDouble()), - unit: "", - description: context.l10n.summary_owed_to_artists, - color: Colors.green, - onTap: () { - context.navigateTo(const StatsStreamFeesRoute()); - }, - ), - SummaryCard( - title: summaryData.artists.toDouble(), - unit: context.l10n.summary_artists, - description: context.l10n.summary_music_reached_you, - color: Colors.yellow, - onTap: () { - context.navigateTo(const StatsArtistsRoute()); - }, - ), - SummaryCard( - title: summaryData.albums.toDouble(), - unit: context.l10n.summary_full_albums, - description: context.l10n.summary_got_your_love, - color: Colors.pink, - onTap: () { - context.navigateTo(const StatsAlbumsRoute()); - }, - ), - SummaryCard( - title: summaryData.playlists.toDouble(), - unit: context.l10n.summary_playlists, - description: context.l10n.summary_were_on_repeat, - color: Colors.teal, - onTap: () { - context.navigateTo(const StatsPlaylistsRoute()); - }, - ), - ]), - ); - }), - ), - ); - } -} diff --git a/lib/modules/stats/summary/summary_card.dart b/lib/modules/stats/summary/summary_card.dart deleted file mode 100644 index e78dd080..00000000 --- a/lib/modules/stats/summary/summary_card.dart +++ /dev/null @@ -1,90 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/foundation.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/formatters.dart'; - -class SummaryCard extends StatelessWidget { - final String title; - final String unit; - final String description; - final VoidCallback? onTap; - - final ColorShades color; - - SummaryCard({ - super.key, - required double title, - required this.unit, - required this.description, - required this.color, - this.onTap, - }) : title = compactNumberFormatter.format(title); - - const SummaryCard.unformatted({ - super.key, - required this.title, - required this.unit, - required this.description, - required this.color, - this.onTap, - }); - - @override - Widget build(BuildContext context) { - final ThemeData(:typography, :brightness) = Theme.of(context); - - final descriptionNewLines = description.split("").where((s) => s == "\n"); - - return Card( - fillColor: brightness == Brightness.dark ? color.shade100 : color.shade50, - filled: true, - borderColor: color, - padding: EdgeInsets.zero, - borderRadius: context.theme.borderRadiusLg, - child: Button.ghost( - onPressed: onTap, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 15), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AutoSizeText.rich( - TextSpan( - children: [ - TextSpan( - text: title, - style: typography.h2.copyWith( - color: color.shade900, - ), - ), - TextSpan( - text: " $unit", - style: typography.semiBold.copyWith( - color: color.shade900, - ), - ), - ], - ), - maxLines: 1, - ), - const Gap(5), - AutoSizeText( - description, - maxLines: description.contains("\n") - ? descriptionNewLines.length + 1 - : 1, - minFontSize: 9, - style: typography.small.copyWith( - color: color.shade900, - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/modules/stats/top/albums.dart b/lib/modules/stats/top/albums.dart deleted file mode 100644 index e2a9042a..00000000 --- a/lib/modules/stats/top/albums.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/modules/stats/common/album_item.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/albums.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -class TopAlbums extends HookConsumerWidget { - const TopAlbums({super.key}); - - @override - Widget build(BuildContext context, ref) { - final historyDuration = ref.watch(playbackHistoryTopDurationProvider); - final topAlbums = ref.watch(historyTopAlbumsProvider(historyDuration)); - final topAlbumsNotifier = - ref.watch(historyTopAlbumsProvider(historyDuration).notifier); - - final albumsData = topAlbums.asData?.value.items ?? []; - - return Skeletonizer.sliver( - enabled: topAlbums.isLoading && !topAlbums.isLoadingNextPage, - child: SliverInfiniteList( - onFetchData: () async { - await topAlbumsNotifier.fetchMore(); - }, - hasError: topAlbums.hasError, - isLoading: topAlbums.isLoading && !topAlbums.isLoadingNextPage, - hasReachedMax: topAlbums.asData?.value.hasMore ?? true, - itemCount: albumsData.length, - emptyBuilder: (context) => Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Gap(50), - Undraw( - illustration: UndrawIllustration.happyMusic, - color: context.theme.colorScheme.primary, - height: 200 * context.theme.scaling, - ), - Text( - context.l10n.no_tracks_listened_yet, - textAlign: TextAlign.center, - ).muted().small(), - ], - ), - ), - itemBuilder: (context, index) { - final album = albumsData[index]; - return StatsAlbumItem( - album: album.album, - info: Text( - context.l10n - .count_plays(compactNumberFormatter.format(album.count)), - ), - ); - }, - ), - ); - } -} diff --git a/lib/modules/stats/top/artists.dart b/lib/modules/stats/top/artists.dart deleted file mode 100644 index 5a8dc441..00000000 --- a/lib/modules/stats/top/artists.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/modules/stats/common/artist_item.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -class TopArtists extends HookConsumerWidget { - const TopArtists({super.key}); - - @override - Widget build(BuildContext context, ref) { - final historyDuration = ref.watch(playbackHistoryTopDurationProvider); - final topTracks = ref.watch( - historyTopTracksProvider(historyDuration), - ); - final topTracksNotifier = - ref.watch(historyTopTracksProvider(historyDuration).notifier); - - final artistsData = - useMemoized(() => topTracksNotifier.artists, [topTracks.asData?.value]); - - return Skeletonizer.sliver( - enabled: topTracks.isLoading && !topTracks.isLoadingNextPage, - child: SliverInfiniteList( - onFetchData: () async { - await topTracksNotifier.fetchMore(); - }, - hasError: topTracks.hasError, - isLoading: topTracks.isLoading && !topTracks.isLoadingNextPage, - hasReachedMax: topTracks.asData?.value.hasMore ?? true, - itemCount: artistsData.length, - emptyBuilder: (context) => Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Gap(50), - Undraw( - illustration: UndrawIllustration.happyMusic, - color: context.theme.colorScheme.primary, - height: 200 * context.theme.scaling, - ), - Text( - context.l10n.no_tracks_listened_yet, - textAlign: TextAlign.center, - ).muted().small(), - ], - ), - ), - itemBuilder: (context, index) { - final artist = artistsData[index]; - return StatsArtistItem( - artist: artist.artist, - info: Text( - context.l10n - .count_plays(compactNumberFormatter.format(artist.count)), - ), - ); - }, - ), - ); - } -} diff --git a/lib/modules/stats/top/top.dart b/lib/modules/stats/top/top.dart deleted file mode 100644 index 38f04ccb..00000000 --- a/lib/modules/stats/top/top.dart +++ /dev/null @@ -1,111 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/modules/stats/top/albums.dart'; -import 'package:spotube/modules/stats/top/artists.dart'; -import 'package:spotube/modules/stats/top/tracks.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; - -class StatsPageTopSection extends HookConsumerWidget { - const StatsPageTopSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final selectedIndex = useState(0); - final historyDuration = ref.watch(playbackHistoryTopDurationProvider); - final historyDurationNotifier = - ref.watch(playbackHistoryTopDurationProvider.notifier); - - final translations = { - HistoryDuration.days7: context.l10n.this_week, - HistoryDuration.days30: context.l10n.this_month, - HistoryDuration.months6: context.l10n.last_6_months, - HistoryDuration.year: context.l10n.this_year, - HistoryDuration.years2: context.l10n.last_2_years, - HistoryDuration.allTime: context.l10n.all_time, - }; - - final dropdown = Select( - popupConstraints: const BoxConstraints(maxWidth: 150), - popupWidthConstraint: PopoverConstraint.flexible, - padding: const EdgeInsets.all(4), - borderRadius: BorderRadius.circular(4), - value: historyDuration, - onChanged: (value) { - if (value == null) return; - historyDurationNotifier.update((_) => value); - }, - itemBuilder: (context, item) => Text(translations[item]!), - popup: (context) { - return SelectPopup( - items: SelectItemBuilder( - childCount: HistoryDuration.values.length, - builder: (context, index) { - final item = HistoryDuration.values[index]; - return SelectItemButton( - value: item, - child: Text(translations[item]!), - ); - }, - ), - ); - }); - - return SliverLayoutBuilder(builder: (context, constraints) { - return SliverMainAxisGroup( - slivers: [ - SliverAppBar( - floating: true, - elevation: 0, - backgroundColor: context.theme.colorScheme.background, - automaticallyImplyLeading: false, - flexibleSpace: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - TabList( - index: selectedIndex.value, - onChanged: (value) { - selectedIndex.value = value; - }, - children: [ - TabItem( - child: Text(context.l10n.top_tracks), - ), - TabItem( - child: Text(context.l10n.top_artists), - ), - TabItem( - child: Text(context.l10n.top_albums), - ), - ], - ), - if (constraints.mdAndUp) ...[ - const Spacer(), - dropdown, - ] - ], - ), - ), - ), - if (constraints.smAndDown) - SliverToBoxAdapter( - child: Align( - alignment: Alignment.centerRight, - child: dropdown, - ), - ), - switch (selectedIndex.value) { - 1 => const TopArtists(), - 2 => const TopAlbums(), - _ => const TopTracks(), - }, - ], - ); - }); - } -} diff --git a/lib/modules/stats/top/tracks.dart b/lib/modules/stats/top/tracks.dart deleted file mode 100644 index 08c742c4..00000000 --- a/lib/modules/stats/top/tracks.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/modules/stats/common/track_item.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -class TopTracks extends HookConsumerWidget { - const TopTracks({super.key}); - - @override - Widget build(BuildContext context, ref) { - final historyDuration = ref.watch(playbackHistoryTopDurationProvider); - final topTracks = ref.watch( - historyTopTracksProvider(historyDuration), - ); - final topTracksNotifier = - ref.watch(historyTopTracksProvider(historyDuration).notifier); - - final tracksData = topTracks.asData?.value.items ?? []; - - return Skeletonizer.sliver( - enabled: topTracks.isLoading && !topTracks.isLoadingNextPage, - child: SliverInfiniteList( - onFetchData: () async { - await topTracksNotifier.fetchMore(); - }, - hasError: topTracks.hasError, - isLoading: topTracks.isLoading && !topTracks.isLoadingNextPage, - hasReachedMax: topTracks.asData?.value.hasMore ?? true, - itemCount: tracksData.length, - emptyBuilder: (context) => Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Gap(50), - Undraw( - illustration: UndrawIllustration.happyMusic, - color: context.theme.colorScheme.primary, - height: 200 * context.theme.scaling, - ), - Text( - context.l10n.no_tracks_listened_yet, - textAlign: TextAlign.center, - ).muted().small(), - ], - ), - ), - itemBuilder: (context, index) { - final track = tracksData[index]; - return StatsTrackItem( - track: track.track, - info: Text( - context.l10n - .count_plays(compactNumberFormatter.format(track.count)), - ), - ); - }, - ), - ); - } -} diff --git a/lib/pages/album/album.dart b/lib/pages/album/album.dart deleted file mode 100644 index 049d8023..00000000 --- a/lib/pages/album/album.dart +++ /dev/null @@ -1,83 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:auto_route/auto_route.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/track_presentation.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/library/albums.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/album.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -@RoutePage() -class AlbumPage extends HookConsumerWidget { - static const name = "album"; - - final SpotubeSimpleAlbumObject album; - final String id; - const AlbumPage({ - super.key, - @PathParam("id") required this.id, - required this.album, - }); - - @override - Widget build(BuildContext context, ref) { - final tracks = ref.watch(metadataPluginAlbumTracksProvider(album.id)); - final tracksNotifier = - ref.watch(metadataPluginAlbumTracksProvider(album.id).notifier); - final favoriteAlbumsNotifier = - ref.watch(metadataPluginSavedAlbumsProvider.notifier); - final isSavedAlbum = - ref.watch(metadataPluginIsSavedAlbumProvider(album.id)); - - return material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginAlbumTracksProvider(album.id)); - ref.invalidate(metadataPluginIsSavedAlbumProvider(album.id)); - ref.invalidate(metadataPluginSavedAlbumsProvider); - }, - child: TrackPresentation( - options: TrackPresentationOptions( - collection: album, - image: album.images.asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - title: album.name, - description: - "${context.l10n.released} • ${album.releaseDate} • ${album.artists.first.name}", - tracks: tracks.asData?.value.items ?? [], - error: tracks.error, - pagination: PaginationProps( - hasNextPage: tracks.asData?.value.hasMore ?? false, - isLoading: tracks.isLoading || tracks.isLoadingNextPage, - onFetchMore: () async { - await tracksNotifier.fetchMore(); - }, - onFetchAll: () async { - return tracksNotifier.fetchAll(); - }, - onRefresh: () async { - ref.invalidate(metadataPluginAlbumTracksProvider(album.id)); - }, - ), - routePath: "/album/${album.id}", - shareUrl: album.externalUri, - isLiked: isSavedAlbum.asData?.value ?? false, - owner: album.artists.first.name, - onHeart: isSavedAlbum.asData?.value == null - ? null - : () async { - if (isSavedAlbum.asData!.value) { - await favoriteAlbumsNotifier.removeFavorite([album]); - } else { - await favoriteAlbumsNotifier.addFavorite([album]); - } - return null; - }, - ), - ), - ); - } -} diff --git a/lib/pages/artist/artist.dart b/lib/pages/artist/artist.dart deleted file mode 100644 index 64bed283..00000000 --- a/lib/pages/artist/artist.dart +++ /dev/null @@ -1,111 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/components/button/back_button.dart'; - -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/artist/artist_album_list.dart'; - -import 'package:spotube/pages/artist/section/footer.dart'; -import 'package:spotube/pages/artist/section/header.dart'; -import 'package:spotube/pages/artist/section/related_artists.dart'; -import 'package:spotube/pages/artist/section/top_tracks.dart'; -import 'package:spotube/provider/metadata_plugin/artist/albums.dart'; -import 'package:spotube/provider/metadata_plugin/artist/artist.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/provider/metadata_plugin/artist/related.dart'; -import 'package:spotube/provider/metadata_plugin/artist/top_tracks.dart'; -import 'package:spotube/provider/metadata_plugin/artist/wikipedia.dart'; -import 'package:spotube/provider/metadata_plugin/library/artists.dart'; - -@RoutePage() -class ArtistPage extends HookConsumerWidget { - static const name = "artist"; - - final String artistId; - const ArtistPage( - @PathParam("id") this.artistId, { - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final scrollController = useScrollController(); - - final artistQuery = ref.watch(metadataPluginArtistProvider(artistId)); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: const [ - TitleBar( - leading: [BackButton()], - backgroundColor: Colors.transparent, - ) - ], - floatingHeader: true, - child: material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginArtistProvider(artistId)); - ref.invalidate( - metadataPluginArtistRelatedArtistsProvider(artistId), - ); - ref.invalidate(metadataPluginArtistAlbumsProvider(artistId)); - ref.invalidate(metadataPluginIsSavedArtistProvider(artistId)); - ref.invalidate(metadataPluginArtistTopTracksProvider(artistId)); - if (artistQuery.hasValue) { - ref.invalidate( - artistWikipediaSummaryProvider(artistQuery.asData!.value), - ); - } - }, - child: Builder(builder: (context) { - if (artistQuery.hasError && artistQuery.asData?.value == null) { - return Center(child: Text(artistQuery.error.toString())); - } - return Skeletonizer( - enabled: artistQuery.isLoading, - child: CustomScrollView( - controller: scrollController, - slivers: [ - const SliverGap(material.kToolbarHeight), - SliverToBoxAdapter( - child: SafeArea( - bottom: false, - child: ArtistPageHeader(artistId: artistId), - ), - ), - const SliverGap(20), - ArtistPageTopTracks(artistId: artistId), - const SliverGap(20), - SliverToBoxAdapter(child: ArtistAlbumList(artistId)), - SliverPadding( - padding: const EdgeInsets.all(8.0), - sliver: SliverToBoxAdapter( - child: Text( - context.l10n.fans_also_like, - style: context.theme.typography.h4, - ), - ), - ), - ArtistPageRelatedArtists(artistId: artistId), - const SliverGap(20), - if (artistQuery.asData?.value != null) - SliverToBoxAdapter( - child: - ArtistPageFooter(artist: artistQuery.asData!.value), - ), - const SliverSafeArea(sliver: SliverGap(10)), - ], - ), - ); - }), - ), - ), - ); - } -} diff --git a/lib/pages/artist/section/footer.dart b/lib/pages/artist/section/footer.dart deleted file mode 100644 index 938fb6fc..00000000 --- a/lib/pages/artist/section/footer.dart +++ /dev/null @@ -1,92 +0,0 @@ -import 'package:flutter/gestures.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/artist/wikipedia.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -class ArtistPageFooter extends ConsumerWidget { - final SpotubeFullArtistObject artist; - const ArtistPageFooter({super.key, required this.artist}); - - @override - Widget build(BuildContext context, ref) { - final ThemeData(:typography) = Theme.of(context); - final mediaQuery = MediaQuery.of(context); - - final artistImage = artist.images.asUrlString( - placeholder: ImagePlaceholder.artist, - ); - final summary = ref.watch(artistWikipediaSummaryProvider(artist)); - if (summary.asData?.value == null) return const SizedBox.shrink(); - - return Container( - margin: const EdgeInsets.all(8), - padding: mediaQuery.smAndDown - ? const EdgeInsets.all(20) - : const EdgeInsets.all(30), - constraints: const BoxConstraints(minHeight: 300), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - image: DecorationImage( - colorFilter: ColorFilter.mode( - Colors.black.withValues(alpha: 0.5), - BlendMode.darken, - ), - image: UniversalImage.imageProvider( - summary.asData?.value!.thumbnail?.source_ ?? artistImage, - height: summary.asData?.value!.thumbnail?.height.toDouble(), - width: summary.asData?.value!.thumbnail?.width.toDouble(), - ), - fit: BoxFit.cover, - alignment: Alignment.center, - ), - ), - alignment: Alignment.center, - child: RichText( - text: TextSpan( - style: typography.semiBold.copyWith( - color: Colors.white, - ), - children: [ - // icon - const WidgetSpan( - child: Icon( - SpotubeIcons.wikipedia, - color: Colors.white, - size: 30, - ), - ), - TextSpan( - text: " Wikipedia", - style: typography.large.copyWith( - color: Colors.white, - ), - ), - const TextSpan(text: '\n\n'), - TextSpan( - text: summary.asData?.value!.extract, - ), - TextSpan( - text: '\n...read more at wikipedia', - style: typography.semiBold.copyWith( - color: Colors.sky[300], - decoration: TextDecoration.underline, - decorationColor: Colors.sky[300], - ), - recognizer: TapGestureRecognizer() - ..onTap = () async { - await launchUrlString( - "http://en.wikipedia.org/wiki?curid=${summary.asData?.value?.pageid}", - ); - }, - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/artist/section/header.dart b/lib/pages/artist/section/header.dart deleted file mode 100644 index b8e7e5dc..00000000 --- a/lib/pages/artist/section/header.dart +++ /dev/null @@ -1,229 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/services.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide Consumer; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/blacklist_provider.dart'; -import 'package:spotube/provider/metadata_plugin/artist/artist.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/library/artists.dart'; -import 'package:spotube/utils/primitive_utils.dart'; - -class ArtistPageHeader extends HookConsumerWidget { - final String artistId; - const ArtistPageHeader({super.key, required this.artistId}); - - @override - Widget build(BuildContext context, ref) { - final artistQuery = ref.watch(metadataPluginArtistProvider(artistId)); - final artist = artistQuery.asData?.value ?? FakeData.artist; - - final theme = Theme.of(context); - final ThemeData(:typography) = theme; - - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - ref.watch(blacklistProvider); - final blacklistNotifier = ref.watch(blacklistProvider.notifier); - final isBlackListed = blacklistNotifier.containsArtist(artist.id); - - final image = artist.images.asUrlString( - placeholder: ImagePlaceholder.artist, - ); - - final actions = Skeleton.keep( - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (authenticated.asData?.value == true) - Consumer( - builder: (context, ref, _) { - final isFollowingQuery = ref.watch( - metadataPluginIsSavedArtistProvider(artist.id), - ); - final followingArtistNotifier = - ref.watch(metadataPluginSavedArtistsProvider.notifier); - - return switch (isFollowingQuery) { - AsyncData(value: final following) => Builder( - builder: (context) { - if (following) { - return Button.outline( - onPressed: () async { - await followingArtistNotifier - .removeFavorite([artist]); - }, - child: Text(context.l10n.following), - ); - } - - return Button.primary( - onPressed: () async { - await followingArtistNotifier.addFavorite([artist]); - }, - child: Text(context.l10n.follow), - ); - }, - ), - AsyncError() => const SizedBox(), - _ => const SizedBox.square( - dimension: 20, - child: CircularProgressIndicator(), - ) - }; - }, - ), - const SizedBox(width: 5), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.add_artist_to_blacklist), - ).call, - child: IconButton( - icon: Icon( - SpotubeIcons.userRemove, - color: !isBlackListed ? Colors.red[400] : null, - ), - variance: isBlackListed - ? ButtonVariance.destructive - : ButtonVariance.ghost, - onPressed: () async { - if (isBlackListed) { - await ref.read(blacklistProvider.notifier).remove(artist.id); - } else { - await ref.read(blacklistProvider.notifier).add( - BlacklistTableCompanion.insert( - name: artist.name, - elementId: artist.id, - elementType: BlacklistedType.artist, - ), - ); - } - }, - ), - ), - IconButton.ghost( - icon: const Icon(SpotubeIcons.share), - onPressed: () async { - await Clipboard.setData( - ClipboardData( - text: artist.externalUri, - ), - ); - - if (!context.mounted) return; - - showToast( - context: context, - location: ToastLocation.topRight, - dismissible: true, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n.artist_url_copied, - textAlign: TextAlign.center, - ), - ); - }, - ); - }, - ) - ], - ), - ); - - return LayoutBuilder( - builder: (context, constrains) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: Card( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ClipRRect( - borderRadius: theme.borderRadiusXl, - child: UniversalImage( - path: image, - width: constrains.mdAndUp ? 200 : 120, - height: constrains.mdAndUp ? 200 : 120, - fit: BoxFit.cover, - ), - ), - const Gap(20), - Flexible( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - OutlineBadge( - child: - Text(context.l10n.artist).small().muted(), - ), - if (isBlackListed) ...[ - const Gap(5), - DestructiveBadge( - child: Text(context.l10n.blacklisted).small(), - ), - ] - ], - ), - const Gap(10), - Flexible( - child: AutoSizeText( - artist.name, - style: constrains.smAndDown - ? typography.h4 - : typography.h3, - maxLines: 2, - overflow: TextOverflow.ellipsis, - minFontSize: 14, - ), - ), - const Gap(5), - Flexible( - child: AutoSizeText( - context.l10n.followers( - artist.followers == null - ? double.infinity - : PrimitiveUtils.toReadableNumber( - artist.followers!.toDouble(), - ), - ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - minFontSize: 12, - ).muted(), - ), - if (constrains.mdAndUp) ...[ - const Gap(20), - actions, - ] - ], - ), - ), - ], - ), - if (constrains.smAndDown) ...[ - const Gap(20), - actions, - ] - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/pages/artist/section/related_artists.dart b/lib/pages/artist/section/related_artists.dart deleted file mode 100644 index ec17e240..00000000 --- a/lib/pages/artist/section/related_artists.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/modules/artist/artist_card.dart'; -import 'package:spotube/provider/metadata_plugin/artist/related.dart'; - -class ArtistPageRelatedArtists extends ConsumerWidget { - final String artistId; - const ArtistPageRelatedArtists({ - super.key, - required this.artistId, - }); - - @override - Widget build(BuildContext context, ref) { - final relatedArtists = - ref.watch(metadataPluginArtistRelatedArtistsProvider(artistId)); - - return switch (relatedArtists) { - AsyncData(value: final artists) => SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - sliver: SliverGrid.builder( - itemCount: artists.items.length, - gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 200, - mainAxisExtent: 250, - mainAxisSpacing: 10, - crossAxisSpacing: 10, - childAspectRatio: 0.8, - ), - itemBuilder: (context, index) { - final artist = artists.items.elementAt(index); - return SizedBox( - width: 180, - child: ArtistCard(artist), - ); - }, - ), - ), - AsyncError(:final error) => SliverToBoxAdapter( - child: Center( - child: Text(error.toString()), - ), - ), - _ => const SliverToBoxAdapter( - child: Center(child: CircularProgressIndicator()), - ), - }; - } -} diff --git a/lib/pages/artist/section/top_tracks.dart b/lib/pages/artist/section/top_tracks.dart deleted file mode 100644 index 30745a01..00000000 --- a/lib/pages/artist/section/top_tracks.dart +++ /dev/null @@ -1,173 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/track_tile/track_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/metadata_plugin/artist/top_tracks.dart'; - -class ArtistPageTopTracks extends HookConsumerWidget { - final String artistId; - const ArtistPageTopTracks({super.key, required this.artistId}); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final isLoading = useState(false); - - final playlist = ref.watch(audioPlayerProvider); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final topTracksQuery = - ref.watch(metadataPluginArtistTopTracksProvider(artistId)); - - final isPlaylistPlaying = playlist.containsTracks( - topTracksQuery.asData?.value.items ?? [], - ); - - if (topTracksQuery.hasError) { - return SliverToBoxAdapter( - child: Center( - child: Text(topTracksQuery.error.toString()), - ), - ); - } - - final topTracks = topTracksQuery.asData?.value.items ?? - List.generate(10, (index) => FakeData.track); - - void playPlaylist( - List tracks, { - SpotubeTrackObject? currentTrack, - }) async { - isLoading.value = true; - - currentTrack ??= tracks.first; - try { - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - - if (isRemoteDevice == null) return; - - if (isRemoteDevice) { - final remotePlayback = ref.read(connectProvider.notifier); - final remotePlaylist = ref.read(queueProvider); - - final isPlaylistPlaying = remotePlaylist.containsTracks(tracks); - - if (!isPlaylistPlaying) { - await remotePlayback.load( - WebSocketLoadEventData.playlist( - tracks: tracks, - collection: null, - initialIndex: - tracks.indexWhere((s) => s.id == currentTrack?.id), - ), - ); - } else if (isPlaylistPlaying && - currentTrack.id != remotePlaylist.activeTrack?.id) { - final index = playlist.tracks - .toList() - .indexWhere((s) => s.id == currentTrack!.id); - await remotePlayback.jumpTo(index); - } - } else { - if (!isPlaylistPlaying) { - playlistNotifier.load( - tracks, - initialIndex: tracks.indexWhere((s) => s.id == currentTrack?.id), - autoPlay: true, - ); - } else if (isPlaylistPlaying && - currentTrack.id != playlist.activeTrack?.id) { - await playlistNotifier.jumpToTrack(currentTrack); - } - } - } finally { - isLoading.value = false; - } - } - - return SliverMainAxisGroup( - slivers: [ - SliverToBoxAdapter( - child: Row( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - context.l10n.top_tracks, - style: theme.typography.h4, - ), - ), - if (!isPlaylistPlaying) - IconButton.outline( - icon: const Icon( - SpotubeIcons.queueAdd, - ), - onPressed: () { - playlistNotifier.addTracks(topTracks.toList()); - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n.added_to_queue( - topTracks.length, - ), - ), - ); - }, - ); - }, - ), - const SizedBox(width: 5), - IconButton.primary( - shape: ButtonShape.circle, - enabled: !isPlaylistPlaying && !isLoading.value, - icon: isLoading.value - ? CircularProgressIndicator( - size: 20 * context.theme.scaling, - color: theme.colorScheme.primaryForeground, - ) - : Skeleton.keep( - child: Icon( - isPlaylistPlaying - ? SpotubeIcons.pause - : SpotubeIcons.play, - ), - ), - onPressed: () => playPlaylist(topTracks.toList()), - ) - ], - ), - ), - const SliverGap(10), - SliverList.builder( - itemCount: topTracks.length, - itemBuilder: (context, index) { - final track = topTracks.elementAt(index); - return TrackTile( - index: index, - playlist: playlist, - track: track, - onTap: () async { - playPlaylist( - topTracks.toList(), - currentTrack: track, - ); - }, - ); - }, - ), - ], - ); - } -} diff --git a/lib/pages/connect/connect.dart b/lib/pages/connect/connect.dart deleted file mode 100644 index bb8bbfae..00000000 --- a/lib/pages/connect/connect.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/modules/connect/local_devices.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/connect/clients.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class ConnectPage extends HookConsumerWidget { - static const name = "connect"; - - const ConnectPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final ThemeData(:colorScheme, :typography) = Theme.of(context); - - final connectClients = ref.watch(connectClientsProvider); - final connectClientsNotifier = ref.read(connectClientsProvider.notifier); - final discoveredDevices = connectClients.asData?.value.services; - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar(title: Text(context.l10n.devices)), - ], - child: Padding( - padding: const EdgeInsets.all(10.0), - child: CustomScrollView( - slivers: [ - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - sliver: SliverToBoxAdapter( - child: Text( - context.l10n.remote, - style: typography.bold, - ), - ), - ), - const SliverGap(10), - SliverList.separated( - itemCount: discoveredDevices?.length ?? 0, - separatorBuilder: (context, index) => const Gap(10), - itemBuilder: (context, index) { - final device = discoveredDevices![index]; - final selected = - connectClients.asData?.value.resolvedService?.name == - device.name; - return ButtonTile( - selected: selected, - leading: const Icon(SpotubeIcons.monitor), - title: Text(device.name), - subtitle: selected - ? Text( - "${connectClients.asData?.value.resolvedService?.host}" - ":${connectClients.asData?.value.resolvedService?.port}", - ) - : null, - trailing: selected - ? IconButton.outline( - icon: const Icon(SpotubeIcons.power), - size: ButtonSize.small, - onPressed: () => - connectClientsNotifier.clearResolvedService(), - ) - : null, - onPressed: () { - if (selected) { - context.navigateTo(const ConnectControlRoute()); - } else { - connectClientsNotifier.resolveService(device); - } - }, - ); - }, - ), - const ConnectPageLocalDevices(), - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/connect/control/control.dart b/lib/pages/connect/control/control.dart deleted file mode 100644 index 164e5d43..00000000 --- a/lib/pages/connect/control/control.dart +++ /dev/null @@ -1,390 +0,0 @@ -import 'dart:convert'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/player/player_queue.dart'; -import 'package:spotube/modules/player/volume_slider.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/anchor_button.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/duration.dart'; -import 'package:spotube/provider/connect/clients.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:media_kit/media_kit.dart' hide Track; - -class RemotePlayerQueue extends ConsumerWidget { - const RemotePlayerQueue({super.key}); - - @override - Widget build(BuildContext context, ref) { - final connectNotifier = ref.watch(connectProvider.notifier); - final playlist = ref.watch(queueProvider); - return PlayerQueue( - playlist: playlist, - floating: true, - onJump: (track) async { - final index = playlist.tracks.toList().indexOf(track); - connectNotifier.jumpTo(index); - }, - onRemove: (track) async { - await connectNotifier.removeTrack(track); - }, - onStop: () async => connectNotifier.stop(), - onReorder: (oldIndex, newIndex) async { - await connectNotifier.reorder( - (oldIndex: oldIndex, newIndex: newIndex), - ); - }, - ); - } -} - -@RoutePage() -class ConnectControlPage extends HookConsumerWidget { - static const name = "connect_control"; - - const ConnectControlPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final ThemeData(:typography, :colorScheme) = Theme.of(context); - - final resolvedService = - ref.watch(connectClientsProvider).asData?.value.resolvedService; - final connect = ref.watch(connectProvider); - final connectNotifier = ref.read(connectProvider.notifier); - final playlist = ref.watch(queueProvider); - final playing = ref.watch(playingProvider); - final shuffled = ref.watch(shuffleProvider); - final loopMode = ref.watch(loopModeProvider); - - ref.listen(connectClientsProvider, (prev, next) { - if (next.asData?.value.resolvedService == null) { - context.back(); - } - }); - - useEffect(() { - if (connect.asData?.value == null) return null; - - final subscription = connect.asData?.value?.stream.listen((message) { - final event = WebSocketEvent.fromJson( - jsonDecode(message), - (data) => data, - ); - event.onError((event) { - if (event.data != "Connection denied") return; - if (!context.mounted) return; - context.back(); - }); - }); - - return () { - subscription?.cancel(); - }; - }, [connect.asData?.value]); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(resolvedService?.name ?? ""), - ) - ], - child: LayoutBuilder(builder: (context, constrains) { - return Row( - children: [ - Expanded( - child: CustomScrollView( - slivers: [ - SliverToBoxAdapter( - child: Container( - alignment: Alignment.center, - padding: const EdgeInsets.symmetric( - horizontal: 20, - vertical: 10, - ).copyWith(top: 0), - constraints: - const BoxConstraints(maxHeight: 350, maxWidth: 350), - child: ClipRRect( - borderRadius: BorderRadius.circular(20), - child: UniversalImage( - path: (playlist.activeTrack?.album.images) - .asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - fit: BoxFit.cover, - ), - ), - ), - ), - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 20), - sliver: SliverMainAxisGroup( - slivers: [ - SliverToBoxAdapter( - child: AnchorButton( - playlist.activeTrack?.name ?? "", - style: typography.h4, - onTap: () { - if (playlist.activeTrack == null) return; - context.navigateTo( - TrackRoute(trackId: playlist.activeTrack!.id), - ); - }, - ), - ), - SliverToBoxAdapter( - child: ArtistLink( - artists: playlist.activeTrack?.artists ?? [], - textStyle: typography.normal, - mainAxisAlignment: WrapAlignment.start, - onOverflowArtistClick: () => context.navigateTo( - TrackRoute(trackId: playlist.activeTrack!.id), - ), - ), - ), - ], - ), - ), - const SliverGap(30), - SliverToBoxAdapter( - child: Consumer( - builder: (context, ref, _) { - final position = ref.watch(positionProvider); - final duration = ref.watch(durationProvider); - - final progress = duration.inSeconds == 0 - ? 0 - : position.inSeconds / duration.inSeconds; - - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 12), - child: Column( - children: [ - Slider( - value: - SliderValue.single(progress.toDouble()), - onChanged: (value) { - connectNotifier.seek( - Duration( - seconds: - (value.value * duration.inSeconds) - .toInt(), - ), - ); - }, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text(position.toHumanReadableString()), - Text(duration.toHumanReadableString()), - ], - ), - ], - ), - ); - }, - ), - ), - SliverToBoxAdapter( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 20, - children: [ - Tooltip( - tooltip: TooltipContainer( - child: Text( - shuffled - ? context.l10n.unshuffle_playlist - : context.l10n.shuffle_playlist, - ), - ).call, - child: IconButton( - icon: const Icon(SpotubeIcons.shuffle), - variance: shuffled - ? ButtonVariance.secondary - : ButtonVariance.ghost, - onPressed: playlist.activeTrack == null - ? null - : () { - connectNotifier.setShuffle(!shuffled); - }, - ), - ), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.previous_track), - ).call, - child: IconButton.ghost( - icon: const Icon(SpotubeIcons.skipBack), - onPressed: playlist.activeTrack == null - ? null - : connectNotifier.previous, - ), - ), - Tooltip( - tooltip: TooltipContainer( - child: Text( - playing - ? context.l10n.pause_playback - : context.l10n.resume_playback, - ), - ).call, - child: IconButton.primary( - shape: ButtonShape.circle, - icon: playlist.activeTrack == null - ? const SizedBox( - height: 20, - width: 20, - child: CircularProgressIndicator( - onSurface: false), - ) - : Icon( - playing - ? SpotubeIcons.pause - : SpotubeIcons.play, - ), - onPressed: playlist.activeTrack == null - ? null - : () { - if (playing) { - connectNotifier.pause(); - } else { - connectNotifier.resume(); - } - }, - ), - ), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.next_track)) - .call, - child: IconButton.ghost( - icon: const Icon(SpotubeIcons.skipForward), - onPressed: playlist.activeTrack == null - ? null - : connectNotifier.next, - ), - ), - Tooltip( - tooltip: TooltipContainer( - child: Text( - loopMode == PlaylistMode.single - ? context.l10n.loop_track - : loopMode == PlaylistMode.loop - ? context.l10n.repeat_playlist - : context.l10n.no_loop, - ), - ).call, - child: IconButton( - icon: Icon( - loopMode == PlaylistMode.single - ? SpotubeIcons.repeatOne - : SpotubeIcons.repeat, - ), - variance: loopMode == PlaylistMode.single || - loopMode == PlaylistMode.loop - ? ButtonVariance.secondary - : ButtonVariance.ghost, - onPressed: playlist.activeTrack == null - ? null - : () async { - connectNotifier.setLoopMode( - switch (loopMode) { - PlaylistMode.loop => - PlaylistMode.single, - PlaylistMode.single => - PlaylistMode.none, - PlaylistMode.none => - PlaylistMode.loop, - }, - ); - }, - ), - ) - ], - ), - ), - const SliverGap(30), - if (constrains.mdAndDown) - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 20), - sliver: SliverToBoxAdapter( - child: Button.outline( - leading: const Icon(SpotubeIcons.queue), - child: Text(context.l10n.queue), - onPressed: () { - openDrawer( - context: context, - barrierDismissible: true, - draggable: true, - barrierColor: Colors.black.withAlpha(100), - borderRadius: BorderRadius.circular(10), - transformBackdrop: false, - position: OverlayPosition.bottom, - surfaceBlur: context.theme.surfaceBlur, - surfaceOpacity: 0.7, - expands: true, - builder: (context) { - return ConstrainedBox( - constraints: BoxConstraints( - maxHeight: - MediaQuery.sizeOf(context).height * - 0.8, - ), - child: const RemotePlayerQueue(), - ); - }, - ); - }, - ), - ), - ), - const SliverGap(30), - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 20), - sliver: SliverToBoxAdapter( - child: Consumer(builder: (context, ref, _) { - final volume = ref.watch(volumeProvider); - return VolumeSlider( - fullWidth: true, - value: volume, - onChanged: (value) { - ref.read(volumeProvider.notifier).state = value; - connectNotifier.setVolume(value); - }, - ); - }), - ), - ), - const SliverSafeArea(sliver: SliverGap(10)), - ], - ), - ), - if (constrains.lgAndUp) ...[ - const VerticalDivider(thickness: 1), - const Expanded( - child: RemotePlayerQueue(), - ), - ] - ], - ); - }), - ), - ); - } -} diff --git a/lib/pages/getting_started/getting_started.dart b/lib/pages/getting_started/getting_started.dart deleted file mode 100644 index 1662624c..00000000 --- a/lib/pages/getting_started/getting_started.dart +++ /dev/null @@ -1,93 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/pages/getting_started/sections/greeting.dart'; -import 'package:spotube/pages/getting_started/sections/playback.dart'; -import 'package:spotube/pages/getting_started/sections/region.dart'; -import 'package:spotube/pages/getting_started/sections/support.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class GettingStartedPage extends HookConsumerWidget { - static const name = "getting_started"; - - const GettingStartedPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final pageController = usePageController(); - - final onNext = useCallback(() { - pageController.nextPage( - duration: const Duration(milliseconds: 300), - curve: Curves.easeInOut, - ); - }, [pageController]); - - final onPrevious = useCallback(() { - pageController.previousPage( - duration: const Duration(milliseconds: 300), - curve: Curves.easeInOut, - ); - }, [pageController]); - - return Scaffold( - headers: [ - SafeArea( - child: TitleBar( - backgroundColor: Colors.transparent, - surfaceBlur: 0, - trailing: [ - ListenableBuilder( - listenable: pageController, - builder: (context, _) { - return AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: pageController.hasClients && - (pageController.page == 0 || - pageController.page == 3) - ? const SizedBox() - : Button.secondary( - onPressed: () { - pageController.animateToPage( - 3, - duration: const Duration(milliseconds: 300), - curve: Curves.easeInOut, - ); - }, - child: Text(context.l10n.skip_this_nonsense), - ), - ); - }, - ), - ], - ), - ), - ], - floatingHeader: true, - child: DecoratedBox( - decoration: BoxDecoration( - image: DecorationImage( - image: Assets.images.bengaliPatternsBg.provider(), - fit: BoxFit.cover, - ), - ), - child: PageView( - controller: pageController, - children: [ - GettingStartedPageGreetingSection(onNext: onNext), - GettingStartedPageLanguageRegionSection(onNext: onNext), - GettingStartedPagePlaybackSection( - onNext: onNext, - onPrevious: onPrevious, - ), - const GettingStartedScreenSupportSection(), - ], - ), - ), - ); - } -} diff --git a/lib/pages/getting_started/sections/greeting.dart b/lib/pages/getting_started/sections/greeting.dart deleted file mode 100644 index 68903e07..00000000 --- a/lib/pages/getting_started/sections/greeting.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/getting_started/blur_card.dart'; -import 'package:spotube/utils/platform.dart'; - -class GettingStartedPageGreetingSection extends HookConsumerWidget { - final VoidCallback onNext; - const GettingStartedPageGreetingSection({super.key, required this.onNext}); - - @override - Widget build(BuildContext context, ref) { - return Center( - child: BlurCard( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Assets.branding.spotubeLogoPng.image(height: 200), - const Gap(24), - const Text("Spotube").semiBold().h4(), - const Gap(4), - Text( - kIsMobile - ? context.l10n.freedom_of_music_palm - : context.l10n.freedom_of_music, - textAlign: TextAlign.center, - ).light().large().italic(), - const Gap(84), - Button.primary( - onPressed: onNext, - trailing: const Icon(SpotubeIcons.angleRight), - child: Text(context.l10n.get_started), - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/getting_started/sections/playback.dart b/lib/pages/getting_started/sections/playback.dart deleted file mode 100644 index 699024b1..00000000 --- a/lib/pages/getting_started/sections/playback.dart +++ /dev/null @@ -1,130 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/modules/getting_started/blur_card.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class GettingStartedPagePlaybackSection extends HookConsumerWidget { - final VoidCallback onNext; - final VoidCallback onPrevious; - - const GettingStartedPagePlaybackSection({ - super.key, - required this.onNext, - required this.onPrevious, - }); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.read(userPreferencesProvider.notifier); - - // final audioSourceToDescription = useMemoized( - // () => { - // AudioSource.youtube: "${context.l10n.youtube_source_description}\n" - // "${context.l10n.highest_quality("148kbps mp4, 128kbps opus")}", - // AudioSource.piped: context.l10n.piped_source_description, - // AudioSource.jiosaavn: - // "${context.l10n.jiosaavn_source_description}\n" - // "${context.l10n.highest_quality("320kbps mp4")}", - // AudioSource.invidious: context.l10n.invidious_source_description, - // AudioSource.dabMusic: "${context.l10n.dab_music_source_description}\n" - // "${context.l10n.highest_quality("320kbps mp3, HI-RES 24bit 44.1kHz-96kHz flac")}", - // }, - // []); - - return Center( - child: BlurCard( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - const Icon(SpotubeIcons.album, size: 16), - const Gap(8), - Text(context.l10n.playback).semiBold().large(), - ], - ), - const Gap(16), - // Align( - // alignment: Alignment.centerLeft, - // child: Text(context.l10n.select_audio_source).semiBold().large(), - // ), - // const Gap(16), - // RadioGroup( - // value: preferences.audioSource, - // onChanged: (value) { - // preferencesNotifier.setAudioSource(value); - // }, - // child: Wrap( - // spacing: 6, - // runSpacing: 6, - // children: [ - // for (final source in AudioSource.values) - // Badge( - // isLabelVisible: source == AudioSource.dabMusic, - // label: const Text("NEW"), - // backgroundColor: Colors.lime[300], - // textColor: Colors.black, - // child: RadioCard( - // value: source, - // child: Column( - // mainAxisSize: MainAxisSize.min, - // children: [ - // audioSourceToIconMap[source]!, - // Text(source.label), - // ], - // ), - // ), - // ), - // ], - // ), - // ), - // const Gap(16), - // Text( - // audioSourceToDescription[preferences.audioSource]!, - // ).small().muted(), - const Gap(16), - ButtonTile( - title: Text(context.l10n.endless_playback), - subtitle: Text( - context.l10n.endless_playback_description, - ).small().muted(), - onPressed: () { - preferencesNotifier - .setEndlessPlayback(!preferences.endlessPlayback); - }, - trailing: Switch( - value: preferences.endlessPlayback, - onChanged: (value) { - preferencesNotifier.setEndlessPlayback(value); - }, - ), - ), - const Gap(34), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Button.secondary( - leading: const Icon(SpotubeIcons.angleLeft), - onPressed: onPrevious, - child: Text(context.l10n.previous), - ), - Directionality( - textDirection: TextDirection.rtl, - child: Button.primary( - leading: const Icon(SpotubeIcons.angleRight), - onPressed: onNext, - child: Text(context.l10n.next), - ), - ), - ], - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/getting_started/sections/region.dart b/lib/pages/getting_started/sections/region.dart deleted file mode 100644 index 917cc41e..00000000 --- a/lib/pages/getting_started/sections/region.dart +++ /dev/null @@ -1,194 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/language_codes.dart'; -import 'package:spotube/collections/markets.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/getting_started/blur_card.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/l10n/l10n.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class GettingStartedPageLanguageRegionSection extends HookConsumerWidget { - final void Function() onNext; - const GettingStartedPageLanguageRegionSection( - {super.key, required this.onNext}); - - bool filterMarkets(dynamic item, String query) { - final market = - marketsMap.firstWhere((element) => element.$1 == item).$2.toLowerCase(); - - return market.contains(query.toLowerCase()); - } - - bool filterLocale(Locale locale, String query) { - final language = LanguageLocals.getDisplayLanguage( - locale.languageCode, - locale.countryCode, - ).toString(); - - return language.toLowerCase().contains(query.toLowerCase()); - } - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - - return SafeArea( - child: Center( - child: BlurCard( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - const Icon( - SpotubeIcons.language, - size: 16, - ), - const SizedBox(width: 8), - Text(context.l10n.language_region).semiBold(), - ], - ), - const Gap(30), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text(context.l10n.choose_your_region).semiBold(), - Text( - context.l10n.choose_your_region_description, - ).small().muted(), - const Gap(16), - Text(context.l10n.market_place_region).small(), - const Gap(8), - SizedBox( - width: double.infinity, - child: Select( - value: preferences.market, - onChanged: (value) { - if (value == null) return; - ref - .read(userPreferencesProvider.notifier) - .setRecommendationMarket(value); - }, - placeholder: Text(preferences.market.name), - itemBuilder: (context, value) => Text( - marketsMap - .firstWhere((element) => element.$1 == value) - .$2, - ), - popup: SelectPopup.builder( - searchPlaceholder: Text(context.l10n.search), - builder: (context, searchQuery) { - final filteredMarkets = searchQuery == null || - searchQuery.isEmpty - ? marketsMap - : marketsMap - .where( - (element) => - filterMarkets(element.$1, searchQuery), - ) - .toList(); - return SelectItemBuilder( - childCount: filteredMarkets.length, - builder: (context, index) { - final market = filteredMarkets[index]; - return SelectItemButton( - value: market.$1, - child: Text(market.$2), - ); - }, - ); - }, - ).call, - ), - ), - const Gap(36), - Text( - context.l10n.choose_your_language, - ).semiBold(), - const Gap(16), - Text(context.l10n.language).small(), - const Gap(8), - SizedBox( - width: double.infinity, - child: Select( - value: preferences.locale, - onChanged: (locale) { - if (locale == null) return; - ref - .read(userPreferencesProvider.notifier) - .setLocale(locale); - }, - placeholder: Text(context.l10n.system_default), - itemBuilder: (context, value) => - value.languageCode == "system" - ? Text(context.l10n.system_default) - : Text( - LanguageLocals.getDisplayLanguage( - value.languageCode, - value.countryCode, - ).toString(), - ), - popup: SelectPopup.builder( - searchPlaceholder: Text(context.l10n.search), - builder: (context, searchQuery) { - final hasNotQueried = - searchQuery == null || searchQuery.trim().isEmpty; - final filteredLocale = hasNotQueried - ? [ - const Locale("system", "system"), - ...L10n.all, - ] - : L10n.all - .where( - (element) => filterLocale( - element, - searchQuery.trim(), - ), - ) - .toList(); - - return SelectItemBuilder( - childCount: filteredLocale.length, - builder: (context, index) { - final locale = filteredLocale[index]; - if (locale == const Locale("system", "system")) { - return SelectItemButton( - value: locale, - child: Text(context.l10n.system_default), - ); - } - return SelectItemButton( - value: locale, - child: Text( - LanguageLocals.getDisplayLanguage( - locale.languageCode, - locale.countryCode, - ).toString(), - ), - ); - }, - ); - }, - ).call, - ), - ), - ], - ), - const Gap(48), - Align( - alignment: Alignment.centerRight, - child: Button.primary( - trailing: const Icon(SpotubeIcons.angleRight), - onPressed: onNext, - child: Text(context.l10n.next), - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/getting_started/sections/support.dart b/lib/pages/getting_started/sections/support.dart deleted file mode 100644 index ef549296..00000000 --- a/lib/pages/getting_started/sections/support.dart +++ /dev/null @@ -1,124 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/env.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/getting_started/blur_card.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -class GettingStartedScreenSupportSection extends HookConsumerWidget { - const GettingStartedScreenSupportSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - return Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - BlurCard( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - const Icon(SpotubeIcons.heartFilled, color: Colors.pink), - const SizedBox(width: 8), - Text( - context.l10n.help_project_grow, - style: const TextStyle(color: Colors.pink), - ).semiBold(), - ], - ), - const Gap(16), - Text(context.l10n.help_project_grow_description), - const Gap(16), - Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Button( - leading: const Icon(SpotubeIcons.github), - style: ButtonVariance.primary.copyWith( - decoration: (context, states, value) { - if (states.isNotEmpty) { - return ButtonVariance.primary - .decoration(context, states); - } - - return BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(8), - ); - }), - onPressed: () async { - await launchUrlString( - "https://github.com/KRTirtho/spotube", - mode: LaunchMode.externalApplication, - ); - }, - child: Text( - context.l10n.contribute_on_github, - style: const TextStyle(color: Colors.white), - ), - ), - if (!Env.hideDonations) ...[ - const Gap(16), - Button( - leading: const Icon(SpotubeIcons.openCollective), - style: ButtonVariance.primary.copyWith( - decoration: (context, states, value) { - if (states.isNotEmpty) { - return ButtonVariance.primary - .decoration(context, states); - } - - return BoxDecoration( - color: const Color(0xff4cb7f6), - borderRadius: BorderRadius.circular(8), - ); - }), - onPressed: () async { - await launchUrlString( - "https://opencollective.com/spotube", - mode: LaunchMode.externalApplication, - ); - }, - child: Text( - context.l10n.donate_on_open_collective, - style: const TextStyle(color: Colors.white), - ), - ), - ] - ], - ), - ], - ), - ), - const Gap(48), - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 250), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Button.primary( - leading: const Icon(SpotubeIcons.extensions), - onPressed: () async { - await KVStoreService.setDoneGettingStarted(true); - if (context.mounted) { - context.pushRoute(const SettingsMetadataProviderRoute()); - } - }, - child: Text(context.l10n.install_a_metadata_provider), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/lib/pages/home/home.dart b/lib/pages/home/home.dart deleted file mode 100644 index a92c776e..00000000 --- a/lib/pages/home/home.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/modules/connect/connect_device.dart'; -import 'package:spotube/modules/home/sections/featured.dart'; -import 'package:spotube/modules/home/sections/sections.dart'; -import 'package:spotube/modules/home/sections/new_releases.dart'; -import 'package:spotube/modules/home/sections/recent.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; - -@RoutePage() -class HomePage extends HookConsumerWidget { - static const name = "home"; - const HomePage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final controller = useScrollController(); - final mediaQuery = MediaQuery.of(context); - final layoutMode = - ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - if (kTitlebarVisible) const TitleBar(height: 30), - ], - child: CustomScrollView( - controller: controller, - slivers: [ - if (mediaQuery.smAndDown || layoutMode == LayoutMode.compact) - SliverAppBar( - floating: true, - title: DefaultTextStyle( - style: TextStyle( - fontFamily: "Cookie", - fontSize: 30, - letterSpacing: 1.8, - color: theme.colorScheme.foreground, - ), - child: const Text("Spotube"), - ), - backgroundColor: theme.colorScheme.background, - foregroundColor: theme.colorScheme.foreground, - actions: [ - const ConnectDeviceButton(), - const Gap(10), - IconButton.ghost( - icon: const Icon(SpotubeIcons.settings, size: 20), - onPressed: () { - context.navigateTo(const SettingsRoute()); - }, - ), - const Gap(10), - ], - ) - else if (kIsMacOS) - const SliverGap(10), - const SliverGap(10), - SliverList.builder( - itemCount: 3, - itemBuilder: (context, index) { - return switch (index) { - // 0 => const HomeGenresSection(), - 0 => const HomeRecentlyPlayedSection(), - 1 => const HomeFeaturedSection(), - // 3 => const HomePageFriendsSection(), - _ => const HomeNewReleasesSection() - }; - }, - ), - const SliverSafeArea(sliver: HomePageBrowseSection()), - ], - ), - )); - } -} diff --git a/lib/pages/home/sections/section_items.dart b/lib/pages/home/sections/section_items.dart deleted file mode 100644 index 89666d26..00000000 --- a/lib/pages/home/sections/section_items.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/components/playbutton_view/playbutton_card.dart'; -import 'package:spotube/components/waypoint.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/album/album_card.dart'; -import 'package:spotube/modules/artist/artist_card.dart'; -import 'package:spotube/modules/playlist/playlist_card.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/provider/metadata_plugin/browse/section_items.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -const _dummyPlaybuttonCard = PlaybuttonCard( - imageUrl: 'https://placehold.co/150x150.png', - isLoading: false, - isPlaying: false, - title: "Playbutton", - description: "A really cool playbutton", - isOwner: false, -); - -@RoutePage() -class HomeBrowseSectionItemsPage extends HookConsumerWidget { - static const name = "home_browse_section_items"; - - final String sectionId; - final SpotubeBrowseSectionObject section; - const HomeBrowseSectionItemsPage({ - super.key, - @PathParam("sectionId") required this.sectionId, - required this.section, - }); - - @override - Widget build(BuildContext context, ref) { - final scale = context.theme.scaling; - - final sectionItems = - ref.watch(metadataPluginBrowseSectionItemsProvider(sectionId)); - final sectionItemsNotifier = - ref.watch(metadataPluginBrowseSectionItemsProvider(sectionId).notifier); - final items = sectionItems.asData?.value.items ?? []; - final controller = useScrollController(); - - final isLoading = sectionItems.isLoading || sectionItems.isLoadingNextPage; - final itemCount = items.length; - final hasMore = sectionItems.asData?.value.hasMore ?? false; - - return SafeArea( - bottom: false, - child: Skeletonizer( - enabled: sectionItems.isLoading, - child: Scaffold( - headers: [ - TitleBar( - title: Text(section.title), - ) - ], - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: CustomScrollView( - controller: controller, - slivers: [ - SliverGrid.builder( - itemCount: isLoading ? 6 : itemCount + 1, - gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 150 * scale, - mainAxisExtent: 225 * scale, - crossAxisSpacing: 12 * scale, - mainAxisSpacing: 12 * scale, - ), - itemBuilder: (context, index) { - if (isLoading) { - return const Skeletonizer( - enabled: true, - child: _dummyPlaybuttonCard, - ); - } - - if (index == itemCount) { - if (!hasMore) return const SizedBox.shrink(); - return Waypoint( - controller: controller, - isGrid: true, - onTouchEdge: () async { - await sectionItemsNotifier.fetchMore(); - }, - child: const Skeletonizer( - enabled: true, - child: _dummyPlaybuttonCard, - ), - ); - } - - final item = items[index]; - return switch (item) { - SpotubeFullArtistObject() => ArtistCard(item), - SpotubeSimplePlaylistObject() => PlaylistCard(item), - SpotubeSimpleAlbumObject() => AlbumCard(item), - _ => throw Exception( - "Unsupported item type: ${item.runtimeType}", - ), - }; - }, - ), - const SliverToBoxAdapter( - child: SafeArea( - child: SizedBox(), - ), - ), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/lastfm_login/lastfm_login.dart b/lib/pages/lastfm_login/lastfm_login.dart deleted file mode 100644 index 164b9b0d..00000000 --- a/lib/pages/lastfm_login/lastfm_login.dart +++ /dev/null @@ -1,157 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/dialogs/prompt_dialog.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/scrobbler/scrobbler.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class LastFMLoginPage extends HookConsumerWidget { - static const name = "lastfm_login"; - const LastFMLoginPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final scrobblerNotifier = ref.read(scrobblerProvider.notifier); - - final usernameKey = - useMemoized(() => const FormKey("username"), []); - final passwordKey = - useMemoized(() => const FormKey("password"), []); - - final passwordVisible = useState(false); - - final isLoading = useState(false); - - return Scaffold( - headers: const [ - SafeArea( - bottom: false, - child: TitleBar( - leading: [BackButton()], - ), - ), - ], - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Flexible( - child: Container( - constraints: const BoxConstraints(maxWidth: 400), - alignment: Alignment.center, - padding: const EdgeInsets.all(16), - child: Card( - padding: const EdgeInsets.all(16.0), - child: Form( - onSubmit: (context, values) async { - try { - isLoading.value = true; - await scrobblerNotifier.login( - values[usernameKey].trim(), - values[passwordKey], - ); - if (context.mounted) { - context.back(); - } - } catch (e) { - if (context.mounted) { - showPromptDialog( - context: context, - title: context.l10n.error("Authentication failed"), - message: e.toString(), - cancelText: null, - ); - } - } finally { - isLoading.value = false; - } - }, - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(30), - color: const Color.fromARGB(255, 186, 0, 0), - ), - padding: const EdgeInsets.all(12), - child: const Icon( - SpotubeIcons.lastFm, - color: Colors.white, - size: 60, - ), - ), - const Text("last.fm").h3(), - Text(context.l10n.login_with_your_lastfm), - AutofillGroup( - child: Column( - spacing: 10, - children: [ - FormField( - label: Text(context.l10n.username), - key: usernameKey, - validator: const NotEmptyValidator( - message: "Username is required", - ), - child: TextField( - autofillHints: const [ - AutofillHints.username, - AutofillHints.email, - ], - placeholder: Text(context.l10n.username), - ), - ), - FormField( - key: passwordKey, - validator: const NotEmptyValidator( - message: "Password is required", - ), - label: Text(context.l10n.password), - child: TextField( - autofillHints: const [ - AutofillHints.password, - ], - obscureText: !passwordVisible.value, - placeholder: Text(context.l10n.password), - features: [ - InputFeature.trailing( - IconButton.ghost( - icon: Icon( - passwordVisible.value - ? SpotubeIcons.eye - : SpotubeIcons.noEye, - ), - onPressed: () => passwordVisible.value = - !passwordVisible.value, - ), - ), - ], - ), - ), - ], - ), - ), - FormErrorBuilder(builder: (context, errors, child) { - return Button.primary( - onPressed: () => context.submitForm(), - enabled: errors.isEmpty && !isLoading.value, - child: Text(context.l10n.login), - ); - }), - ], - ), - ), - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/pages/library/library.dart b/lib/pages/library/library.dart deleted file mode 100644 index de438451..00000000 --- a/lib/pages/library/library.dart +++ /dev/null @@ -1,93 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart' show Badge; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/side_bar_tiles.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; - -@RoutePage() -class LibraryPage extends HookConsumerWidget { - const LibraryPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final downloadingCount = ref - .watch(downloadManagerProvider) - .where((e) => - e.status == DownloadStatus.downloading || - e.status == DownloadStatus.queued) - .length; - final router = context.watchRouter; - final sidebarLibraryTileList = useMemoized( - () => [ - ...getSidebarLibraryTileList(context.l10n), - SideBarTiles( - id: "downloads", - pathPrefix: "library/downloads", - title: context.l10n.downloads, - route: const UserDownloadsRoute(), - icon: SpotubeIcons.download, - ), - ], - [context.l10n], - ); - final index = sidebarLibraryTileList.indexWhere( - (e) => router.currentPath.startsWith(e.pathPrefix), - ); - - return PopScope( - canPop: false, - onPopInvokedWithResult: (didPop, result) { - context.navigateTo(const HomeRoute()); - }, - child: SafeArea( - bottom: false, - child: LayoutBuilder(builder: (context, constraints) { - return Scaffold( - headers: [ - if (constraints.smAndDown) - TitleBar( - automaticallyImplyLeading: false, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: TabList( - index: index, - onChanged: (index) { - context.navigateTo(sidebarLibraryTileList[index].route); - }, - children: [ - for (final tile in sidebarLibraryTileList) - TabItem( - child: Badge( - isLabelVisible: tile.id == 'downloads' && - downloadingCount > 0, - label: Text(downloadingCount.toString()), - child: Text(tile.title), - ), - ), - ], - ), - ), - ) - else - const TitleBar( - automaticallyImplyLeading: false, - backgroundColor: Colors.transparent, - surfaceBlur: 0, - height: 32, - ), - const Gap(10), - ], - child: const AutoRouter(), - ); - }), - ), - ); - } -} diff --git a/lib/pages/library/user_albums.dart b/lib/pages/library/user_albums.dart deleted file mode 100644 index 2d989138..00000000 --- a/lib/pages/library/user_albums.dart +++ /dev/null @@ -1,155 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide Image; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:collection/collection.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/fallbacks/no_default_metadata_plugin.dart'; -import 'package:spotube/components/playbutton_view/playbutton_view.dart'; -import 'package:spotube/modules/album/album_card.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/fallbacks/anonymous_fallback.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/library/albums.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -@RoutePage() -class UserAlbumsPage extends HookConsumerWidget { - static const name = 'user_albums'; - const UserAlbumsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - final albumsQuery = ref.watch(metadataPluginSavedAlbumsProvider); - final albumsQueryNotifier = - ref.watch(metadataPluginSavedAlbumsProvider.notifier); - - final controller = useScrollController(); - - final searchText = useState(''); - - final albums = useMemoized(() { - if (searchText.value.isEmpty) { - return albumsQuery.asData?.value.items ?? []; - } - return albumsQuery.asData?.value.items - .map((e) => ( - weightedRatio(e.name, searchText.value), - e, - )) - .sorted((a, b) => b.$1.compareTo(a.$1)) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList() ?? - []; - }, [albumsQuery.asData?.value, searchText.value]); - - if (albumsQuery.error - case MetadataPluginException( - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - message: _, - )) { - return const Center(child: NoDefaultMetadataPlugin()); - } - - if (authenticated.asData?.value != true) { - return const AnonymousFallback(); - } - - if (albumsQuery.hasError) { - return ErrorBox( - error: albumsQuery.error!, - onRetry: () { - ref.invalidate(metadataPluginSavedAlbumsProvider); - }, - ); - } - - return SafeArea( - bottom: false, - child: Scaffold( - child: material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginSavedAlbumsProvider); - }, - child: InterScrollbar( - controller: controller, - child: CustomScrollView( - controller: controller, - slivers: [ - SliverAppBar( - automaticallyImplyLeading: false, - backgroundColor: Theme.of(context).colorScheme.background, - floating: true, - flexibleSpace: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: SizedBox( - height: 48, - child: TextField( - onChanged: (value) => searchText.value = value, - features: const [ - InputFeature.leading(Icon(SpotubeIcons.filter)) - ], - placeholder: Text(context.l10n.filter_albums), - ), - ), - ), - ), - const SliverGap(10), - if (albums.isEmpty && - !albumsQuery.isLoading && - searchText.value.isEmpty) - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8), - sliver: SliverToBoxAdapter( - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.followMeDrone, - color: Theme.of(context).colorScheme.primary, - ), - Text( - context.l10n.no_favorite_albums_yet, - textAlign: TextAlign.center, - ).muted().small() - ], - ), - ), - ) - else - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8), - sliver: PlaybuttonView( - controller: controller, - itemCount: albums.length, - hasMore: albumsQuery.asData?.value.hasMore == true, - isLoading: albumsQuery.isLoading, - onRequestMore: albumsQueryNotifier.fetchMore, - gridItemBuilder: (context, index) => AlbumCard( - albums[index], - ), - listItemBuilder: (context, index) => - AlbumCard.tile(albums[index]), - ), - ), - const SliverSafeArea(sliver: SliverGap(10)), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/library/user_artists.dart b/lib/pages/library/user_artists.dart deleted file mode 100644 index 750cb50b..00000000 --- a/lib/pages/library/user_artists.dart +++ /dev/null @@ -1,197 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:collection/collection.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/fallbacks/anonymous_fallback.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/fallbacks/no_default_metadata_plugin.dart'; -import 'package:spotube/modules/artist/artist_card.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/waypoint.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/library/artists.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -@RoutePage() -class UserArtistsPage extends HookConsumerWidget { - static const name = 'user_artists'; - const UserArtistsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - - final artistQuery = ref.watch(metadataPluginSavedArtistsProvider); - final artistQueryNotifier = - ref.watch(metadataPluginSavedArtistsProvider.notifier); - - final searchText = useState(''); - - final filteredArtists = useMemoized(() { - final artists = artistQuery.asData?.value.items ?? []; - - if (searchText.value.isEmpty) { - return artists.toList(); - } - return artists - .map((e) => ( - weightedRatio(e.name, searchText.value), - e, - )) - .sorted((a, b) => b.$1.compareTo(a.$1)) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList(); - }, [artistQuery.asData?.value.items, searchText.value]); - - final controller = useScrollController(); - - if (artistQuery.error - case MetadataPluginException( - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - message: _, - )) { - return const Center(child: NoDefaultMetadataPlugin()); - } - - if (authenticated.asData?.value != true) { - return const AnonymousFallback(); - } - - if (artistQuery.hasError) { - return ErrorBox( - error: artistQuery.error!, - onRetry: () { - ref.invalidate(metadataPluginSavedArtistsProvider); - }, - ); - } - - return SafeArea( - bottom: false, - child: Scaffold( - child: material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginSavedArtistsProvider); - }, - child: InterScrollbar( - controller: controller, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: CustomScrollView( - controller: controller, - slivers: [ - SliverAppBar( - automaticallyImplyLeading: false, - backgroundColor: Theme.of(context).colorScheme.background, - floating: true, - flexibleSpace: SizedBox( - height: 48, - child: TextField( - onChanged: (value) => searchText.value = value, - features: const [ - InputFeature.leading(Icon(SpotubeIcons.filter)), - ], - placeholder: Text(context.l10n.filter_artist), - ), - ), - ), - const SliverGap(10), - if (filteredArtists.isNotEmpty || artistQuery.isLoading) - SliverLayoutBuilder(builder: (context, constrains) { - return SliverGrid.builder( - itemCount: filteredArtists.length + 1, - gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 200, - mainAxisExtent: constrains.smAndDown ? 225 : 250, - crossAxisSpacing: 8, - mainAxisSpacing: 8, - ), - itemBuilder: (context, index) { - if (filteredArtists.isNotEmpty && - index == filteredArtists.length) { - if (artistQuery.asData?.value.hasMore != true) { - return const SizedBox.shrink(); - } - - return Waypoint( - controller: controller, - isGrid: true, - onTouchEdge: artistQueryNotifier.fetchMore, - child: Skeletonizer( - enabled: true, - child: ArtistCard(FakeData.artist), - ), - ); - } - - return Skeletonizer( - enabled: artistQuery.isLoading, - child: ArtistCard( - filteredArtists.elementAtOrNull(index) ?? - FakeData.artist, - ), - ); - }, - ); - }) - else if (filteredArtists.isEmpty && - searchText.value.isEmpty && - !artistQuery.isLoading) - SliverToBoxAdapter( - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.followMeDrone, - color: Theme.of(context).colorScheme.primary, - ), - Text( - context.l10n.not_following_artists, - textAlign: TextAlign.center, - ).muted().small() - ], - ), - ) - else - SliverToBoxAdapter( - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.taken, - color: Theme.of(context).colorScheme.primary, - ), - Text( - context.l10n.nothing_found, - textAlign: TextAlign.center, - ).muted().small() - ], - ), - ), - const SliverSafeArea(sliver: SliverGap(10)), - ], - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/library/user_downloads.dart b/lib/pages/library/user_downloads.dart deleted file mode 100644 index f6a130bb..00000000 --- a/lib/pages/library/user_downloads.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/modules/library/user_downloads/download_item.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class UserDownloadsPage extends HookConsumerWidget { - static const name = 'user_downloads'; - const UserDownloadsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final downloadQueue = ref.watch(downloadManagerProvider); - final downloadManagerNotifier = ref.watch(downloadManagerProvider.notifier); - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 15), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: AutoSizeText( - context.l10n.currently_downloading(downloadQueue.length), - maxLines: 1, - ).semiBold(), - ), - const SizedBox(width: 10), - Button.destructive( - onPressed: downloadQueue.isEmpty - ? null - : downloadManagerNotifier.clearAll, - child: Text(context.l10n.cancel_all), - ), - ], - ), - ), - Expanded( - child: SafeArea( - child: ListView.builder( - itemCount: downloadQueue.length, - padding: const EdgeInsets.only(bottom: 200), - itemBuilder: (context, index) { - return DownloadItem( - task: downloadQueue.elementAt(index), - ); - }, - ), - ), - ), - ], - ); - } -} diff --git a/lib/pages/library/user_local_tracks/local_folder.dart b/lib/pages/library/user_local_tracks/local_folder.dart deleted file mode 100644 index 523097e1..00000000 --- a/lib/pages/library/user_local_tracks/local_folder.dart +++ /dev/null @@ -1,504 +0,0 @@ -import 'dart:io'; -import 'dart:math'; - -import 'package:flutter/material.dart' as material; -import 'package:collection/collection.dart'; -import 'package:file_picker/file_picker.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/track_presentation/presentation_actions.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/string.dart'; -import 'package:spotube/hooks/controllers/use_shadcn_text_editing_controller.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/library/local_folder/cache_export_dialog.dart'; -import 'package:spotube/pages/library/user_local_tracks/user_local_tracks.dart'; -import 'package:spotube/components/expandable_search/expandable_search.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/track_presentation/sort_tracks_dropdown.dart'; -import 'package:spotube/components/track_tile/track_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/local_tracks/local_tracks_provider.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/service_utils.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class LocalLibraryPage extends HookConsumerWidget { - static const name = "local_library_page"; - - final String location; - final bool isDownloads; - final bool isCache; - const LocalLibraryPage( - this.location, { - super.key, - this.isDownloads = false, - this.isCache = false, - }); - - Future playLocalTracks( - WidgetRef ref, - List tracks, { - SpotubeLocalTrackObject? currentTrack, - }) async { - final playlist = ref.read(audioPlayerProvider); - final playback = ref.read(audioPlayerProvider.notifier); - currentTrack ??= tracks.first; - final isPlaylistPlaying = playlist.containsTracks(tracks); - if (!isPlaylistPlaying) { - var indexWhere = tracks.indexWhere((s) => s.id == currentTrack?.id); - await playback.load( - tracks, - initialIndex: indexWhere, - autoPlay: true, - ); - } else if (isPlaylistPlaying && - currentTrack.id != playlist.activeTrack?.id) { - await playback.jumpToTrack(currentTrack); - } - } - - Future shufflePlayLocalTracks( - WidgetRef ref, - List tracks, - ) async { - final playlist = ref.read(audioPlayerProvider); - final playback = ref.read(audioPlayerProvider.notifier); - final isPlaylistPlaying = playlist.containsTracks(tracks); - final shuffledTracks = tracks.shuffled(); - if (isPlaylistPlaying) return; - - await playback.load( - shuffledTracks, - initialIndex: 0, - autoPlay: true, - ); - } - - Future addToQueueLocalTracks( - BuildContext context, - WidgetRef ref, - List tracks, - ) async { - final playlist = ref.read(audioPlayerProvider); - final playback = ref.read(audioPlayerProvider.notifier); - final isPlaylistPlaying = playlist.containsTracks(tracks); - if (isPlaylistPlaying) return; - await playback.addTracks(tracks); - if (!context.mounted) return; - showToastForAction(context, "add-to-queue", tracks.length); - } - - @override - Widget build(BuildContext context, ref) { - final scale = context.theme.scaling; - - final sortBy = useState(SortBy.none); - final playlist = ref.watch(audioPlayerProvider); - final trackSnapshot = ref.watch(localTracksProvider); - final isPlaylistPlaying = useMemoized( - () => playlist.containsTracks( - trackSnapshot.asData?.value[location] ?? [], - ), - [playlist, trackSnapshot, location], - ); - - final searchController = useShadcnTextEditingController(); - useValueListenable(searchController); - final searchFocus = useFocusNode(); - final isFiltering = useState(false); - - final controller = useScrollController(); - - final directorySize = useMemoized(() async { - final dir = Directory(location); - final files = await dir.list(recursive: true).toList(); - - final filesLength = - await Future.wait(files.whereType().map((e) => e.length())); - - return (filesLength.sum.toInt() / pow(10, 9)).toStringAsFixed(2); - }, [location]); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - padding: const EdgeInsets.symmetric( - horizontal: 10, - vertical: 0, - ), - surfaceBlur: 0, - leading: const [BackButton()], - title: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - isDownloads - ? context.l10n.downloads - : isCache - ? context.l10n.cache_folder.capitalize() - : location, - ), - FutureBuilder( - future: directorySize, - builder: (context, snapshot) { - return Text( - "${(snapshot.data ?? 0)} GB", - ).xSmall().muted(); - }, - ) - ], - ), - backgroundColor: Colors.transparent, - trailingGap: 10, - trailing: [ - if (isCache) ...[ - IconButton.outline( - size: ButtonSize.small, - icon: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(SpotubeIcons.delete), - Text(context.l10n.clear_cache) - ], - ).xSmall().iconSmall(), - onPressed: () async { - final accepted = await showDialog( - context: context, - builder: (context) => AlertDialog( - title: Text(context.l10n.clear_cache_confirmation), - actions: [ - Button.outline( - onPressed: () { - Navigator.of(context).pop(false); - }, - child: Text(context.l10n.decline), - ), - Button.destructive( - onPressed: () async { - Navigator.of(context).pop(true); - }, - child: Text(context.l10n.accept), - ), - ], - ), - ); - - if (accepted != true) return; - - final cacheDir = Directory( - await UserPreferencesNotifier.getMusicCacheDir(), - ); - - if (cacheDir.existsSync()) { - await cacheDir.delete(recursive: true); - } - - ref.invalidate(localTracksProvider); - }, - ), - IconButton.outline( - size: ButtonSize.small, - icon: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(SpotubeIcons.export), - Text( - context.l10n.export, - ) - ], - ).xSmall().iconSmall(), - onPressed: () async { - final exportPath = - await FilePicker.platform.getDirectoryPath(); - - if (exportPath == null) return; - final exportDirectory = Directory(exportPath); - - if (!exportDirectory.existsSync()) { - await exportDirectory.create(recursive: true); - } - - final cacheDir = Directory( - await UserPreferencesNotifier.getMusicCacheDir()); - - if (!context.mounted) return; - await showDialog( - context: context, - builder: (context) { - return LocalFolderCacheExportDialog( - cacheDir: cacheDir, - exportDir: exportDirectory, - ); - }, - ); - }, - ), - ] - ], - ), - ], - child: LayoutBuilder( - builder: (context, constraints) => Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - const Gap(5), - Tooltip( - tooltip: - TooltipContainer(child: Text(context.l10n.play)).call, - child: IconButton.primary( - onPressed: trackSnapshot.asData?.value != null - ? () async { - if (trackSnapshot.asData?.value.isNotEmpty == - true) { - if (!isPlaylistPlaying) { - await playLocalTracks( - ref, - trackSnapshot.asData!.value[location] ?? - [], - ); - } - } - } - : null, - icon: Icon( - isPlaylistPlaying - ? SpotubeIcons.stop - : SpotubeIcons.play, - ), - ), - ), - const Gap(5), - Tooltip( - tooltip: - TooltipContainer(child: Text(context.l10n.shuffle)) - .call, - child: IconButton.outline( - onPressed: trackSnapshot.asData?.value != null - ? () async { - if (trackSnapshot.asData?.value.isNotEmpty == - true) { - if (!isPlaylistPlaying) { - await shufflePlayLocalTracks( - ref, - trackSnapshot.asData!.value[location] ?? - [], - ); - } - } - } - : null, - enabled: !isPlaylistPlaying, - icon: const Icon(SpotubeIcons.shuffle), - ), - ), - const Gap(5), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.add_to_queue)) - .call, - child: IconButton.outline( - onPressed: trackSnapshot.asData?.value != null - ? () async { - if (trackSnapshot.asData?.value.isNotEmpty == - true) { - if (!isPlaylistPlaying) { - await addToQueueLocalTracks( - context, - ref, - trackSnapshot.asData!.value[location] ?? - [], - ); - } - } - } - : null, - enabled: !isPlaylistPlaying, - icon: const Icon(SpotubeIcons.queueAdd), - ), - ), - const Spacer(), - if (constraints.smAndDown) - ExpandableSearchButton( - isFiltering: isFiltering.value, - onPressed: (value) => isFiltering.value = value, - searchFocus: searchFocus, - ) - else - ConstrainedBox( - constraints: BoxConstraints( - maxWidth: 300 * scale, - maxHeight: 38 * scale, - ), - child: ExpandableSearchField( - isFiltering: true, - onChangeFiltering: (value) {}, - searchController: searchController, - searchFocus: searchFocus, - ), - ), - const Gap(5), - SortTracksDropdown( - value: sortBy.value, - onChanged: (value) { - sortBy.value = value; - }, - ), - const Gap(5), - IconButton.outline( - icon: const Icon(SpotubeIcons.refresh), - onPressed: () { - ref.invalidate(localTracksProvider); - }, - ) - ], - ), - ), - ExpandableSearchField( - searchController: searchController, - searchFocus: searchFocus, - isFiltering: isFiltering.value, - onChangeFiltering: (value) => isFiltering.value = value, - ), - HookBuilder(builder: (context) { - return trackSnapshot.when( - data: (tracks) { - final sortedTracks = useMemoized(() { - return ServiceUtils.sortTracks( - tracks[location] ?? [], - sortBy.value); - }, [sortBy.value, tracks]); - - final filteredTracks = useMemoized(() { - if (searchController.text.isEmpty) { - return sortedTracks; - } - return sortedTracks - .map((e) => ( - weightedRatio( - "${e.name} - ${e.artists.asString()}", - searchController.text, - ), - e, - )) - .toList() - .sorted( - (a, b) => b.$1.compareTo(a.$1), - ) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList() - .toList(); - }, [searchController.text, sortedTracks]); - - if (!trackSnapshot.isLoading && filteredTracks.isEmpty) { - return Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Undraw( - illustration: UndrawIllustration.empty, - height: 200 * scale, - color: context.theme.colorScheme.primary, - ), - const Gap(10), - Text( - context.l10n.nothing_found, - textAlign: TextAlign.center, - ).muted().small() - ], - ), - ); - } - - return Expanded( - child: material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(localTracksProvider); - }, - child: InterScrollbar( - controller: controller, - child: Skeletonizer( - enabled: trackSnapshot.isLoading, - child: CustomScrollView( - controller: controller, - physics: const AlwaysScrollableScrollPhysics(), - slivers: [ - SliverList.builder( - itemCount: trackSnapshot.isLoading - ? 5 - : filteredTracks.length, - itemBuilder: (context, index) { - if (trackSnapshot.isLoading) { - return TrackTile( - playlist: playlist, - track: FakeData.track, - index: index, - ); - } - - final track = filteredTracks[index]; - return TrackTile( - index: index, - playlist: playlist, - track: track, - userPlaylist: false, - onTap: () async { - await playLocalTracks( - ref, - sortedTracks, - currentTrack: track, - ); - }, - ); - }, - ), - const SliverGap(200), - ], - ), - ), - ), - ), - ); - }, - loading: () => Expanded( - child: Skeletonizer( - enabled: true, - child: ListView.builder( - itemCount: 5, - itemBuilder: (context, index) => TrackTile( - track: FakeData.track, - index: index, - playlist: playlist, - ), - ), - ), - ), - error: (error, stackTrace) => - Text(error.toString() + stackTrace.toString()), - ); - }), - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/library/user_local_tracks/user_local_tracks.dart b/lib/pages/library/user_local_tracks/user_local_tracks.dart deleted file mode 100644 index 5f7502e6..00000000 --- a/lib/pages/library/user_local_tracks/user_local_tracks.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:file_picker/file_picker.dart'; -import 'package:file_selector/file_selector.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/library/local_folder/local_folder_item.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/local_tracks/local_tracks_provider.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; - -enum SortBy { - none, - ascending, - descending, - newest, - oldest, - duration, - artist, - album, -} - -@RoutePage() -class UserLocalLibraryPage extends HookConsumerWidget { - static const name = 'user_local_library'; - const UserLocalLibraryPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final cacheDir = useFuture(UserPreferencesNotifier.getMusicCacheDir()); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - final preferences = ref.watch(userPreferencesProvider); - - final addLocalLibraryLocation = useCallback(() async { - if (kIsMobile || kIsMacOS) { - final dirStr = await FilePicker.platform.getDirectoryPath( - initialDirectory: preferences.downloadLocation, - ); - if (dirStr == null) return; - if (preferences.localLibraryLocation.contains(dirStr)) return; - preferencesNotifier.setLocalLibraryLocation( - [...preferences.localLibraryLocation, dirStr]); - } else { - String? dirStr = await getDirectoryPath( - initialDirectory: preferences.downloadLocation, - ); - if (dirStr == null) return; - if (preferences.localLibraryLocation.contains(dirStr)) return; - preferencesNotifier.setLocalLibraryLocation( - [...preferences.localLibraryLocation, dirStr]); - } - }, [preferences.localLibraryLocation]); - - // This is just to pre-load the tracks. - // For now, this gets all of them. - ref.watch(localTracksProvider); - - final locations = [ - preferences.downloadLocation, - if (cacheDir.hasData) cacheDir.data!, - ...preferences.localLibraryLocation, - ]; - - return LayoutBuilder( - builder: (context, constrains) => Padding( - padding: const EdgeInsets.symmetric(horizontal: 12.0), - child: Column( - children: [ - Align( - alignment: Alignment.centerRight, - child: Button.secondary( - leading: const Icon(SpotubeIcons.folderAdd), - onPressed: addLocalLibraryLocation, - child: Text(context.l10n.add_library_location), - ), - ), - const Gap(8), - Expanded( - child: GridView.builder( - gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 200, - mainAxisExtent: constrains.isXs - ? 230 * context.theme.scaling - : constrains.mdAndDown - ? 280 * context.theme.scaling - : 250 * context.theme.scaling, - crossAxisSpacing: 10, - mainAxisSpacing: 10, - ), - itemCount: locations.length, - itemBuilder: (context, index) { - return LocalFolderItem( - folder: locations[index], - ); - }, - ), - ), - ], - ), - )); - } -} diff --git a/lib/pages/library/user_playlists.dart b/lib/pages/library/user_playlists.dart deleted file mode 100644 index 740bc947..00000000 --- a/lib/pages/library/user_playlists.dart +++ /dev/null @@ -1,172 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; -import 'package:collection/collection.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide Image; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/assets.gen.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/fallbacks/no_default_metadata_plugin.dart'; -import 'package:spotube/components/playbutton_view/playbutton_view.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/playlist/playlist_create_dialog.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/fallbacks/anonymous_fallback.dart'; -import 'package:spotube/modules/playlist/playlist_card.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -@RoutePage() -class UserPlaylistsPage extends HookConsumerWidget { - static const name = 'user_playlists'; - const UserPlaylistsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final searchText = useState(''); - - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - - final me = ref.watch(metadataPluginUserProvider); - final playlistsQuery = ref.watch(metadataPluginSavedPlaylistsProvider); - final playlistsQueryNotifier = - ref.watch(metadataPluginSavedPlaylistsProvider.notifier); - - final likedTracksPlaylist = useMemoized( - () => me.asData?.value == null - ? null - : SpotubeSimplePlaylistObject( - id: "user-liked-tracks", - name: context.l10n.liked_tracks, - description: context.l10n.liked_tracks_description, - externalUri: "", - owner: me.asData!.value!, - images: [ - SpotubeImageObject( - url: Assets.images.likedTracks.path, - width: 300, - height: 300, - ) - ]), - [context.l10n, me.asData?.value], - ); - - final playlists = useMemoized( - () { - if (searchText.value.isEmpty) { - return [ - if (likedTracksPlaylist != null) likedTracksPlaylist, - ...?playlistsQuery.asData?.value.items, - ]; - } - return [ - if (likedTracksPlaylist != null) likedTracksPlaylist, - ...?playlistsQuery.asData?.value.items, - ] - .map((e) => (weightedRatio(e.name, searchText.value), e)) - .sorted((a, b) => b.$1.compareTo(a.$1)) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList(); - }, - [playlistsQuery, searchText.value], - ); - - final controller = useScrollController(); - - if (playlistsQuery.error - case MetadataPluginException( - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - message: _, - )) { - return const Center(child: NoDefaultMetadataPlugin()); - } - - if (authenticated.asData?.value != true) { - return const AnonymousFallback(); - } - - if (playlistsQuery.hasError) { - return ErrorBox( - error: playlistsQuery.error!, - onRetry: () { - ref.invalidate(metadataPluginSavedPlaylistsProvider); - }, - ); - } - - return material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginSavedPlaylistsProvider); - }, - child: SafeArea( - bottom: false, - child: InterScrollbar( - controller: controller, - child: CustomScrollView( - controller: controller, - slivers: [ - SliverAppBar( - automaticallyImplyLeading: false, - floating: true, - backgroundColor: context.theme.colorScheme.background, - flexibleSpace: Container( - padding: const EdgeInsets.symmetric(horizontal: 8), - height: 48, - child: TextField( - onChanged: (value) => searchText.value = value, - placeholder: Text(context.l10n.filter_playlists), - features: const [ - InputFeature.leading(Icon(SpotubeIcons.filter)), - ], - ), - ), - ), - const SliverGap(10), - SliverPadding( - padding: const EdgeInsets.symmetric(horizontal: 8), - sliver: PlaybuttonView( - leading: const Expanded( - child: Row( - children: [ - PlaylistCreateDialogButton(), - // const Gap(10), - // Button.primary( - // leading: const Icon(SpotubeIcons.magic), - // child: Text(context.l10n.generate), - // onPressed: () { - // context.navigateTo(const PlaylistGeneratorRoute()); - // }, - // ), - // const Gap(10), - ], - ), - ), - controller: controller, - hasMore: playlistsQuery.asData?.value.hasMore == true, - isLoading: playlistsQuery.isLoading, - onRequestMore: playlistsQueryNotifier.fetchMore, - itemCount: playlists.length, - gridItemBuilder: (context, index) { - return PlaylistCard(playlists[index]); - }, - listItemBuilder: (context, index) { - return PlaylistCard.tile(playlists[index]); - }, - ), - ), - const SliverSafeArea(sliver: SliverGap(10)), - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/lyrics/lyrics.dart b/lib/pages/lyrics/lyrics.dart deleted file mode 100644 index b55dc02e..00000000 --- a/lib/pages/lyrics/lyrics.dart +++ /dev/null @@ -1,120 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide Consumer; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; - -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/utils/use_palette_color.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/pages/lyrics/plain_lyrics.dart'; -import 'package:spotube/pages/lyrics/synced_lyrics.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/lyrics/synced.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class LyricsPage extends HookConsumerWidget { - static const name = "lyrics"; - - const LyricsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - String albumArt = useMemoized( - () => (playlist.activeTrack?.album.images).asUrlString( - index: (playlist.activeTrack?.album.images.length ?? 1) - 1, - placeholder: ImagePlaceholder.albumArt, - ), - [playlist.activeTrack?.album.images], - ); - final palette = usePaletteColor(albumArt, ref); - final selectedIndex = useState(0); - - Widget tabbar = Padding( - padding: const EdgeInsets.all(10), - child: Tabs( - index: selectedIndex.value, - onChanged: (index) => selectedIndex.value = index, - children: [ - TabItem(child: Text(context.l10n.synced)), - TabItem(child: Text(context.l10n.plain)), - ], - ), - ); - - tabbar = Row( - children: [ - tabbar, - const Spacer(), - Consumer( - builder: (context, ref, child) { - final playback = ref.watch(audioPlayerProvider); - final lyric = ref.watch(syncedLyricsProvider(playback.activeTrack)); - final providerName = lyric.asData?.value.provider; - - if (providerName == null) { - return const SizedBox.shrink(); - } - - return Align( - alignment: Alignment.bottomRight, - child: Text(context.l10n.powered_by_provider(providerName)), - ); - }, - ), - const Gap(5), - ], - ); - - return SafeArea( - bottom: false, - child: Scaffold( - floatingHeader: true, - headers: [ - !kIsMacOS - ? TitleBar( - backgroundColor: Colors.transparent, - title: tabbar, - height: 58 * context.theme.scaling, - surfaceBlur: 0, - automaticallyImplyLeading: false, - ) - : tabbar - ], - child: Container( - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration( - image: DecorationImage( - image: UniversalImage.imageProvider(albumArt), - fit: BoxFit.cover, - ), - ), - margin: const EdgeInsets.only(bottom: 10), - child: SurfaceCard( - surfaceBlur: context.theme.surfaceBlur, - surfaceOpacity: context.theme.surfaceOpacity, - padding: EdgeInsets.zero, - borderRadius: BorderRadius.zero, - borderWidth: 0, - child: ColoredBox( - color: palette.color.withValues(alpha: .7), - child: SafeArea( - child: IndexedStack( - index: selectedIndex.value, - children: [ - SyncedLyrics(palette: palette, isModal: false), - PlainLyrics(palette: palette, isModal: false), - ], - ), - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/lyrics/mini_lyrics.dart b/lib/pages/lyrics/mini_lyrics.dart deleted file mode 100644 index 4c28eddd..00000000 --- a/lib/pages/lyrics/mini_lyrics.dart +++ /dev/null @@ -1,287 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:palette_generator/palette_generator.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide Consumer; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/player/player_controls.dart'; -import 'package:spotube/modules/player/player_queue.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/utils/use_force_update.dart'; -import 'package:spotube/pages/lyrics/plain_lyrics.dart'; -import 'package:spotube/pages/lyrics/synced_lyrics.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class MiniLyricsPage extends HookConsumerWidget { - static const name = "mini_lyrics"; - - final Size prevSize; - const MiniLyricsPage({super.key, required this.prevSize}); - - @override - Widget build(BuildContext context, ref) { - final theme = Theme.of(context); - final update = useForceUpdate(); - final wasMaximized = useRef(false); - - final playlistQueue = ref.watch(audioPlayerProvider); - - final index = useState(0); - - final areaActive = useState(false); - final hoverMode = useState(true); - final showLyrics = useState(true); - - useEffect(() { - if (kIsDesktop) { - WidgetsBinding.instance.addPostFrameCallback((_) async { - wasMaximized.value = await windowManager.isMaximized(); - }); - } - return null; - }, []); - - return MouseRegion( - onEnter: !hoverMode.value - ? null - : (event) { - areaActive.value = true; - }, - onExit: !hoverMode.value - ? null - : (event) { - areaActive.value = false; - }, - child: Scaffold( - backgroundColor: theme.colorScheme.background.withValues(alpha: 0.4), - headers: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: AnimatedCrossFade( - duration: const Duration(milliseconds: 200), - crossFadeState: areaActive.value - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - secondChild: const SizedBox(), - firstChild: DragToMoveArea( - child: Row( - spacing: 2, - children: [ - const Gap(10), - if (kIsMacOS) const SizedBox(width: 65), - if (showLyrics.value) - Tabs( - index: index.value, - onChanged: (i) { - index.value = i; - }, - children: [ - TabItem(child: Text(context.l10n.synced)), - TabItem(child: Text(context.l10n.plain)), - ], - ), - const Spacer(), - Tooltip( - tooltip: - TooltipContainer(child: Text(context.l10n.lyrics)) - .call, - child: IconButton( - variance: showLyrics.value - ? ButtonVariance.secondary - : ButtonVariance.ghost, - icon: showLyrics.value - ? const Icon(SpotubeIcons.lyrics) - : const Icon(SpotubeIcons.lyricsOff), - onPressed: () async { - showLyrics.value = !showLyrics.value; - areaActive.value = true; - hoverMode.value = false; - - if (kIsDesktop) { - await windowManager.setSize( - showLyrics.value - ? const Size(400, 500) - : const Size(400, 150), - ); - } - }, - ), - ), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.show_hide_ui_on_hover), - ).call, - child: IconButton( - variance: hoverMode.value - ? ButtonVariance.secondary - : ButtonVariance.ghost, - icon: hoverMode.value - ? const Icon(SpotubeIcons.hoverOn) - : const Icon(SpotubeIcons.hoverOff), - onPressed: () async { - areaActive.value = true; - hoverMode.value = !hoverMode.value; - }, - ), - ), - if (kIsDesktop) - FutureBuilder( - future: windowManager.isAlwaysOnTop(), - builder: (context, snapshot) { - return Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.always_on_top), - ).call, - child: IconButton( - variance: snapshot.data == true - ? ButtonVariance.secondary - : ButtonVariance.ghost, - icon: Icon( - snapshot.data == true - ? SpotubeIcons.pinOn - : SpotubeIcons.pinOff, - ), - onPressed: snapshot.data == null - ? null - : () async { - await windowManager.setAlwaysOnTop( - snapshot.data == true ? false : true, - ); - update(); - }, - ), - ); - }, - ), - ], - ), - ), - ), - ), - ], - child: Column( - children: [ - if (playlistQueue.activeTrack != null) - Text(playlistQueue.activeTrack!.name!).semiBold(), - if (showLyrics.value) - Expanded( - child: IndexedStack( - index: index.value, - children: [ - SyncedLyrics( - palette: PaletteColor(theme.colorScheme.background, 0), - isModal: true, - defaultTextZoom: 65, - ), - PlainLyrics( - palette: PaletteColor(theme.colorScheme.background, 0), - isModal: true, - defaultTextZoom: 65, - ), - ], - ), - ) - else - const Gap(20), - AnimatedCrossFade( - crossFadeState: areaActive.value - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - duration: const Duration(milliseconds: 200), - secondChild: const SizedBox(), - firstChild: Row( - children: [ - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.queue), - ).call, - child: IconButton.ghost( - icon: const Icon(SpotubeIcons.queue), - onPressed: playlistQueue.activeTrack != null - ? () { - openDrawer( - context: context, - barrierDismissible: true, - draggable: true, - barrierColor: Colors.black.withAlpha(100), - borderRadius: BorderRadius.circular(10), - transformBackdrop: false, - position: OverlayPosition.bottom, - surfaceBlur: context.theme.surfaceBlur, - surfaceOpacity: 0.7, - expands: true, - builder: (context) => Consumer( - builder: (context, ref, _) { - final playlist = ref.watch( - audioPlayerProvider, - ); - final playlistNotifier = - ref.read(audioPlayerProvider.notifier); - return ConstrainedBox( - constraints: BoxConstraints( - maxHeight: - MediaQuery.of(context).size.height * - 0.8, - ), - child: - PlayerQueue.fromAudioPlayerNotifier( - floating: false, - playlist: playlist, - notifier: playlistNotifier, - ), - ); - }, - ), - ); - } - : null, - ), - ), - const Flexible(child: PlayerControls(compact: true)), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.exit_mini_player)) - .call, - child: IconButton.ghost( - icon: const Icon(SpotubeIcons.maximize), - onPressed: () async { - if (!kIsDesktop) return; - - try { - await windowManager - .setMinimumSize(const Size(300, 700)); - await windowManager.setAlwaysOnTop(false); - if (wasMaximized.value) { - await windowManager.maximize(); - } else { - await windowManager.setSize(prevSize); - } - await windowManager.setAlignment(Alignment.center); - if (!kIsLinux) { - await windowManager.setHasShadow(true); - } - await Future.delayed( - const Duration(milliseconds: 200)); - } finally { - if (context.mounted) { - context.navigateTo(const LyricsRoute()); - } - } - }, - ), - ), - ], - ), - ) - ], - ), - ), - ); - } -} diff --git a/lib/pages/lyrics/plain_lyrics.dart b/lib/pages/lyrics/plain_lyrics.dart deleted file mode 100644 index 3f0d7d1b..00000000 --- a/lib/pages/lyrics/plain_lyrics.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:palette_generator/palette_generator.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/lyrics/zoom_controls.dart'; -import 'package:spotube/components/shimmers/shimmer_lyrics.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/lyrics/synced.dart'; - -class PlainLyrics extends HookConsumerWidget { - final PaletteColor palette; - final bool? isModal; - final int defaultTextZoom; - const PlainLyrics({ - required this.palette, - this.isModal, - this.defaultTextZoom = 100, - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - final lyricsQuery = ref.watch(syncedLyricsProvider(playlist.activeTrack)); - final mediaQuery = MediaQuery.of(context); - final typography = Theme.of(context).typography; - - final textZoomLevel = useState(defaultTextZoom); - - return Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (isModal != true) ...[ - Center( - child: Text( - playlist.activeTrack?.name ?? "", - style: mediaQuery.mdAndUp - ? typography.h3 - : typography.h4.copyWith( - color: palette.titleTextColor, - ), - ), - ), - Center( - child: Text( - playlist.activeTrack?.artists.asString() ?? "", - style: (mediaQuery.mdAndUp ? typography.h4 : typography.large) - .copyWith( - color: palette.bodyTextColor, - ), - ), - ) - ], - Expanded( - child: SingleChildScrollView( - child: Center( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Builder( - builder: (context) { - if (lyricsQuery.isLoading || lyricsQuery.isRefreshing) { - return const ShimmerLyrics(); - } else if (lyricsQuery.hasError) { - return Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(16), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - context.l10n.no_lyrics_available, - style: typography.large.copyWith( - color: palette.bodyTextColor, - ), - textAlign: TextAlign.center, - ), - const Gap(26), - const Icon(SpotubeIcons.noLyrics, size: 60), - ], - ), - ); - } - - final lyrics = - lyricsQuery.asData?.value.lyrics.mapIndexed((i, e) { - final next = lyricsQuery.asData?.value.lyrics - .elementAtOrNull(i + 1); - if (next != null && - e.time - next.time > - const Duration(milliseconds: 700)) { - return "${e.text}\n"; - } - - return e.text; - }).join("\n"); - - return AnimatedDefaultTextStyle( - duration: const Duration(milliseconds: 200), - style: TextStyle( - color: isModal == true - ? context.theme.colorScheme.foreground - : palette.bodyTextColor, - fontSize: 24 * textZoomLevel.value / 100, - height: textZoomLevel.value < 70 - ? 1.5 - : textZoomLevel.value > 150 - ? 1.7 - : 2, - ), - child: SelectableText( - lyrics == null && playlist.activeTrack == null - ? context.l10n.no_tracks_playing - : lyrics ?? "", - textAlign: TextAlign.center, - ), - ); - }, - ), - ), - ), - ), - ), - ], - ), - Align( - alignment: Alignment.bottomRight, - child: ZoomControls( - value: textZoomLevel.value, - onChanged: (value) => textZoomLevel.value = value, - min: 50, - max: 200, - ), - ), - ], - ); - } -} diff --git a/lib/pages/lyrics/synced_lyrics.dart b/lib/pages/lyrics/synced_lyrics.dart deleted file mode 100644 index cb331724..00000000 --- a/lib/pages/lyrics/synced_lyrics.dart +++ /dev/null @@ -1,278 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:palette_generator/palette_generator.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/lyrics/zoom_controls.dart'; -import 'package:spotube/components/shimmers/shimmer_lyrics.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_auto_scroll_controller.dart'; -import 'package:spotube/modules/lyrics/use_synced_lyrics.dart'; -import 'package:scroll_to_index/scroll_to_index.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/lyrics/synced.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class SyncedLyrics extends HookConsumerWidget { - final PaletteColor palette; - final bool? isModal; - final int defaultTextZoom; - - const SyncedLyrics({ - required this.palette, - this.isModal, - this.defaultTextZoom = 100, - super.key, - }); - - @override - Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.sizeOf(context); - final theme = Theme.of(context); - - final playlist = ref.watch(audioPlayerProvider); - - final controller = useAutoScrollController(); - - final delay = ref.watch(syncedLyricsDelayProvider); - - final timedLyricsQuery = - ref.watch(syncedLyricsProvider(playlist.activeTrack)); - - final lyricValue = timedLyricsQuery.asData?.value; - - final lyricsState = ref.watch( - syncedLyricsMapProvider(playlist.activeTrack), - ); - final currentTime = - useSyncedLyrics(ref, lyricsState.asData?.value.lyricsMap ?? {}, delay); - final textZoomLevel = useState(defaultTextZoom); - - final typography = Theme.of(context).typography; - - ref.listen( - audioPlayerProvider.select((s) => s.activeTrack), - (previous, next) { - controller.animateTo( - 0, - duration: const Duration(milliseconds: 500), - curve: Curves.easeInOut, - ); - ref.read(syncedLyricsDelayProvider.notifier).state = 0; - }, - ); - - final headlineTextStyle = (mediaQuery.mdAndUp - ? typography.h3 - : typography.h4.copyWith(fontSize: 25)) - .copyWith( - color: palette.titleTextColor, - ); - - final bodyTextTheme = typography.large.copyWith( - color: palette.bodyTextColor, - ); - - useEffect(() { - StreamSubscription? subscription; - WidgetsBinding.instance.addPostFrameCallback((_) { - subscription = audioPlayer.positionStream.listen((event) { - try { - if (event > Duration.zero || !controller.hasClients) return; - controller.animateTo( - 0, - duration: const Duration(milliseconds: 500), - curve: Curves.easeInOut, - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - }); - - return subscription?.cancel; - }, [controller]); - - return Stack( - children: [ - CustomScrollView( - controller: controller, - slivers: [ - if (isModal != true) - SliverAppBar( - automaticallyImplyLeading: false, - backgroundColor: Colors.transparent, - centerTitle: true, - title: Text( - playlist.activeTrack?.name ?? context.l10n.not_playing, - style: headlineTextStyle, - ), - bottom: PreferredSize( - preferredSize: const Size.fromHeight(40), - child: Text( - playlist.activeTrack?.artists.asString() ?? "", - style: - mediaQuery.mdAndUp ? typography.h4 : typography.x2Large, - ), - ), - ), - if (lyricValue != null && - lyricValue.lyrics.isNotEmpty && - lyricsState.asData?.value.static != true) - SliverList.builder( - itemCount: lyricValue.lyrics.length, - itemBuilder: (context, index) { - final lyricSlice = lyricValue.lyrics[index]; - final isActive = lyricSlice.time.inSeconds == currentTime; - - if (isActive) { - controller.scrollToIndex( - index, - preferPosition: AutoScrollPosition.middle, - ); - } - return AutoScrollTag( - key: ValueKey(index), - index: index, - controller: controller, - child: lyricSlice.text.isEmpty - ? Container( - padding: index == lyricValue.lyrics.length - 1 - ? EdgeInsets.only( - bottom: mediaQuery.height / 2, - ) - : null, - ) - : Center( - child: Padding( - padding: index == lyricValue.lyrics.length - 1 - ? const EdgeInsets.all(8.0).copyWith( - bottom: 100, - ) - : const EdgeInsets.all(8.0), - child: AnimatedDefaultTextStyle( - duration: const Duration(milliseconds: 250), - style: TextStyle( - color: isActive - ? theme.colorScheme.foreground - : theme.colorScheme.mutedForeground, - fontWeight: isActive - ? FontWeight.w500 - : FontWeight.normal, - fontSize: (isActive ? 28 : 26) * - (textZoomLevel.value / 100), - ), - textAlign: TextAlign.center, - child: MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - onTap: () async { - final time = Duration( - seconds: - lyricSlice.time.inSeconds - delay, - ); - if (time > audioPlayer.duration || - time.isNegative) { - return; - } - audioPlayer.seek(time); - }, - child: Text(lyricSlice.text), - ), - ), - ), - ), - ), - ); - }, - ), - if (playlist.activeTrack != null && - (timedLyricsQuery.isLoading || timedLyricsQuery.isRefreshing)) - const SliverToBoxAdapter(child: ShimmerLyrics()) - else if (playlist.activeTrack != null && - (timedLyricsQuery.hasError)) ...[ - SliverToBoxAdapter( - child: Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(16), - child: Text( - context.l10n.no_lyrics_available, - style: bodyTextTheme, - textAlign: TextAlign.center, - ), - ), - ), - const SliverGap(26), - const SliverToBoxAdapter( - child: Icon(SpotubeIcons.noLyrics, size: 60), - ), - ] else if (lyricsState.asData?.value.static == true) - SliverFillRemaining( - child: Center( - child: RichText( - textAlign: TextAlign.center, - text: TextSpan( - style: bodyTextTheme, - children: [ - TextSpan( - text: context.l10n.synced_lyrics_not_available, - ), - TextSpan( - text: " ${context.l10n.plain_lyrics} ", - style: typography.large.copyWith( - color: palette.bodyTextColor, - fontWeight: FontWeight.bold, - ), - ), - TextSpan(text: context.l10n.tab_instead), - ], - ), - ), - ), - ), - ], - ), - Align( - alignment: Alignment.bottomRight, - child: Builder(builder: (context) { - final actions = [ - ZoomControls( - value: delay, - onChanged: (value) => - ref.read(syncedLyricsDelayProvider.notifier).state = value, - interval: 1, - unit: "s", - increaseIcon: const Icon(SpotubeIcons.add), - decreaseIcon: const Icon(SpotubeIcons.remove), - direction: isModal == true ? Axis.horizontal : Axis.vertical, - ), - ZoomControls( - value: textZoomLevel.value, - onChanged: (value) => textZoomLevel.value = value, - min: 50, - max: 200, - ), - ]; - - return isModal == true - ? Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.end, - children: actions, - ) - : Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.end, - children: actions, - ); - }), - ), - ], - ); - } -} diff --git a/lib/pages/player/lyrics.dart b/lib/pages/player/lyrics.dart deleted file mode 100644 index 093b0aa2..00000000 --- a/lib/pages/player/lyrics.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:auto_route/annotations.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/utils/use_palette_color.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/pages/lyrics/plain_lyrics.dart'; -import 'package:spotube/pages/lyrics/synced_lyrics.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; - -@RoutePage() -class PlayerLyricsPage extends HookConsumerWidget { - const PlayerLyricsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch(audioPlayerProvider); - String albumArt = useMemoized( - () => (playlist.activeTrack?.album.images).asUrlString( - index: (playlist.activeTrack?.album.images.length ?? 1) - 1, - placeholder: ImagePlaceholder.albumArt, - ), - [playlist.activeTrack?.album.images], - ); - final selectedIndex = useState(0); - final palette = usePaletteColor(albumArt, ref); - - final tabbar = TabList( - index: selectedIndex.value, - onChanged: (index) => selectedIndex.value = index, - children: [ - TabItem( - child: Text(context.l10n.synced), - ), - TabItem( - child: Text(context.l10n.plain), - ), - ], - ); - - return Scaffold( - headers: [ - AppBar( - leading: [tabbar], - trailing: const [ - BackButton(icon: SpotubeIcons.angleDown), - ], - ), - ], - child: IndexedStack( - index: selectedIndex.value, - children: [ - SyncedLyrics(palette: palette, isModal: false), - PlainLyrics(palette: palette, isModal: false), - ], - ), - ); - } -} diff --git a/lib/pages/player/queue.dart b/lib/pages/player/queue.dart deleted file mode 100644 index 829db6eb..00000000 --- a/lib/pages/player/queue.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:auto_route/annotations.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/modules/player/player_queue.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; - -@RoutePage() -class PlayerQueuePage extends HookConsumerWidget { - const PlayerQueuePage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final playlist = ref.watch( - audioPlayerProvider, - ); - final playlistNotifier = ref.read(audioPlayerProvider.notifier); - return Scaffold( - child: SafeArea( - bottom: false, - child: PlayerQueue.fromAudioPlayerNotifier( - floating: false, - playlist: playlist, - notifier: playlistNotifier, - ), - ), - ); - } -} diff --git a/lib/pages/player/sources.dart b/lib/pages/player/sources.dart deleted file mode 100644 index 8e370daf..00000000 --- a/lib/pages/player/sources.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/modules/player/sibling_tracks_sheet.dart'; - -@RoutePage() -class PlayerTrackSourcesPage extends StatelessWidget { - const PlayerTrackSourcesPage({super.key}); - - @override - Widget build(BuildContext context) { - return const Scaffold( - child: SiblingTracksSheet(floating: false), - ); - } -} diff --git a/lib/pages/playlist/liked_playlist.dart b/lib/pages/playlist/liked_playlist.dart deleted file mode 100644 index 3897acef..00000000 --- a/lib/pages/playlist/liked_playlist.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:flutter/widgets.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/track_presentation.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/pages/playlist/playlist.dart'; -import 'package:spotube/provider/metadata_plugin/library/tracks.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -@RoutePage() -class LikedPlaylistPage extends HookConsumerWidget { - static const name = PlaylistPage.name; - - final SpotubeSimplePlaylistObject playlist; - const LikedPlaylistPage({ - super.key, - required this.playlist, - }); - - @override - Widget build(BuildContext context, ref) { - final likedTracks = ref.watch(metadataPluginSavedTracksProvider); - final likedTracksNotifier = - ref.watch(metadataPluginSavedTracksProvider.notifier); - final tracks = likedTracks.asData?.value.items ?? []; - - return material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginSavedTracksProvider); - }, - child: TrackPresentation( - options: TrackPresentationOptions( - collection: playlist, - image: Assets.images.likedTracks.path, - pagination: PaginationProps( - hasNextPage: likedTracks.asData?.value.hasMore ?? false, - isLoading: likedTracks.isLoadingNextPage && !likedTracks.isLoading, - onFetchMore: () async { - await likedTracksNotifier.fetchMore(); - }, - onFetchAll: () async { - return await likedTracksNotifier.fetchAll(); - }, - onRefresh: () async { - ref.invalidate(metadataPluginSavedTracksProvider); - }, - ), - title: playlist.name, - description: playlist.description, - tracks: tracks, - error: likedTracks.error, - routePath: '/playlist/${playlist.id}', - isLiked: false, - shareUrl: null, - onHeart: null, - owner: playlist.owner.name, - ), - ), - ); - } -} diff --git a/lib/pages/playlist/playlist.dart b/lib/pages/playlist/playlist.dart deleted file mode 100644 index 4aca5945..00000000 --- a/lib/pages/playlist/playlist.dart +++ /dev/null @@ -1,113 +0,0 @@ -import 'package:flutter/material.dart' as material; -import 'package:collection/collection.dart'; -import 'package:flutter/material.dart' hide Page; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/components/dialogs/prompt_dialog.dart'; -import 'package:spotube/components/track_presentation/presentation_props.dart'; -import 'package:spotube/components/track_presentation/track_presentation.dart'; -import 'package:spotube/components/track_presentation/use_is_user_playlist.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/playlist.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -@RoutePage() -class PlaylistPage extends HookConsumerWidget { - static const name = "playlist"; - - final SpotubeSimplePlaylistObject _playlist; - final String id; - const PlaylistPage({ - super.key, - @PathParam("id") required this.id, - required SpotubeSimplePlaylistObject playlist, - }) : _playlist = playlist; - - @override - Widget build(BuildContext context, ref) { - final playlist = ref - .watch( - metadataPluginSavedPlaylistsProvider.select( - (value) => value.whenData( - (value) => - value.items.firstWhereOrNull((s) => s.id == _playlist.id), - ), - ), - ) - .asData - ?.value ?? - _playlist; - - final tracks = ref.watch(metadataPluginPlaylistTracksProvider(playlist.id)); - final tracksNotifier = - ref.watch(metadataPluginPlaylistTracksProvider(playlist.id).notifier); - final isFavoritePlaylist = - ref.watch(metadataPluginIsSavedPlaylistProvider(playlist.id)); - - final favoritePlaylistsNotifier = - ref.watch(metadataPluginSavedPlaylistsProvider.notifier); - - final isUserPlaylist = useIsUserPlaylist(ref, playlist.id); - - return material.RefreshIndicator.adaptive( - onRefresh: () async { - ref.invalidate(metadataPluginPlaylistTracksProvider(playlist.id)); - ref.invalidate(metadataPluginSavedPlaylistsProvider); - ref.invalidate(metadataPluginIsSavedPlaylistProvider(playlist.id)); - }, - child: TrackPresentation( - options: TrackPresentationOptions( - collection: playlist, - image: playlist.images.asUrlString( - placeholder: ImagePlaceholder.collection, - ), - pagination: PaginationProps( - hasNextPage: tracks.asData?.value.hasMore ?? false, - isLoading: tracks.isLoading || tracks.isLoadingNextPage, - onFetchMore: tracksNotifier.fetchMore, - onRefresh: () async { - ref.invalidate(metadataPluginPlaylistTracksProvider(playlist.id)); - }, - onFetchAll: () async { - return await tracksNotifier.fetchAll(); - }, - ), - title: playlist.name, - description: playlist.description, - owner: playlist.owner.name, - ownerImage: playlist.owner.images.lastOrNull?.url, - tracks: tracks.asData?.value.items ?? [], - error: tracks.error, - routePath: '/playlist/${playlist.id}', - isLiked: isFavoritePlaylist.asData?.value ?? false, - shareUrl: playlist.externalUri, - onHeart: isFavoritePlaylist.asData?.value == null - ? null - : () async { - final confirmed = isUserPlaylist - ? await showPromptDialog( - context: context, - title: context.l10n.delete_playlist, - message: context.l10n.delete_playlist_confirmation, - ) - : true; - if (!confirmed) return null; - - if (isFavoritePlaylist.asData!.value) { - if (isUserPlaylist) { - await favoritePlaylistsNotifier.delete(playlist.id); - } else { - await favoritePlaylistsNotifier.removeFavorite(playlist); - } - } else { - await favoritePlaylistsNotifier.addFavorite(playlist); - } - return isUserPlaylist; - }, - ), - ), - ); - } -} diff --git a/lib/pages/profile/profile.dart b/lib/pages/profile/profile.dart deleted file mode 100644 index eb3dec2a..00000000 --- a/lib/pages/profile/profile.dart +++ /dev/null @@ -1,141 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:sliver_tools/sliver_tools.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; -import 'package:url_launcher/url_launcher_string.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class ProfilePage extends HookConsumerWidget { - static const name = "profile"; - - const ProfilePage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final me = ref.watch(metadataPluginUserProvider); - final meData = me.asData?.value ?? FakeData.user; - - // final userProperties = useMemoized( - // () => { - // context.l10n.email: meData.email ?? "N/A", - // context.l10n.profile_followers: - // meData.followers?.total.toString() ?? "N/A", - // context.l10n.birthday: meData.birthdate ?? context.l10n.not_born, - // context.l10n.country: markets - // .firstWhere((market) => market.$1 == meData.country) - // .$2, - // context.l10n.subscription: meData.product ?? context.l10n.hacker, - // }, - // [meData], - // ); - - return SafeArea( - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.profile), - ) - ], - child: Skeletonizer( - enabled: me.isLoading, - child: CustomScrollView( - slivers: [ - SliverToBoxAdapter( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - ClipRRect( - borderRadius: BorderRadius.circular(600), - child: UniversalImage( - path: meData.images.asUrlString( - index: 1, - placeholder: ImagePlaceholder.artist, - ), - width: 300, - height: 300, - fit: BoxFit.cover, - ), - ), - ], - ), - ), - const SliverGap(10), - SliverToBoxAdapter( - child: Text( - meData.name, - textAlign: TextAlign.center, - ).h4(), - ), - const SliverGap(20), - SliverCrossAxisConstrained( - maxCrossAxisExtent: 500, - child: SliverToBoxAdapter( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Button.text( - leading: const Icon(SpotubeIcons.edit), - onPressed: () { - launchUrlString( - meData.externalUri, - mode: LaunchMode.externalApplication, - ); - }, - child: Text(context.l10n.edit), - ), - ], - ), - ), - ), - // SliverCrossAxisConstrained( - // maxCrossAxisExtent: 500, - // child: SliverToBoxAdapter( - // child: Card( - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Table( - // columnWidths: const { - // 0: FixedTableSize(120), - // }, - // defaultRowHeight: const FixedTableSize(40), - // rows: [ - // for (final MapEntry(:key, :value) - // in userProperties.entries) - // TableRow( - // cells: [ - // TableCell( - // child: Padding( - // padding: const EdgeInsets.all(6), - // child: Text(key).large(), - // ), - // ), - // TableCell( - // child: Padding( - // padding: const EdgeInsets.all(6), - // child: Text(value), - // ), - // ), - // ], - // ) - // ], - // ), - // ), - // ), - // ), - // ), - const SliverGap(200), - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/root/root_app.dart b/lib/pages/root/root_app.dart deleted file mode 100644 index 44b8416f..00000000 --- a/lib/pages/root/root_app.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/hooks/configurators/use_check_yt_dlp_installed.dart'; -import 'package:spotube/modules/root/bottom_player.dart'; -import 'package:spotube/modules/root/sidebar/sidebar.dart'; -import 'package:spotube/modules/root/spotube_navigation_bar.dart'; -import 'package:spotube/hooks/configurators/use_endless_playback.dart'; -import 'package:spotube/modules/root/use_global_subscriptions.dart'; -import 'package:spotube/provider/glance/glance.dart'; - -@RoutePage() -class RootAppPage extends HookConsumerWidget { - const RootAppPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final backgroundColor = Theme.of(context).colorScheme.background; - final brightness = Theme.of(context).brightness; - - ref.listen(glanceProvider, (_, __) {}); - - useGlobalSubscriptions(ref); - useEndlessPlayback(ref); - useCheckYtDlpInstalled(ref); - - useEffect(() { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarColor: backgroundColor, // status bar color - statusBarIconBrightness: brightness == Brightness.dark - ? Brightness.light - : Brightness.dark, - ), - ); - return null; - }, [backgroundColor, brightness]); - - final scaffold = MediaQuery.removeViewInsets( - context: context, - removeBottom: true, - child: SafeArea( - top: false, - child: Scaffold( - footers: const [ - BottomPlayer(), - SpotubeNavigationBar(), - ], - floatingFooter: true, - child: Sidebar( - child: MediaQuery( - data: MediaQuery.of(context).copyWith( - padding: MediaQuery.paddingOf(context) - .copyWith(bottom: 100 * context.theme.scaling), - ), - child: const AutoRouter(), - ), - ), - ), - ), - ); - - return scaffold; - } -} diff --git a/lib/pages/search/search.dart b/lib/pages/search/search.dart deleted file mode 100644 index da5cc0e2..00000000 --- a/lib/pages/search/search.dart +++ /dev/null @@ -1,233 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/collections/routes.gr.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/fallbacks/no_default_metadata_plugin.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/string.dart'; -import 'package:spotube/hooks/controllers/use_shadcn_text_editing_controller.dart'; -import 'package:spotube/pages/search/tabs/albums.dart'; -import 'package:spotube/pages/search/tabs/all.dart'; -import 'package:spotube/pages/search/tabs/artists.dart'; -import 'package:spotube/pages/search/tabs/playlists.dart'; -import 'package:spotube/pages/search/tabs/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/search/all.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -final searchTermStateProvider = StateProvider((ref) { - return ""; -}); - -@RoutePage() -class SearchPage extends HookConsumerWidget { - static const name = "search"; - - const SearchPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useShadcnTextEditingController(); - final focusNode = useFocusNode(); - - final searchTerm = ref.watch(searchTermStateProvider); - final searchChipSnapshot = ref.watch(metadataPluginSearchChipsProvider); - final selectedChip = useState( - searchChipSnapshot.asData?.value.first ?? "all", - ); - - ref.listen( - metadataPluginSearchChipsProvider, - (previous, next) { - selectedChip.value = next.asData?.value.first ?? "all"; - }, - ); - - useEffect(() { - controller.text = searchTerm; - - return null; - }, []); - - void onSubmitted(String value) { - ref.read(searchTermStateProvider.notifier).state = value; - focusNode.unfocus(); - if (value.trim().isEmpty) { - return; - } - KVStoreService.setRecentSearches( - { - value, - ...KVStoreService.recentSearches, - }.toList(), - ); - } - - return PopScope( - canPop: false, - onPopInvokedWithResult: (didPop, result) { - context.navigateTo(const HomeRoute()); - }, - child: SafeArea( - bottom: false, - child: Scaffold( - headers: [ - if (kTitlebarVisible) - const TitleBar(automaticallyImplyLeading: false, height: 30) - ], - child: Builder(builder: (context) { - if (searchChipSnapshot.error - case MetadataPluginException( - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - message: _ - )) { - return const NoDefaultMetadataPlugin(); - } - - if (searchChipSnapshot.hasError) { - return ErrorBox( - error: searchChipSnapshot.error!, - onRetry: () { - ref.invalidate(metadataPluginSearchChipsProvider); - }, - ); - } - - return Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 20, - vertical: 10, - ), - child: ListenableBuilder( - listenable: controller, - builder: (context, _) { - final suggestions = controller.text.isEmpty - ? KVStoreService.recentSearches - : KVStoreService.recentSearches - .where( - (s) => - weightedRatio( - s.toLowerCase(), - controller.text.toLowerCase(), - ) > - 50, - ) - .toList(); - - return AutoComplete( - suggestions: suggestions.length <= 2 - ? [ - ...suggestions, - "Twenty One Pilots", - "Linkin Park", - ] - : suggestions, - completer: (suggestion) => suggestion, - mode: AutoCompleteMode.replaceAll, - child: TextField( - autofocus: true, - controller: controller, - focusNode: focusNode, - features: [ - const InputFeature.leading( - Icon(SpotubeIcons.search), - ), - InputFeature.trailing( - AnimatedCrossFade( - duration: - const Duration(milliseconds: 300), - crossFadeState: - controller.text.isNotEmpty - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - firstChild: IconButton.ghost( - size: ButtonSize.small, - icon: const Icon(SpotubeIcons.close), - onPressed: () { - controller.clear(); - }, - ), - secondChild: const SizedBox.square( - dimension: 28), - ), - ) - ], - textInputAction: TextInputAction.search, - placeholder: Text(context.l10n.search), - onSubmitted: onSubmitted, - ), - ); - }), - ), - ), - ], - ), - Row( - spacing: 8, - children: [ - const Gap(12), - if (searchChipSnapshot.asData?.value != null) - for (final chip in searchChipSnapshot.asData!.value) - Chip( - style: selectedChip.value == chip - ? ButtonVariance.primary.copyWith( - decoration: (context, states, value) { - return ButtonVariance.primary - .decoration(context, states) - .copyWithIfBoxDecoration( - borderRadius: - BorderRadius.circular(100), - ); - }, - ) - : ButtonVariance.secondary.copyWith( - decoration: (context, states, value) { - return ButtonVariance.secondary - .decoration(context, states) - .copyWithIfBoxDecoration( - borderRadius: - BorderRadius.circular(100), - ); - }, - ), - child: Text(chip.capitalize()), - onPressed: () { - selectedChip.value = chip; - }, - ), - ], - ), - Expanded( - child: AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: switch (selectedChip.value) { - "tracks" => const SearchPageTracksTab(), - "albums" => const SearchPageAlbumsTab(), - "artists" => const SearchPageArtistsTab(), - "playlists" => const SearchPagePlaylistsTab(), - _ => const SearchPageAllTab(), - }, - ), - ), - ], - ); - }), - ), - ), - ); - } -} diff --git a/lib/pages/search/tabs/albums.dart b/lib/pages/search/tabs/albums.dart deleted file mode 100644 index e27772c6..00000000 --- a/lib/pages/search/tabs/albums.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/playbutton_view/playbutton_view.dart'; -import 'package:spotube/modules/album/album_card.dart'; -import 'package:spotube/modules/search/loading.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/metadata_plugin/search/albums.dart'; - -class SearchPageAlbumsTab extends HookConsumerWidget { - const SearchPageAlbumsTab({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - - final searchTerm = ref.watch(searchTermStateProvider); - final searchAlbumsSnapshot = - ref.watch(metadataPluginSearchAlbumsProvider(searchTerm)); - final searchAlbumsNotifier = - ref.read(metadataPluginSearchAlbumsProvider(searchTerm).notifier); - final searchAlbums = - searchAlbumsSnapshot.asData?.value.items ?? [FakeData.albumSimple]; - - if (searchAlbumsSnapshot.hasError) { - return ErrorBox( - error: searchAlbumsSnapshot.error!, - onRetry: () { - ref.invalidate(metadataPluginSearchAlbumsProvider(searchTerm)); - }, - ); - } - - return SearchPlaceholder( - snapshot: searchAlbumsSnapshot, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: CustomScrollView( - slivers: [ - PlaybuttonView( - controller: controller, - itemCount: searchAlbums.length, - hasMore: searchAlbumsSnapshot.asData?.value.hasMore == true, - isLoading: searchAlbumsSnapshot.isLoading, - onRequestMore: searchAlbumsNotifier.fetchMore, - gridItemBuilder: (context, index) => - AlbumCard(searchAlbums[index]), - listItemBuilder: (context, index) => - AlbumCard.tile(searchAlbums[index]), - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/search/tabs/all.dart b/lib/pages/search/tabs/all.dart deleted file mode 100644 index 306bdfce..00000000 --- a/lib/pages/search/tabs/all.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/modules/search/loading.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/modules/search/sections/albums.dart'; -import 'package:spotube/modules/search/sections/artists.dart'; -import 'package:spotube/modules/search/sections/playlists.dart'; -import 'package:spotube/modules/search/sections/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/search/all.dart'; - -class SearchPageAllTab extends HookConsumerWidget { - const SearchPageAllTab({super.key}); - - @override - Widget build(BuildContext context, ref) { - final scrollController = ScrollController(); - final searchTerm = ref.watch(searchTermStateProvider); - final searchSnapshot = - ref.watch(metadataPluginSearchAllProvider(searchTerm)); - - if (searchSnapshot.hasError) { - return ErrorBox( - error: searchSnapshot.error!, - onRetry: () { - ref.invalidate(metadataPluginSearchAllProvider(searchTerm)); - }, - ); - } - - return SearchPlaceholder( - snapshot: searchSnapshot, - child: InterScrollbar( - controller: scrollController, - child: SingleChildScrollView( - controller: scrollController, - child: const Padding( - padding: EdgeInsets.symmetric(vertical: 8), - child: SafeArea( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SearchTracksSection(), - SearchPlaylistsSection(), - Gap(20), - SearchArtistsSection(), - Gap(20), - SearchAlbumsSection(), - ], - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/search/tabs/artists.dart b/lib/pages/search/tabs/artists.dart deleted file mode 100644 index 8cea7b58..00000000 --- a/lib/pages/search/tabs/artists.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/waypoint.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/artist/artist_card.dart'; -import 'package:spotube/modules/search/loading.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/metadata_plugin/search/artists.dart'; - -class SearchPageArtistsTab extends HookConsumerWidget { - const SearchPageArtistsTab({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - - final searchTerm = ref.watch(searchTermStateProvider); - final searchArtistsSnapshot = - ref.watch(metadataPluginSearchArtistsProvider(searchTerm)); - final searchArtistsNotifier = - ref.read(metadataPluginSearchArtistsProvider(searchTerm).notifier); - final searchArtists = searchArtistsSnapshot.asData?.value.items ?? []; - - if (searchArtistsSnapshot.hasError) { - return ErrorBox( - error: searchArtistsSnapshot.error!, - onRetry: () { - ref.invalidate(metadataPluginSearchArtistsProvider(searchTerm)); - }, - ); - } - - return SearchPlaceholder( - snapshot: searchArtistsSnapshot, - child: AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: LayoutBuilder(builder: (context, constrains) { - if (searchArtistsSnapshot.hasValue && searchArtists.isEmpty) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: Column( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Undraw( - height: 200 * context.theme.scaling, - illustration: UndrawIllustration.taken, - color: Theme.of(context).colorScheme.primary, - ), - Text( - context.l10n.nothing_found, - textAlign: TextAlign.center, - ).muted().small() - ], - ), - ); - } - - return GridView.builder( - padding: const EdgeInsets.all(16), - itemCount: searchArtists.length + 1, - gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 200, - mainAxisExtent: constrains.smAndDown ? 225 : 250, - crossAxisSpacing: 8, - mainAxisSpacing: 8, - ), - itemBuilder: (context, index) { - if (searchArtists.isNotEmpty && index == searchArtists.length) { - if (searchArtistsSnapshot.asData?.value.hasMore != true) { - return const SizedBox.shrink(); - } - - return Waypoint( - controller: controller, - isGrid: true, - onTouchEdge: searchArtistsNotifier.fetchMore, - child: Skeletonizer( - enabled: true, - child: ArtistCard(FakeData.artist), - ), - ); - } - - return Skeletonizer( - enabled: searchArtistsSnapshot.isLoading, - child: ArtistCard( - searchArtists.elementAtOrNull(index) ?? FakeData.artist, - ), - ); - }, - ); - }), - ), - ); - } -} diff --git a/lib/pages/search/tabs/playlists.dart b/lib/pages/search/tabs/playlists.dart deleted file mode 100644 index f00153cb..00000000 --- a/lib/pages/search/tabs/playlists.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/playbutton_view/playbutton_view.dart'; -import 'package:spotube/modules/playlist/playlist_card.dart'; -import 'package:spotube/modules/search/loading.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/metadata_plugin/search/playlists.dart'; - -class SearchPagePlaylistsTab extends HookConsumerWidget { - const SearchPagePlaylistsTab({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - - final searchTerm = ref.watch(searchTermStateProvider); - final searchPlaylistsSnapshot = - ref.watch(metadataPluginSearchPlaylistsProvider(searchTerm)); - final searchPlaylistsNotifier = - ref.read(metadataPluginSearchPlaylistsProvider(searchTerm).notifier); - final searchPlaylists = searchPlaylistsSnapshot.asData?.value.items ?? - [FakeData.playlistSimple]; - - if (searchPlaylistsSnapshot.hasError) { - return ErrorBox( - error: searchPlaylistsSnapshot.error!, - onRetry: () { - ref.invalidate(metadataPluginSearchPlaylistsProvider(searchTerm)); - }, - ); - } - - return SearchPlaceholder( - snapshot: searchPlaylistsSnapshot, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: CustomScrollView( - slivers: [ - PlaybuttonView( - controller: controller, - itemCount: searchPlaylists.length, - hasMore: searchPlaylistsSnapshot.asData?.value.hasMore == true, - isLoading: searchPlaylistsSnapshot.isLoading, - onRequestMore: searchPlaylistsNotifier.fetchMore, - gridItemBuilder: (context, index) => - PlaylistCard(searchPlaylists[index]), - listItemBuilder: (context, index) => - PlaylistCard.tile(searchPlaylists[index]), - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/search/tabs/tracks.dart b/lib/pages/search/tabs/tracks.dart deleted file mode 100644 index e4c56891..00000000 --- a/lib/pages/search/tabs/tracks.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/components/dialogs/prompt_dialog.dart'; -import 'package:spotube/components/dialogs/select_device_dialog.dart'; -import 'package:spotube/components/fallbacks/error_box.dart'; -import 'package:spotube/components/track_tile/track_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/modules/search/loading.dart'; -import 'package:spotube/pages/search/search.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/connect/connect.dart'; -import 'package:spotube/provider/metadata_plugin/search/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; - -class SearchPageTracksTab extends HookConsumerWidget { - const SearchPageTracksTab({super.key}); - - @override - Widget build(BuildContext context, ref) { - final searchTerm = ref.watch(searchTermStateProvider); - final searchTracksSnapshot = - ref.watch(metadataPluginSearchTracksProvider(searchTerm)); - final searchTracksNotifier = - ref.read(metadataPluginSearchTracksProvider(searchTerm).notifier); - final searchTracks = - searchTracksSnapshot.asData?.value.items ?? [FakeData.track]; - - final playlist = ref.watch(audioPlayerProvider); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - - if (searchTracksSnapshot.hasError) { - return ErrorBox( - error: searchTracksSnapshot.error!, - onRetry: () { - ref.invalidate(metadataPluginSearchTracksProvider(searchTerm)); - }, - ); - } - - return SearchPlaceholder( - snapshot: searchTracksSnapshot, - child: InfiniteList( - itemCount: searchTracksSnapshot.asData?.value.items.length ?? 0, - hasReachedMax: searchTracksSnapshot.asData?.value.hasMore != true, - isLoading: searchTracksSnapshot.isLoading && - !searchTracksSnapshot.isLoadingNextPage, - loadingBuilder: (context) { - return Skeletonizer( - enabled: true, - child: TrackTile(track: FakeData.track, playlist: playlist), - ); - }, - onFetchData: () { - searchTracksNotifier.fetchMore(); - }, - itemBuilder: (context, index) { - final track = searchTracks[index]; - - return TrackTile( - track: track, - playlist: playlist, - index: index, - onTap: () async { - final isRemoteDevice = await showSelectDeviceDialog(context, ref); - - if (isRemoteDevice == null) return; - - if (isRemoteDevice) { - final remotePlayback = ref.read(connectProvider.notifier); - final remotePlaylist = ref.read(queueProvider); - - final isTrackPlaying = - remotePlaylist.activeTrack?.id == track.id; - - if (!isTrackPlaying && context.mounted) { - final shouldPlay = (playlist.tracks.length) > 20 - ? await showPromptDialog( - context: context, - title: context.l10n.playing_track( - track.name, - ), - message: context.l10n.queue_clear_alert( - playlist.tracks.length, - ), - ) - : true; - - if (shouldPlay) { - await remotePlayback.load( - WebSocketLoadEventData.playlist( - tracks: [track], - ), - ); - } - } - } else { - final isTrackPlaying = playlist.activeTrack?.id == track.id; - if (!isTrackPlaying && context.mounted) { - final shouldPlay = (playlist.tracks.length) > 20 - ? await showPromptDialog( - context: context, - title: context.l10n.playing_track( - track.name, - ), - message: context.l10n.queue_clear_alert( - playlist.tracks.length, - ), - ) - : true; - - if (shouldPlay) { - await playlistNotifier.load( - [track], - autoPlay: true, - ); - } - } - } - }, - ); - }, - ), - ); - } -} diff --git a/lib/pages/settings/about.dart b/lib/pages/settings/about.dart deleted file mode 100644 index 5a95c0eb..00000000 --- a/lib/pages/settings/about.dart +++ /dev/null @@ -1,211 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/assets.gen.dart'; -import 'package:spotube/collections/env.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/hyper_link.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/hooks/controllers/use_package_info.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:url_launcher/url_launcher.dart'; -import 'package:auto_route/auto_route.dart'; - -final _licenseProvider = FutureProvider((ref) async { - return await rootBundle.loadString("LICENSE"); -}); - -@RoutePage() -class AboutSpotubePage extends HookConsumerWidget { - static const name = "about"; - - const AboutSpotubePage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final packageInfo = usePackageInfo(); - final license = ref.watch(_licenseProvider); - final theme = Theme.of(context); - - const colon = TableCell(child: Text(":")); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - leading: const [BackButton()], - title: Text(context.l10n.about_spotube), - ) - ], - child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Column( - children: [ - Assets.branding.spotubeLogoPng.image( - height: 200, - width: 200, - ), - Center( - child: Column( - children: [ - Text(context.l10n.spotube_description).semiBold().large(), - const SizedBox(height: 20), - Table( - columnWidths: const { - 0: FixedTableSize(95), - 1: FixedTableSize(10), - 2: IntrinsicTableSize(), - }, - defaultRowHeight: const FixedTableSize(40), - rows: [ - TableRow( - cells: [ - TableCell(child: Text(context.l10n.founder)), - colon, - TableCell( - child: Hyperlink( - context.l10n.kingkor_roy_tirtho, - "https://github.com/KRTirtho", - ), - ) - ], - ), - TableRow( - cells: [ - TableCell(child: Text(context.l10n.version)), - colon, - TableCell(child: Text("v${packageInfo.version}")) - ], - ), - TableRow( - cells: [ - TableCell(child: Text(context.l10n.channel)), - colon, - TableCell(child: Text(Env.releaseChannel.name)) - ], - ), - TableRow( - cells: [ - TableCell(child: Text(context.l10n.build_number)), - colon, - TableCell( - child: Text(packageInfo.buildNumber - .replaceAll(".", " ")), - ) - ], - ), - const TableRow( - cells: [ - TableCell(child: Text("Website")), - colon, - TableCell( - child: Hyperlink( - "spotube.krtirtho.dev", - "https://spotube.krtirtho.dev", - ), - ), - ], - ), - TableRow( - cells: [ - TableCell(child: Text(context.l10n.repository)), - colon, - const TableCell( - child: Hyperlink( - "github.com/KRTirtho/spotube", - "https://github.com/KRTirtho/spotube", - ), - ), - ], - ), - TableRow( - cells: [ - TableCell(child: Text(context.l10n.license)), - colon, - const TableCell( - child: Hyperlink( - "BSD-4-Clause", - "https://raw.githubusercontent.com/KRTirtho/spotube/master/LICENSE", - ), - ), - ], - ), - TableRow( - cells: [ - TableCell(child: Text(context.l10n.bug_issues)), - colon, - const TableCell( - child: Hyperlink( - "Discord#chat", - "https://discord.gg/uJ94vxB6vg", - ), - ), - ], - ), - ], - ), - ], - ), - ), - const SizedBox(height: 20), - MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - onTap: () => launchUrl( - Uri.parse("https://discord.gg/uJ94vxB6vg"), - mode: LaunchMode.externalApplication, - ), - child: const UniversalImage( - path: - "https://discord.com/api/guilds/1012234096237350943/widget.png?style=banner2", - ), - ), - ), - const SizedBox(height: 20), - Text( - context.l10n.made_with, - textAlign: TextAlign.center, - style: theme.typography.small, - ), - Text( - context.l10n.copyright(DateTime.now().year), - textAlign: TextAlign.center, - style: theme.typography.small, - ), - const SizedBox(height: 20), - ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 750), - child: SafeArea( - child: license.when( - data: (data) { - return Text( - data, - style: theme.typography.small, - ); - }, - loading: () { - return const Center( - child: CircularProgressIndicator(), - ); - }, - error: (e, s) { - return Text( - e.toString(), - style: theme.typography.small, - ); - }, - ), - ), - ), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/settings/blacklist.dart b/lib/pages/settings/blacklist.dart deleted file mode 100644 index 2af899f3..00000000 --- a/lib/pages/settings/blacklist.dart +++ /dev/null @@ -1,99 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:collection/collection.dart'; -import 'package:fuzzywuzzy/fuzzywuzzy.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; - -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/ui/button_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/blacklist_provider.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class BlackListPage extends HookConsumerWidget { - static const name = "blacklist"; - - const BlackListPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - final blacklist = ref.watch(blacklistProvider); - final searchText = useState(""); - - final filteredBlacklist = useMemoized( - () { - if (searchText.value.isEmpty) { - return blacklist.asData?.value ?? []; - } - return blacklist.asData?.value - .map( - (e) => ( - weightedRatio( - "${e.name} ${e.elementType.name}", searchText.value), - e, - ), - ) - .sorted((a, b) => b.$1.compareTo(a.$1)) - .where((e) => e.$1 > 50) - .map((e) => e.$2) - .toList() ?? - []; - }, - [blacklist, searchText.value], - ); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.blacklist), - leading: const [BackButton()], - ) - ], - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - onChanged: (value) => searchText.value = value, - placeholder: Text(context.l10n.search), - // prefixIcon: const Icon(SpotubeIcons.search), - ), - ), - InterScrollbar( - controller: controller, - child: ListView.builder( - controller: controller, - shrinkWrap: true, - itemCount: filteredBlacklist.length, - itemBuilder: (context, index) { - final item = filteredBlacklist.elementAt(index); - return ButtonTile( - style: ButtonVariance.ghost, - leading: Text("${index + 1}."), - title: Text("${item.name} (${item.elementType.name})"), - subtitle: Text(item.elementId), - trailing: IconButton.ghost( - icon: Icon(SpotubeIcons.trash, color: Colors.red[400]), - onPressed: () { - ref.read(blacklistProvider.notifier).remove( - filteredBlacklist.elementAt(index).elementId); - }, - ), - ); - }, - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/settings/logs.dart b/lib/pages/settings/logs.dart deleted file mode 100644 index 61269456..00000000 --- a/lib/pages/settings/logs.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_undraw/flutter_undraw.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/button/back_button.dart'; -import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/logs/logs_provider.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class LogsPage extends HookConsumerWidget { - static const name = "logs"; - - const LogsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - - final logsQuery = ref.watch(logsProvider); - - return Scaffold( - headers: [ - SafeArea( - bottom: false, - child: TitleBar( - title: Text(context.l10n.logs), - leading: const [BackButton()], - trailing: [ - IconButton.ghost( - icon: const Icon(SpotubeIcons.clipboard, size: 16), - onPressed: () async { - final logsSnapshot = await ref.read(logsProvider.future); - - await Clipboard.setData(ClipboardData(text: logsSnapshot)); - if (context.mounted) { - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - title: Text(context.l10n.copied_to_clipboard("")), - ), - ); - }, - ); - } - }, - ), - IconButton.ghost( - icon: const Icon( - SpotubeIcons.trash, - size: 16, - ), - onPressed: () async { - ref.invalidate(logsProvider); - - final logsFile = await AppLogger.getLogsPath(); - - await logsFile.writeAsString(""); - }, - ) - ], - ), - ) - ], - child: SafeArea( - child: switch (logsQuery) { - AsyncData(:final value) => InterScrollbar( - controller: controller, - child: SingleChildScrollView( - padding: const EdgeInsets.all(8.0), - controller: controller, - child: Card(child: SelectableText(value)), - ), - ), - AsyncError(:final error) => switch (error) { - StateError() => Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Undraw( - illustration: UndrawIllustration.noData, - height: 200 * context.theme.scaling, - width: 200 * context.theme.scaling, - color: context.theme.colorScheme.primary, - ), - Text(context.l10n.no_logs_found).muted().small(), - ], - ), - _ => Center(child: Text(error.toString())), - }, - _ => const Center(child: CircularProgressIndicator()), - }, - ), - ); - } -} diff --git a/lib/pages/settings/metadata/metadata_form.dart b/lib/pages/settings/metadata/metadata_form.dart deleted file mode 100644 index b0aeb8bb..00000000 --- a/lib/pages/settings/metadata/metadata_form.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/components/markdown/markdown.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -@RoutePage() -class SettingsMetadataProviderFormPage extends HookConsumerWidget { - final String title; - final List fields; - const SettingsMetadataProviderFormPage({ - super.key, - required this.title, - required this.fields, - }); - - @override - Widget build(BuildContext context, ref) { - final formKey = useMemoized(() => GlobalKey(), []); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(title), - ), - ], - child: FormBuilder( - key: formKey, - child: Center( - child: Container( - padding: const EdgeInsets.all(16), - constraints: const BoxConstraints(maxWidth: 600), - child: CustomScrollView( - shrinkWrap: true, - slivers: [ - SliverToBoxAdapter( - child: Text( - title, - textAlign: TextAlign.center, - style: context.theme.typography.h2, - ), - ), - const SliverGap(24), - SliverList.separated( - itemCount: fields.length, - separatorBuilder: (context, index) => const Gap(12), - itemBuilder: (context, index) { - if (fields[index] is MetadataFormFieldTextObject) { - final field = - fields[index] as MetadataFormFieldTextObject; - return AppMarkdown(data: field.text); - } - - final field = - fields[index] as MetadataFormFieldInputObject; - return FormBuilderField( - name: field.id, - initialValue: field.defaultValue, - validator: FormBuilderValidators.compose([ - if (field.required == true) - FormBuilderValidators.required( - errorText: 'This field is required', - ), - if (field.regex != null) - FormBuilderValidators.match( - RegExp(field.regex!), - errorText: - context.l10n.input_does_not_match_format, - ), - ]), - builder: (formField) { - return Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 4, - children: [ - TextField( - placeholder: field.placeholder == null - ? null - : Text(field.placeholder!), - initialValue: formField.value, - onChanged: (value) { - formField.didChange(value); - }, - obscureText: - field.variant == FormFieldVariant.password, - keyboardType: - field.variant == FormFieldVariant.number - ? TextInputType.number - : TextInputType.text, - features: [ - if (field.variant == - FormFieldVariant.password) - const InputFeature.passwordToggle(), - ], - ), - if (formField.hasError) - Text( - formField.errorText ?? '', - style: const TextStyle( - color: Colors.red, fontSize: 12), - ), - ], - ); - }, - ); - }, - ), - const SliverGap(24), - SliverToBoxAdapter( - child: Button.primary( - onPressed: () { - if (formKey.currentState?.saveAndValidate() != true) { - return; - } - - final data = formKey.currentState!.value.entries - .map((e) => { - "id": e.key, - "value": e.value, - }) - .toList(); - - context.router.maybePop(data); - }, - child: Text(context.l10n.submit), - ), - ), - const SliverGap(200) - ], - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/settings/metadata_plugins.dart b/lib/pages/settings/metadata_plugins.dart deleted file mode 100644 index d4cb1ecf..00000000 --- a/lib/pages/settings/metadata_plugins.dart +++ /dev/null @@ -1,358 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:collection/collection.dart'; -import 'package:file_selector/file_selector.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/form/text_form_field.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/modules/metadata_plugins/installed_plugin.dart'; -import 'package:spotube/modules/metadata_plugins/plugin_repository.dart'; -import 'package:spotube/provider/metadata_plugin/core/repositories.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:file_picker/file_picker.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:sliver_tools/sliver_tools.dart'; - -@RoutePage() -class SettingsMetadataProviderPage extends HookConsumerWidget { - const SettingsMetadataProviderPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final tabState = useState(0); - final formKey = useMemoized(() => GlobalKey(), []); - - final plugins = ref.watch(metadataPluginsProvider); - final pluginsNotifier = ref.watch(metadataPluginsProvider.notifier); - - final pluginReposSnapshot = ref.watch(metadataPluginRepositoriesProvider); - final pluginReposNotifier = - ref.watch(metadataPluginRepositoriesProvider.notifier); - - final pluginRepos = useMemoized( - () { - final installedPluginIds = plugins.asData?.value.plugins - .map((e) => e.repository) - .nonNulls - .toList() ?? - []; - - final pluginRepos = pluginReposSnapshot.asData?.value.items ?? []; - if (installedPluginIds.isEmpty) return pluginRepos; - final availablePlugins = pluginRepos - .whereNot((repo) => installedPluginIds.contains(repo.repoUrl)) - .toList(); - - if (tabState.value != 0) { - // metadata only plugins - return availablePlugins.where( - (d) { - return d.topics.contains( - tabState.value == 1 - ? "spotube-metadata-plugin" - : "spotube-audio-source-plugin", - ); - }, - ).toList(); - } - - return availablePlugins; // all plugins - }, - [ - plugins.asData?.value.plugins, - pluginReposSnapshot.asData?.value, - tabState.value, - ], - ); - - final installedPlugins = useMemoized?>(() { - if (tabState.value == 0) return plugins.asData?.value.plugins; - - return plugins.asData?.value.plugins.where((d) { - return d.abilities.contains( - tabState.value == 1 - ? PluginAbilities.metadata - : PluginAbilities.audioSource, - ); - }).toList(); - }, [tabState.value, plugins.asData?.value]); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.plugins), - ) - ], - child: Padding( - padding: const EdgeInsets.all(8), - child: CustomScrollView( - slivers: [ - SliverToBoxAdapter( - child: Row( - spacing: 8, - children: [ - Expanded( - child: FormBuilder( - key: formKey, - child: TextFormBuilderField( - name: "plugin_url", - validator: FormBuilderValidators.url( - protocols: ["http", "https"]), - placeholder: - Text(context.l10n.paste_plugin_download_url), - ), - ), - ), - HookBuilder(builder: (context) { - final isLoading = useState(false); - - return Tooltip( - tooltip: TooltipContainer( - child: Text(context - .l10n.download_and_install_plugin_from_url), - ).call, - child: IconButton.secondary( - icon: isLoading.value - ? const SizedBox.square( - dimension: 22, - child: - CircularProgressIndicator(strokeWidth: 2), - ) - : const Icon(SpotubeIcons.download), - enabled: !isLoading.value, - onPressed: () async { - try { - if (formKey.currentState?.saveAndValidate() ?? - false) { - final url = formKey.currentState - ?.fields["plugin_url"]?.value as String; - - if (url.isNotEmpty) { - isLoading.value = true; - final pluginConfig = await pluginsNotifier - .downloadAndCachePlugin(url); - - await pluginsNotifier.addPlugin(pluginConfig); - - formKey.currentState?.fields["plugin_url"] - ?.reset(); - } - } - } catch (e, stackTrace) { - AppLogger.reportError(e, stackTrace); - if (context.mounted) { - showToast( - showDuration: const Duration(seconds: 5), - context: context, - builder: (context, overlay) { - return SurfaceCard( - child: Basic( - leading: const Icon( - SpotubeIcons.error, - color: Colors.red, - ), - title: Text( - context.l10n - .failed_to_add_plugin_error( - e.toString()), - ), - ), - ); - }, - ); - } - } finally { - isLoading.value = false; - } - }, - ), - ); - }), - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.upload_plugin_from_file), - ).call, - child: IconButton.primary( - icon: const Icon(SpotubeIcons.upload), - onPressed: () async { - Uint8List bytes; - - if (kIsFlatpak) { - final result = await openFile( - acceptedTypeGroups: [ - const XTypeGroup( - label: 'Spotube Metadata Plugin', - extensions: ['smplug'], - ), - ], - ); - if (result == null) return; - bytes = await result.readAsBytes(); - } else { - final result = await FilePicker.platform.pickFiles( - type: kIsAndroid ? FileType.any : FileType.custom, - allowedExtensions: kIsAndroid ? [] : ["smplug"], - withData: true, - ); - - if (result == null) return; - - final file = result.files.first; - if (file.bytes == null) return; - bytes = file.bytes!; - } - - final pluginConfig = - await pluginsNotifier.extractPluginArchive(bytes); - await pluginsNotifier.addPlugin(pluginConfig); - }, - ), - ), - ], - ), - ), - const SliverGap(12), - SliverToBoxAdapter( - child: TabList( - index: tabState.value, - onChanged: (value) { - tabState.value = value; - }, - children: const [ - TabItem(child: Text("All")), - TabItem(child: Text("Metadata")), - TabItem(child: Text("Audio Source")), - ], - ), - ), - const SliverGap(12), - if (plugins.asData?.value.plugins.isNotEmpty ?? false) - SliverToBoxAdapter( - child: Row( - children: [ - const Gap(8), - Text(context.l10n.installed).h4, - const Gap(8), - const Expanded(child: Divider()), - const Gap(8), - ], - ), - ), - const SliverGap(20), - SliverList.separated( - itemCount: installedPlugins?.length ?? 0, - separatorBuilder: (context, index) => const Gap(12), - itemBuilder: (context, index) { - final plugin = installedPlugins![index]; - final isDefaultMetadata = - plugins.asData!.value.defaultMetadataPluginConfig?.slug == - plugin.slug; - final isDefaultAudioSource = plugins - .asData!.value.defaultAudioSourcePluginConfig?.slug == - plugin.slug; - return MetadataInstalledPluginItem( - plugin: plugin, - isDefaultMetadata: isDefaultMetadata, - isDefaultAudioSource: isDefaultAudioSource, - ); - }, - ), - const SliverGap(12), - SliverToBoxAdapter( - child: Row( - children: [ - const Gap(8), - Text(context.l10n.available_plugins).h4, - const Gap(8), - const Expanded(child: Divider()), - const Gap(8), - ], - ), - ), - const SliverGap(12), - SliverInfiniteList( - isLoading: pluginReposSnapshot.isLoading && - !pluginReposSnapshot.isLoadingNextPage, - itemCount: pluginRepos.length, - onFetchData: pluginReposNotifier.fetchMore, - separatorBuilder: (context, index) { - return const Gap(12); - }, - loadingBuilder: (context) { - return Skeletonizer( - enabled: true, - child: MetadataPluginRepositoryItem( - pluginRepo: MetadataPluginRepository( - name: "Loading...", - description: "Loading...", - repoUrl: "", - owner: "", - topics: [], - ), - ), - ); - }, - itemBuilder: (context, index) { - final pluginRepo = pluginRepos[index]; - - return MetadataPluginRepositoryItem( - pluginRepo: pluginRepo, - ); - }, - ), - const SliverGap(20), - SliverCrossAxisConstrained( - maxCrossAxisExtent: 720, - child: SliverFillRemaining( - hasScrollBody: false, - child: Container( - alignment: Alignment.bottomCenter, - margin: const EdgeInsets.only(bottom: 20), - child: SafeArea( - child: Card( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 12, - children: [ - Row( - spacing: 8, - children: [ - const Icon(SpotubeIcons.warning, size: 16), - Text( - context.l10n.disclaimer, - style: const TextStyle( - fontWeight: FontWeight.bold), - ).bold, - ], - ), - Text(context.l10n.third_party_plugin_dmca_notice) - .muted - .xSmall, - ], - ), - ), - ), - ), - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/settings/scrobbling/scrobbling.dart b/lib/pages/settings/scrobbling/scrobbling.dart deleted file mode 100644 index 9c7f3296..00000000 --- a/lib/pages/settings/scrobbling/scrobbling.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart' - show ListTile, ListTileTheme, ListTileThemeData, Material, MaterialType; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; - -@RoutePage() -class SettingsScrobblingPage extends HookConsumerWidget { - static const name = "settings_scrobbling"; - - const SettingsScrobblingPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - return Material( - type: MaterialType.transparency, - child: ListTileTheme( - data: ListTileThemeData( - contentPadding: EdgeInsets.zero, - minVerticalPadding: 0, - shape: RoundedRectangleBorder( - borderRadius: context.theme.borderRadiusLg, - side: BorderSide( - color: context.theme.colorScheme.border, - width: .5, - ), - ), - textColor: context.theme.colorScheme.foreground, - iconColor: context.theme.colorScheme.foreground, - selectedColor: context.theme.colorScheme.accent, - subtitleTextStyle: context.theme.typography.xSmall, - ), - child: SafeArea( - bottom: false, - child: Scaffold( - headers: [TitleBar(title: Text(context.l10n.scrobbling))], - child: ListView( - padding: const EdgeInsets.all(8), - children: [ - Card( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: ListTile( - leading: const Icon(SpotubeIcons.lastFm, color: Colors.red), - title: Text(context.l10n.login_with_lastfm), - subtitle: Text(context.l10n.scrobble_to_lastfm), - trailing: Button.secondary( - leading: const Icon(SpotubeIcons.lastFm), - onPressed: () { - context.navigateTo(const LastFMLoginRoute()); - }, - child: Text(context.l10n.connect), - ), - ), - ), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/settings/sections/about.dart b/lib/pages/settings/sections/about.dart deleted file mode 100644 index 82c98e90..00000000 --- a/lib/pages/settings/sections/about.dart +++ /dev/null @@ -1,99 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/material.dart' show ListTile; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide ButtonStyle; -import 'package:spotube/collections/env.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/components/adaptive/adaptive_list_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -class SettingsAboutSection extends HookConsumerWidget { - const SettingsAboutSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - - return SectionCardWithHeading( - heading: context.l10n.about, - children: [ - if (!Env.hideDonations) - AdaptiveListTile( - leading: const Icon( - SpotubeIcons.heart, - color: Colors.pink, - ), - title: SizedBox( - height: 50, - width: 200, - child: Align( - alignment: Alignment.centerLeft, - child: AutoSizeText( - context.l10n.u_love_spotube, - maxLines: 1, - style: const TextStyle( - color: Colors.pink, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - trailing: (context, update) => Button( - style: ButtonVariance.primary.copyWith( - decoration: (context, states, value) { - final decoration = ButtonVariance.primary - .decoration(context, states) as BoxDecoration; - - if (states.contains(WidgetState.hovered)) { - return decoration.copyWith(color: Colors.pink[400]); - } else if (states.contains(WidgetState.focused)) { - return decoration.copyWith(color: Colors.pink[300]); - } else if (states.isNotEmpty) { - return decoration; - } - - return decoration.copyWith(color: Colors.pink); - }, - textStyle: (context, states, value) => ButtonVariance.primary - .textStyle(context, states) - .copyWith(color: Colors.white), - ), - onPressed: () { - launchUrlString( - "https://opencollective.com/spotube", - mode: LaunchMode.externalApplication, - ); - }, - leading: const Icon(SpotubeIcons.heart), - child: Text(context.l10n.please_sponsor), - ), - ), - if (Env.enableUpdateChecker) - ListTile( - leading: const Icon(SpotubeIcons.update), - title: Text(context.l10n.check_for_updates), - trailing: Switch( - value: preferences.checkUpdate, - onChanged: (checked) => - preferencesNotifier.setCheckUpdate(checked), - ), - ), - ListTile( - leading: const Icon(SpotubeIcons.info), - title: Text(context.l10n.about_spotube), - trailing: const Icon(SpotubeIcons.angleRight), - onTap: () { - context.navigateTo(const AboutSpotubeRoute()); - }, - ) - ], - ); - } -} diff --git a/lib/pages/settings/sections/accounts.dart b/lib/pages/settings/sections/accounts.dart deleted file mode 100644 index ca859ada..00000000 --- a/lib/pages/settings/sections/accounts.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart' show ListTile; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/scrobbler/scrobbler.dart'; - -class SettingsAccountSection extends HookConsumerWidget { - const SettingsAccountSection({super.key}); - - @override - Widget build(context, ref) { - final scrobbler = ref.watch(scrobblerProvider); - - return SectionCardWithHeading( - heading: context.l10n.account, - children: [ - ListTile( - leading: const Icon(SpotubeIcons.extensions), - title: Text(context.l10n.plugins), - subtitle: Text(context.l10n.configure_plugins), - onTap: () { - context.pushRoute(const SettingsMetadataProviderRoute()); - }, - trailing: const Icon(SpotubeIcons.angleRight), - ), - if (scrobbler.asData?.value == null) - ListTile( - leading: const Icon(SpotubeIcons.music), - title: Text(context.l10n.audio_scrobblers), - onTap: () { - context.pushRoute(const SettingsScrobblingRoute()); - }, - trailing: const Icon(SpotubeIcons.angleRight), - ) - else - ListTile( - leading: const Icon(SpotubeIcons.lastFm), - title: Text(context.l10n.disconnect_lastfm), - trailing: Button.destructive( - onPressed: () { - ref.read(scrobblerProvider.notifier).logout(); - }, - child: Text(context.l10n.disconnect), - ), - ), - ], - ); - } -} diff --git a/lib/pages/settings/sections/appearance.dart b/lib/pages/settings/sections/appearance.dart deleted file mode 100644 index 88f39a25..00000000 --- a/lib/pages/settings/sections/appearance.dart +++ /dev/null @@ -1,132 +0,0 @@ -import 'package:flutter/material.dart' show ListTile; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/modules/settings/color_scheme_picker_dialog.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/components/adaptive/adaptive_select_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class SettingsAppearanceSection extends HookConsumerWidget { - final bool isGettingStarted; - const SettingsAppearanceSection({ - super.key, - this.isGettingStarted = false, - }); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - final pickColorScheme = useCallback(() { - return () => showDialog( - context: context, - builder: (context) { - return const ColorSchemePickerDialog(); - }); - }, []); - - final children = [ - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.dashboard), - title: Text(context.l10n.layout_mode), - subtitle: Text(context.l10n.override_layout_settings), - value: preferences.layoutMode, - onChanged: (value) { - if (value != null) { - preferencesNotifier.setLayoutMode(value); - } - }, - options: [ - SelectItemButton( - value: LayoutMode.adaptive, - child: Text(context.l10n.adaptive), - ), - SelectItemButton( - value: LayoutMode.compact, - child: Text(context.l10n.compact), - ), - SelectItemButton( - value: LayoutMode.extended, - child: Text(context.l10n.extended), - ), - ], - ), - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.darkMode), - title: Text(context.l10n.theme), - value: preferences.themeMode, - options: [ - SelectItemButton( - value: ThemeMode.dark, - child: Text(context.l10n.dark), - ), - SelectItemButton( - value: ThemeMode.light, - child: Text(context.l10n.light), - ), - SelectItemButton( - value: ThemeMode.system, - child: Text(context.l10n.system), - ), - ], - onChanged: (value) { - if (value != null) { - preferencesNotifier.setThemeMode(value); - } - }, - ), - // ListTile( - // leading: const Icon(SpotubeIcons.amoled), - // title: Text(context.l10n.use_amoled_mode), - // subtitle: Text(context.l10n.pitch_dark_theme), - // trailing: Switch( - // value: preferences.amoledDarkTheme, - // onChanged: preferencesNotifier.setAmoledDarkTheme, - // )), - ListTile( - leading: const Icon(SpotubeIcons.palette), - title: Text(context.l10n.accent_color), - contentPadding: const EdgeInsets.symmetric( - horizontal: 15, - vertical: 5, - ), - trailing: ColorChip( - color: preferences.accentColorScheme, - name: preferences.accentColorScheme.name, - onPressed: pickColorScheme(), - isActive: false, - ), - onTap: pickColorScheme(), - ), - // ListTile( - // leading: const Icon(SpotubeIcons.colorSync), - // title: Text(context.l10n.sync_album_color), - // subtitle: Text(context.l10n.sync_album_color_description), - // trailing: Switch( - // value: preferences.albumColorSync, - // onChanged: preferencesNotifier.setAlbumColorSync, - // )), - ]; - - if (isGettingStarted) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - for (final child in children) ...[ - child, - const Gap(16), - ], - ], - ); - } - - return SectionCardWithHeading( - heading: context.l10n.appearance, - children: children, - ); - } -} diff --git a/lib/pages/settings/sections/desktop.dart b/lib/pages/settings/sections/desktop.dart deleted file mode 100644 index ad45c689..00000000 --- a/lib/pages/settings/sections/desktop.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:flutter/material.dart' show ListTile; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/components/adaptive/adaptive_select_tile.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -class SettingsDesktopSection extends HookConsumerWidget { - const SettingsDesktopSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - - return SectionCardWithHeading( - heading: context.l10n.desktop, - children: [ - const Gap(10), - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.close), - title: Text(context.l10n.close_behavior), - value: preferences.closeBehavior, - options: [ - SelectItemButton( - value: CloseBehavior.close, - child: Text(context.l10n.close), - ), - SelectItemButton( - value: CloseBehavior.minimizeToTray, - child: Text(context.l10n.minimize_to_tray), - ), - ], - onChanged: (value) { - if (value != null) { - preferencesNotifier.setCloseBehavior(value); - } - }, - ), - ListTile( - leading: const Icon(SpotubeIcons.tray), - title: Text(context.l10n.show_tray_icon), - trailing: Switch( - value: preferences.showSystemTrayIcon, - onChanged: preferencesNotifier.setShowSystemTrayIcon, - ), - ), - ListTile( - leading: const Icon(SpotubeIcons.window), - title: Text(context.l10n.use_system_title_bar), - trailing: Switch( - value: preferences.systemTitleBar, - onChanged: preferencesNotifier.setSystemTitleBar, - ), - ), - ListTile( - leading: const Icon(SpotubeIcons.discord), - title: Text(context.l10n.discord_rich_presence), - trailing: Switch( - value: preferences.discordPresence, - onChanged: preferencesNotifier.setDiscordPresence, - ), - ), - ], - ); - } -} diff --git a/lib/pages/settings/sections/developers.dart b/lib/pages/settings/sections/developers.dart deleted file mode 100644 index 0862e023..00000000 --- a/lib/pages/settings/sections/developers.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart' show ListTile; -import 'package:flutter_hooks/flutter_hooks.dart'; - -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/extensions/context.dart'; - -class SettingsDevelopersSection extends HookWidget { - const SettingsDevelopersSection({super.key}); - - @override - Widget build(BuildContext context) { - return SectionCardWithHeading( - heading: context.l10n.developers, - children: [ - ListTile( - leading: const Icon(SpotubeIcons.logs), - title: Text(context.l10n.logs), - trailing: const Icon(SpotubeIcons.angleRight), - onTap: () { - context.navigateTo(const LogsRoute()); - }, - ) - ], - ); - } -} diff --git a/lib/pages/settings/sections/downloads.dart b/lib/pages/settings/sections/downloads.dart deleted file mode 100644 index 516d2aca..00000000 --- a/lib/pages/settings/sections/downloads.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:file_picker/file_picker.dart'; -import 'package:file_selector/file_selector.dart'; -import 'package:flutter/material.dart' show ListTile; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; - -class SettingsDownloadsSection extends HookConsumerWidget { - const SettingsDownloadsSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - final preferences = ref.watch(userPreferencesProvider); - - final pickDownloadLocation = useCallback(() async { - if (kIsMobile || kIsMacOS) { - final dirStr = await FilePicker.platform.getDirectoryPath( - initialDirectory: preferences.downloadLocation, - ); - if (dirStr == null) return; - preferencesNotifier.setDownloadLocation(dirStr); - } else { - String? dirStr = await getDirectoryPath( - initialDirectory: preferences.downloadLocation, - ); - if (dirStr == null) return; - preferencesNotifier.setDownloadLocation(dirStr); - } - }, [preferences.downloadLocation]); - - return SectionCardWithHeading( - heading: context.l10n.downloads, - children: [ - ListTile( - leading: const Icon(SpotubeIcons.download), - title: Text(context.l10n.download_location), - subtitle: Text(preferences.downloadLocation), - trailing: IconButton.secondary( - onPressed: pickDownloadLocation, - icon: const Icon(SpotubeIcons.folder), - ), - onTap: pickDownloadLocation, - ), - ], - ); - } -} diff --git a/lib/pages/settings/sections/language_region.dart b/lib/pages/settings/sections/language_region.dart deleted file mode 100644 index 920b0df7..00000000 --- a/lib/pages/settings/sections/language_region.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/language_codes.dart'; -import 'package:spotube/collections/markets.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/models/metadata/market.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/components/adaptive/adaptive_select_tile.dart'; -import 'package:spotube/extensions/constrains.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/l10n/l10n.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -final localWithName = L10n.all.map((e) { - final isoCodeName = - LanguageLocals.getDisplayLanguage(e.languageCode, e.countryCode); - return ( - locale: e, - name: "${isoCodeName.name} (${isoCodeName.nativeName})", - ); -}).sortedBy((e) => e.name); - -class SettingsLanguageRegionSection extends HookConsumerWidget { - const SettingsLanguageRegionSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - final mediaQuery = MediaQuery.of(context); - - return SectionCardWithHeading( - heading: context.l10n.language_region, - children: [ - AdaptiveSelectTile( - value: preferences.locale, - onChanged: (locale) { - if (locale == null) return; - preferencesNotifier.setLocale(locale); - }, - title: Text(context.l10n.language), - secondary: const Icon(SpotubeIcons.language), - options: [ - SelectItemButton( - value: const Locale("system", "system"), - child: Text(context.l10n.system_default), - ), - for (final (:locale, :name) in localWithName) - SelectItemButton(value: locale, child: Text(name)), - ], - ), - AdaptiveSelectTile( - breakLayout: mediaQuery.lgAndUp, - secondary: const Icon(SpotubeIcons.shoppingBag), - title: Text(context.l10n.market_place_region), - subtitle: Text(context.l10n.recommendation_country), - value: preferences.market, - onChanged: (value) { - if (value == null) return; - preferencesNotifier.setRecommendationMarket(value); - }, - options: marketsMap - .map( - (country) => SelectItemButton( - value: country.$1, - child: Text(country.$2), - ), - ) - .toList(), - ), - ], - ); - } -} diff --git a/lib/pages/settings/sections/playback.dart b/lib/pages/settings/sections/playback.dart deleted file mode 100644 index 0a29c991..00000000 --- a/lib/pages/settings/sections/playback.dart +++ /dev/null @@ -1,217 +0,0 @@ -import 'dart:io'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart' show ListTile; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/adaptive/adaptive_select_tile.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/modules/settings/playback/edit_connect_port_dialog.dart'; -import 'package:spotube/modules/settings/section_card_with_heading.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/modules/settings/youtube_engine_not_installed_dialog.dart'; -import 'package:spotube/provider/metadata_plugin/audio_source/quality_presets.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:spotube/services/youtube_engine/yt_dlp_engine.dart'; - -import 'package:spotube/utils/platform.dart'; - -class SettingsPlaybackSection extends HookConsumerWidget { - const SettingsPlaybackSection({super.key}); - - @override - Widget build(BuildContext context, ref) { - final preferences = ref.watch(userPreferencesProvider); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - final sourcePresets = ref.watch(audioSourcePresetsProvider); - final sourcePresetsNotifier = - ref.watch(audioSourcePresetsProvider.notifier); - final theme = Theme.of(context); - - return SectionCardWithHeading( - heading: context.l10n.playback, - children: [ - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.engine), - title: Text(context.l10n.youtube_engine), - value: preferences.youtubeClientEngine, - options: YoutubeClientEngine.values - .where((e) => e.isAvailableForPlatform()) - .map((e) => SelectItemButton( - value: e, - child: Text(e.label), - )) - .toList(), - onChanged: (value) async { - if (value == null) return; - if (value == YoutubeClientEngine.ytDlp) { - final customPath = KVStoreService.getYoutubeEnginePath(value); - if (!await YtDlpEngine.isInstalled() && - (customPath == null || !await File(customPath).exists()) && - context.mounted) { - final hasInstalled = await showDialog( - context: context, - builder: (context) => - YouTubeEngineNotInstalledDialog(engine: value), - ); - if (hasInstalled != true) return; - } - } - preferencesNotifier.setYoutubeClientEngine(value); - }, - ), - if (sourcePresets.presets.isNotEmpty) ...[ - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.plugin), - title: Text(context.l10n.streaming_music_format), - value: sourcePresets.selectedStreamingContainerIndex, - options: [ - for (final MapEntry(:key, value: preset) - in sourcePresets.presets.asMap().entries) - SelectItemButton(value: key, child: Text(preset.name)), - ], - onChanged: (value) { - if (value == null) return; - sourcePresetsNotifier.setSelectedStreamingContainerIndex(value); - }, - ), - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.audioQuality), - title: Text(context.l10n.streaming_music_quality), - value: sourcePresets.selectedStreamingQualityIndex, - options: [ - for (final MapEntry(:key, value: quality) in sourcePresets - .presets[sourcePresets.selectedStreamingContainerIndex] - .qualities - .asMap() - .entries) - SelectItemButton(value: key, child: Text(quality.toString())), - ], - onChanged: (value) { - if (value == null) return; - sourcePresetsNotifier.setSelectedStreamingQualityIndex(value); - }, - ), - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.plugin), - title: Text(context.l10n.download_music_format), - value: sourcePresets.selectedDownloadingContainerIndex, - options: [ - for (final MapEntry(:key, value: preset) - in sourcePresets.presets.asMap().entries) - SelectItemButton(value: key, child: Text(preset.name)), - ], - onChanged: (value) { - if (value == null) return; - sourcePresetsNotifier.setSelectedDownloadingContainerIndex(value); - }, - ), - AdaptiveSelectTile( - secondary: const Icon(SpotubeIcons.audioQuality), - title: Text(context.l10n.download_music_quality), - value: sourcePresets.selectedStreamingQualityIndex, - options: [ - for (final MapEntry(:key, value: quality) in sourcePresets - .presets[sourcePresets.selectedDownloadingContainerIndex] - .qualities - .asMap() - .entries) - SelectItemButton(value: key, child: Text(quality.toString())), - ], - onChanged: (value) { - if (value == null) return; - sourcePresetsNotifier.setSelectedStreamingQualityIndex(value); - }, - ), - ], - ListTile( - title: Text(context.l10n.cache_music), - subtitle: kIsMobile - ? null - : Text.rich( - TextSpan( - children: [ - TextSpan(text: "${context.l10n.open} "), - TextSpan( - text: context.l10n.cache_folder.toLowerCase(), - recognizer: TapGestureRecognizer() - ..onTap = preferencesNotifier.openCacheFolder, - style: theme.typography.normal.copyWith( - color: theme.colorScheme.primary, - decoration: TextDecoration.underline, - ), - ) - ], - ), - ), - leading: const Icon(SpotubeIcons.cache), - trailing: Switch( - value: preferences.cacheMusic, - onChanged: preferencesNotifier.setCacheMusic, - ), - ), - ListTile( - leading: const Icon(SpotubeIcons.playlistRemove), - title: Text(context.l10n.blacklist), - subtitle: Text(context.l10n.blacklist_description), - onTap: () { - context.navigateTo(const BlackListRoute()); - }, - trailing: const Icon(SpotubeIcons.angleRight), - ), - ListTile( - leading: const Icon(SpotubeIcons.normalize), - title: Text(context.l10n.normalize_audio), - trailing: Switch( - value: preferences.normalizeAudio, - onChanged: preferencesNotifier.setNormalizeAudio, - ), - ), - ListTile( - leading: const Icon(SpotubeIcons.repeat), - title: Text(context.l10n.endless_playback), - trailing: Switch( - value: preferences.endlessPlayback, - onChanged: preferencesNotifier.setEndlessPlayback, - )), - ListTile( - title: Text(context.l10n.enable_connect), - subtitle: Text(context.l10n.enable_connect_description), - leading: const Icon(SpotubeIcons.connect), - trailing: Row( - mainAxisSize: MainAxisSize.min, - spacing: 10, - children: [ - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.edit_port), - ).call, - child: IconButton.outline( - icon: const Icon(SpotubeIcons.edit), - size: ButtonSize.small, - onPressed: () { - showDialog( - context: context, - barrierColor: Colors.black.withValues(alpha: 0.5), - builder: (context) => - const SettingsPlaybackEditConnectPortDialog(), - ); - }, - ), - ), - Switch( - value: preferences.enableConnect, - onChanged: preferencesNotifier.setEnableConnect, - ), - ], - ), - ), - ], - ); - } -} diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart deleted file mode 100644 index 0948bdeb..00000000 --- a/lib/pages/settings/settings.dart +++ /dev/null @@ -1,76 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart' show Material, MaterialType; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/pages/settings/sections/about.dart'; -import 'package:spotube/pages/settings/sections/accounts.dart'; -import 'package:spotube/pages/settings/sections/appearance.dart'; -import 'package:spotube/pages/settings/sections/desktop.dart'; -import 'package:spotube/pages/settings/sections/developers.dart'; -import 'package:spotube/pages/settings/sections/downloads.dart'; -import 'package:spotube/pages/settings/sections/language_region.dart'; -import 'package:spotube/pages/settings/sections/playback.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class SettingsPage extends HookConsumerWidget { - static const name = "settings"; - - const SettingsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final controller = useScrollController(); - final preferencesNotifier = ref.watch(userPreferencesProvider.notifier); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.settings), - ) - ], - child: Scrollbar( - controller: controller, - child: Center( - child: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 1366), - child: ScrollConfiguration( - behavior: const ScrollBehavior().copyWith(scrollbars: false), - child: Material( - type: MaterialType.transparency, - child: ListView( - controller: controller, - children: [ - const SettingsAccountSection(), - const SettingsLanguageRegionSection(), - const SettingsAppearanceSection(), - const SettingsPlaybackSection(), - const SettingsDownloadsSection(), - if (kIsDesktop) const SettingsDesktopSection(), - if (!kIsWeb) const SettingsDevelopersSection(), - const SettingsAboutSection(), - Center( - child: Button.destructive( - onPressed: preferencesNotifier.reset, - child: Text(context.l10n.restore_defaults), - ), - ), - const SizedBox(height: 200), - ], - ), - ), - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/stats/albums/albums.dart b/lib/pages/stats/albums/albums.dart deleted file mode 100644 index 363e7962..00000000 --- a/lib/pages/stats/albums/albums.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/common/album_item.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/albums.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsAlbumsPage extends HookConsumerWidget { - static const name = "stats_albums"; - const StatsAlbumsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final topAlbums = - ref.watch(historyTopAlbumsProvider(HistoryDuration.allTime)); - final topAlbumsNotifier = - ref.watch(historyTopAlbumsProvider(HistoryDuration.allTime).notifier); - - final albumsData = topAlbums.asData?.value.items ?? []; - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.albums), - ) - ], - child: Skeletonizer( - enabled: topAlbums.isLoading && !topAlbums.isLoadingNextPage, - child: InfiniteList( - onFetchData: () async { - await topAlbumsNotifier.fetchMore(); - }, - hasError: topAlbums.hasError, - isLoading: topAlbums.isLoading && !topAlbums.isLoadingNextPage, - hasReachedMax: topAlbums.asData?.value.hasMore ?? true, - itemCount: albumsData.length, - itemBuilder: (context, index) { - final album = albumsData[index]; - return StatsAlbumItem( - album: album.album, - info: Text(context.l10n - .count_plays(compactNumberFormatter.format(album.count))), - ); - }, - ), - ), - ), - ); - } -} diff --git a/lib/pages/stats/artists/artists.dart b/lib/pages/stats/artists/artists.dart deleted file mode 100644 index 340f7b4b..00000000 --- a/lib/pages/stats/artists/artists.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/common/artist_item.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsArtistsPage extends HookConsumerWidget { - static const name = "stats_artists"; - const StatsArtistsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final topTracks = ref.watch( - historyTopTracksProvider(HistoryDuration.allTime), - ); - final topTracksNotifier = - ref.watch(historyTopTracksProvider(HistoryDuration.allTime).notifier); - - final artistsData = useMemoized( - () => topTracksNotifier.artists, - [topTracks.asData?.value], - ); - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.artists), - ) - ], - child: Skeletonizer( - enabled: topTracks.isLoading && !topTracks.isLoadingNextPage, - child: InfiniteList( - onFetchData: () async { - await topTracksNotifier.fetchMore(); - }, - hasError: topTracks.hasError, - isLoading: topTracks.isLoading && !topTracks.isLoadingNextPage, - hasReachedMax: topTracks.asData?.value.hasMore ?? true, - itemCount: artistsData.length, - itemBuilder: (context, index) { - final artist = artistsData[index]; - return StatsArtistItem( - artist: artist.artist, - info: Text(context.l10n - .count_plays(compactNumberFormatter.format(artist.count))), - ); - }, - ), - ), - ), - ); - } -} diff --git a/lib/pages/stats/fees/fees.dart b/lib/pages/stats/fees/fees.dart deleted file mode 100644 index 15b93057..00000000 --- a/lib/pages/stats/fees/fees.dart +++ /dev/null @@ -1,140 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:sliver_tools/sliver_tools.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/common/artist_item.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsStreamFeesPage extends HookConsumerWidget { - static const name = "stats_stream_fees"; - - const StatsStreamFeesPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final duration = useState(HistoryDuration.days30); - - final topTracks = ref.watch( - historyTopTracksProvider(duration.value), - ); - final topTracksNotifier = - ref.watch(historyTopTracksProvider(duration.value).notifier); - - final artistsData = useMemoized( - () => topTracksNotifier.artists, - [topTracks.asData?.value], - ); - - final total = useMemoized( - () => artistsData.fold( - 0, - (previousValue, element) => previousValue + element.count * 0.005, - ), - [artistsData], - ); - - final translations = { - HistoryDuration.days7: context.l10n.this_week, - HistoryDuration.days30: context.l10n.this_month, - HistoryDuration.months6: context.l10n.last_6_months, - HistoryDuration.year: context.l10n.this_year, - HistoryDuration.years2: context.l10n.last_2_years, - HistoryDuration.allTime: context.l10n.all_time, - }; - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.streaming_fees_hypothetical), - ) - ], - child: CustomScrollView( - slivers: [ - SliverCrossAxisConstrained( - maxCrossAxisExtent: 600, - alignment: -1, - child: SliverPadding( - padding: const EdgeInsets.all(16.0), - sliver: SliverToBoxAdapter( - child: Text( - context.l10n.hipotetical_calculation, - ).small().muted(), - ), - ), - ), - SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - context.l10n.total_money(usdFormatter.format(total)), - ).semiBold().large(), - Select( - value: duration.value, - onChanged: (value) { - if (value == null) return; - duration.value = value; - }, - itemBuilder: (context, value) => - Text(translations[value]!), - constraints: const BoxConstraints(maxWidth: 150), - popupWidthConstraint: PopoverConstraint.anchorMaxSize, - popup: SelectPopup( - items: SelectItemBuilder( - childCount: translations.length, - builder: (context, index) { - final entry = translations.entries.elementAt(index); - return SelectItemButton( - value: entry.key, - child: Text(entry.value), - ); - }, - ), - ).call, - ), - ], - ), - ), - ), - SliverSafeArea( - sliver: Skeletonizer.sliver( - enabled: topTracks.isLoading && !topTracks.isLoadingNextPage, - child: SliverInfiniteList( - onFetchData: () async { - await topTracksNotifier.fetchMore(); - }, - hasError: topTracks.hasError, - isLoading: - topTracks.isLoading && !topTracks.isLoadingNextPage, - hasReachedMax: topTracks.asData?.value.hasMore ?? true, - itemCount: artistsData.length, - itemBuilder: (context, index) { - final artist = artistsData[index]; - return StatsArtistItem( - artist: artist.artist, - info: Text(usdFormatter.format(artist.count * 0.005)), - ); - }, - ), - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/pages/stats/minutes/minutes.dart b/lib/pages/stats/minutes/minutes.dart deleted file mode 100644 index a6c95992..00000000 --- a/lib/pages/stats/minutes/minutes.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/common/track_item.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsMinutesPage extends HookConsumerWidget { - static const name = "stats_minutes"; - - const StatsMinutesPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final topTracks = ref.watch( - historyTopTracksProvider(HistoryDuration.allTime), - ); - final topTracksNotifier = - ref.watch(historyTopTracksProvider(HistoryDuration.allTime).notifier); - - final tracksData = topTracks.asData?.value.items ?? []; - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.minutes_listened), - ) - ], - child: Skeletonizer( - enabled: topTracks.isLoading && !topTracks.isLoadingNextPage, - child: InfiniteList( - separatorBuilder: (context, index) => const Gap(8), - onFetchData: () async { - await topTracksNotifier.fetchMore(); - }, - hasError: topTracks.hasError, - isLoading: topTracks.isLoading && !topTracks.isLoadingNextPage, - hasReachedMax: topTracks.asData?.value.hasMore ?? true, - itemCount: tracksData.length, - itemBuilder: (context, index) { - final track = tracksData[index]; - return StatsTrackItem( - track: track.track, - info: Text( - context.l10n.count_mins( - compactNumberFormatter.format( - track.count * - Duration(milliseconds: track.track.durationMs) - .inMinutes, - ), - ), - ), - ); - }, - ), - ), - ), - ); - } -} diff --git a/lib/pages/stats/playlists/playlists.dart b/lib/pages/stats/playlists/playlists.dart deleted file mode 100644 index 369066f7..00000000 --- a/lib/pages/stats/playlists/playlists.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/common/playlist_item.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsPlaylistsPage extends HookConsumerWidget { - static const name = "stats_playlists"; - const StatsPlaylistsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final topPlaylists = - ref.watch(historyTopPlaylistsProvider(HistoryDuration.allTime)); - - final topPlaylistsNotifier = ref - .watch(historyTopPlaylistsProvider(HistoryDuration.allTime).notifier); - - final playlistsData = topPlaylists.asData?.value.items ?? []; - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.playlists), - ) - ], - child: Skeletonizer( - enabled: topPlaylists.isLoading && !topPlaylists.isLoadingNextPage, - child: InfiniteList( - onFetchData: () async { - await topPlaylistsNotifier.fetchMore(); - }, - hasError: topPlaylists.hasError, - isLoading: - topPlaylists.isLoading && !topPlaylists.isLoadingNextPage, - hasReachedMax: topPlaylists.asData?.value.hasMore ?? true, - itemCount: playlistsData.length, - itemBuilder: (context, index) { - final playlist = playlistsData[index]; - return StatsPlaylistItem( - playlist: playlist.playlist, - info: Text( - context.l10n.count_plays( - compactNumberFormatter.format(playlist.count)), - ), - ); - }, - ), - ), - ), - ); - } -} diff --git a/lib/pages/stats/stats.dart b/lib/pages/stats/stats.dart deleted file mode 100644 index da7c64f3..00000000 --- a/lib/pages/stats/stats.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/summary/summary.dart'; -import 'package:spotube/modules/stats/top/top.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsPage extends HookConsumerWidget { - static const name = "stats"; - - const StatsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - return PopScope( - canPop: false, - onPopInvokedWithResult: (didPop, result) { - context.navigateTo(const HomeRoute()); - }, - child: SafeArea( - bottom: false, - child: Scaffold( - headers: [ - if (kTitlebarVisible) - const TitleBar(automaticallyImplyLeading: false), - ], - child: CustomScrollView( - slivers: [ - if (kIsMacOS) const SliverGap(20), - const StatsPageSummarySection(), - const StatsPageTopSection(), - const SliverToBoxAdapter( - child: SafeArea( - child: SizedBox(), - ), - ) - ], - ), - ), - ), - ); - } -} diff --git a/lib/pages/stats/streams/streams.dart b/lib/pages/stats/streams/streams.dart deleted file mode 100644 index b2cc671d..00000000 --- a/lib/pages/stats/streams/streams.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/formatters.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/modules/stats/common/track_item.dart'; -import 'package:spotube/extensions/context.dart'; - -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/history/top/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:very_good_infinite_list/very_good_infinite_list.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class StatsStreamsPage extends HookConsumerWidget { - static const name = "stats_streams"; - - const StatsStreamsPage({super.key}); - - @override - Widget build(BuildContext context, ref) { - final topTracks = ref.watch( - historyTopTracksProvider(HistoryDuration.allTime), - ); - final topTracksNotifier = - ref.watch(historyTopTracksProvider(HistoryDuration.allTime).notifier); - - final tracksData = topTracks.asData?.value.items ?? []; - - return SafeArea( - bottom: false, - child: Scaffold( - headers: [ - TitleBar( - title: Text(context.l10n.streamed_songs), - ) - ], - child: Skeletonizer( - enabled: topTracks.isLoading && !topTracks.isLoadingNextPage, - child: InfiniteList( - separatorBuilder: (context, index) => const Gap(8), - onFetchData: () async { - await topTracksNotifier.fetchMore(); - }, - hasError: topTracks.hasError, - isLoading: topTracks.isLoading && !topTracks.isLoadingNextPage, - hasReachedMax: topTracks.asData?.value.hasMore ?? true, - itemCount: tracksData.length, - itemBuilder: (context, index) { - final track = tracksData[index]; - return StatsTrackItem( - track: track.track, - info: Text( - context.l10n - .count_plays(compactNumberFormatter.format(track.count)), - ), - ); - }, - ), - ), - ), - ); - } -} diff --git a/lib/pages/track/track.dart b/lib/pages/track/track.dart deleted file mode 100644 index 44453ebd..00000000 --- a/lib/pages/track/track.dart +++ /dev/null @@ -1,257 +0,0 @@ -import 'dart:ui'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:skeletonizer/skeletonizer.dart'; -import 'package:spotube/collections/fake.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/components/heart_button/heart_button.dart'; -import 'package:spotube/components/image/universal_image.dart'; -import 'package:spotube/components/links/artist_link.dart'; -import 'package:spotube/components/links/link_text.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/components/track_tile/track_options_button.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/extensions/list.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/track.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; - -import 'package:spotube/extensions/constrains.dart'; -import 'package:auto_route/auto_route.dart'; - -@RoutePage() -class TrackPage extends HookConsumerWidget { - static const name = "track"; - - final String trackId; - const TrackPage({ - super.key, - @PathParam("id") required this.trackId, - }); - - @override - Widget build(BuildContext context, ref) { - final ThemeData(:typography, :colorScheme) = Theme.of(context); - final mediaQuery = MediaQuery.of(context); - - final playlist = ref.watch(audioPlayerProvider); - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - - final isActive = playlist.activeTrack?.id == trackId; - - final trackQuery = ref.watch(metadataPluginTrackProvider(trackId)); - - final track = trackQuery.asData?.value ?? FakeData.track; - - void onPlay() async { - if (isActive) { - audioPlayer.pause(); - } else { - await playlistNotifier.load([track], autoPlay: true); - } - } - - return SafeArea( - bottom: false, - child: Scaffold( - headers: const [ - TitleBar( - backgroundColor: Colors.transparent, - surfaceBlur: 0, - ) - ], - floatingHeader: true, - child: Stack( - children: [ - Positioned.fill( - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: UniversalImage.imageProvider( - track.album.images.asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - ), - fit: BoxFit.cover, - colorFilter: ColorFilter.mode( - colorScheme.background.withValues(alpha: 0.5), - BlendMode.srcOver, - ), - alignment: Alignment.topCenter, - ), - ), - ), - ), - Positioned.fill( - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), - child: Skeletonizer( - enabled: trackQuery.isLoading, - child: Container( - alignment: Alignment.topCenter, - decoration: BoxDecoration( - gradient: LinearGradient( - colors: [ - colorScheme.background, - Colors.transparent, - ], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - stops: const [0.2, 1], - ), - ), - child: SafeArea( - child: Wrap( - spacing: 20, - runSpacing: 20, - alignment: WrapAlignment.center, - crossAxisAlignment: WrapCrossAlignment.center, - runAlignment: WrapAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only(top: 20), - child: ClipRRect( - borderRadius: BorderRadius.circular(10), - child: UniversalImage( - path: track.album.images.asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - height: 200, - width: 200, - ), - ), - ), - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16.0), - child: Column( - crossAxisAlignment: mediaQuery.smAndDown - ? CrossAxisAlignment.center - : CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - track.name, - ).large().semiBold(), - const Gap(10), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(SpotubeIcons.album), - const Gap(5), - Flexible( - child: LinkText( - track.album.name, - AlbumRoute( - id: track.album.id, - album: track.album, - ), - push: true, - ), - ), - ], - ), - const Gap(10), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(SpotubeIcons.artist), - const Gap(5), - Flexible( - child: ArtistLink( - artists: track.artists, - hideOverflowArtist: false, - ), - ), - ], - ), - const Gap(10), - ConstrainedBox( - constraints: - const BoxConstraints(maxWidth: 350), - child: Row( - mainAxisSize: mediaQuery.smAndDown - ? MainAxisSize.max - : MainAxisSize.min, - children: [ - const Gap(5), - if (!isActive && - !playlist.tracks - .containsBy(track, (t) => t.id)) - Button.outline( - leading: - const Icon(SpotubeIcons.queueAdd), - child: Text(context.l10n.queue), - onPressed: () { - playlistNotifier.addTrack(track); - }, - ), - const Gap(5), - if (!isActive && - !playlist.tracks - .containsBy(track, (t) => t.id)) - Tooltip( - tooltip: TooltipContainer( - child: Text(context.l10n.play_next), - ).call, - child: IconButton.outline( - icon: const Icon( - SpotubeIcons.lightning), - onPressed: () { - playlistNotifier - .addTracksAtFirst([track]); - }, - ), - ), - const Gap(5), - Tooltip( - tooltip: TooltipContainer( - child: Text( - isActive - ? context.l10n.pause_playback - : context.l10n.play, - ), - ).call, - child: IconButton.primary( - shape: ButtonShape.circle, - icon: Icon( - isActive - ? SpotubeIcons.pause - : SpotubeIcons.play, - ), - onPressed: onPlay, - ), - ), - const Gap(5), - if (mediaQuery.smAndDown) - const Spacer() - else - const Gap(20), - TrackHeartButton(track: track), - TrackOptionsButton( - track: track, - userPlaylist: false, - ), - const Gap(5), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ), - ), - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/provider/audio_player/audio_player.dart b/lib/provider/audio_player/audio_player.dart deleted file mode 100644 index 66878714..00000000 --- a/lib/provider/audio_player/audio_player.dart +++ /dev/null @@ -1,478 +0,0 @@ -import 'dart:math'; - -import 'package:collection/collection.dart'; -import 'package:drift/drift.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:media_kit/media_kit.dart'; -import 'package:spotube/extensions/list.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/state.dart'; -import 'package:spotube/provider/blacklist_provider.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/discord_provider.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class AudioPlayerNotifier extends Notifier { - BlackListNotifier get _blacklist => ref.read(blacklistProvider.notifier); - - void _assertAllowedTracks(Iterable tracks) { - assert( - tracks.every( - (track) => - track is SpotubeFullTrackObject || track is SpotubeLocalTrackObject, - ), - 'All tracks must be either SpotubeFullTrackObject or SpotubeLocalTrackObject', - ); - } - - void _assertAllowedTrack(SpotubeTrackObject tracks) { - assert( - tracks is SpotubeFullTrackObject || tracks is SpotubeLocalTrackObject, - 'Track must be either SpotubeFullTrackObject or SpotubeLocalTrackObject', - ); - } - - Future _syncSavedState() async { - final database = ref.read(databaseProvider); - - var playerState = - await database.select(database.audioPlayerStateTable).getSingleOrNull(); - - if (playerState == null) { - await database.into(database.audioPlayerStateTable).insert( - AudioPlayerStateTableCompanion.insert( - playing: audioPlayer.isPlaying, - loopMode: audioPlayer.loopMode, - shuffled: audioPlayer.isShuffled, - collections: [], - tracks: const Value([]), - currentIndex: const Value(0), - id: const Value(0), - ), - ); - - playerState = - await database.select(database.audioPlayerStateTable).getSingle(); - } else { - await audioPlayer.setLoopMode(playerState.loopMode); - await audioPlayer.setShuffle(playerState.shuffled); - } - - final tracks = playerState.tracks; - final currentIndex = playerState.currentIndex; - - if (tracks.isEmpty && state.tracks.isNotEmpty) { - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(currentIndex), - ), - ); - } else if (tracks.isNotEmpty) { - state = state.copyWith( - tracks: tracks, - currentIndex: currentIndex, - ); - await audioPlayer.openPlaylist( - tracks.asMediaList(), - initialIndex: currentIndex, - autoPlay: false, - ); - } - - if (playerState.collections.isNotEmpty) { - state = state.copyWith( - collections: playerState.collections, - ); - } - } - - Future _updatePlayerState( - AudioPlayerStateTableCompanion companion, - ) async { - final database = ref.read(databaseProvider); - - await (database.update(database.audioPlayerStateTable) - ..where((tb) => tb.id.equals(0))) - .write(companion); - } - - @override - build() { - final subscriptions = [ - audioPlayer.playingStream.listen((playing) async { - try { - state = state.copyWith(playing: playing); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - playing: Value(playing), - ), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }), - audioPlayer.loopModeStream.listen((loopMode) async { - try { - state = state.copyWith(loopMode: loopMode); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - loopMode: Value(loopMode), - ), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }), - audioPlayer.shuffledStream.listen((shuffled) async { - try { - state = state.copyWith(shuffled: shuffled); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - shuffled: Value(shuffled), - ), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }), - audioPlayer.playlistStream.listen((playlist) async { - try { - final tracks = - playlist.medias.map((e) => SpotubeMedia.media(e).track).toList(); - - state = state.copyWith( - tracks: tracks, - currentIndex: playlist.index, - ); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - currentIndex: Value(state.currentIndex), - tracks: Value(state.tracks), - ), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }), - ]; - - _syncSavedState(); - - ref.onDispose(() { - for (final subscription in subscriptions) { - subscription.cancel(); - } - }); - - return AudioPlayerState( - loopMode: audioPlayer.loopMode, - playing: audioPlayer.isPlaying, - shuffled: audioPlayer.isShuffled, - tracks: [], - collections: [], - ); - } - - // Collection related methods - Future addCollections(List collectionIds) async { - state = state.copyWith(collections: [ - ...state.collections, - ...collectionIds, - ]); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - collections: Value(state.collections), - ), - ); - } - - Future addCollection(String collectionId) async { - await addCollections([collectionId]); - } - - Future removeCollections(List collectionIds) async { - state = state.copyWith( - collections: state.collections - .where((element) => !collectionIds.contains(element)) - .toList(), - ); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - collections: Value(state.collections), - ), - ); - } - - Future removeCollection(String collectionId) async { - await removeCollections([collectionId]); - } - - Future addTracksAtFirst( - Iterable tracks, { - bool allowDuplicates = false, - }) async { - _assertAllowedTracks(tracks); - if (state.tracks.length == 1) { - return addTracks(tracks); - } - - final addableTracks = _blacklist - .filter(tracks) - .where( - (track) => - allowDuplicates || - !state.tracks.any((element) => _compareTracks(element, track)), - ) - .toList(); - - state = state.copyWith( - tracks: [...addableTracks, ...state.tracks], - ); - - for (int i = 0; i < addableTracks.length; i++) { - final track = addableTracks.elementAt(i); - - await audioPlayer.addTrackAt( - SpotubeMedia(track), - max(state.currentIndex, 0) + i + 1, - ); - } - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(max(state.currentIndex, 0)), - ), - ); - } - - Future addTrack(SpotubeTrackObject track) async { - _assertAllowedTrack(track); - - if (_blacklist.contains(track)) return; - if (state.tracks.any((element) => _compareTracks(element, track))) return; - - state = state.copyWith( - tracks: [...state.tracks, track], - ); - - await audioPlayer.addTrack(SpotubeMedia(track)); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(max(state.currentIndex, 0)), - ), - ); - } - - Future addTracks(Iterable tracks) async { - _assertAllowedTracks(tracks); - - tracks = _blacklist.filter(tracks).toList(); - state = state.copyWith( - tracks: [...state.tracks, ...tracks], - ); - - for (final track in tracks) { - await audioPlayer.addTrack(SpotubeMedia(track)); - } - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(max(state.currentIndex, 0)), - ), - ); - } - - Future removeTrack(String trackId) async { - final index = state.tracks.indexWhere((element) => element.id == trackId); - - if (index == -1) return; - - state = state.copyWith( - tracks: List.of(state.tracks)..removeAt(index), - ); - - await audioPlayer.removeTrack(index); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(max(state.currentIndex, 0)), - ), - ); - } - - Future removeTracks(Iterable trackIds) async { - final trackIndexes = state.tracks - .where((element) => trackIds.any((trackId) => trackId == element.id)) - .mapIndexed((index, element) => index); - - final tracks = state.tracks.where( - (element) => !trackIds.contains(element.id), - ); - - state = state.copyWith( - tracks: tracks.toList(), - ); - - for (final index in trackIndexes) { - await audioPlayer.removeTrack(index); - } - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(max(state.currentIndex, 0)), - ), - ); - } - - bool _compareTracks(SpotubeTrackObject a, SpotubeTrackObject b) { - if (a.runtimeType != b.runtimeType) { - return false; - } - - return a is SpotubeLocalTrackObject && b is SpotubeLocalTrackObject - ? a.path == b.path - : a.id == b.id; - } - - Future load( - List tracks, { - int initialIndex = 0, - bool autoPlay = false, - }) async { - _assertAllowedTracks(tracks); - - final medias = _blacklist - .filter(tracks) - .toList() - .asMediaList() - .unique((a, b) => a.uri == b.uri); - - // Giving the initial track a boost so MediaKit won't skip - // because of timeout - final intendedActiveTrack = medias.elementAt(initialIndex); - if (intendedActiveTrack.track is! SpotubeLocalTrackObject) { - ref.read( - sourcedTrackProvider( - intendedActiveTrack.track as SpotubeFullTrackObject, - ).future, - ); - } - - if (medias.isEmpty) return; - - state = state.copyWith( - // These are filtered tracks as well - tracks: medias.map((media) => media.track).toList(), - currentIndex: initialIndex, - collections: [], - ); - - await audioPlayer.openPlaylist( - medias, - initialIndex: initialIndex, - autoPlay: autoPlay, - ); - - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(max(state.currentIndex, 0)), - ), - ); - } - - Future swapActiveSource() async { - if (state.tracks.isEmpty || state.activeTrack is! SpotubeFullTrackObject) { - return; - } - - final oldState = state; - await audioPlayer.stop(); - - await load( - oldState.tracks, - initialIndex: oldState.currentIndex, - autoPlay: true, - ); - state = state.copyWith( - collections: oldState.collections, - loopMode: oldState.loopMode, - playing: oldState.playing, - shuffled: false, - ); - await audioPlayer.setLoopMode(oldState.loopMode); - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: Value(state.currentIndex), - collections: Value(state.collections), - loopMode: Value(state.loopMode), - playing: Value(state.playing), - shuffled: Value(state.shuffled), - ), - ); - } - - Future jumpToTrack(SpotubeTrackObject track) async { - final index = - state.tracks.toList().indexWhere((element) => element.id == track.id); - if (index == -1) return; - await audioPlayer.jumpTo(index); - } - - Future moveTrack(int oldIndex, int newIndex) async { - if (oldIndex == newIndex || - newIndex < 0 || - oldIndex < 0 || - newIndex > state.tracks.length - 1 || - oldIndex > state.tracks.length - 1) { - return; - } - - await audioPlayer.moveTrack(oldIndex, newIndex); - } - - Future stop() async { - state = state.copyWith( - tracks: [], - currentIndex: 0, - collections: [], - loopMode: PlaylistMode.none, - playing: false, - shuffled: false, - ); - await audioPlayer.stop(); - await _updatePlayerState( - AudioPlayerStateTableCompanion( - tracks: Value(state.tracks), - currentIndex: const Value(0), - collections: const Value([]), - loopMode: const Value(PlaylistMode.none), - playing: const Value(false), - shuffled: const Value(false), - ), - ); - ref.read(discordProvider.notifier).clear(); - } -} - -final audioPlayerProvider = - NotifierProvider( - () => AudioPlayerNotifier(), -); diff --git a/lib/provider/audio_player/audio_player_streams.dart b/lib/provider/audio_player/audio_player_streams.dart deleted file mode 100644 index eff13134..00000000 --- a/lib/provider/audio_player/audio_player_streams.dart +++ /dev/null @@ -1,175 +0,0 @@ -import 'dart:async'; -import 'dart:math'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/audio_player/state.dart'; -import 'package:spotube/provider/discord_provider.dart'; -import 'package:spotube/provider/history/history.dart'; -import 'package:spotube/provider/metadata_plugin/core/scrobble.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; -import 'package:spotube/provider/skip_segments/skip_segments.dart'; -import 'package:spotube/provider/scrobbler/scrobbler.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/audio_services/audio_services.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class AudioPlayerStreamListeners { - final Ref ref; - late final AudioServices notificationService; - AudioPlayerStreamListeners(this.ref) { - AudioServices.create(ref, ref.read(audioPlayerProvider.notifier)).then( - (value) => notificationService = value, - ); - - final subscriptions = [ - subscribeToPlaylist(), - subscribeToSkipSponsor(), - subscribeToScrobbleChanged(), - subscribeToPosition(), - subscribeToPlayerError(), - ]; - - ref.onDispose(() { - for (final subscription in subscriptions) { - subscription.cancel(); - } - }); - } - - ScrobblerNotifier get scrobbler => ref.read(scrobblerProvider.notifier); - UserPreferences get preferences => ref.read(userPreferencesProvider); - DiscordNotifier get discord => ref.read(discordProvider.notifier); - AudioPlayerState get audioPlayerState => ref.read(audioPlayerProvider); - PlaybackHistoryActions get history => - ref.read(playbackHistoryActionsProvider); - - StreamSubscription subscribeToPlaylist() { - return audioPlayer.playlistStream.listen((mpvPlaylist) { - try { - if (audioPlayerState.activeTrack == null) return; - notificationService.addTrack(audioPlayerState.activeTrack!); - discord.updatePresence(audioPlayerState.activeTrack!); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - } - - StreamSubscription subscribeToSkipSponsor() { - return audioPlayer.positionStream.listen((position) async { - try { - final currentSegments = await ref.read(segmentProvider.future); - - if (currentSegments?.segments.isNotEmpty != true || - position < const Duration(seconds: 3)) { - return; - } - - for (final segment in currentSegments!.segments) { - final seconds = position.inSeconds; - - if (seconds < segment.start || seconds >= segment.end) continue; - - await audioPlayer.seek(Duration(seconds: segment.end + 1)); - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - } - - StreamSubscription subscribeToScrobbleChanged() { - String? lastScrobbled; - return audioPlayer.positionStream.listen((position) async { - try { - final uid = audioPlayerState.activeTrack is SpotubeLocalTrackObject - ? (audioPlayerState.activeTrack as SpotubeLocalTrackObject).path - : audioPlayerState.activeTrack?.id; - - /// According to Listenbrainz and Last.fm, a scrobble should be sent - /// after 4 minutes of listening or 50% of the track duration, - /// whichever is less. - final minimumListenTime = min(audioPlayer.duration.inSeconds ~/ 2, 240); - - if (audioPlayerState.activeTrack == null || - lastScrobbled == uid || - position.inSeconds < minimumListenTime || - audioPlayer.duration == Duration.zero || - position == Duration.zero) { - return; - } - - scrobbler.scrobble(audioPlayerState.activeTrack!); - ref - .read(metadataPluginScrobbleProvider.notifier) - .scrobble(audioPlayerState.activeTrack!); - lastScrobbled = uid; - - /// The [Track] from Playlist.getTracks doesn't contain artist images - /// so we need to fetch them from the API - var activeTrack = audioPlayerState.activeTrack!; - if (activeTrack.artists.any((a) => a.images == null)) { - final metadataPlugin = await ref.read(metadataPluginProvider.future); - final artists = await Future.wait( - activeTrack.artists - .map((artist) => metadataPlugin!.artist.getArtist(artist.id)), - ); - activeTrack = activeTrack.copyWith( - artists: artists - .map((e) => SpotubeSimpleArtistObject.fromJson(e.toJson())) - .toList(), - ); - } - - await history.addTrack(activeTrack); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - } - - StreamSubscription subscribeToPosition() { - String lastTrack = ""; // used to prevent multiple calls to the same track - return audioPlayer.positionStream.listen((event) async { - final percentProgress = - (event.inSeconds / max(audioPlayer.duration.inSeconds, 1)) * 100; - try { - if (percentProgress < 80 || - audioPlayerState.currentIndex == -1 || - audioPlayerState.currentIndex == - audioPlayerState.tracks.length - 1) { - return; - } - final nextTrack = audioPlayerState.tracks - .elementAtOrNull(audioPlayerState.currentIndex + 1); - - if (nextTrack == null || - lastTrack == nextTrack.id || - nextTrack is SpotubeLocalTrackObject) { - return; - } - - try { - await ref.read( - sourcedTrackProvider(nextTrack as SpotubeFullTrackObject).future, - ); - } finally { - lastTrack = nextTrack.id; - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - } - - StreamSubscription subscribeToPlayerError() { - return audioPlayer.errorStream.listen((event) {}); - } -} - -final audioPlayerStreamListenersProvider = - Provider(AudioPlayerStreamListeners.new); diff --git a/lib/provider/audio_player/querying_track_info.dart b/lib/provider/audio_player/querying_track_info.dart deleted file mode 100644 index 06e9653c..00000000 --- a/lib/provider/audio_player/querying_track_info.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; - -final queryingTrackInfoProvider = Provider((ref) { - final audioPlayer = ref.watch(audioPlayerProvider); - - if (audioPlayer.activeTrack == null) { - return false; - } - - if (audioPlayer.activeTrack is! SpotubeFullTrackObject) { - return false; - } - - return ref - .watch( - sourcedTrackProvider( - audioPlayer.activeTrack! as SpotubeFullTrackObject), - ) - .isLoading; -}); diff --git a/lib/provider/audio_player/state.dart b/lib/provider/audio_player/state.dart deleted file mode 100644 index d62155f3..00000000 --- a/lib/provider/audio_player/state.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:spotube/models/metadata/metadata.dart'; - -part 'state.freezed.dart'; -part 'state.g.dart'; - -@freezed -class AudioPlayerState with _$AudioPlayerState { - const AudioPlayerState._(); - - factory AudioPlayerState._inner({ - required bool playing, - required PlaylistMode loopMode, - required bool shuffled, - required List collections, - @Default(0) int currentIndex, - @Default([]) List tracks, - }) = _AudioPlayerState; - - factory AudioPlayerState({ - required bool playing, - required PlaylistMode loopMode, - required bool shuffled, - required List collections, - int currentIndex = 0, - List tracks = const [], - }) { - assert( - tracks.every((track) => - track is SpotubeFullTrackObject || track is SpotubeLocalTrackObject), - 'All tracks must be either SpotubeFullTrackObject or SpotubeLocalTrackObject', - ); - - return AudioPlayerState._inner( - playing: playing, - loopMode: loopMode, - shuffled: shuffled, - currentIndex: currentIndex, - tracks: tracks, - collections: collections, - ); - } - - factory AudioPlayerState.fromJson(Map json) => - _$AudioPlayerStateFromJson(json); - - SpotubeTrackObject? get activeTrack { - if (currentIndex < 0 || currentIndex >= tracks.length) return null; - return tracks[currentIndex]; - } - - bool containsTrack(SpotubeTrackObject track) { - return tracks.isNotEmpty && - tracks.any( - (t) => - t is SpotubeLocalTrackObject && track is SpotubeLocalTrackObject - ? t.path == track.path - : t.id == track.id, - ); - } - - bool containsTracks(List tracks) { - return this.tracks.isNotEmpty && tracks.every(containsTrack); - } - - bool containsCollection(String collectionId) { - return collections.contains(collectionId); - } -} diff --git a/lib/provider/audio_player/state.freezed.dart b/lib/provider/audio_player/state.freezed.dart deleted file mode 100644 index 0299cd2f..00000000 --- a/lib/provider/audio_player/state.freezed.dart +++ /dev/null @@ -1,297 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'state.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -AudioPlayerState _$AudioPlayerStateFromJson(Map json) { - return _AudioPlayerState.fromJson(json); -} - -/// @nodoc -mixin _$AudioPlayerState { - bool get playing => throw _privateConstructorUsedError; - PlaylistMode get loopMode => throw _privateConstructorUsedError; - bool get shuffled => throw _privateConstructorUsedError; - List get collections => throw _privateConstructorUsedError; - int get currentIndex => throw _privateConstructorUsedError; - List get tracks => throw _privateConstructorUsedError; - - /// Serializes this AudioPlayerState to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of AudioPlayerState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $AudioPlayerStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AudioPlayerStateCopyWith<$Res> { - factory $AudioPlayerStateCopyWith( - AudioPlayerState value, $Res Function(AudioPlayerState) then) = - _$AudioPlayerStateCopyWithImpl<$Res, AudioPlayerState>; - @useResult - $Res call( - {bool playing, - PlaylistMode loopMode, - bool shuffled, - List collections, - int currentIndex, - List tracks}); -} - -/// @nodoc -class _$AudioPlayerStateCopyWithImpl<$Res, $Val extends AudioPlayerState> - implements $AudioPlayerStateCopyWith<$Res> { - _$AudioPlayerStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of AudioPlayerState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? playing = null, - Object? loopMode = null, - Object? shuffled = null, - Object? collections = null, - Object? currentIndex = null, - Object? tracks = null, - }) { - return _then(_value.copyWith( - playing: null == playing - ? _value.playing - : playing // ignore: cast_nullable_to_non_nullable - as bool, - loopMode: null == loopMode - ? _value.loopMode - : loopMode // ignore: cast_nullable_to_non_nullable - as PlaylistMode, - shuffled: null == shuffled - ? _value.shuffled - : shuffled // ignore: cast_nullable_to_non_nullable - as bool, - collections: null == collections - ? _value.collections - : collections // ignore: cast_nullable_to_non_nullable - as List, - currentIndex: null == currentIndex - ? _value.currentIndex - : currentIndex // ignore: cast_nullable_to_non_nullable - as int, - tracks: null == tracks - ? _value.tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$AudioPlayerStateImplCopyWith<$Res> - implements $AudioPlayerStateCopyWith<$Res> { - factory _$$AudioPlayerStateImplCopyWith(_$AudioPlayerStateImpl value, - $Res Function(_$AudioPlayerStateImpl) then) = - __$$AudioPlayerStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {bool playing, - PlaylistMode loopMode, - bool shuffled, - List collections, - int currentIndex, - List tracks}); -} - -/// @nodoc -class __$$AudioPlayerStateImplCopyWithImpl<$Res> - extends _$AudioPlayerStateCopyWithImpl<$Res, _$AudioPlayerStateImpl> - implements _$$AudioPlayerStateImplCopyWith<$Res> { - __$$AudioPlayerStateImplCopyWithImpl(_$AudioPlayerStateImpl _value, - $Res Function(_$AudioPlayerStateImpl) _then) - : super(_value, _then); - - /// Create a copy of AudioPlayerState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? playing = null, - Object? loopMode = null, - Object? shuffled = null, - Object? collections = null, - Object? currentIndex = null, - Object? tracks = null, - }) { - return _then(_$AudioPlayerStateImpl( - playing: null == playing - ? _value.playing - : playing // ignore: cast_nullable_to_non_nullable - as bool, - loopMode: null == loopMode - ? _value.loopMode - : loopMode // ignore: cast_nullable_to_non_nullable - as PlaylistMode, - shuffled: null == shuffled - ? _value.shuffled - : shuffled // ignore: cast_nullable_to_non_nullable - as bool, - collections: null == collections - ? _value._collections - : collections // ignore: cast_nullable_to_non_nullable - as List, - currentIndex: null == currentIndex - ? _value.currentIndex - : currentIndex // ignore: cast_nullable_to_non_nullable - as int, - tracks: null == tracks - ? _value._tracks - : tracks // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$AudioPlayerStateImpl extends _AudioPlayerState { - _$AudioPlayerStateImpl( - {required this.playing, - required this.loopMode, - required this.shuffled, - required final List collections, - this.currentIndex = 0, - final List tracks = const []}) - : _collections = collections, - _tracks = tracks, - super._(); - - factory _$AudioPlayerStateImpl.fromJson(Map json) => - _$$AudioPlayerStateImplFromJson(json); - - @override - final bool playing; - @override - final PlaylistMode loopMode; - @override - final bool shuffled; - final List _collections; - @override - List get collections { - if (_collections is EqualUnmodifiableListView) return _collections; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_collections); - } - - @override - @JsonKey() - final int currentIndex; - final List _tracks; - @override - @JsonKey() - List get tracks { - if (_tracks is EqualUnmodifiableListView) return _tracks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tracks); - } - - @override - String toString() { - return 'AudioPlayerState._inner(playing: $playing, loopMode: $loopMode, shuffled: $shuffled, collections: $collections, currentIndex: $currentIndex, tracks: $tracks)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AudioPlayerStateImpl && - (identical(other.playing, playing) || other.playing == playing) && - (identical(other.loopMode, loopMode) || - other.loopMode == loopMode) && - (identical(other.shuffled, shuffled) || - other.shuffled == shuffled) && - const DeepCollectionEquality() - .equals(other._collections, _collections) && - (identical(other.currentIndex, currentIndex) || - other.currentIndex == currentIndex) && - const DeepCollectionEquality().equals(other._tracks, _tracks)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - playing, - loopMode, - shuffled, - const DeepCollectionEquality().hash(_collections), - currentIndex, - const DeepCollectionEquality().hash(_tracks)); - - /// Create a copy of AudioPlayerState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$AudioPlayerStateImplCopyWith<_$AudioPlayerStateImpl> get copyWith => - __$$AudioPlayerStateImplCopyWithImpl<_$AudioPlayerStateImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$AudioPlayerStateImplToJson( - this, - ); - } -} - -abstract class _AudioPlayerState extends AudioPlayerState { - factory _AudioPlayerState( - {required final bool playing, - required final PlaylistMode loopMode, - required final bool shuffled, - required final List collections, - final int currentIndex, - final List tracks}) = _$AudioPlayerStateImpl; - _AudioPlayerState._() : super._(); - - factory _AudioPlayerState.fromJson(Map json) = - _$AudioPlayerStateImpl.fromJson; - - @override - bool get playing; - @override - PlaylistMode get loopMode; - @override - bool get shuffled; - @override - List get collections; - @override - int get currentIndex; - @override - List get tracks; - - /// Create a copy of AudioPlayerState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$AudioPlayerStateImplCopyWith<_$AudioPlayerStateImpl> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/provider/audio_player/state.g.dart b/lib/provider/audio_player/state.g.dart deleted file mode 100644 index de5f6f1c..00000000 --- a/lib/provider/audio_player/state.g.dart +++ /dev/null @@ -1,40 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'state.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$AudioPlayerStateImpl _$$AudioPlayerStateImplFromJson(Map json) => - _$AudioPlayerStateImpl( - playing: json['playing'] as bool, - loopMode: $enumDecode(_$PlaylistModeEnumMap, json['loopMode']), - shuffled: json['shuffled'] as bool, - collections: (json['collections'] as List) - .map((e) => e as String) - .toList(), - currentIndex: (json['currentIndex'] as num?)?.toInt() ?? 0, - tracks: (json['tracks'] as List?) - ?.map((e) => SpotubeTrackObject.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - ); - -Map _$$AudioPlayerStateImplToJson( - _$AudioPlayerStateImpl instance) => - { - 'playing': instance.playing, - 'loopMode': _$PlaylistModeEnumMap[instance.loopMode]!, - 'shuffled': instance.shuffled, - 'collections': instance.collections, - 'currentIndex': instance.currentIndex, - 'tracks': instance.tracks.map((e) => e.toJson()).toList(), - }; - -const _$PlaylistModeEnumMap = { - PlaylistMode.none: 'none', - PlaylistMode.single: 'single', - PlaylistMode.loop: 'loop', -}; diff --git a/lib/provider/blacklist_provider.dart b/lib/provider/blacklist_provider.dart deleted file mode 100644 index f916c491..00000000 --- a/lib/provider/blacklist_provider.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; - -class BlackListNotifier extends AsyncNotifier> { - @override - build() async { - final database = ref.watch(databaseProvider); - - final subscription = database - .select(database.blacklistTable) - .watch() - .listen((event) => state = AsyncData(event)); - - ref.onDispose(() { - subscription.cancel(); - }); - - return await database.select(database.blacklistTable).get(); - } - - AppDatabase get _database => ref.read(databaseProvider); - - Future add(BlacklistTableCompanion element) async { - _database.into(_database.blacklistTable).insert(element); - } - - Future remove(String elementId) async { - await (_database.delete(_database.blacklistTable) - ..where((tbl) => tbl.elementId.equals(elementId))) - .go(); - } - - bool contains(SpotubeTrackObject track) { - final containsTrack = - state.asData?.value.any((element) => element.elementId == track.id) ?? - false; - - final containsTrackArtists = track.artists.any( - (artist) => - state.asData?.value.any((el) => el.elementId == artist.id) ?? false, - ); - - return containsTrack || containsTrackArtists; - } - - bool containsArtist(String artistId) { - return state.asData?.value - .any((element) => element.elementId == artistId) ?? - false; - } - - /// Filters the non blacklisted tracks from the given [tracks] - Iterable filter(Iterable tracks) { - return tracks.whereNot(contains).toList(); - } -} - -final blacklistProvider = - AsyncNotifierProvider>( - () => BlackListNotifier(), -); diff --git a/lib/provider/connect/clients.dart b/lib/provider/connect/clients.dart deleted file mode 100644 index 51578a7b..00000000 --- a/lib/provider/connect/clients.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'package:bonsoir/bonsoir.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/services/device_info/device_info.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class ConnectClientsState { - final List services; - final ResolvedBonsoirService? resolvedService; - final BonsoirDiscovery discovery; - - ConnectClientsState({ - required this.services, - required this.discovery, - this.resolvedService, - }); - - ConnectClientsState copyWith({ - List? services, - BonsoirDiscovery? discovery, - ResolvedBonsoirService? resolvedService, - }) { - return ConnectClientsState( - services: services ?? this.services, - discovery: discovery ?? this.discovery, - resolvedService: resolvedService ?? this.resolvedService, - ); - } -} - -class ConnectClientsNotifier extends AsyncNotifier { - ConnectClientsNotifier(); - - @override - build() async { - final discovery = BonsoirDiscovery(type: '_spotube._tcp'); - final deviceId = await DeviceInfoService.instance.deviceId(); - await discovery.ready; - - final subscription = discovery.eventStream?.listen((event) { - // ignore device itself - try { - if (event.service?.attributes["deviceId"] == deviceId) { - return; - } - - switch (event.type) { - case BonsoirDiscoveryEventType.discoveryServiceFound: - state = AsyncData(state.value!.copyWith( - services: [ - ...?state.value?.services, - event.service!, - ], - )); - break; - case BonsoirDiscoveryEventType.discoveryServiceResolved: - state = AsyncData( - state.value!.copyWith( - resolvedService: event.service as ResolvedBonsoirService, - ), - ); - break; - case BonsoirDiscoveryEventType.discoveryServiceLost: - state = AsyncData( - ConnectClientsState( - services: state.value!.services - .where((s) => s.name != event.service!.name) - .toList(), - discovery: state.value!.discovery, - resolvedService: state.value?.resolvedService != null && - event.service?.name == - state.value?.resolvedService?.name - ? null - : state.value!.resolvedService, - ), - ); - break; - default: - break; - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - - ref.onDispose(() { - subscription?.cancel(); - discovery.stop(); - }); - - await discovery.start(); - - return ConnectClientsState( - services: [], - discovery: discovery, - ); - } - - Future resolveService(BonsoirService service) async { - if (state.value == null) return; - await service.resolve(state.value!.discovery.serviceResolver); - } - - Future clearResolvedService() async { - if (state.value == null) return; - state = AsyncData( - ConnectClientsState( - services: state.value!.services, - discovery: state.value!.discovery, - ), - ); - } -} - -final connectClientsProvider = - AsyncNotifierProvider( - () => ConnectClientsNotifier(), -); diff --git a/lib/provider/connect/connect.dart b/lib/provider/connect/connect.dart deleted file mode 100644 index 268b6567..00000000 --- a/lib/provider/connect/connect.dart +++ /dev/null @@ -1,230 +0,0 @@ -import 'dart:convert'; - -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/state.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/connect/connect.dart'; - -import 'package:spotube/provider/connect/clients.dart'; -import 'package:web_socket_channel/web_socket_channel.dart'; -import 'package:web_socket_channel/status.dart' as status; - -final playingProvider = StateProvider( - (ref) => false, -); - -final positionProvider = StateProvider( - (ref) => Duration.zero, -); - -final durationProvider = StateProvider( - (ref) => Duration.zero, -); - -final shuffleProvider = StateProvider( - (ref) => false, -); - -final loopModeProvider = StateProvider( - (ref) => PlaylistMode.none, -); - -final queueProvider = StateProvider( - (ref) => AudioPlayerState( - playing: audioPlayer.isPlaying, - loopMode: audioPlayer.loopMode, - shuffled: audioPlayer.isShuffled, - tracks: [], - currentIndex: 0, - collections: [], - ), -); - -final volumeProvider = StateProvider( - (ref) => 1.0, -); - -typedef ConnectState = ({WebSocketChannel channel, Stream stream}); - -class ConnectNotifier extends AsyncNotifier { - @override - build() async { - try { - final connectClients = await ref.watch(connectClientsProvider.future); - - if (connectClients.resolvedService == null) return null; - - final service = connectClients.resolvedService!; - - AppLogger.log.t( - '♾️ Connecting to ${service.name}: ws://${service.host}:${service.port}/ws', - ); - - final channel = WebSocketChannel.connect( - Uri.parse('ws://${service.host}:${service.port}/ws'), - ); - - await channel.ready; - - AppLogger.log.t( - '✅ Connected to ${service.name}: ws://${service.host}:${service.port}/ws', - ); - - final stream = channel.stream.asBroadcastStream(); - - final subscription = stream.listen( - (message) { - final event = - WebSocketEvent.fromJson(jsonDecode(message), (data) => data); - - event.onQueue((event) { - ref.read(queueProvider.notifier).state = event.data; - }); - - event.onPlaying((event) { - ref.read(playingProvider.notifier).state = event.data; - }); - - event.onPosition((event) { - ref.read(positionProvider.notifier).state = event.data; - }); - - event.onDuration((event) { - ref.read(durationProvider.notifier).state = event.data; - }); - - event.onShuffle((event) { - ref.read(shuffleProvider.notifier).state = event.data; - }); - - event.onLoop((event) { - ref.read(loopModeProvider.notifier).state = event.data; - }); - - event.onVolume((event) { - ref.read(volumeProvider.notifier).state = event.data; - }); - - event.onError((event) { - if (event.data == "Connection denied") { - ref.read(connectClientsProvider.notifier).clearResolvedService(); - - if (rootNavigatorKey.currentContext?.mounted == true) { - final theme = Theme.of(rootNavigatorKey.currentContext!); - - showToast( - context: rootNavigatorKey.currentContext!, - location: ToastLocation.topRight, - dismissible: true, - builder: (context, overlay) { - return SurfaceCard( - fillColor: theme.colorScheme.destructive, - filled: true, - child: Basic( - leading: const Icon(SpotubeIcons.error), - title: Text( - context.l10n.connection_request_denied, - style: theme.typography.normal.copyWith( - color: theme.colorScheme.destructiveForeground, - ), - ), - leadingAlignment: Alignment.center, - ), - ); - }, - ); - } - } - }); - }, - onError: (error) { - AppLogger.reportError(error, StackTrace.current); - }, - ); - - ref.onDispose(() { - subscription.cancel(); - channel.sink.close(status.goingAway); - }); - - return (channel: channel, stream: stream); - } catch (e, stack) { - AppLogger.reportError(e, stack); - rethrow; - } - } - - Future emit(Object message) async { - if (state.value == null) return; - state.value?.channel.sink.add( - message is String ? message : (message as dynamic).toJson(), - ); - } - - Future resume() async { - emit(WebSocketResumeEvent()); - } - - Future pause() async { - emit(WebSocketPauseEvent()); - } - - Future stop() async { - emit(WebSocketStopEvent()); - } - - Future jumpTo(int position) async { - emit(WebSocketJumpEvent(position)); - } - - Future load(WebSocketLoadEventData data) async { - emit(WebSocketLoadEvent(data)); - } - - Future next() async { - emit(WebSocketNextEvent()); - } - - Future previous() async { - emit(WebSocketPreviousEvent()); - } - - Future seek(Duration position) async { - emit(WebSocketSeekEvent(position)); - } - - Future setShuffle(bool value) async { - emit(WebSocketShuffleEvent(value)); - } - - Future setLoopMode(PlaylistMode value) async { - emit(WebSocketLoopEvent(value)); - } - - Future addTrack(SpotubeFullTrackObject data) async { - emit(WebSocketAddTrackEvent(data)); - } - - Future removeTrack(String data) async { - emit(WebSocketRemoveTrackEvent(data)); - } - - Future reorder(ReorderData data) async { - emit(WebSocketReorderEvent(data)); - } - - Future setVolume(double value) async { - emit(WebSocketVolumeEvent(value)); - } -} - -final connectProvider = AsyncNotifierProvider( - () => ConnectNotifier(), -); diff --git a/lib/provider/database/database.dart b/lib/provider/database/database.dart deleted file mode 100644 index 95976e56..00000000 --- a/lib/provider/database/database.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; - -final databaseProvider = Provider((ref) => AppDatabase()); diff --git a/lib/provider/discord_provider.dart b/lib/provider/discord_provider.dart deleted file mode 100644 index fb1c41b1..00000000 --- a/lib/provider/discord_provider.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_discord_rpc/flutter_discord_rpc.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/platform.dart'; - -class DiscordNotifier extends AsyncNotifier { - @override - FutureOr build() async { - if (!kIsDesktop) return; - - final enabled = ref.watch( - userPreferencesProvider.select((s) => s.discordPresence && kIsDesktop)); - - var lastPosition = audioPlayer.position; - - final subscriptions = [ - FlutterDiscordRPC.instance.isConnectedStream.listen((connected) async { - try { - final playback = ref.read(audioPlayerProvider); - if (connected && playback.activeTrack != null) { - await updatePresence(playback.activeTrack!); - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }), - audioPlayer.playerStateStream.listen((state) async { - try { - final playback = ref.read(audioPlayerProvider); - if (playback.activeTrack == null) return; - - await updatePresence(ref.read(audioPlayerProvider).activeTrack!); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }), - audioPlayer.positionStream.listen((position) async { - try { - final playback = ref.read(audioPlayerProvider); - if (playback.activeTrack != null) { - final diff = position.inMilliseconds - lastPosition.inMilliseconds; - if (diff > 500 || diff < -500) { - await updatePresence(ref.read(audioPlayerProvider).activeTrack!); - } - } - lastPosition = position; - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }) - ]; - - ref.onDispose(() async { - for (final subscription in subscriptions) { - subscription.cancel(); - } - await clear(); - await close(); - await FlutterDiscordRPC.instance.dispose(); - }); - - if (!enabled && FlutterDiscordRPC.instance.isConnected) { - await clear(); - await close(); - } else if (enabled) { - await FlutterDiscordRPC.instance.connect(autoRetry: true); - } - } - - Future updatePresence(SpotubeTrackObject track) async { - if (!kIsDesktop) return; - if (FlutterDiscordRPC.instance.isConnected == false) return; - final artistNames = track.artists.asString(); - final isPlaying = audioPlayer.isPlaying; - final position = audioPlayer.position; - - await FlutterDiscordRPC.instance.setActivity( - activity: RPCActivity( - details: track.name, - state: artistNames, - assets: RPCAssets( - largeImage: - track.album.images.firstOrNull?.url ?? "spotube-logo-foreground", - largeText: track.album.name, - smallImage: "spotube-logo-foreground", - smallText: "Spotube", - ), - buttons: [ - RPCButton( - label: "Listen on Spotube", - url: track.externalUri, - ), - ], - timestamps: RPCTimestamps( - start: isPlaying - ? DateTime.now().millisecondsSinceEpoch - position.inMilliseconds - : null, - ), - activityType: ActivityType.listening, - ), - ); - } - - Future clear() async { - if (!kIsDesktop) return; - await FlutterDiscordRPC.instance.clearActivity(); - } - - Future close() async { - if (!kIsDesktop) return; - await FlutterDiscordRPC.instance.disconnect(); - } -} - -final discordProvider = - AsyncNotifierProvider(() => DiscordNotifier()); diff --git a/lib/provider/download_manager_provider.dart b/lib/provider/download_manager_provider.dart deleted file mode 100644 index 0ca99ec1..00000000 --- a/lib/provider/download_manager_provider.dart +++ /dev/null @@ -1,285 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:dio/dio.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:metadata_god/metadata_god.dart'; -import 'package:path/path.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide join; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/components/dialogs/replace_downloaded_dialog.dart'; -import 'package:spotube/extensions/dio.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/audio_source/quality_presets.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/service_utils.dart'; - -enum DownloadStatus { - queued, - downloading, - completed, - failed, - canceled, -} - -class DownloadTask { - final SpotubeFullTrackObject track; - final DownloadStatus status; - final CancelToken cancelToken; - final int? totalSizeBytes; - final StreamController _downloadedBytesStreamController; - - Stream get downloadedBytesStream => - _downloadedBytesStreamController.stream; - - DownloadTask({ - required this.track, - required this.status, - required this.cancelToken, - this.totalSizeBytes, - StreamController? downloadedBytesStreamController, - }) : _downloadedBytesStreamController = - downloadedBytesStreamController ?? StreamController.broadcast(); - - DownloadTask copyWith({ - SpotubeFullTrackObject? track, - DownloadStatus? status, - CancelToken? cancelToken, - int? totalSizeBytes, - StreamController? downloadedBytesStreamController, - }) { - return DownloadTask( - track: track ?? this.track, - status: status ?? this.status, - cancelToken: cancelToken ?? this.cancelToken, - totalSizeBytes: totalSizeBytes ?? this.totalSizeBytes, - downloadedBytesStreamController: - downloadedBytesStreamController ?? _downloadedBytesStreamController, - ); - } -} - -class DownloadManagerNotifier extends Notifier> { - final Dio dio; - DownloadManagerNotifier() - : dio = Dio(), - super(); - - @override - build() { - ref.onDispose(() { - for (final task in state) { - if (task.status == DownloadStatus.downloading) { - task.cancelToken.cancel(); - } - task._downloadedBytesStreamController.close(); - } - }); - - return []; - } - - DownloadTask? getTaskByTrackId(String trackId) { - return state.firstWhereOrNull((element) => element.track.id == trackId); - } - - void addToQueue(SpotubeFullTrackObject track) { - if (state.any((element) => element.track.id == track.id)) return; - state = [ - ...state, - DownloadTask( - track: track, - status: DownloadStatus.queued, - cancelToken: CancelToken(), - ), - ]; - - ref.read(sourcedTrackProvider(track)); - - _startDownloading(); // No await should be invoked to avoid stuck UI - } - - void addAllToQueue(List tracks) { - state = [ - ...state, - ...tracks.map((e) => DownloadTask( - track: e, - status: DownloadStatus.queued, - cancelToken: CancelToken(), - )), - ]; - - ref.read(sourcedTrackProvider(tracks.first)); - _startDownloading(); // No await should be invoked to avoid stuck UI - } - - void retry(SpotubeFullTrackObject track) { - if (state.firstWhereOrNull((e) => e.track.id == track.id)?.status - case DownloadStatus.canceled || DownloadStatus.failed) { - _setStatus(track, DownloadStatus.queued); - _startDownloading(); // No await should be invoked to avoid stuck UI - } - } - - void cancel(SpotubeFullTrackObject track) { - if (state.firstWhereOrNull((e) => e.track.id == track.id)?.status == - DownloadStatus.failed) { - return; - } - _setStatus(track, DownloadStatus.canceled); - } - - void clearAll() { - for (final task in state) { - if (task.status == DownloadStatus.downloading) { - task.cancelToken.cancel(); - } - } - state = []; - } - - void _setStatus(SpotubeFullTrackObject track, DownloadStatus status) { - state = state.map((e) { - if (e.track.id == track.id) { - if ((status == DownloadStatus.canceled) && e.cancelToken.isCancelled) { - e.cancelToken.cancel(); - } - - return e.copyWith(status: status); - } - return e; - }).toList(); - } - - bool _isShowingDialog = false; - - Future _shouldReplaceFileOnExist(DownloadTask task) async { - if (rootNavigatorKey.currentContext == null || _isShowingDialog) { - return false; - } - final replaceAll = ref.read(replaceDownloadedFileState); - if (replaceAll != null) return replaceAll; - _isShowingDialog = true; - try { - return await showDialog( - context: rootNavigatorKey.currentContext!, - builder: (context) => ReplaceDownloadedDialog( - track: task.track, - ), - ) ?? - false; - } finally { - _isShowingDialog = false; - } - } - - Future _downloadTrack(DownloadTask task) async { - try { - _setStatus(task.track, DownloadStatus.downloading); - final track = await ref.read(sourcedTrackProvider(task.track).future); - if (task.cancelToken.isCancelled) { - _setStatus(task.track, DownloadStatus.canceled); - } - final presets = ref.read(audioSourcePresetsProvider); - final container = - presets.presets[presets.selectedDownloadingContainerIndex]; - final downloadLocation = ref.read( - userPreferencesProvider.select((value) => value.downloadLocation)); - - final url = track.getUrlOfQuality( - container, - presets.selectedDownloadingQualityIndex, - ); - - if (url == null) { - throw Exception("No download URL found for selected codec"); - } - - final savePath = join( - downloadLocation, - ServiceUtils.sanitizeFilename( - "${track.query.name} - ${track.query.artists.map((e) => e.name).join(", ")}.${container.getFileExtension()}", - ), - ); - - final savePathFile = File(savePath); - if (await savePathFile.exists()) { - // dio automatically replaces the file if it exists so no deletion required - if (!await _shouldReplaceFileOnExist(task)) { - _setStatus(track.query, DownloadStatus.completed); - return; - } - } - - final response = await dio.chunkDownload( - url, - savePath, - cancelToken: task.cancelToken, - onReceiveProgress: (count, total) { - if (task.totalSizeBytes == null) { - state = state.map((e) { - if (e.track.id == track.query.id) { - return e.copyWith(totalSizeBytes: total); - } - return e; - }).toList(); - } - task._downloadedBytesStreamController.add(count); - }, - deleteOnError: true, - fileAccessMode: FileAccessMode.write, - ); - if (response.statusCode != null && response.statusCode! < 400) { - _setStatus(track.query, DownloadStatus.completed); - } else { - _setStatus(track.query, DownloadStatus.failed); - return; - } - - if (container.getFileExtension() == "weba") return; - - final imageBytes = await ServiceUtils.downloadImage( - (task.track.album.images).asUrlString( - placeholder: ImagePlaceholder.albumArt, - index: 1, - ), - ); - await MetadataGod.writeMetadata( - file: savePath, - metadata: task.track.toMetadata( - fileLength: await savePathFile.length(), - imageBytes: imageBytes, - ), - ); - } catch (e, stack) { - if (e is! DioException || e.type != DioExceptionType.cancel) { - _setStatus(task.track, DownloadStatus.failed); - AppLogger.reportError(e, stack); - } - } - } - - Future _startDownloading() async { - for (final task in state) { - if (task.status == DownloadStatus.downloading) return; - - if (task.status == DownloadStatus.queued) { - try { - await _downloadTrack(task); - } finally { - // After completion, check for more queued tasks - // Ignore errors of the prior task to allow next task to complete - await _startDownloading(); - } - } - } - } -} - -final downloadManagerProvider = - NotifierProvider>( - DownloadManagerNotifier.new, -); diff --git a/lib/provider/glance/glance.dart b/lib/provider/glance/glance.dart deleted file mode 100644 index 00b6bc38..00000000 --- a/lib/provider/glance/glance.dart +++ /dev/null @@ -1,174 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -import 'package:home_widget/home_widget.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:http/http.dart'; -import 'package:logger/logger.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/server/server.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/platform.dart'; - -@pragma("vm:entry-point") -Future glanceBackgroundCallback(Uri? data) async { - final logger = Logger(); - try { - if (data == null || - data.host != "playback" || - data.pathSegments.isEmpty || - data.queryParameters["serverAddress"] == null) { - return; - } - - final command = data.pathSegments.first; - final res = await get( - Uri.parse( - "http://${data.queryParameters["serverAddress"]}/playback/$command", - ), - ); - - if (res.statusCode != 200) { - throw Exception("Failed to execute command: $command\nBody: ${res.body}"); - } - } catch (e) { - logger.e("[GlanceBackgroundCallback] $e"); - } -} - -Future _saveWidgetData(String key, T? value) async { - try { - if (!kIsMobile) return null; - - return await HomeWidget.saveWidgetData(key, value); - } catch (e, stack) { - AppLogger.reportError(e, stack); - return null; - } -} - -Future _updateWidget() async { - try { - if (!kIsMobile) return; - - if (kIsAndroid) { - await HomeWidget.updateWidget( - androidName: 'HomePlayerWidgetReceiver', - qualifiedAndroidName: - 'oss.krtirtho.spotube.glance.HomePlayerWidgetReceiver', - ); - } - if (kIsIOS) { - await HomeWidget.updateWidget( - name: 'HomePlayerWidget', - iOSName: 'HomePlayerWidget', - ); - } - } on Exception catch (e, stack) { - AppLogger.reportError(e, stack); - } -} - -Future _sendActiveTrack(SpotubeTrackObject? track) async { - if (track == null) { - await _saveWidgetData("activeTrack", null); - await _updateWidget(); - return; - } - - final jsonTrack = track.toJson(); - - final image = track.album.images.firstOrNull; - final cachedImage = image == null - ? null - : image.url.startsWith("http") - ? (await DefaultCacheManager().getSingleFile(image.url)).path - : image.url; - final data = { - ...jsonTrack, - "album": { - ...jsonTrack["album"], - "images": [ - if (cachedImage != null && image != null) - { - ...image.toJson(), - "path": cachedImage, - } - ] - } - }; - - await _saveWidgetData("activeTrack", jsonEncode(data)); - - await _updateWidget(); -} - -final glanceProvider = Provider((ref) { - final server = ref.read(serverProvider); - final activeTrack = ref.read(audioPlayerProvider).activeTrack; - - server.whenData( - (value) async { - final (:server, :port) = value; - - await _saveWidgetData( - "playbackServerAddress", - "${server.address.host}:$port", - ); - await _updateWidget(); - }, - ); - - _sendActiveTrack(activeTrack); - - ref.listen(serverProvider, (prev, next) async { - next.whenData( - (value) async { - final (:server, :port) = value; - - await _saveWidgetData( - "playbackServerAddress", - "${server.address.host}:$port", - ); - await _updateWidget(); - }, - ); - }); - - ref.listen( - audioPlayerProvider, - (previous, next) async { - try { - if (previous?.activeTrack != next.activeTrack && - next.activeTrack != null) { - await _sendActiveTrack(next.activeTrack); - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }, - ); - - final subscriptions = [ - audioPlayer.playingStream.listen((playing) async { - await _saveWidgetData("isPlaying", playing); - await _updateWidget(); - }), - audioPlayer.positionStream.listen((position) async { - await _saveWidgetData("position", position.inSeconds); - await _updateWidget(); - }), - audioPlayer.durationStream.listen((duration) async { - await _saveWidgetData("duration", duration.inSeconds); - await _updateWidget(); - }), - ]; - - ref.onDispose(() { - for (final subscription in subscriptions) { - subscription.cancel(); - } - }); -}); diff --git a/lib/provider/history/history.dart b/lib/provider/history/history.dart deleted file mode 100644 index b83e5db1..00000000 --- a/lib/provider/history/history.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; - -class PlaybackHistoryActions { - final Ref ref; - AppDatabase get _db => ref.read(databaseProvider); - - PlaybackHistoryActions(this.ref); - - Future _batchInsertHistoryEntries( - List entries) async { - await _db.batch((batch) { - batch.insertAll(_db.historyTable, entries); - }); - } - - Future addPlaylists(List playlists) async { - await _batchInsertHistoryEntries([ - for (final playlist in playlists) - HistoryTableCompanion.insert( - type: HistoryEntryType.playlist, - itemId: playlist.id, - data: playlist.toJson(), - ), - ]); - } - - Future addAlbums(List albums) async { - await _batchInsertHistoryEntries([ - for (final albums in albums) - HistoryTableCompanion.insert( - type: HistoryEntryType.album, - itemId: albums.id, - data: albums.toJson(), - ), - ]); - } - - Future addTracks(List tracks) async { - assert( - tracks.every((t) => t.artists.every((a) => a.images != null)), - 'Track artists must have images', - ); - - await _batchInsertHistoryEntries([ - for (final track in tracks) - HistoryTableCompanion.insert( - type: HistoryEntryType.track, - itemId: track.id, - data: track.toJson(), - ), - ]); - } - - Future addTrack(SpotubeTrackObject track) async { - assert( - track.artists.every((a) => a.images != null), - 'Track artists must have images', - ); - - await _db.into(_db.historyTable).insert( - HistoryTableCompanion.insert( - type: HistoryEntryType.track, - itemId: track.id, - data: track.toJson(), - ), - ); - } - - Future clear() async { - _db.delete(_db.historyTable).go(); - } -} - -final playbackHistoryActionsProvider = - Provider((ref) => PlaybackHistoryActions(ref)); diff --git a/lib/provider/history/recent.dart b/lib/provider/history/recent.dart deleted file mode 100644 index 1ee2a5d6..00000000 --- a/lib/provider/history/recent.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'dart:convert'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/provider/database/database.dart'; - -class RecentlyPlayedItemNotifier extends AsyncNotifier> { - @override - build() async { - final database = ref.watch(databaseProvider); - - final query = database.customSelect( - """ - WITH RankedHistory AS ( - SELECT *, ROW_NUMBER() OVER (PARTITION BY item_id ORDER BY created_at DESC) AS rn - FROM history_table - WHERE type in ('playlist', 'album') - ) - SELECT * - FROM RankedHistory - WHERE rn = 1 - ORDER BY created_at DESC - LIMIT 10 - """, - readsFrom: {database.historyTable}, - ).map((rows) async { - return await rows.map((row) { - final type = row.read('type'); - return HistoryTableData( - id: row.read('id'), - itemId: row.read('item_id'), - type: HistoryEntryType.values.firstWhere((e) => e.name == type), - createdAt: row.read('created_at'), - data: jsonDecode(row.read('data')) as Map, - ); - }); - }); - - final subscription = query.watch().listen((event) async { - state = AsyncData(await Future.wait(event)); - }); - - ref.onDispose(() => subscription.cancel()); - - final items = await Future.wait(await query.get()); - - return items; - } -} - -final recentlyPlayedItems = - AsyncNotifierProvider>( - () => RecentlyPlayedItemNotifier(), -); diff --git a/lib/provider/history/summary.dart b/lib/provider/history/summary.dart deleted file mode 100644 index 5ced7559..00000000 --- a/lib/provider/history/summary.dart +++ /dev/null @@ -1,197 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; - -import 'package:drift/drift.dart'; -import 'package:drift/extensions/json1.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/provider/database/database.dart'; - -class PlaybackHistorySummary { - final Duration duration; - final int tracks; - final int artists; - final double fees; - final int albums; - final int playlists; - - const PlaybackHistorySummary({ - required this.duration, - required this.tracks, - required this.artists, - required this.fees, - required this.albums, - required this.playlists, - }); - - PlaybackHistorySummary copyWith({ - Duration? duration, - int? tracks, - int? artists, - double? fees, - int? albums, - int? playlists, - }) { - return PlaybackHistorySummary( - duration: duration ?? this.duration, - tracks: tracks ?? this.tracks, - artists: artists ?? this.artists, - fees: fees ?? this.fees, - albums: albums ?? this.albums, - playlists: playlists ?? this.playlists, - ); - } -} - -class PlaybackHistorySummaryNotifier - extends AsyncNotifier { - @override - build() async { - final database = ref.watch(databaseProvider); - - final uniqItemIdCountingCol = - database.historyTable.itemId.count(distinct: true); - final itemIdCountingCol = database.historyTable.itemId.count(); - final durationSumJsonColumn = - database.historyTable.data.jsonExtract(r"$.durationMs").sum(); - final artistCountingCol = - database.historyTable.data.jsonExtract(r"$.artists"); - - final totalTracksListenedQuery = (database.selectOnly(database.historyTable) - ..addColumns([uniqItemIdCountingCol]) - ..where( - database.historyTable.type.equals(HistoryEntryType.track.name))) - .map((row) => row.read(uniqItemIdCountingCol)); - - final totalDurationListenedQuery = (database - .selectOnly(database.historyTable) - ..addColumns([durationSumJsonColumn]) - ..where( - database.historyTable.type.equals(HistoryEntryType.track.name))) - .map( - (row) => Duration(milliseconds: row.read(durationSumJsonColumn) ?? 0), - ); - - final totalArtistsListenedQuery = - (database.selectOnly(database.historyTable) - ..addColumns([artistCountingCol]) - ..where( - database.historyTable.type.equals(HistoryEntryType.track.name), - )) - .map( - (row) { - final data = jsonDecode(row.read(artistCountingCol)!) as List; - return data.map((e) => e['id'] as String).cast().toList(); - }, - ); - - final totalAlbumsListenedQuery = (database.selectOnly(database.historyTable) - ..addColumns([uniqItemIdCountingCol]) - ..where( - database.historyTable.type.equals(HistoryEntryType.album.name))) - .map((row) => row.read(uniqItemIdCountingCol)); - - final totalPlaylistsListenedQuery = - (database.selectOnly(database.historyTable) - ..addColumns([uniqItemIdCountingCol]) - ..where( - database.historyTable.type - .equals(HistoryEntryType.playlist.name), - )) - .map((row) => row.read(uniqItemIdCountingCol)); - - final oldestDate = DateTime.now().copyWith(day: 1, hour: 0, minute: 0); - final newestDate = DateTime.now().copyWith(day: 30, hour: 23, minute: 59); - final totalTracksListenedThisMonthQuery = - (database.selectOnly(database.historyTable) - ..addColumns([itemIdCountingCol]) - ..where( - database.historyTable.type.equals( - HistoryEntryType.track.name, - ) & - database.historyTable.createdAt - .isBetweenValues(oldestDate, newestDate), - )) - .map((row) => row.read(itemIdCountingCol)); - - final subscriptions = [ - totalTracksListenedQuery.watchSingle().listen((event) { - if (event == null || state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - tracks: event, - )); - }), - totalDurationListenedQuery.watchSingle().listen((event) { - if (state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - duration: event, - )); - }), - totalArtistsListenedQuery.watch().listen((event) { - if (state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - artists: event.expand((e) => e).toSet().length, - )); - }), - totalAlbumsListenedQuery.watchSingle().listen((event) { - if (event == null || state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - albums: event, - )); - }), - totalPlaylistsListenedQuery.watchSingle().listen((event) { - if (event == null || state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - playlists: event, - )); - }), - totalTracksListenedThisMonthQuery.watchSingle().listen((event) { - if (event == null || state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - fees: event * 0.005, - )); - }), - ]; - - ref.onDispose(() { - for (final subscription in subscriptions) { - subscription.cancel(); - } - }); - - return database.transaction(() async { - final totalTracksListened = - await totalTracksListenedQuery.getSingle() ?? 0; - - final totalDurationListened = - await totalDurationListenedQuery.getSingle(); - - final totalArtistsListened = await totalArtistsListenedQuery - .get() - .then((value) => value.expand((e) => e).toSet().length); - - final totalAlbumsListened = - await totalAlbumsListenedQuery.getSingle() ?? 0; - - final totalPlaylistsListened = - await totalPlaylistsListenedQuery.getSingle() ?? 0; - - final totalTracksListenedThisMonth = - await totalTracksListenedThisMonthQuery.getSingle() ?? 0; - - return PlaybackHistorySummary( - duration: totalDurationListened, - tracks: totalTracksListened, - artists: totalArtistsListened, - fees: totalTracksListenedThisMonth * 0.005, - albums: totalAlbumsListened, - playlists: totalPlaylistsListened, - ); - }); - } -} - -final playbackHistorySummaryProvider = AsyncNotifierProvider< - PlaybackHistorySummaryNotifier, PlaybackHistorySummary>( - () => PlaybackHistorySummaryNotifier(), -); diff --git a/lib/provider/history/top.dart b/lib/provider/history/top.dart deleted file mode 100644 index b52e65e2..00000000 --- a/lib/provider/history/top.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; - -enum HistoryDuration { - allTime(Duration(days: 365 * 2003)), - days7(Duration(days: 7)), - days30(Duration(days: 30)), - months6(Duration(days: 30 * 6)), - year(Duration(days: 365)), - years2(Duration(days: 365 * 2)); - - final Duration duration; - - const HistoryDuration(this.duration); -} - -final playbackHistoryTopDurationProvider = - StateProvider((ref) => HistoryDuration.days30); diff --git a/lib/provider/history/top/albums.dart b/lib/provider/history/top/albums.dart deleted file mode 100644 index 1caad5cd..00000000 --- a/lib/provider/history/top/albums.dart +++ /dev/null @@ -1,116 +0,0 @@ -import 'dart:convert'; - -import 'package:collection/collection.dart'; -import 'package:drift/drift.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -typedef PlaybackHistoryAlbum = ({int count, SpotubeSimpleAlbumObject album}); - -class HistoryTopAlbumsNotifier extends FamilyPaginatedAsyncNotifier< - PlaybackHistoryAlbum, HistoryDuration> { - HistoryTopAlbumsNotifier() : super(); - - Selectable createAlbumsQuery( - {int? limit, int? offset}) { - final database = ref.read(databaseProvider); - - final duration = switch (arg) { - HistoryDuration.allTime => '0', - HistoryDuration.days7 => "strftime('%s', 'now', 'weekday 0', '-7 days')", - HistoryDuration.days30 => "strftime('%s', 'now', 'start of month')", - HistoryDuration.months6 => - "strftime('%s', date('now', '-5 months', 'start of month'))", - HistoryDuration.year => "strftime('%s', date('now', 'start of year'))", - HistoryDuration.years2 => - "strftime('%s', date('now', '-1 years', 'start of year'))", - }; - - return database.customSelect( - """ - SELECT - history_table.created_at, - """ - r""" - json_extract(history_table.data, '$.album') as data, - json_extract(history_table.data, '$.album.id') as item_id, - 'album' as type - """ - """ - FROM history_table - WHERE type = 'track' AND - created_at >= $duration - UNION ALL - SELECT - history_table.created_at, - history_table.data, - history_table.item_id, - history_table.type - FROM history_table - WHERE type = 'album' AND - created_at >= $duration - ORDER BY created_at desc - ${limit != null && offset != null ? 'LIMIT $limit OFFSET $offset' : ''} - """, - readsFrom: {database.historyTable}, - ).map((row) { - final data = row.read('data'); - final album = SpotubeSimpleAlbumObject.fromJson(jsonDecode(data)); - return album; - }); - } - - @override - fetch(offset, limit) async { - final albumsQuery = createAlbumsQuery(limit: limit, offset: offset); - - final items = getAlbumsWithCount(await albumsQuery.get()); - - return SpotubePaginationResponseObject( - items: items, - limit: limit, - hasMore: items.length == limit, - nextOffset: (offset + limit).toInt(), - total: items.length, - ); - } - - @override - build(arg) async { - final subscription = createAlbumsQuery().watch().listen((event) { - if (state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - items: getAlbumsWithCount(event), - hasMore: false, - )); - }); - - ref.onDispose(() { - subscription.cancel(); - }); - - return await fetch(0, 20); - } - - List getAlbumsWithCount( - List albumsWithTrackAlbums, - ) { - return groupBy(albumsWithTrackAlbums, (album) => album.id) - .entries - .map((entry) { - return (count: entry.value.length, album: entry.value.first); - }) - .sorted((a, b) => b.count.compareTo(a.count)) - .toList(); - } -} - -final historyTopAlbumsProvider = AsyncNotifierProviderFamily< - HistoryTopAlbumsNotifier, - SpotubePaginationResponseObject, - HistoryDuration>( - () => HistoryTopAlbumsNotifier(), -); diff --git a/lib/provider/history/top/playlists.dart b/lib/provider/history/top/playlists.dart deleted file mode 100644 index 1beabb80..00000000 --- a/lib/provider/history/top/playlists.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:drift/drift.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -typedef PlaybackHistoryPlaylist = ({ - int count, - SpotubeSimplePlaylistObject playlist -}); - -class HistoryTopPlaylistsNotifier extends FamilyPaginatedAsyncNotifier< - PlaybackHistoryPlaylist, HistoryDuration> { - HistoryTopPlaylistsNotifier() : super(); - - SimpleSelectStatement<$HistoryTableTable, HistoryTableData> - createPlaylistsQuery() { - final database = ref.read(databaseProvider); - - return database.select(database.historyTable) - ..where( - (tbl) => - tbl.type.equalsValue(HistoryEntryType.playlist) & - tbl.createdAt.isBiggerOrEqualValue( - DateTime.now().subtract(arg.duration), - ), - ); - } - - @override - fetch(offset, limit) async { - final playlistsQuery = createPlaylistsQuery()..limit(limit, offset: offset); - - final items = getPlaylistsWithCount(await playlistsQuery.get()); - - return SpotubePaginationResponseObject( - items: items, - nextOffset: offset + limit, - total: items.length, - limit: limit, - hasMore: items.length == limit, - ); - } - - @override - build(arg) async { - final subscription = createPlaylistsQuery().watch().listen((event) { - if (state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - items: getPlaylistsWithCount(event), - hasMore: false, - )); - }); - - ref.onDispose(() { - subscription.cancel(); - }); - - return await fetch(0, 20); - } - - List getPlaylistsWithCount( - List playlists, - ) { - return groupBy(playlists, (playlist) => playlist.playlist!.id) - .entries - .map((entry) { - return ( - count: entry.value.length, - playlist: entry.value.first.playlist!, - ); - }) - .sorted((a, b) => b.count.compareTo(a.count)) - .toList(); - } -} - -final historyTopPlaylistsProvider = AsyncNotifierProviderFamily< - HistoryTopPlaylistsNotifier, - SpotubePaginationResponseObject, - HistoryDuration>( - () => HistoryTopPlaylistsNotifier(), -); diff --git a/lib/provider/history/top/tracks.dart b/lib/provider/history/top/tracks.dart deleted file mode 100644 index 5c1dbdbf..00000000 --- a/lib/provider/history/top/tracks.dart +++ /dev/null @@ -1,196 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:drift/drift.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/history/top.dart'; -import 'package:spotube/provider/metadata_plugin/artist/artist.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -typedef PlaybackHistoryTrack = ({int count, SpotubeTrackObject track}); -typedef PlaybackHistoryArtist = ({int count, SpotubeSimpleArtistObject artist}); - -class HistoryTopTracksNotifier extends FamilyPaginatedAsyncNotifier< - PlaybackHistoryTrack, HistoryDuration> { - HistoryTopTracksNotifier() : super(); - - SimpleSelectStatement<$HistoryTableTable, HistoryTableData> - createTracksQuery() { - final database = ref.read(databaseProvider); - - return database.select(database.historyTable) - ..where( - (tbl) => - tbl.type.equalsValue(HistoryEntryType.track) & - tbl.createdAt.isBiggerOrEqualValue(switch (arg) { - HistoryDuration.allTime => DateTime(1970), - // from start of the week - HistoryDuration.days7 => DateTime.now() - .subtract(Duration(days: DateTime.now().weekday - 1)), - // from start of the month - HistoryDuration.days30 => - DateTime.now().subtract(Duration(days: DateTime.now().day - 1)), - // from start of the 6th month - HistoryDuration.months6 => DateTime.now() - .subtract(Duration(days: DateTime.now().day - 1)) - .subtract(const Duration(days: 30 * 6)), - // from start of the year - HistoryDuration.year => DateTime.now() - .subtract(Duration(days: DateTime.now().day - 1)) - .subtract(const Duration(days: 30 * 12)), - HistoryDuration.years2 => DateTime.now() - .subtract(Duration(days: DateTime.now().day - 1)) - .subtract(const Duration(days: 30 * 12 * 2)), - }), - ); - } - - Future fixImageNotLoadingForArtistIssue( - List entries, - ) async { - final nonImageArtistTracks = - entries.where((e) => e.track!.artists.any((a) => a.images == null)); - - if (nonImageArtistTracks.isEmpty) return; - - final artistIds = nonImageArtistTracks - .map((e) => e.track!.artists.map((a) => a.id)) - .expand((e) => e) - .toSet() - .toList(); - - if (artistIds.isEmpty) return; - - final artists = await Future.wait([ - for (final id in artistIds) - ref.read(metadataPluginArtistProvider(id).future), - ]); - - final imagedArtistTracks = nonImageArtistTracks.map((e) { - var track = e.track!; - final includedArtists = track.artists - .map((a) { - final fullArtist = - artists.firstWhereOrNull((artist) => artist.id == a.id); - - return fullArtist != null - ? a.copyWith(images: fullArtist.images) - : a; - }) - .nonNulls - .toList(); - - track = track.copyWith(artists: includedArtists); - - return e.copyWith(data: track.toJson()); - }); - - assert( - imagedArtistTracks - .every((e) => e.track!.artists.every((a) => a.images != null)), - 'Tracks artists should have images', - ); - - final database = ref.read(databaseProvider); - await database.batch((batch) { - batch.insertAllOnConflictUpdate( - database.historyTable, - imagedArtistTracks, - ); - }); - } - - @override - fetch(offset, limit) async { - final tracksQuery = createTracksQuery()..limit(limit, offset: offset); - - final entries = await tracksQuery.get(); - - final items = getTracksWithCount(entries); - - return SpotubePaginationResponseObject( - items: items, - nextOffset: offset + limit, - total: items.length, - limit: limit, - hasMore: items.length == limit, - ); - } - - @override - build(arg) async { - final subscription = createTracksQuery().watch().listen((event) { - if (state.asData == null) return; - state = AsyncData(state.asData!.value.copyWith( - items: getTracksWithCount(event), - hasMore: false, - )); - }); - - ref.onDispose(() { - subscription.cancel(); - }); - - return await fetch(0, 20); - } - - List get artists { - return getArtistsWithCount( - state.asData?.value.items.expand((e) => e.track.artists) ?? [], - ); - } - - List getArtistsWithCount( - Iterable artists, - ) { - return groupBy(artists, (artist) => artist.id) - .entries - .map((entry) { - return ( - count: entry.value.length, - - /// Previously, due to a bug, artist images were not being saved. - /// Now it's fixed, but we need to handle the case where images are null. - /// So we take the first artist with images if available, otherwise the first one. - artist: entry.value.firstWhereOrNull((a) => a.images != null) ?? - entry.value.first, - ); - }) - .sorted((a, b) => b.count.compareTo(a.count)) - .toList(); - } - - List getTracksWithCount(List tracks) { - fixImageNotLoadingForArtistIssue(tracks); - - return groupBy( - tracks, - (track) => track.track!.id, - ) - .entries - .map((entry) { - return ( - count: entry.value.length, - - /// Previously, due to a bug, artist images were not being saved. - /// Now it's fixed, but we need to handle the case where images are null. - /// So we take the first artist with images if available, otherwise the first one. - track: entry.value - .firstWhereOrNull( - (t) => t.track!.artists.every((a) => a.images != null)) - ?.track! ?? - entry.value.first.track!, - ); - }) - .sorted((a, b) => b.count.compareTo(a.count)) - .toList(); - } -} - -final historyTopTracksProvider = AsyncNotifierProviderFamily< - HistoryTopTracksNotifier, - SpotubePaginationResponseObject, - HistoryDuration>( - () => HistoryTopTracksNotifier(), -); diff --git a/lib/provider/local_tracks/local_tracks_provider.dart b/lib/provider/local_tracks/local_tracks_provider.dart deleted file mode 100644 index 8d44b607..00000000 --- a/lib/provider/local_tracks/local_tracks_provider.dart +++ /dev/null @@ -1,148 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:flutter/foundation.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:metadata_god/metadata_god.dart'; -import 'package:mime/mime.dart'; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart'; - -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -// ignore: depend_on_referenced_packages -import 'package:flutter_rust_bridge/flutter_rust_bridge.dart' show FrbException; -import 'package:spotube/utils/service_utils.dart'; - -const supportedAudioTypes = [ - "audio/webm", - "audio/ogg", - "audio/mpeg", - "audio/mp4", - "audio/opus", - "audio/wav", - "audio/aac", - "audio/flac", - "audio/x-flac", - "audio/x-wav", -]; - -const imgMimeToExt = { - "image/png": ".png", - "image/jpeg": ".jpg", - "image/webp": ".webp", - "image/gif": ".gif", -}; - -typedef MetadataFile = ({ - Metadata? metadata, - File file, - String? art, -}); - -final localTracksProvider = - FutureProvider>>((ref) async { - try { - if (kIsWeb) return {}; - final Map> libraryToTracks = {}; - - final downloadLocation = ref.watch( - userPreferencesProvider.select((s) => s.downloadLocation), - ); - - if (downloadLocation.isEmpty) { - return {}; - } - - final downloadDir = Directory(downloadLocation); - final cacheDir = - Directory(await UserPreferencesNotifier.getMusicCacheDir()); - if (!await downloadDir.exists()) { - await downloadDir.create(recursive: true); - } - if (!await cacheDir.exists()) { - await cacheDir.create(recursive: true); - } - final localLibraryLocations = ref.watch( - userPreferencesProvider.select((s) => s.localLibraryLocation), - ); - - for (final location in [ - downloadLocation, - cacheDir.path, - ...localLibraryLocations - ]) { - if (location.isEmpty) continue; - final entities = []; - if (await Directory(location).exists()) { - try { - final dirEntities = - await Directory(location).list(recursive: true).toList(); - - entities.addAll( - dirEntities.where( - (e) { - final mime = lookupMimeType(e.path) ?? - (extension(e.path) == ".opus" ? "audio/opus" : null); - - return e is File && supportedAudioTypes.contains(mime); - }, - ).cast(), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - } - - final List filesWithMetadata = await Future.wait( - entities.map((file) async { - try { - final metadata = await MetadataGod.readMetadata(file: file.path); - - final imageFile = File( - join( - (await getTemporaryDirectory()).path, - "spotube", - ServiceUtils.sanitizeFilename( - basenameWithoutExtension(file.path)) + - imgMimeToExt[metadata.picture?.mimeType ?? "image/jpeg"]!, - ), - ); - if (!await imageFile.exists() && metadata.picture != null) { - await imageFile.create(recursive: true); - await imageFile.writeAsBytes( - metadata.picture?.data ?? [], - mode: FileMode.writeOnly, - ); - } - - return (metadata: metadata, file: file, art: imageFile.path); - } catch (e, stack) { - if (e case FrbException() || TimeoutException()) { - return (file: file, metadata: null, art: null); - } - AppLogger.reportError(e, stack); - return null; - } - }), - ).then((value) => value.nonNulls.toList()); - - final tracksFromMetadata = filesWithMetadata - .map( - (fileWithMetadata) => SpotubeTrackObject.localTrackFromFile( - fileWithMetadata.file, - metadata: fileWithMetadata.metadata, - art: fileWithMetadata.art, - ) as SpotubeLocalTrackObject, - ) - .toList(); - - libraryToTracks[location] = tracksFromMetadata; - } - return libraryToTracks; - } catch (e, stack) { - AppLogger.reportError(e, stack); - return {}; - } -}); diff --git a/lib/provider/logs/logs_provider.dart b/lib/provider/logs/logs_provider.dart deleted file mode 100644 index d39059ac..00000000 --- a/lib/provider/logs/logs_provider.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'dart:convert'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/services/logger/logger.dart'; - -final logsProvider = StreamProvider.autoDispose((ref) async* { - final file = await AppLogger.getLogsPath(); - // Check if file is empty or non-existent - - if (await file.length() == 0) { - throw StateError("Logs file is empty or non-existent"); - } - - final stream = file.openRead().transform(utf8.decoder); - - await for (final line in stream) { - yield line; - } -}); diff --git a/lib/provider/lyrics/synced.dart b/lib/provider/lyrics/synced.dart deleted file mode 100644 index 2c33a736..00000000 --- a/lib/provider/lyrics/synced.dart +++ /dev/null @@ -1,153 +0,0 @@ -import 'dart:async'; - -import 'package:dio/dio.dart'; -import 'package:drift/drift.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:lrc/lrc.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/lyrics.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/services/dio/dio.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class SyncedLyricsNotifier - extends FamilyAsyncNotifier { - SpotubeTrackObject get _track => arg!; - - /// Lyrics credits: [lrclib.net](https://lrclib.net) and their contributors - /// Thanks for their generous public API - Future getLRCLibLyrics() async { - final packageInfo = await PackageInfo.fromPlatform(); - - final res = await globalDio.getUri( - Uri( - scheme: "https", - host: "lrclib.net", - path: "/api/get", - queryParameters: { - "artist_name": _track.artists.first.name, - "track_name": _track.name, - "album_name": _track.album.name, - if (_track.durationMs > 0) - "duration": (_track.durationMs / 1000).toInt().toString(), - }, - ), - options: Options( - headers: { - "User-Agent": - "Spotube v${packageInfo.version} (https://github.com/KRTirtho/spotube)" - }, - responseType: ResponseType.json, - ), - ); - - if (res.statusCode != 200) { - return SubtitleSimple( - lyrics: [], - name: _track.name, - uri: res.realUri, - rating: 0, - provider: "LRCLib", - ); - } - - final json = res.data as Map; - - final syncedLyricsRaw = json["syncedLyrics"] as String?; - final syncedLyrics = syncedLyricsRaw?.isNotEmpty == true - ? Lrc.parse(syncedLyricsRaw!) - .lyrics - .map(LyricSlice.fromLrcLine) - .toList() - : null; - - if (syncedLyrics?.isNotEmpty == true) { - return SubtitleSimple( - lyrics: syncedLyrics!, - name: _track.name, - uri: res.realUri, - rating: 100, - provider: "LRCLib", - ); - } - - final plainLyrics = (json["plainLyrics"] as String) - .split("\n") - .map((line) => LyricSlice(text: line, time: Duration.zero)) - .toList(); - - return SubtitleSimple( - lyrics: plainLyrics, - name: _track.name, - uri: res.realUri, - rating: 0, - provider: "LRCLib", - ); - } - - @override - FutureOr build(track) async { - try { - final database = ref.watch(databaseProvider); - - if (track == null) { - throw "No track currently"; - } - - final cachedLyrics = await (database.select(database.lyricsTable) - ..where((tbl) => tbl.trackId.equals(track.id))) - .map((row) => row.data) - .getSingleOrNull(); - - SubtitleSimple? lyrics = cachedLyrics; - - if (lyrics == null || - lyrics.lyrics.isEmpty || - lyrics.lyrics.length <= 5) { - lyrics = await getLRCLibLyrics(); - } - - if (lyrics.lyrics.isEmpty) { - throw Exception("Unable to find lyrics"); - } - - if (cachedLyrics == null || cachedLyrics.lyrics.isEmpty) { - await database.into(database.lyricsTable).insert( - LyricsTableCompanion.insert( - trackId: track.id, - data: lyrics, - ), - mode: InsertMode.replace, - ); - } - - return lyrics; - } catch (e, stackTrace) { - AppLogger.reportError(e, stackTrace); - rethrow; - } - } -} - -final syncedLyricsDelayProvider = StateProvider((ref) => 0); - -final syncedLyricsProvider = AsyncNotifierProviderFamily( - () => SyncedLyricsNotifier(), -); - -final syncedLyricsMapProvider = - FutureProvider.family((ref, SpotubeTrackObject? track) async { - final syncedLyrics = await ref.watch(syncedLyricsProvider(track).future); - - final isStaticLyrics = - syncedLyrics.lyrics.every((l) => l.time == Duration.zero); - - final lyricsMap = syncedLyrics.lyrics - .map((lyric) => {lyric.time.inSeconds: lyric.text}) - .reduce((accumulator, lyricSlice) => {...accumulator, ...lyricSlice}); - - return (static: isStaticLyrics, lyricsMap: lyricsMap); -}); diff --git a/lib/provider/metadata_plugin/album/album.dart b/lib/provider/metadata_plugin/album/album.dart deleted file mode 100644 index 394f6eb0..00000000 --- a/lib/provider/metadata_plugin/album/album.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -final metadataPluginAlbumProvider = - FutureProvider.autoDispose.family( - (ref, id) async { - ref.cacheFor(); - - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - return metadataPlugin.album.getAlbum(id); - }, -); diff --git a/lib/provider/metadata_plugin/album/releases.dart b/lib/provider/metadata_plugin/album/releases.dart deleted file mode 100644 index e6e88baf..00000000 --- a/lib/provider/metadata_plugin/album/releases.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; - -class MetadataPluginAlbumReleasesNotifier - extends PaginatedAsyncNotifier { - @override - Future> fetch( - int offset, - int limit, - ) async { - return await (await metadataPlugin) - .album - .releases(limit: limit, offset: offset); - } - - @override - build() async { - ref.watch(metadataPluginAuthenticatedProvider); - return await fetch(0, 20); - } -} - -final metadataPluginAlbumReleasesProvider = AsyncNotifierProvider< - MetadataPluginAlbumReleasesNotifier, - SpotubePaginationResponseObject>( - () => MetadataPluginAlbumReleasesNotifier(), -); diff --git a/lib/provider/metadata_plugin/artist/albums.dart b/lib/provider/metadata_plugin/artist/albums.dart deleted file mode 100644 index 0f582bf9..00000000 --- a/lib/provider/metadata_plugin/artist/albums.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginArtistAlbumNotifier - extends FamilyPaginatedAsyncNotifier { - @override - Future> fetch( - int offset, - int limit, - ) async { - return await (await metadataPlugin).artist.albums( - arg, - limit: limit, - offset: offset, - ); - } - - @override - build(arg) async { - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginArtistAlbumsProvider = AsyncNotifierProviderFamily< - MetadataPluginArtistAlbumNotifier, - SpotubePaginationResponseObject, - String>( - () => MetadataPluginArtistAlbumNotifier(), -); diff --git a/lib/provider/metadata_plugin/artist/artist.dart b/lib/provider/metadata_plugin/artist/artist.dart deleted file mode 100644 index e66309d4..00000000 --- a/lib/provider/metadata_plugin/artist/artist.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -final metadataPluginArtistProvider = - FutureProvider.autoDispose.family( - (ref, artistId) async { - ref.cacheFor(); - - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - return metadataPlugin.artist.getArtist(artistId); - }, -); diff --git a/lib/provider/metadata_plugin/artist/related.dart b/lib/provider/metadata_plugin/artist/related.dart deleted file mode 100644 index c6a80f75..00000000 --- a/lib/provider/metadata_plugin/artist/related.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginArtistRelatedArtistsNotifier - extends FamilyPaginatedAsyncNotifier { - @override - Future> fetch( - int offset, - int limit, - ) async { - return await (await metadataPlugin).artist.related( - arg, - limit: limit, - offset: offset, - ); - } - - @override - build(arg) async { - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginArtistRelatedArtistsProvider = AsyncNotifierProviderFamily< - MetadataPluginArtistRelatedArtistsNotifier, - SpotubePaginationResponseObject, - String>( - () => MetadataPluginArtistRelatedArtistsNotifier(), -); diff --git a/lib/provider/metadata_plugin/artist/top_tracks.dart b/lib/provider/metadata_plugin/artist/top_tracks.dart deleted file mode 100644 index c622a738..00000000 --- a/lib/provider/metadata_plugin/artist/top_tracks.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -class MetadataPluginArtistTopTracksNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginArtistTopTracksNotifier() : super(); - - @override - fetch(offset, limit) async { - final tracks = await (await metadataPlugin).artist.topTracks( - arg, - offset: offset, - limit: limit, - ); - - return tracks; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginArtistTopTracksProvider = - AutoDisposeAsyncNotifierProviderFamily< - MetadataPluginArtistTopTracksNotifier, - SpotubePaginationResponseObject, - String>( - () => MetadataPluginArtistTopTracksNotifier(), -); diff --git a/lib/provider/metadata_plugin/artist/wikipedia.dart b/lib/provider/metadata_plugin/artist/wikipedia.dart deleted file mode 100644 index 81fcc77c..00000000 --- a/lib/provider/metadata_plugin/artist/wikipedia.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/services/wikipedia/wikipedia.dart'; -import 'package:wikipedia_api/wikipedia_api.dart'; - -final artistWikipediaSummaryProvider = - FutureProvider.autoDispose.family( - (ref, artist) async { - final query = artist.name.replaceAll(" ", "_"); - final res = await wikipedia.pageContent.pageSummaryTitleGet(query); - - if (res?.type != "standard") { - return await wikipedia.pageContent - .pageSummaryTitleGet("${query}_(singer)"); - } - return res; - }, -); diff --git a/lib/provider/metadata_plugin/audio_source/quality_label.dart b/lib/provider/metadata_plugin/audio_source/quality_label.dart deleted file mode 100644 index 113ed54e..00000000 --- a/lib/provider/metadata_plugin/audio_source/quality_label.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:riverpod/riverpod.dart'; -import 'package:spotube/provider/metadata_plugin/audio_source/quality_presets.dart'; - -final audioSourceQualityLabelProvider = Provider((ref) { - final sourceQuality = ref.watch(audioSourcePresetsProvider); - final sourceContainer = sourceQuality.presets - .elementAtOrNull(sourceQuality.selectedStreamingContainerIndex); - final quality = sourceContainer?.qualities - .elementAtOrNull(sourceQuality.selectedStreamingQualityIndex); - - return "${sourceContainer?.name ?? "Unknown"} • ${quality?.toString() ?? "Unknown"}"; -}); diff --git a/lib/provider/metadata_plugin/audio_source/quality_presets.dart b/lib/provider/metadata_plugin/audio_source/quality_presets.dart deleted file mode 100644 index ba88fed6..00000000 --- a/lib/provider/metadata_plugin/audio_source/quality_presets.dart +++ /dev/null @@ -1,132 +0,0 @@ -import 'dart:convert'; - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; -import 'package:spotube/services/metadata/metadata.dart'; - -part 'quality_presets.g.dart'; -part 'quality_presets.freezed.dart'; - -@freezed -class AudioSourcePresetsState with _$AudioSourcePresetsState { - factory AudioSourcePresetsState({ - @Default([]) final List presets, - @Default(0) final int selectedStreamingQualityIndex, - @Default(0) final int selectedStreamingContainerIndex, - @Default(0) final int selectedDownloadingQualityIndex, - @Default(0) final int selectedDownloadingContainerIndex, - }) = _AudioSourcePresetsState; - - factory AudioSourcePresetsState.fromJson(Map json) => - _$AudioSourcePresetsStateFromJson(json); -} - -class AudioSourceAvailableQualityPresetsNotifier - extends Notifier { - @override - build() { - final audioSourceSnapshot = ref.watch(audioSourcePluginProvider); - final audioSourceConfigSnapshot = ref.watch( - metadataPluginsProvider.select((data) => - data.whenData((value) => value.defaultAudioSourcePluginConfig)), - ); - - _initialize(audioSourceSnapshot, audioSourceConfigSnapshot); - - listenSelf((previous, next) { - final isNewLossless = - next.presets.elementAtOrNull(next.selectedStreamingContainerIndex) - is SpotubeAudioSourceContainerPresetLossless; - final isOldLossless = previous?.presets - .elementAtOrNull(previous.selectedStreamingContainerIndex) - is SpotubeAudioSourceContainerPresetLossless; - if (!isOldLossless && isNewLossless) { - audioPlayer.setDemuxerBufferSize(6 * 1024 * 1024); // 6MB - } else if (isOldLossless && !isNewLossless) { - audioPlayer.setDemuxerBufferSize(4 * 1024 * 1024); // 4MB - } - }); - - return AudioSourcePresetsState(); - } - - void _initialize( - AsyncValue audioSourceSnapshot, - AsyncValue audioSourceConfigSnapshot, - ) async { - audioSourceConfigSnapshot.whenData((audioSourceConfig) { - audioSourceSnapshot.whenData((audioSource) async { - if (audioSource == null || audioSourceConfig == null) { - throw MetadataPluginException.noDefaultAudioSourcePlugin(); - } - final preferences = await SharedPreferences.getInstance(); - final persistedStateStr = - preferences.getString("audioSourceState-${audioSourceConfig.slug}"); - - if (persistedStateStr != null) { - state = - AudioSourcePresetsState.fromJson(jsonDecode(persistedStateStr)) - .copyWith( - presets: audioSource.audioSource.supportedPresets, - ); - } else { - state = AudioSourcePresetsState( - presets: audioSource.audioSource.supportedPresets, - ); - } - }); - }); - } - - void setSelectedStreamingContainerIndex(int index) { - state = state.copyWith( - selectedStreamingContainerIndex: index, - selectedStreamingQualityIndex: - 0, // Resetting both because it's a different quality - ); - _updatePreferences(); - } - - void setSelectedStreamingQualityIndex(int index) { - state = state.copyWith(selectedStreamingQualityIndex: index); - _updatePreferences(); - } - - void setSelectedDownloadingContainerIndex(int index) { - state = state.copyWith( - selectedDownloadingContainerIndex: index, - selectedDownloadingQualityIndex: - 0, // Resetting both because it's a different quality - ); - _updatePreferences(); - } - - void setSelectedDownloadingQualityIndex(int index) { - state = state.copyWith(selectedDownloadingQualityIndex: index); - _updatePreferences(); - } - - void _updatePreferences() async { - final audioSourceConfig = await ref.read(metadataPluginsProvider - .selectAsync((data) => data.defaultAudioSourcePluginConfig)); - if (audioSourceConfig == null) { - throw MetadataPluginException.noDefaultAudioSourcePlugin(); - } - - final preferences = await SharedPreferences.getInstance(); - await preferences.setString( - "audioSourceState-${audioSourceConfig.slug}", - jsonEncode(state), - ); - } -} - -final audioSourcePresetsProvider = NotifierProvider< - AudioSourceAvailableQualityPresetsNotifier, AudioSourcePresetsState>( - () => AudioSourceAvailableQualityPresetsNotifier(), -); diff --git a/lib/provider/metadata_plugin/audio_source/quality_presets.freezed.dart b/lib/provider/metadata_plugin/audio_source/quality_presets.freezed.dart deleted file mode 100644 index a8e0c9f7..00000000 --- a/lib/provider/metadata_plugin/audio_source/quality_presets.freezed.dart +++ /dev/null @@ -1,289 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'quality_presets.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -AudioSourcePresetsState _$AudioSourcePresetsStateFromJson( - Map json) { - return _AudioSourcePresetsState.fromJson(json); -} - -/// @nodoc -mixin _$AudioSourcePresetsState { - List get presets => - throw _privateConstructorUsedError; - int get selectedStreamingQualityIndex => throw _privateConstructorUsedError; - int get selectedStreamingContainerIndex => throw _privateConstructorUsedError; - int get selectedDownloadingQualityIndex => throw _privateConstructorUsedError; - int get selectedDownloadingContainerIndex => - throw _privateConstructorUsedError; - - /// Serializes this AudioSourcePresetsState to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of AudioSourcePresetsState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $AudioSourcePresetsStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AudioSourcePresetsStateCopyWith<$Res> { - factory $AudioSourcePresetsStateCopyWith(AudioSourcePresetsState value, - $Res Function(AudioSourcePresetsState) then) = - _$AudioSourcePresetsStateCopyWithImpl<$Res, AudioSourcePresetsState>; - @useResult - $Res call( - {List presets, - int selectedStreamingQualityIndex, - int selectedStreamingContainerIndex, - int selectedDownloadingQualityIndex, - int selectedDownloadingContainerIndex}); -} - -/// @nodoc -class _$AudioSourcePresetsStateCopyWithImpl<$Res, - $Val extends AudioSourcePresetsState> - implements $AudioSourcePresetsStateCopyWith<$Res> { - _$AudioSourcePresetsStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of AudioSourcePresetsState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? presets = null, - Object? selectedStreamingQualityIndex = null, - Object? selectedStreamingContainerIndex = null, - Object? selectedDownloadingQualityIndex = null, - Object? selectedDownloadingContainerIndex = null, - }) { - return _then(_value.copyWith( - presets: null == presets - ? _value.presets - : presets // ignore: cast_nullable_to_non_nullable - as List, - selectedStreamingQualityIndex: null == selectedStreamingQualityIndex - ? _value.selectedStreamingQualityIndex - : selectedStreamingQualityIndex // ignore: cast_nullable_to_non_nullable - as int, - selectedStreamingContainerIndex: null == selectedStreamingContainerIndex - ? _value.selectedStreamingContainerIndex - : selectedStreamingContainerIndex // ignore: cast_nullable_to_non_nullable - as int, - selectedDownloadingQualityIndex: null == selectedDownloadingQualityIndex - ? _value.selectedDownloadingQualityIndex - : selectedDownloadingQualityIndex // ignore: cast_nullable_to_non_nullable - as int, - selectedDownloadingContainerIndex: null == - selectedDownloadingContainerIndex - ? _value.selectedDownloadingContainerIndex - : selectedDownloadingContainerIndex // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$AudioSourcePresetsStateImplCopyWith<$Res> - implements $AudioSourcePresetsStateCopyWith<$Res> { - factory _$$AudioSourcePresetsStateImplCopyWith( - _$AudioSourcePresetsStateImpl value, - $Res Function(_$AudioSourcePresetsStateImpl) then) = - __$$AudioSourcePresetsStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {List presets, - int selectedStreamingQualityIndex, - int selectedStreamingContainerIndex, - int selectedDownloadingQualityIndex, - int selectedDownloadingContainerIndex}); -} - -/// @nodoc -class __$$AudioSourcePresetsStateImplCopyWithImpl<$Res> - extends _$AudioSourcePresetsStateCopyWithImpl<$Res, - _$AudioSourcePresetsStateImpl> - implements _$$AudioSourcePresetsStateImplCopyWith<$Res> { - __$$AudioSourcePresetsStateImplCopyWithImpl( - _$AudioSourcePresetsStateImpl _value, - $Res Function(_$AudioSourcePresetsStateImpl) _then) - : super(_value, _then); - - /// Create a copy of AudioSourcePresetsState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? presets = null, - Object? selectedStreamingQualityIndex = null, - Object? selectedStreamingContainerIndex = null, - Object? selectedDownloadingQualityIndex = null, - Object? selectedDownloadingContainerIndex = null, - }) { - return _then(_$AudioSourcePresetsStateImpl( - presets: null == presets - ? _value._presets - : presets // ignore: cast_nullable_to_non_nullable - as List, - selectedStreamingQualityIndex: null == selectedStreamingQualityIndex - ? _value.selectedStreamingQualityIndex - : selectedStreamingQualityIndex // ignore: cast_nullable_to_non_nullable - as int, - selectedStreamingContainerIndex: null == selectedStreamingContainerIndex - ? _value.selectedStreamingContainerIndex - : selectedStreamingContainerIndex // ignore: cast_nullable_to_non_nullable - as int, - selectedDownloadingQualityIndex: null == selectedDownloadingQualityIndex - ? _value.selectedDownloadingQualityIndex - : selectedDownloadingQualityIndex // ignore: cast_nullable_to_non_nullable - as int, - selectedDownloadingContainerIndex: null == - selectedDownloadingContainerIndex - ? _value.selectedDownloadingContainerIndex - : selectedDownloadingContainerIndex // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$AudioSourcePresetsStateImpl implements _AudioSourcePresetsState { - _$AudioSourcePresetsStateImpl( - {final List presets = const [], - this.selectedStreamingQualityIndex = 0, - this.selectedStreamingContainerIndex = 0, - this.selectedDownloadingQualityIndex = 0, - this.selectedDownloadingContainerIndex = 0}) - : _presets = presets; - - factory _$AudioSourcePresetsStateImpl.fromJson(Map json) => - _$$AudioSourcePresetsStateImplFromJson(json); - - final List _presets; - @override - @JsonKey() - List get presets { - if (_presets is EqualUnmodifiableListView) return _presets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_presets); - } - - @override - @JsonKey() - final int selectedStreamingQualityIndex; - @override - @JsonKey() - final int selectedStreamingContainerIndex; - @override - @JsonKey() - final int selectedDownloadingQualityIndex; - @override - @JsonKey() - final int selectedDownloadingContainerIndex; - - @override - String toString() { - return 'AudioSourcePresetsState(presets: $presets, selectedStreamingQualityIndex: $selectedStreamingQualityIndex, selectedStreamingContainerIndex: $selectedStreamingContainerIndex, selectedDownloadingQualityIndex: $selectedDownloadingQualityIndex, selectedDownloadingContainerIndex: $selectedDownloadingContainerIndex)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AudioSourcePresetsStateImpl && - const DeepCollectionEquality().equals(other._presets, _presets) && - (identical(other.selectedStreamingQualityIndex, - selectedStreamingQualityIndex) || - other.selectedStreamingQualityIndex == - selectedStreamingQualityIndex) && - (identical(other.selectedStreamingContainerIndex, - selectedStreamingContainerIndex) || - other.selectedStreamingContainerIndex == - selectedStreamingContainerIndex) && - (identical(other.selectedDownloadingQualityIndex, - selectedDownloadingQualityIndex) || - other.selectedDownloadingQualityIndex == - selectedDownloadingQualityIndex) && - (identical(other.selectedDownloadingContainerIndex, - selectedDownloadingContainerIndex) || - other.selectedDownloadingContainerIndex == - selectedDownloadingContainerIndex)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_presets), - selectedStreamingQualityIndex, - selectedStreamingContainerIndex, - selectedDownloadingQualityIndex, - selectedDownloadingContainerIndex); - - /// Create a copy of AudioSourcePresetsState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$AudioSourcePresetsStateImplCopyWith<_$AudioSourcePresetsStateImpl> - get copyWith => __$$AudioSourcePresetsStateImplCopyWithImpl< - _$AudioSourcePresetsStateImpl>(this, _$identity); - - @override - Map toJson() { - return _$$AudioSourcePresetsStateImplToJson( - this, - ); - } -} - -abstract class _AudioSourcePresetsState implements AudioSourcePresetsState { - factory _AudioSourcePresetsState( - {final List presets, - final int selectedStreamingQualityIndex, - final int selectedStreamingContainerIndex, - final int selectedDownloadingQualityIndex, - final int selectedDownloadingContainerIndex}) = - _$AudioSourcePresetsStateImpl; - - factory _AudioSourcePresetsState.fromJson(Map json) = - _$AudioSourcePresetsStateImpl.fromJson; - - @override - List get presets; - @override - int get selectedStreamingQualityIndex; - @override - int get selectedStreamingContainerIndex; - @override - int get selectedDownloadingQualityIndex; - @override - int get selectedDownloadingContainerIndex; - - /// Create a copy of AudioSourcePresetsState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$AudioSourcePresetsStateImplCopyWith<_$AudioSourcePresetsStateImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/provider/metadata_plugin/audio_source/quality_presets.g.dart b/lib/provider/metadata_plugin/audio_source/quality_presets.g.dart deleted file mode 100644 index f3d8fd41..00000000 --- a/lib/provider/metadata_plugin/audio_source/quality_presets.g.dart +++ /dev/null @@ -1,38 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'quality_presets.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$AudioSourcePresetsStateImpl _$$AudioSourcePresetsStateImplFromJson( - Map json) => - _$AudioSourcePresetsStateImpl( - presets: (json['presets'] as List?) - ?.map((e) => SpotubeAudioSourceContainerPreset.fromJson( - Map.from(e as Map))) - .toList() ?? - const [], - selectedStreamingQualityIndex: - (json['selectedStreamingQualityIndex'] as num?)?.toInt() ?? 0, - selectedStreamingContainerIndex: - (json['selectedStreamingContainerIndex'] as num?)?.toInt() ?? 0, - selectedDownloadingQualityIndex: - (json['selectedDownloadingQualityIndex'] as num?)?.toInt() ?? 0, - selectedDownloadingContainerIndex: - (json['selectedDownloadingContainerIndex'] as num?)?.toInt() ?? 0, - ); - -Map _$$AudioSourcePresetsStateImplToJson( - _$AudioSourcePresetsStateImpl instance) => - { - 'presets': instance.presets.map((e) => e.toJson()).toList(), - 'selectedStreamingQualityIndex': instance.selectedStreamingQualityIndex, - 'selectedStreamingContainerIndex': - instance.selectedStreamingContainerIndex, - 'selectedDownloadingQualityIndex': - instance.selectedDownloadingQualityIndex, - 'selectedDownloadingContainerIndex': - instance.selectedDownloadingContainerIndex, - }; diff --git a/lib/provider/metadata_plugin/browse/section_items.dart b/lib/provider/metadata_plugin/browse/section_items.dart deleted file mode 100644 index 5c03ec2c..00000000 --- a/lib/provider/metadata_plugin/browse/section_items.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginBrowseSectionItemsNotifier - extends FamilyPaginatedAsyncNotifier { - @override - Future> fetch( - int offset, - int limit, - ) async { - return await (await metadataPlugin).browse.sectionItems( - arg, - limit: limit, - offset: offset, - ); - } - - @override - build(arg) async { - ref.watch(metadataPluginAuthenticatedProvider); - return await fetch(0, 20); - } -} - -final metadataPluginBrowseSectionItemsProvider = AsyncNotifierProviderFamily< - MetadataPluginBrowseSectionItemsNotifier, - SpotubePaginationResponseObject, - String>( - () => MetadataPluginBrowseSectionItemsNotifier(), -); diff --git a/lib/provider/metadata_plugin/browse/sections.dart b/lib/provider/metadata_plugin/browse/sections.dart deleted file mode 100644 index 1f73e10c..00000000 --- a/lib/provider/metadata_plugin/browse/sections.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; - -class MetadataPluginBrowseSectionsNotifier - extends PaginatedAsyncNotifier> { - @override - Future>> - fetch( - int offset, - int limit, - ) async { - return await (await metadataPlugin).browse.sections( - limit: limit, - offset: offset, - ); - } - - @override - build() async { - ref.watch(metadataPluginAuthenticatedProvider); - return await fetch(0, 20); - } -} - -final metadataPluginBrowseSectionsProvider = AsyncNotifierProvider< - MetadataPluginBrowseSectionsNotifier, - SpotubePaginationResponseObject>>( - () => MetadataPluginBrowseSectionsNotifier(), -); diff --git a/lib/provider/metadata_plugin/core/auth.dart b/lib/provider/metadata_plugin/core/auth.dart deleted file mode 100644 index dc5e7eb6..00000000 --- a/lib/provider/metadata_plugin/core/auth.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'dart:async'; - -import 'package:riverpod/riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; - -class MetadataPluginAuthenticatedNotifier extends AsyncNotifier { - @override - FutureOr build() async { - final defaultPluginConfig = ref.watch(metadataPluginsProvider); - if (defaultPluginConfig.asData?.value.defaultMetadataPluginConfig?.abilities - .contains(PluginAbilities.authentication) != - true) { - return false; - } - - final defaultPlugin = await ref.watch(metadataPluginProvider.future); - if (defaultPlugin == null) { - return false; - } - - final sub = defaultPlugin.auth.authStateStream.listen((event) { - state = AsyncData(defaultPlugin.auth.isAuthenticated()); - }); - - ref.onDispose(() { - sub.cancel(); - }); - - return defaultPlugin.auth.isAuthenticated(); - } -} - -final metadataPluginAuthenticatedProvider = - AsyncNotifierProvider( - MetadataPluginAuthenticatedNotifier.new, -); - -class AudioSourcePluginAuthenticatedNotifier extends AsyncNotifier { - @override - FutureOr build() async { - final defaultPluginConfig = ref.watch(metadataPluginsProvider); - if (defaultPluginConfig - .asData?.value.defaultAudioSourcePluginConfig?.abilities - .contains(PluginAbilities.authentication) != - true) { - return false; - } - - final defaultPlugin = await ref.watch(audioSourcePluginProvider.future); - if (defaultPlugin == null) { - return false; - } - - final sub = defaultPlugin.auth.authStateStream.listen((event) { - state = AsyncData(defaultPlugin.auth.isAuthenticated()); - }); - - ref.onDispose(() { - sub.cancel(); - }); - - return defaultPlugin.auth.isAuthenticated(); - } -} - -final audioSourcePluginAuthenticatedProvider = - AsyncNotifierProvider( - AudioSourcePluginAuthenticatedNotifier.new, -); diff --git a/lib/provider/metadata_plugin/core/repositories.dart b/lib/provider/metadata_plugin/core/repositories.dart deleted file mode 100644 index a78f63d9..00000000 --- a/lib/provider/metadata_plugin/core/repositories.dart +++ /dev/null @@ -1,90 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; -import 'package:spotube/services/dio/dio.dart'; - -class MetadataPluginRepositoriesNotifier - extends PaginatedAsyncNotifier { - MetadataPluginRepositoriesNotifier() : super(); - - Map _hasMore = {}; - - @override - fetch(int offset, int limit) async { - final gitubSearch = globalDio.get( - "https://api.github.com/search/repositories", - queryParameters: { - "q": "topic:spotube-plugin", - "sort": "stars", - "order": "desc", - "page": offset, - "per_page": limit, - }, - ); - - final codebergSearch = globalDio.get( - "https://codeberg.org/api/v1/repos/search", - queryParameters: { - "q": "spotube-plugin", - "topic": "true", - "sort": "stars", - "order": "desc", - "page": offset, - "limit": limit, - }, - ); - - final responses = await Future.wait([ - if (_hasMore["github.com"] ?? true) gitubSearch, - if (_hasMore["codeberg.org"] ?? true) codebergSearch, - ]); - - final repos = responses - .expand( - (response) => response.data["data"] ?? response.data["items"] ?? [], - ) - .map((repo) { - return MetadataPluginRepository( - name: repo["name"] ?? "", - owner: repo["owner"]["login"] ?? "", - description: repo["description"] ?? "", - repoUrl: repo["html_url"] ?? "", - topics: repo["topics"].cast() ?? [], - ); - }).toList(); - - final hasMore = responses.any((response) { - final items = - (response.data["data"] ?? response.data["items"] ?? []) as List; - _hasMore[response.requestOptions.uri.host] = - items.length >= limit && items.isNotEmpty; - - return _hasMore[response.requestOptions.uri.host] ?? false; - }); - - return SpotubePaginationResponseObject( - items: repos, - total: responses.fold( - 0, - (previousValue, response) => previousValue + - (response.data["total_count"] ?? - int.tryParse(response.headers["x-total-count"]?[0] ?? "") ?? - 0) as int, - ), - hasMore: hasMore, - nextOffset: hasMore ? offset + 1 : null, - limit: limit, - ); - } - - @override - build() async { - return await fetch(0, 10); - } -} - -final metadataPluginRepositoriesProvider = AsyncNotifierProvider< - MetadataPluginRepositoriesNotifier, - SpotubePaginationResponseObject>( - () => MetadataPluginRepositoriesNotifier(), -); diff --git a/lib/provider/metadata_plugin/core/scrobble.dart b/lib/provider/metadata_plugin/core/scrobble.dart deleted file mode 100644 index 0f8fcc19..00000000 --- a/lib/provider/metadata_plugin/core/scrobble.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'dart:async'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class MetadataPluginScrobbleNotifier - extends Notifier?> { - @override - build() { - final metadataPlugin = ref.watch(metadataPluginProvider); - final pluginConfig = ref - .watch(metadataPluginsProvider) - .valueOrNull - ?.defaultMetadataPluginConfig; - - if (metadataPlugin.valueOrNull == null || - pluginConfig == null || - !pluginConfig.abilities.contains(PluginAbilities.scrobbling)) { - return null; - } - - final controller = StreamController.broadcast(); - - final subscription = controller.stream.listen((event) async { - try { - await metadataPlugin.valueOrNull?.core.scrobble({ - "id": event.id, - "title": event.name, - "artists": event.artists - .map((artist) => { - "id": artist.id, - "name": artist.name, - }) - .toList(), - "album": { - "id": event.album.id, - "name": event.album.name, - }, - "timestamp": DateTime.now().millisecondsSinceEpoch ~/ 1000, - "duration_ms": event.durationMs, - "isrc": event is SpotubeFullTrackObject ? event.isrc : null, - }); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - - ref.onDispose(() { - subscription.cancel(); - controller.close(); - }); - - return controller; - } - - void scrobble(SpotubeTrackObject track) { - state?.add(track); - } -} - -final metadataPluginScrobbleProvider = NotifierProvider< - MetadataPluginScrobbleNotifier, StreamController?>( - MetadataPluginScrobbleNotifier.new, -); diff --git a/lib/provider/metadata_plugin/core/support.dart b/lib/provider/metadata_plugin/core/support.dart deleted file mode 100644 index 8864f1b1..00000000 --- a/lib/provider/metadata_plugin/core/support.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; - -final metadataPluginSupportTextProvider = FutureProvider((ref) async { - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw 'No metadata plugin available'; - } - return await metadataPlugin.core.support; -}); - -final audioSourcePluginSupportTextProvider = - FutureProvider((ref) async { - final audioSourcePlugin = await ref.watch(audioSourcePluginProvider.future); - - if (audioSourcePlugin == null) { - throw 'No metadata plugin available'; - } - return await audioSourcePlugin.core.support; -}); diff --git a/lib/provider/metadata_plugin/core/user.dart b/lib/provider/metadata_plugin/core/user.dart deleted file mode 100644 index 3ad46d63..00000000 --- a/lib/provider/metadata_plugin/core/user.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; - -final metadataPluginUserProvider = FutureProvider( - (ref) async { - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - final authenticated = - await ref.watch(metadataPluginAuthenticatedProvider.future); - - if (!authenticated || metadataPlugin == null) { - return null; - } - return metadataPlugin.user.me(); - }, -); diff --git a/lib/provider/metadata_plugin/library/albums.dart b/lib/provider/metadata_plugin/library/albums.dart deleted file mode 100644 index 10438025..00000000 --- a/lib/provider/metadata_plugin/library/albums.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:riverpod/riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; - -class MetadataPluginSavedAlbumNotifier - extends PaginatedAsyncNotifier { - @override - Future> fetch( - int offset, - int limit, - ) async { - return await (await metadataPlugin).user.savedAlbums( - limit: limit, - offset: offset, - ); - } - - @override - build() async { - await ref.watch(metadataPluginAuthenticatedProvider.future); - return await fetch(0, 20); - } - - Future addFavorite(List albums) async { - if (albums.isEmpty || state.value == null) return; - final oldState = state.value; - - state = AsyncData( - state.value!.copyWith( - items: [ - ...albums, - ...state.value!.items, - ], - ), - ); - try { - await (await metadataPlugin).album.save(albums.map((e) => e.id).toList()); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } - - Future removeFavorite(List albums) async { - if (albums.isEmpty || state.value == null) return; - - final oldState = state.value; - - final albumIds = albums.map((e) => e.id).toList(); - state = AsyncData( - state.value!.copyWith( - items: state.value!.items - .where( - (e) => albumIds.contains((e).id) == false, - ) - .toList(), - ), - ); - try { - await (await metadataPlugin).album.unsave(albumIds); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } -} - -final metadataPluginSavedAlbumsProvider = AsyncNotifierProvider< - MetadataPluginSavedAlbumNotifier, - SpotubePaginationResponseObject>( - () => MetadataPluginSavedAlbumNotifier(), -); - -final metadataPluginIsSavedAlbumProvider = - FutureProvider.autoDispose.family( - (ref, albumId) async { - final savedAlbums = - await ref.watch(metadataPluginSavedAlbumsProvider.future); - final savedAlbumsNotifier = - ref.read(metadataPluginSavedAlbumsProvider.notifier); - final allSavedAlbums = savedAlbums.hasMore - ? await savedAlbumsNotifier.fetchAll() - : savedAlbums.items; - - return allSavedAlbums.any((element) => element.id == albumId); - }, -); diff --git a/lib/provider/metadata_plugin/library/artists.dart b/lib/provider/metadata_plugin/library/artists.dart deleted file mode 100644 index 31f976e0..00000000 --- a/lib/provider/metadata_plugin/library/artists.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'package:riverpod/riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; - -class MetadataPluginSavedArtistNotifier - extends PaginatedAsyncNotifier { - @override - Future> fetch( - int offset, - int limit, - ) async { - final artists = await (await metadataPlugin).user.savedArtists( - limit: limit, - offset: offset, - ); - - return artists; - } - - @override - build() async { - await ref.watch(metadataPluginAuthenticatedProvider.future); - return await fetch(0, 20); - } - - Future addFavorite(List artists) async { - if (artists.isEmpty || state.value == null) return; - final oldState = state.value; - - state = AsyncData( - state.value!.copyWith( - items: [ - ...artists, - ...state.value!.items, - ], - ), - ); - try { - await (await metadataPlugin) - .artist - .save(artists.map((e) => e.id).toList()); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } - - Future removeFavorite(List artists) async { - if (artists.isEmpty || state.value == null) return; - - final oldState = state.value; - - final artistIds = artists.map((e) => e.id).toList(); - state = AsyncData( - state.value!.copyWith( - items: state.value!.items - .where( - (e) => artistIds.contains((e).id) == false, - ) - .toList(), - ), - ); - - try { - await (await metadataPlugin).artist.unsave(artistIds); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } -} - -final metadataPluginSavedArtistsProvider = AsyncNotifierProvider< - MetadataPluginSavedArtistNotifier, - SpotubePaginationResponseObject>( - () => MetadataPluginSavedArtistNotifier(), -); - -final metadataPluginIsSavedArtistProvider = - FutureProvider.autoDispose.family( - (ref, artistId) async { - final savedArtists = - await ref.watch(metadataPluginSavedArtistsProvider.future); - final savedArtistsNotifier = - ref.read(metadataPluginSavedArtistsProvider.notifier); - - final allSavedArtists = savedArtists.hasMore - ? await savedArtistsNotifier.fetchAll() - : savedArtists.items; - - return allSavedArtists.any((element) => element.id == artistId); - }, -); diff --git a/lib/provider/metadata_plugin/library/playlists.dart b/lib/provider/metadata_plugin/library/playlists.dart deleted file mode 100644 index 5793eb57..00000000 --- a/lib/provider/metadata_plugin/library/playlists.dart +++ /dev/null @@ -1,149 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/tracks/playlist.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -class MetadataPluginSavedPlaylistsNotifier - extends PaginatedAsyncNotifier { - MetadataPluginSavedPlaylistsNotifier() : super(); - - @override - fetch(int offset, int limit) async { - final playlists = await (await metadataPlugin) - .user - .savedPlaylists(limit: limit, offset: offset); - - return playlists; - } - - @override - build() async { - await ref.watch(metadataPluginAuthenticatedProvider.future); - - final playlists = await fetch(0, 20); - - return playlists; - } - - void updatePlaylist(SpotubeSimplePlaylistObject playlist) { - if (state.value == null) return; - - if (state.value!.items.none((e) => e.id == playlist.id)) return; - - state = AsyncData( - state.value!.copyWith( - items: state.value!.items - .map((element) => element.id == playlist.id ? playlist : element) - .toList(), - ), - ); - } - - Future addFavorite(SpotubeSimplePlaylistObject playlist) async { - if (state.value == null) return; - - final oldState = state.value; - - state = AsyncData( - state.value!.copyWith( - items: [ - playlist, - ...state.value!.items, - ], - ), - ); - - try { - await (await metadataPlugin).playlist.save(playlist.id); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } - - Future removeFavorite(SpotubeSimplePlaylistObject playlist) async { - if (state.value == null) return; - - final oldState = state.value; - state = AsyncData( - state.value!.copyWith( - items: state.value!.items.where((e) => (e).id != playlist.id).toList(), - ), - ); - - try { - await (await metadataPlugin).playlist.unsave(playlist.id); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } - - Future delete(String playlistId) async { - if (state.value == null) return; - final oldState = state; - try { - state = const AsyncLoading(); - await (await metadataPlugin).playlist.deletePlaylist(playlistId); - ref.invalidateSelf(); - ref.invalidate(metadataPluginIsSavedPlaylistProvider(playlistId)); - ref.invalidate(metadataPluginPlaylistTracksProvider(playlistId)); - } catch (e) { - state = oldState; - rethrow; - } - } - - Future addTracks(String playlistId, List trackIds) async { - if (state.value == null) return; - - await (await metadataPlugin) - .playlist - .addTracks(playlistId, trackIds: trackIds); - - ref.invalidate(metadataPluginPlaylistTracksProvider(playlistId)); - } - - Future removeTracks(String playlistId, List trackIds) async { - if (state.value == null) return; - - await (await metadataPlugin) - .playlist - .removeTracks(playlistId, trackIds: trackIds); - - ref.invalidate(metadataPluginPlaylistTracksProvider(playlistId)); - } -} - -final metadataPluginSavedPlaylistsProvider = AsyncNotifierProvider< - MetadataPluginSavedPlaylistsNotifier, - SpotubePaginationResponseObject>( - () => MetadataPluginSavedPlaylistsNotifier(), -); - -final metadataPluginIsSavedPlaylistProvider = - FutureProvider.family( - (ref, id) async { - final plugin = await ref.watch(metadataPluginProvider.future); - - if (plugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - final savedPlaylists = - await ref.watch(metadataPluginSavedPlaylistsProvider.future); - - final savedPlaylistsNotifier = - ref.read(metadataPluginSavedPlaylistsProvider.notifier); - - final allSavedPlaylists = savedPlaylists.hasMore - ? await savedPlaylistsNotifier.fetchAll() - : savedPlaylists.items; - - return allSavedPlaylists.any((element) => element.id == id); - }, -); diff --git a/lib/provider/metadata_plugin/library/tracks.dart b/lib/provider/metadata_plugin/library/tracks.dart deleted file mode 100644 index d19865dd..00000000 --- a/lib/provider/metadata_plugin/library/tracks.dart +++ /dev/null @@ -1,96 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/provider/metadata_plugin/utils/paginated.dart'; - -class MetadataPluginSavedTracksNotifier - extends AutoDisposePaginatedAsyncNotifier { - MetadataPluginSavedTracksNotifier() : super(); - - @override - fetch(offset, limit) async { - final tracks = await (await metadataPlugin).user.savedTracks( - offset: offset, - limit: limit, - ); - - return tracks; - } - - @override - build() async { - ref.cacheFor(); - - await ref.watch(metadataPluginAuthenticatedProvider.future); - return await fetch(0, 20); - } - - Future addFavorite(List tracks) async { - if (state.value == null) { - return; - } - - final oldState = state.value; - state = AsyncData( - state.value!.copyWith( - items: [ - ...tracks.whereType(), - ...state.value!.items - ], - ), - ); - - try { - await (await metadataPlugin).track.save(tracks.map((e) => e.id).toList()); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } - - Future removeFavorite(List tracks) async { - if (state.value == null) { - return; - } - - final oldState = state.value; - state = AsyncData( - state.value!.copyWith( - items: state.value!.items - .where( - (savedTrack) => !tracks.any((track) => track.id == savedTrack.id), - ) - .toList(), - ), - ); - - try { - await (await metadataPlugin) - .track - .unsave(tracks.map((e) => e.id).toList()); - } catch (e) { - state = AsyncData(oldState!); - rethrow; - } - } -} - -final metadataPluginSavedTracksProvider = AutoDisposeAsyncNotifierProvider< - MetadataPluginSavedTracksNotifier, - SpotubePaginationResponseObject>( - () => MetadataPluginSavedTracksNotifier(), -); - -final metadataPluginIsSavedTrackProvider = - FutureProvider.autoDispose.family( - (ref, trackId) async { - final savedTracks = - await ref.watch(metadataPluginSavedTracksProvider.future); - final allSavedTracks = savedTracks.hasMore - ? await ref.read(metadataPluginSavedTracksProvider.notifier).fetchAll() - : savedTracks.items; - - return allSavedTracks.any((track) => track.id == trackId); - }, -); diff --git a/lib/provider/metadata_plugin/metadata_plugin_provider.dart b/lib/provider/metadata_plugin/metadata_plugin_provider.dart deleted file mode 100644 index cdc96c41..00000000 --- a/lib/provider/metadata_plugin/metadata_plugin_provider.dart +++ /dev/null @@ -1,635 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:dio/dio.dart'; -import 'package:drift/drift.dart'; -import 'package:flutter/services.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/youtube_engine/youtube_engine.dart'; -import 'package:spotube/services/dio/dio.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; -import 'package:spotube/services/metadata/metadata.dart'; -import 'package:spotube/utils/service_utils.dart'; -import 'package:archive/archive.dart'; -import 'package:pub_semver/pub_semver.dart'; - -final allowedDomainsRegex = RegExp( - r"^(https?:\/\/)?(www\.)?(github\.com|codeberg\.org)\/.+", -); - -class MetadataPluginState { - final List plugins; - final int defaultMetadataPlugin; - final int defaultAudioSourcePlugin; - - const MetadataPluginState({ - this.plugins = const [], - this.defaultMetadataPlugin = -1, - this.defaultAudioSourcePlugin = -1, - }); - - PluginConfiguration? get defaultMetadataPluginConfig { - if (defaultMetadataPlugin < 0 || defaultMetadataPlugin >= plugins.length) { - return null; - } - return plugins[defaultMetadataPlugin]; - } - - PluginConfiguration? get defaultAudioSourcePluginConfig { - if (defaultAudioSourcePlugin < 0 || - defaultAudioSourcePlugin >= plugins.length) { - return null; - } - return plugins[defaultAudioSourcePlugin]; - } - - factory MetadataPluginState.fromJson(Map json) { - return MetadataPluginState( - plugins: (json["plugins"] as List) - .map((e) => PluginConfiguration.fromJson(e)) - .toList(), - defaultMetadataPlugin: json["default_metadata_plugin"] ?? -1, - defaultAudioSourcePlugin: json['default_audio_source_plugin'], - ); - } - - Map toJson() { - return { - "plugins": plugins.map((e) => e.toJson()).toList(), - "default_metadata_plugin": defaultMetadataPlugin, - "default_audio_source_plugin": defaultAudioSourcePlugin - }; - } - - MetadataPluginState copyWith({ - List? plugins, - int? defaultMetadataPlugin, - int? defaultAudioSourcePlugin, - }) { - return MetadataPluginState( - plugins: plugins ?? this.plugins, - defaultMetadataPlugin: - defaultMetadataPlugin ?? this.defaultMetadataPlugin, - defaultAudioSourcePlugin: - defaultAudioSourcePlugin ?? this.defaultAudioSourcePlugin, - ); - } -} - -class MetadataPluginNotifier extends AsyncNotifier { - AppDatabase get database => ref.read(databaseProvider); - - @override - build() async { - final database = ref.watch(databaseProvider); - - final subscription = database.pluginsTable.select().watch().listen( - (event) async { - state = AsyncValue.data(await toStatePlugins(event)); - }, - ); - - ref.onDispose(() { - subscription.cancel(); - }); - - final plugins = await database.pluginsTable.select().get(); - - final pluginState = await toStatePlugins(plugins); - - await _loadDefaultPlugins(pluginState); - - return pluginState; - } - - Future toStatePlugins( - List plugins, - ) async { - int defaultMetadataPlugin = -1; - int defaultAudioSourcePlugin = -1; - final pluginConfigs = []; - - for (int i = 0; i < plugins.length; i++) { - final plugin = plugins[i]; - - final pluginConfig = PluginConfiguration( - name: plugin.name, - author: plugin.author, - description: plugin.description, - version: plugin.version, - entryPoint: plugin.entryPoint, - pluginApiVersion: plugin.pluginApiVersion, - repository: plugin.repository, - apis: plugin.apis - .map( - (e) => PluginApis.values.firstWhereOrNull( - (api) => api.name == e, - ), - ) - .nonNulls - .toList(), - abilities: plugin.abilities - .map( - (e) => PluginAbilities.values.firstWhereOrNull( - (ability) => ability.name == e, - ), - ) - .nonNulls - .toList(), - ); - - final pluginExtractionDir = await _getPluginExtractionDir(pluginConfig); - final pluginJsonFile = - File(join(pluginExtractionDir.path, "plugin.json")); - final pluginBinaryFile = - File(join(pluginExtractionDir.path, "plugin.out")); - - if (!await pluginExtractionDir.exists() || - !await pluginJsonFile.exists() || - !await pluginBinaryFile.exists()) { - // Delete the plugin entry from DB if the plugin files are not there. - await database.pluginsTable.deleteOne(plugin); - continue; - } - - pluginConfigs.add(pluginConfig); - - if (plugin.selectedForMetadata) { - defaultMetadataPlugin = pluginConfigs.length - 1; - } - if (plugin.selectedForAudioSource) { - defaultAudioSourcePlugin = pluginConfigs.length - 1; - } - } - - return MetadataPluginState( - plugins: pluginConfigs, - defaultMetadataPlugin: defaultMetadataPlugin, - defaultAudioSourcePlugin: defaultAudioSourcePlugin, - ); - } - - Future _loadDefaultPlugins(MetadataPluginState pluginState) async { - const plugins = [ - "spotube-plugin-musicbrainz-listenbrainz", - "spotube-plugin-youtube-audio", - ]; - - for (final plugin in plugins) { - final byteData = await rootBundle.load( - "assets/plugins/$plugin/plugin.smplug", - ); - final pluginConfig = - await extractPluginArchive(byteData.buffer.asUint8List()); - try { - await addPlugin(pluginConfig); - } on MetadataPluginException catch (e) { - if (e.errorCode == MetadataPluginErrorCode.duplicatePlugin && - await isPluginUpdate(pluginConfig)) { - final oldConfig = pluginState.plugins - .firstWhereOrNull((p) => p.slug == pluginConfig.slug); - if (oldConfig == null) continue; - final isDefaultMetadata = - oldConfig == pluginState.defaultMetadataPluginConfig; - final isDefaultAudioSource = - oldConfig == pluginState.defaultAudioSourcePluginConfig; - - await removePlugin(pluginConfig); - await addPlugin(pluginConfig); - - if (isDefaultMetadata) { - await setDefaultMetadataPlugin(pluginConfig); - } - if (isDefaultAudioSource) { - await setDefaultAudioSourcePlugin(pluginConfig); - } - } - } - } - } - - Uri _getGithubReleasesUrl(String repoUrl) { - final parsedUri = Uri.parse(repoUrl); - final uri = parsedUri.replace( - host: "api.github.com", - pathSegments: [ - "repos", - ...parsedUri.pathSegments, - "releases", - ], - queryParameters: { - "per_page": "1", - "page": "1", - }, - ); - - return uri; - } - - Uri _getCodebergeReleasesUrl(String repoUrl) { - final parsedUri = Uri.parse(repoUrl); - final uri = parsedUri.replace( - pathSegments: [ - "api", - "v1", - "repos", - ...parsedUri.pathSegments, - "releases", - ], - queryParameters: { - "limit": "1", - "page": "1", - }, - ); - - return uri; - } - - Future _getPluginDownloadUrl(Uri uri) async { - AppLogger.log.i("Getting plugin download URL from: $uri"); - final res = await globalDio.getUri( - uri, - options: Options(responseType: ResponseType.json), - ); - - if (res.statusCode != 200) { - throw MetadataPluginException.failedToGetRelease(); - } - final releases = res.data as List; - if (releases.isEmpty) { - throw MetadataPluginException.noReleasesFound(); - } - final latestRelease = releases.first; - final downloadUrl = (latestRelease["assets"] as List).firstWhere( - (asset) => (asset["name"] as String).endsWith(".smplug"), - )["browser_download_url"]; - if (downloadUrl == null) { - throw MetadataPluginException.assetUrlNotFound(); - } - return downloadUrl; - } - - /// Root directory where all metadata plugins are stored. - Future _getPluginRootDir() async => Directory( - join( - (await getApplicationSupportDirectory()).path, - "metadata-plugins", - ), - ); - - /// Directory where the plugin will be extracted. - /// This is a unique directory for each plugin version. - /// It is used to avoid conflicts when multiple versions of the same plugin are installed - Future _getPluginExtractionDir(PluginConfiguration plugin) async { - final pluginDir = await _getPluginRootDir(); - final pluginExtractionDirPath = join( - pluginDir.path, - "${ServiceUtils.sanitizeFilename(plugin.author)}-${ServiceUtils.sanitizeFilename(plugin.name)}-${plugin.version}", - ); - return Directory(pluginExtractionDirPath); - } - - Future extractPluginArchive(List bytes) async { - final archive = ZipDecoder().decodeBytes(bytes); - final pluginJson = archive - .firstWhereOrNull((file) => file.isFile && file.name == "plugin.json"); - - if (pluginJson == null) { - throw MetadataPluginException.pluginConfigJsonNotFound(); - } - final pluginConfig = PluginConfiguration.fromJson( - jsonDecode( - utf8.decode(pluginJson.content as List), - ) as Map, - ); - - final pluginDir = await _getPluginRootDir(); - await pluginDir.create(recursive: true); - - final pluginExtractionDir = await _getPluginExtractionDir(pluginConfig); - - for (final file in archive) { - if (file.isFile) { - final filename = file.name; - final data = file.content as List; - final extractedFile = File(join( - pluginExtractionDir.path, - filename, - )); - await extractedFile.create(recursive: true); - await extractedFile.writeAsBytes(data); - } - } - - return pluginConfig; - } - - /// Downloads, extracts & caches the plugin from the given URL and returns the plugin config. - /// If only a text/html URL is provided, it will try to get the latest release from - /// the URL for supported websites (github.com, codeberg.org). - Future downloadAndCachePlugin(String url) async { - final res = await globalDio.head(url); - final isSupportedWebsite = - (res.headers["Content-Type"]?.first)?.startsWith("text/html") == true && - allowedDomainsRegex.hasMatch(url); - String pluginDownloadUrl = url; - if (isSupportedWebsite) { - if (url.contains("github.com")) { - final uri = _getGithubReleasesUrl(url); - pluginDownloadUrl = await _getPluginDownloadUrl(uri); - } else if (url.contains("codeberg.org")) { - final uri = _getCodebergeReleasesUrl(url); - pluginDownloadUrl = await _getPluginDownloadUrl(uri); - } else { - throw MetadataPluginException.unsupportedPluginDownloadWebsite(); - } - } - - // Now let's download, extract and cache the plugin - final pluginDir = await _getPluginRootDir(); - await pluginDir.create(recursive: true); - - final pluginRes = await globalDio.get( - pluginDownloadUrl, - options: Options( - responseType: ResponseType.bytes, - followRedirects: true, - receiveTimeout: const Duration(seconds: 30), - ), - ); - - if ((pluginRes.statusCode ?? 500) > 299) { - throw MetadataPluginException.pluginDownloadFailed(); - } - - return await extractPluginArchive(pluginRes.data); - } - - bool validatePluginApiCompatibility(PluginConfiguration plugin) { - final configPluginApiVersion = Version.parse(plugin.pluginApiVersion); - final appPluginApiVersion = MetadataPlugin.pluginApiVersion; - - // Plugin API's major version must match the app's major version - if (configPluginApiVersion.major != appPluginApiVersion.major) { - return false; - } - return configPluginApiVersion >= appPluginApiVersion; - } - - void _assertPluginApiCompatibility(PluginConfiguration plugin) { - if (!validatePluginApiCompatibility(plugin)) { - throw MetadataPluginException.pluginApiVersionMismatch(); - } - } - - Future addPlugin(PluginConfiguration plugin) async { - _assertPluginApiCompatibility(plugin); - - final pluginRes = await (database.pluginsTable.select() - ..where( - (tbl) => - tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author), - ) - ..limit(1)) - .get(); - - if (pluginRes.isNotEmpty) { - throw MetadataPluginException.duplicatePlugin(); - } - - await database.pluginsTable.insertOne( - PluginsTableCompanion.insert( - name: plugin.name, - author: plugin.author, - description: plugin.description, - version: plugin.version, - entryPoint: plugin.entryPoint, - apis: plugin.apis.map((e) => e.name).toList(), - abilities: plugin.abilities.map((e) => e.name).toList(), - pluginApiVersion: Value(plugin.pluginApiVersion), - repository: Value(plugin.repository), - // Setting the very first plugin as the default plugin - selectedForMetadata: Value( - (state.valueOrNull?.plugins - .where( - (d) => d.abilities.contains(PluginAbilities.metadata)) - .isEmpty ?? - true) && - plugin.abilities.contains(PluginAbilities.metadata), - ), - selectedForAudioSource: Value( - (state.valueOrNull?.plugins - .where((d) => - d.abilities.contains(PluginAbilities.audioSource)) - .isEmpty ?? - true) && - plugin.abilities.contains(PluginAbilities.audioSource), - ), - ), - ); - } - - Future removePlugin(PluginConfiguration plugin) async { - final pluginExtractionDir = await _getPluginExtractionDir(plugin); - - if (pluginExtractionDir.existsSync()) { - await pluginExtractionDir.delete(recursive: true); - } - await database.pluginsTable.deleteWhere((tbl) => - tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author)); - - // Same here, if the removed plugin is the default plugin - // set the first available plugin as the default plugin - // only when there is 1 remaining plugin - if (state.valueOrNull?.defaultMetadataPluginConfig == plugin) { - final remainingPlugins = state.valueOrNull?.plugins.where( - (p) => - p != plugin && p.abilities.contains(PluginAbilities.metadata), - ) ?? - []; - if (remainingPlugins.length == 1) { - await setDefaultMetadataPlugin(remainingPlugins.first); - } - } - - if (state.valueOrNull?.defaultAudioSourcePluginConfig == plugin) { - final remainingPlugins = state.valueOrNull?.plugins.where( - (p) => - p != plugin && - p.abilities.contains(PluginAbilities.audioSource), - ) ?? - []; - if (remainingPlugins.length == 1) { - await setDefaultAudioSourcePlugin(remainingPlugins.first); - } - } - } - - Future isPluginUpdate(PluginConfiguration newPlugin) async { - final pluginRes = await (database.pluginsTable.select() - ..where( - (tbl) => - tbl.name.equals(newPlugin.name) & - tbl.author.equals(newPlugin.author), - ) - ..limit(1)) - .get(); - - if (pluginRes.isEmpty) { - return false; - } - - final oldPlugin = pluginRes.first; - final oldPluginApiVersion = Version.parse(oldPlugin.pluginApiVersion); - final newPluginApiVersion = Version.parse(newPlugin.pluginApiVersion); - - return newPluginApiVersion > oldPluginApiVersion; - } - - Future updatePlugin( - PluginConfiguration plugin, - PluginUpdateAvailable update, - ) async { - final isDefaultMetadata = - plugin == state.valueOrNull?.defaultMetadataPluginConfig; - final isDefaultAudioSource = - plugin == state.valueOrNull?.defaultAudioSourcePluginConfig; - final pluginUpdatedConfig = - await downloadAndCachePlugin(update.downloadUrl); - - if (pluginUpdatedConfig.name != plugin.name && - pluginUpdatedConfig.author != plugin.author) { - throw MetadataPluginException.invalidPluginConfiguration(); - } - _assertPluginApiCompatibility(pluginUpdatedConfig); - - await removePlugin(plugin); - await addPlugin(pluginUpdatedConfig); - - if (isDefaultMetadata) { - await setDefaultMetadataPlugin(pluginUpdatedConfig); - } - if (isDefaultAudioSource) { - await setDefaultAudioSourcePlugin(pluginUpdatedConfig); - } - } - - Future setDefaultMetadataPlugin(PluginConfiguration plugin) async { - assert( - plugin.abilities.contains(PluginAbilities.metadata), - "Must be a metadata plugin", - ); - - await database.pluginsTable - .update() - .write(const PluginsTableCompanion(selectedForMetadata: Value(false))); - - await (database.pluginsTable.update() - ..where((tbl) => - tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author))) - .write( - const PluginsTableCompanion(selectedForMetadata: Value(true)), - ); - } - - Future setDefaultAudioSourcePlugin(PluginConfiguration plugin) async { - assert( - plugin.abilities.contains(PluginAbilities.audioSource), - "Must be an audio-source plugin", - ); - - await database.pluginsTable.update().write( - const PluginsTableCompanion(selectedForAudioSource: Value(false))); - - await (database.pluginsTable.update() - ..where((tbl) => - tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author))) - .write( - const PluginsTableCompanion(selectedForAudioSource: Value(true)), - ); - } - - Future getPluginByteCode(PluginConfiguration plugin) async { - final pluginExtractionDirPath = await _getPluginExtractionDir(plugin); - - final libraryFile = File(join(pluginExtractionDirPath.path, "plugin.out")); - - if (!libraryFile.existsSync()) { - throw MetadataPluginException.pluginByteCodeFileNotFound(); - } - - return await libraryFile.readAsBytes(); - } - - Future getLogoPath(PluginConfiguration plugin) async { - final pluginExtractionDirPath = await _getPluginExtractionDir(plugin); - - final logoFile = File(join(pluginExtractionDirPath.path, "logo.png")); - - if (!logoFile.existsSync()) { - return null; - } - - return logoFile; - } -} - -final metadataPluginsProvider = - AsyncNotifierProvider( - MetadataPluginNotifier.new, -); - -final metadataPluginProvider = FutureProvider( - (ref) async { - final defaultPlugin = await ref.watch( - metadataPluginsProvider - .selectAsync((data) => data.defaultMetadataPluginConfig), - ); - final youtubeEngine = ref.read(youtubeEngineProvider); - - if (defaultPlugin == null) { - return null; - } - - final pluginsNotifier = ref.read(metadataPluginsProvider.notifier); - final pluginByteCode = - await pluginsNotifier.getPluginByteCode(defaultPlugin); - - return await MetadataPlugin.create( - youtubeEngine, - defaultPlugin, - pluginByteCode, - ); - }, -); - -final audioSourcePluginProvider = FutureProvider( - (ref) async { - final defaultPlugin = await ref.watch( - metadataPluginsProvider - .selectAsync((data) => data.defaultAudioSourcePluginConfig), - ); - final youtubeEngine = ref.watch(youtubeEngineProvider); - - if (defaultPlugin == null) { - return null; - } - - final pluginsNotifier = ref.read(metadataPluginsProvider.notifier); - final pluginByteCode = - await pluginsNotifier.getPluginByteCode(defaultPlugin); - - return await MetadataPlugin.create( - youtubeEngine, - defaultPlugin, - pluginByteCode, - ); - }, -); diff --git a/lib/provider/metadata_plugin/playlist/playlist.dart b/lib/provider/metadata_plugin/playlist/playlist.dart deleted file mode 100644 index 9a41340d..00000000 --- a/lib/provider/metadata_plugin/playlist/playlist.dart +++ /dev/null @@ -1,131 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/core/user.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; -import 'package:spotube/services/metadata/metadata.dart'; - -class MetadataPluginPlaylistNotifier - extends AutoDisposeFamilyAsyncNotifier { - Future get metadataPlugin async { - final metadataPlugin = await ref.read(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - return metadataPlugin; - } - - @override - build(playlistId) async { - ref.cacheFor(); - - return (await metadataPlugin).playlist.getPlaylist(playlistId); - } - - Future create({ - required String name, - String? description, - bool? public, - bool? collaborative, - void Function(dynamic error)? onError, - }) async { - final userId = await ref - .read(metadataPluginUserProvider.selectAsync((data) => data?.id)); - if (userId == null) { - throw Exception('User ID is not available. Please log in first.'); - } - state = const AsyncValue.loading(); - try { - final playlist = await (await metadataPlugin).playlist.create( - userId, - name: name, - description: description, - public: public, - collaborative: collaborative, - ); - if (playlist != null) { - state = AsyncValue.data(playlist); - } - ref.invalidate(metadataPluginSavedPlaylistsProvider); - } catch (e) { - onError?.call(e); - rethrow; - } - } - - Future modify({ - String? name, - String? description, - bool? public, - bool? collaborative, - void Function(dynamic error)? onError, - }) async { - try { - if (name == null && - description == null && - public == null && - collaborative == null) { - throw Exception('No modifications provided.'); - } - await (await metadataPlugin).playlist.update( - arg, - name: name, - description: description, - public: public, - collaborative: collaborative, - ); - ref.invalidateSelf(); - } on Exception catch (e) { - onError?.call(e); - rethrow; - } - } - - Future addTracks(List trackIds, - [void Function(dynamic error)? onError]) async { - if (state.value == null) return; - - try { - await ref - .read(metadataPluginSavedPlaylistsProvider.notifier) - .addTracks(arg, trackIds); - } catch (e) { - onError?.call(e); - rethrow; - } - } - - Future removeTracks(List trackIds, - [void Function(dynamic error)? onError]) async { - try { - if (state.value == null) return; - - await ref - .read(metadataPluginSavedPlaylistsProvider.notifier) - .removeTracks(arg, trackIds); - } catch (e) { - onError?.call(e); - rethrow; - } - } - - Future delete() async { - if (state.value == null) return; - final userId = await ref - .read(metadataPluginUserProvider.selectAsync((data) => data?.id)); - if (userId == null || userId != state.value!.owner.id) { - throw Exception('You can only delete your own playlists.'); - } - - await ref.read(metadataPluginSavedPlaylistsProvider.notifier).delete(arg); - } -} - -final metadataPluginPlaylistProvider = AutoDisposeAsyncNotifierProviderFamily< - MetadataPluginPlaylistNotifier, SpotubeFullPlaylistObject, String>( - () => MetadataPluginPlaylistNotifier(), -); diff --git a/lib/provider/metadata_plugin/search/albums.dart b/lib/provider/metadata_plugin/search/albums.dart deleted file mode 100644 index 40bb62e6..00000000 --- a/lib/provider/metadata_plugin/search/albums.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginSearchAlbumsNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginSearchAlbumsNotifier() : super(); - - @override - fetch(offset, limit) async { - if (arg.isEmpty) { - return SpotubePaginationResponseObject( - limit: limit, - nextOffset: null, - total: 0, - items: [], - hasMore: false, - ); - } - - final res = await (await metadataPlugin).search.albums( - arg, - offset: offset, - limit: limit, - ); - - return res; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginSearchAlbumsProvider = - AutoDisposeAsyncNotifierProviderFamily, String>( - () => MetadataPluginSearchAlbumsNotifier(), -); diff --git a/lib/provider/metadata_plugin/search/all.dart b/lib/provider/metadata_plugin/search/all.dart deleted file mode 100644 index 4b051e58..00000000 --- a/lib/provider/metadata_plugin/search/all.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -final metadataPluginSearchAllProvider = - FutureProvider.autoDispose.family( - (ref, query) async { - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - return metadataPlugin.search.all(query); - }, -); - -final metadataPluginSearchChipsProvider = FutureProvider((ref) async { - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - return metadataPlugin.search.chips; -}); diff --git a/lib/provider/metadata_plugin/search/artists.dart b/lib/provider/metadata_plugin/search/artists.dart deleted file mode 100644 index b4d619f7..00000000 --- a/lib/provider/metadata_plugin/search/artists.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginSearchArtistsNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginSearchArtistsNotifier() : super(); - - @override - fetch(offset, limit) async { - if (arg.isEmpty) { - return SpotubePaginationResponseObject( - limit: limit, - nextOffset: null, - total: 0, - items: [], - hasMore: false, - ); - } - - final res = await (await metadataPlugin).search.artists( - arg, - offset: offset, - limit: limit, - ); - - return res; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginSearchArtistsProvider = - AutoDisposeAsyncNotifierProviderFamily, String>( - () => MetadataPluginSearchArtistsNotifier(), -); diff --git a/lib/provider/metadata_plugin/search/playlists.dart b/lib/provider/metadata_plugin/search/playlists.dart deleted file mode 100644 index dbf54250..00000000 --- a/lib/provider/metadata_plugin/search/playlists.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginSearchPlaylistsNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginSearchPlaylistsNotifier() : super(); - - @override - fetch(offset, limit) async { - if (arg.isEmpty) { - return SpotubePaginationResponseObject( - limit: limit, - nextOffset: null, - total: 0, - items: [], - hasMore: false, - ); - } - - final res = await (await metadataPlugin).search.playlists( - arg, - offset: offset, - limit: limit, - ); - - return res; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginSearchPlaylistsProvider = - AutoDisposeAsyncNotifierProviderFamily< - MetadataPluginSearchPlaylistsNotifier, - SpotubePaginationResponseObject, - String>( - () => MetadataPluginSearchPlaylistsNotifier(), -); diff --git a/lib/provider/metadata_plugin/search/tracks.dart b/lib/provider/metadata_plugin/search/tracks.dart deleted file mode 100644 index 0b6ac141..00000000 --- a/lib/provider/metadata_plugin/search/tracks.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; - -class MetadataPluginSearchTracksNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginSearchTracksNotifier() : super(); - - @override - fetch(offset, limit) async { - if (arg.isEmpty) { - return SpotubePaginationResponseObject( - limit: limit, - nextOffset: null, - total: 0, - items: [], - hasMore: false, - ); - } - - final tracks = await (await metadataPlugin).search.tracks( - arg, - offset: offset, - limit: limit, - ); - - return tracks; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginSearchTracksProvider = - AutoDisposeAsyncNotifierProviderFamily, String>( - () => MetadataPluginSearchTracksNotifier(), -); diff --git a/lib/provider/metadata_plugin/tracks/album.dart b/lib/provider/metadata_plugin/tracks/album.dart deleted file mode 100644 index 5491bdd0..00000000 --- a/lib/provider/metadata_plugin/tracks/album.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -class MetadataPluginAlbumTracksNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginAlbumTracksNotifier() : super(); - - @override - fetch(offset, limit) async { - final tracks = await (await metadataPlugin).album.tracks( - arg, - offset: offset, - limit: limit, - ); - - return tracks; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginAlbumTracksProvider = - AutoDisposeAsyncNotifierProviderFamily, String>( - () => MetadataPluginAlbumTracksNotifier(), -); diff --git a/lib/provider/metadata_plugin/tracks/playlist.dart b/lib/provider/metadata_plugin/tracks/playlist.dart deleted file mode 100644 index 7fdd47db..00000000 --- a/lib/provider/metadata_plugin/tracks/playlist.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; - -class MetadataPluginPlaylistTracksNotifier - extends AutoDisposeFamilyPaginatedAsyncNotifier { - MetadataPluginPlaylistTracksNotifier() : super(); - - @override - fetch(offset, limit) async { - final tracks = await (await metadataPlugin).playlist.tracks( - arg, - offset: offset, - limit: limit, - ); - - return tracks; - } - - @override - build(arg) async { - ref.cacheFor(); - - ref.watch(metadataPluginProvider); - return await fetch(0, 20); - } -} - -final metadataPluginPlaylistTracksProvider = - AutoDisposeAsyncNotifierProviderFamily, String>( - () => MetadataPluginPlaylistTracksNotifier(), -); diff --git a/lib/provider/metadata_plugin/tracks/track.dart b/lib/provider/metadata_plugin/tracks/track.dart deleted file mode 100644 index 1beac43a..00000000 --- a/lib/provider/metadata_plugin/tracks/track.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -final metadataPluginTrackProvider = - FutureProvider.family((ref, trackId) async { - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - return metadataPlugin.track.getTrack(trackId); -}); diff --git a/lib/provider/metadata_plugin/updater/update_checker.dart b/lib/provider/metadata_plugin/updater/update_checker.dart deleted file mode 100644 index 6a7dc589..00000000 --- a/lib/provider/metadata_plugin/updater/update_checker.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; - -final metadataPluginUpdateCheckerProvider = - FutureProvider((ref) async { - final metadataPluginConfigs = await ref.watch(metadataPluginsProvider.future); - final metadataPlugin = await ref.watch(metadataPluginProvider.future); - - if (metadataPlugin == null || - metadataPluginConfigs.defaultMetadataPluginConfig == null) { - return null; - } - - return metadataPlugin.core - .checkUpdate(metadataPluginConfigs.defaultMetadataPluginConfig!); -}); - -final audioSourcePluginUpdateCheckerProvider = - FutureProvider((ref) async { - final audioSourcePluginConfigs = - await ref.watch(metadataPluginsProvider.future); - final audioSourcePlugin = await ref.watch(audioSourcePluginProvider.future); - - if (audioSourcePlugin == null || - audioSourcePluginConfigs.defaultAudioSourcePluginConfig == null) { - return null; - } - - return audioSourcePlugin.core - .checkUpdate(audioSourcePluginConfigs.defaultAudioSourcePluginConfig!); -}); diff --git a/lib/provider/metadata_plugin/utils/common.dart b/lib/provider/metadata_plugin/utils/common.dart deleted file mode 100644 index dc56e494..00000000 --- a/lib/provider/metadata_plugin/utils/common.dart +++ /dev/null @@ -1,56 +0,0 @@ -// ignore: implementation_imports -import 'package:riverpod/src/async_notifier.dart'; -import 'dart:async'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; -import 'package:spotube/services/metadata/metadata.dart'; - -extension PaginationExtension on AsyncValue { - bool get isLoadingNextPage => this is AsyncData && this is AsyncLoadingNext; -} - -mixin MetadataPluginMixin -// ignore: invalid_use_of_internal_member - on AsyncNotifierBase> { - Future get metadataPlugin async { - final plugin = await ref.read(metadataPluginProvider.future); - - if (plugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - return plugin; - } -} - -extension AutoDisposeAsyncNotifierCacheFor -// ignore: deprecated_member_use - on AutoDisposeAsyncNotifierProviderRef { - // When invoked keeps your provider alive for [duration] - // ignore: unused_element - void cacheFor([Duration duration = const Duration(minutes: 5)]) { - final link = keepAlive(); - final timer = Timer(duration, () => link.close()); - onDispose(() => timer.cancel()); - } -} - -// ignore: deprecated_member_use -extension AutoDisposeCacheFor on AutoDisposeRef { - // When invoked keeps your provider alive for [duration] - // ignore: unused_element - void cacheFor([Duration duration = const Duration(minutes: 5)]) { - final link = keepAlive(); - final timer = Timer(duration, () => link.close()); - onDispose(() => timer.cancel()); - } -} - -// ignore: subtype_of_sealed_class -class AsyncLoadingNext extends AsyncData { - const AsyncLoadingNext(super.value); -} diff --git a/lib/provider/metadata_plugin/utils/family_paginated.dart b/lib/provider/metadata_plugin/utils/family_paginated.dart deleted file mode 100644 index b798dc8e..00000000 --- a/lib/provider/metadata_plugin/utils/family_paginated.dart +++ /dev/null @@ -1,141 +0,0 @@ -import 'dart:async'; -import 'dart:math'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/logger/logger.dart'; - -abstract class FamilyPaginatedAsyncNotifier - extends FamilyAsyncNotifier, A> - with MetadataPluginMixin { - Future> fetch(int offset, int limit); - - Future fetchMore() async { - if (state.value == null || !state.value!.hasMore) return; - - final oldState = state.value; - - try { - state = AsyncLoadingNext(state.asData!.value); - - final newState = await fetch( - state.value!.nextOffset!, - state.value!.limit, - ); - - final oldItems = - state.value!.items.isEmpty ? [] : state.value!.items.cast(); - final items = newState.items.isEmpty ? [] : newState.items.cast(); - - state = AsyncData(newState.copyWith(items: [...oldItems, ...items])); - } catch (e, stack) { - AppLogger.reportError(e, stack); - state = AsyncData(oldState!); - } - } - - Future> fetchAll() async { - if (state.value == null) return []; - if (!state.value!.hasMore) return state.value!.items.cast(); - - bool hasMore = true; - while (hasMore) { - final newState = await fetch( - state.value!.nextOffset!, - max(state.value!.limit, 100), - ) - .catchError( - (e) => fetch(state.value!.nextOffset!, max(state.value!.limit, 50)), - ) - .catchError( - (e) => fetch(state.value!.nextOffset!, state.value!.limit), - ) - .catchError( - (e) async { - await Future.delayed(const Duration(milliseconds: 500)); - return fetch(state.value!.nextOffset!, state.value!.limit); - }, - ); - - hasMore = newState.hasMore; - - final oldItems = - state.value!.items.isEmpty ? [] : state.value!.items.cast(); - final items = newState.items.isEmpty ? [] : newState.items.cast(); - - state = AsyncData( - newState.copyWith(items: [...oldItems, ...items]), - ); - } - - return state.value!.items.cast(); - } -} - -abstract class AutoDisposeFamilyPaginatedAsyncNotifier - extends AutoDisposeFamilyAsyncNotifier, - A> with MetadataPluginMixin { - Future> fetch(int offset, int limit); - - Future fetchMore() async { - if (state.value == null || !state.value!.hasMore) return; - final oldState = state.value; - - try { - state = AsyncLoadingNext(state.value!); - - final newState = await fetch( - state.value!.nextOffset!, - state.value!.limit, - ); - - state = AsyncData( - newState.copyWith(items: [ - ...state.value!.items.cast(), - ...newState.items.cast(), - ]), - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - state = AsyncData(oldState!); - } - } - - Future> fetchAll() async { - if (state.value == null) return []; - if (!state.value!.hasMore) return state.value!.items.cast(); - - bool hasMore = true; - while (hasMore) { - final newState = await fetch( - state.value!.nextOffset!, - max(state.value!.limit, 100), - ) - .catchError( - (e) => fetch(state.value!.nextOffset!, max(state.value!.limit, 50)), - ) - .catchError( - (e) => fetch(state.value!.nextOffset!, state.value!.limit), - ) - .catchError( - (e) async { - await Future.delayed(const Duration(milliseconds: 500)); - return fetch(state.value!.nextOffset!, state.value!.limit); - }, - ); - - hasMore = newState.hasMore; - - final oldItems = - state.value!.items.isEmpty ? [] : state.value!.items.cast(); - final items = newState.items.isEmpty ? [] : newState.items.cast(); - - state = AsyncData( - newState.copyWith(items: [...oldItems, ...items]), - ); - } - - return state.value!.items.cast(); - } -} diff --git a/lib/provider/metadata_plugin/utils/paginated.dart b/lib/provider/metadata_plugin/utils/paginated.dart deleted file mode 100644 index 4c77441a..00000000 --- a/lib/provider/metadata_plugin/utils/paginated.dart +++ /dev/null @@ -1,83 +0,0 @@ -import 'dart:async'; -import 'dart:math'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -// ignore: implementation_imports -import 'package:riverpod/src/async_notifier.dart'; -import 'package:spotube/provider/metadata_plugin/utils/common.dart'; -import 'package:spotube/services/logger/logger.dart'; - -mixin PaginatedAsyncNotifierMixin - // ignore: invalid_use_of_internal_member - on AsyncNotifierBase> { - Future> fetch(int offset, int limit); - - Future fetchMore() async { - if (state.value == null || !state.value!.hasMore) return; - - final oldState = state.value; - try { - state = AsyncLoadingNext(state.asData!.value); - - final newState = await fetch( - state.value!.nextOffset!, - state.value!.limit, - ); - - final oldItems = - state.value!.items.isEmpty ? [] : state.value!.items.cast(); - final items = newState.items.isEmpty ? [] : newState.items.cast(); - - state = AsyncData(newState.copyWith(items: [...oldItems, ...items])); - } catch (e, stack) { - AppLogger.reportError(e, stack); - state = AsyncData(oldState!); - } - } - - Future> fetchAll() async { - if (state.value == null) return []; - if (!state.value!.hasMore) return state.value!.items.cast(); - - bool hasMore = true; - while (hasMore) { - final newState = await fetch( - state.value!.nextOffset!, - max(state.value!.limit, 100), - ) - .catchError( - (e) => fetch(state.value!.nextOffset!, max(state.value!.limit, 50)), - ) - .catchError( - (e) => fetch(state.value!.nextOffset!, state.value!.limit), - ) - .catchError( - (e) async { - await Future.delayed(const Duration(milliseconds: 500)); - return fetch(state.value!.nextOffset!, state.value!.limit); - }, - ); - - hasMore = newState.hasMore; - - final oldItems = - state.value!.items.isEmpty ? [] : state.value!.items.cast(); - final items = newState.items.isEmpty ? [] : newState.items.cast(); - - state = AsyncData( - newState.copyWith(items: [...oldItems, ...items]), - ); - } - - return state.value!.items.cast(); - } -} - -abstract class PaginatedAsyncNotifier - extends AsyncNotifier> - with PaginatedAsyncNotifierMixin, MetadataPluginMixin {} - -abstract class AutoDisposePaginatedAsyncNotifier - extends AutoDisposeAsyncNotifier> - with PaginatedAsyncNotifierMixin, MetadataPluginMixin {} diff --git a/lib/provider/scrobbler/scrobbler.dart b/lib/provider/scrobbler/scrobbler.dart deleted file mode 100644 index f5e5556d..00000000 --- a/lib/provider/scrobbler/scrobbler.dart +++ /dev/null @@ -1,132 +0,0 @@ -import 'dart:async'; - -import 'package:drift/drift.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:scrobblenaut/scrobblenaut.dart'; -import 'package:spotube/collections/env.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class ScrobblerNotifier extends AsyncNotifier { - final StreamController _scrobbleController = - StreamController.broadcast(); - @override - build() async { - final database = ref.watch(databaseProvider); - - final loginInfo = await (database.select(database.scrobblerTable) - ..where((t) => t.id.equals(0))) - .getSingleOrNull(); - - final subscription = - database.select(database.scrobblerTable).watch().listen((event) async { - try { - if (event.isNotEmpty) { - state = await AsyncValue.guard( - () async => Scrobblenaut( - lastFM: await LastFM.authenticateWithPasswordHash( - apiKey: Env.lastFmApiKey, - apiSecret: Env.lastFmApiSecret, - username: event.first.username, - passwordHash: event.first.passwordHash.value, - ), - ), - ); - } else { - state = const AsyncValue.data(null); - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - - final scrobblerSubscription = - _scrobbleController.stream.listen((track) async { - try { - await state.asData?.value?.track.scrobble( - artist: track.artists.first.name, - track: track.name, - album: track.album.name, - chosenByUser: true, - duration: Duration(milliseconds: track.durationMs), - timestamp: DateTime.now().toUtc(), - ); - } catch (e, stackTrace) { - AppLogger.reportError(e, stackTrace); - } - }); - - ref.onDispose(() { - subscription.cancel(); - scrobblerSubscription.cancel(); - }); - - if (loginInfo == null) { - return null; - } - - return Scrobblenaut( - lastFM: await LastFM.authenticateWithPasswordHash( - apiKey: Env.lastFmApiKey, - apiSecret: Env.lastFmApiSecret, - username: loginInfo.username, - passwordHash: loginInfo.passwordHash.value, - ), - ); - } - - Future login( - String username, - String password, - ) async { - final database = ref.read(databaseProvider); - - final lastFm = await LastFM.authenticate( - apiKey: Env.lastFmApiKey, - apiSecret: Env.lastFmApiSecret, - username: username, - password: password, - ); - - if (!lastFm.isAuth) throw Exception("Invalid credentials"); - - await database.into(database.scrobblerTable).insert( - ScrobblerTableCompanion.insert( - id: const Value(0), - username: username, - passwordHash: DecryptedText(lastFm.passwordHash!), - ), - ); - } - - Future logout() async { - state = const AsyncValue.data(null); - final database = ref.read(databaseProvider); - await database.delete(database.scrobblerTable).go(); - } - - void scrobble(SpotubeTrackObject track) { - _scrobbleController.add(track); - } - - Future love(SpotubeTrackObject track) async { - await state.asData?.value?.track.love( - artist: track.artists.asString(), - track: track.name, - ); - } - - Future unlove(SpotubeTrackObject track) async { - await state.asData?.value?.track.unLove( - artist: track.artists.asString(), - track: track.name, - ); - } -} - -final scrobblerProvider = - AsyncNotifierProvider( - () => ScrobblerNotifier(), -); diff --git a/lib/provider/server/active_track_sources.dart b/lib/provider/server/active_track_sources.dart deleted file mode 100644 index 603ca0e4..00000000 --- a/lib/provider/server/active_track_sources.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; -import 'package:spotube/services/sourced_track/sourced_track.dart'; - -final activeTrackSourcesProvider = FutureProvider< - ({ - SourcedTrack? source, - SourcedTrackNotifier? notifier, - SpotubeTrackObject track, - })?>((ref) async { - final audioPlayerState = ref.watch(audioPlayerProvider); - - if (audioPlayerState.activeTrack == null) { - return null; - } - - if (audioPlayerState.activeTrack is SpotubeLocalTrackObject) { - return ( - source: null, - notifier: null, - track: audioPlayerState.activeTrack!, - ); - } - - final sourcedTrack = await ref.watch( - sourcedTrackProvider( - audioPlayerState.activeTrack! as SpotubeFullTrackObject, - ).future, - ); - final sourcedTrackNotifier = ref.watch( - sourcedTrackProvider( - audioPlayerState.activeTrack! as SpotubeFullTrackObject, - ).notifier, - ); - - return ( - source: sourcedTrack, - track: audioPlayerState.activeTrack!, - notifier: sourcedTrackNotifier, - ); -}); diff --git a/lib/provider/server/bonsoir.dart b/lib/provider/server/bonsoir.dart deleted file mode 100644 index fcc40e54..00000000 --- a/lib/provider/server/bonsoir.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:bonsoir/bonsoir.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/provider/connect/clients.dart'; -import 'package:spotube/provider/server/server.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/device_info/device_info.dart'; -import 'package:spotube/utils/primitive_utils.dart'; - -final bonsoirProvider = FutureProvider((ref) async { - final enabled = ref.watch( - userPreferencesProvider.select((s) => s.enableConnect), - ); - final resolvedService = await ref.watch( - connectClientsProvider.selectAsync((s) => s.resolvedService), - ); - - if (!enabled || resolvedService != null) { - return null; - } - - final (server: _, :port) = await ref.watch(serverProvider.future); - - final service = BonsoirService( - name: await DeviceInfoService.instance.computerName(), - type: '_spotube._tcp', - port: port, - attributes: { - "id": PrimitiveUtils.uuid.v4(), - "deviceId": await DeviceInfoService.instance.deviceId(), - }, - ); - - final broadcast = BonsoirBroadcast(service: service); - - await broadcast.ready; - await broadcast.start(); - - ref.onDispose(() async { - await broadcast.stop(); - }); -}); diff --git a/lib/provider/server/pipeline.dart b/lib/provider/server/pipeline.dart deleted file mode 100644 index 8f97ce89..00000000 --- a/lib/provider/server/pipeline.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shelf/shelf.dart'; - -final pipelineProvider = Provider((ref) { - const pipeline = Pipeline(); - if (kDebugMode) { - pipeline.addMiddleware(logRequests()); - } - return pipeline; -}); diff --git a/lib/provider/server/router.dart b/lib/provider/server/router.dart deleted file mode 100644 index f103ea8c..00000000 --- a/lib/provider/server/router.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shelf/shelf.dart'; -import 'package:shelf_router/shelf_router.dart'; -import 'package:spotube/provider/server/routes/connect.dart'; -import 'package:spotube/provider/server/routes/playback.dart'; - -final serverRouterProvider = Provider((ref) { - final playbackRoutes = ref.watch(serverPlaybackRoutesProvider); - final connectRoutes = ref.watch(serverConnectRoutesProvider); - - final router = Router(); - - router.get("/ping", (Request request) => Response.ok("pong")); - - router.head("/stream/", playbackRoutes.headStreamTrackId); - router.get("/stream/", playbackRoutes.getStreamTrackId); - - router.get("/playback/toggle-playback", playbackRoutes.togglePlayback); - router.get("/playback/previous", playbackRoutes.previousTrack); - router.get("/playback/next", playbackRoutes.nextTrack); - - router.all("/ws", connectRoutes.websocket); - - return router; -}); diff --git a/lib/provider/server/routes/connect.dart b/lib/provider/server/routes/connect.dart deleted file mode 100644 index 257c4cb4..00000000 --- a/lib/provider/server/routes/connect.dart +++ /dev/null @@ -1,249 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shelf/shelf.dart'; -import 'package:shelf_web_socket/shelf_web_socket.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/connect/connect.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -import 'package:spotube/provider/history/history.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/volume_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:web_socket_channel/web_socket_channel.dart'; - -extension _WebsocketSinkExts on WebSocketSink { - void addEvent(WebSocketEvent event) { - add(event.toJson()); - } -} - -class ServerConnectRoutes { - final Ref ref; - final StreamController _connectClientStreamController; - final List subscriptions; - ServerConnectRoutes(this.ref) - : _connectClientStreamController = StreamController.broadcast(), - subscriptions = [] { - ref.onDispose(() { - _connectClientStreamController.close(); - for (final subscription in subscriptions) { - subscription.cancel(); - } - }); - } - - AudioPlayerNotifier get audioPlayerNotifier => - ref.read(audioPlayerProvider.notifier); - PlaybackHistoryActions get historyNotifier => - ref.read(playbackHistoryActionsProvider); - Stream get connectClientStream => - _connectClientStreamController.stream; - - final List _allowedConnections = []; - - FutureOr websocket(Request req) { - return webSocketHandler( - ( - WebSocketChannel channel, - String? protocol, - ) async { - final context = - (req.context["shelf.io.connection_info"] as HttpConnectionInfo?); - final origin = "${context?.remoteAddress.host}:${context?.remotePort}"; - _connectClientStreamController.add(origin); - - // Confirm whether user allows to connect - if (rootNavigatorKey.currentContext?.mounted == true && - _allowedConnections.contains(origin) == false) { - final confirmed = await showDialog( - context: rootNavigatorKey.currentContext!, - builder: (context) { - return AlertDialog( - title: Text(context.l10n.connect), - content: Text( - context.l10n.connect_request(origin), - ), - actions: [ - Button.secondary( - onPressed: () { - Navigator.of(context).pop(false); - }, - child: Text(context.l10n.decline), - ), - Button.primary( - onPressed: () { - Navigator.of(context).pop(true); - }, - child: Text(context.l10n.accept), - ), - ], - ); - }, - ) ?? - false; - - if (confirmed) { - _allowedConnections.add(origin); - } else { - channel.sink.addEvent( - WebSocketErrorEvent("Connection denied"), - ); - await channel.sink.close(); - return; - } - } - - ref.listen( - audioPlayerProvider, - (previous, next) { - channel.sink.addEvent(WebSocketQueueEvent(next)); - }, - fireImmediately: true, - ); - - // because audioPlayer events doesn't fireImmediately - channel.sink.addEvent(WebSocketPlayingEvent(audioPlayer.isPlaying)); - channel.sink.addEvent( - WebSocketPositionEvent(audioPlayer.position), - ); - channel.sink.addEvent( - WebSocketDurationEvent(audioPlayer.duration), - ); - channel.sink.addEvent(WebSocketShuffleEvent(audioPlayer.isShuffled)); - channel.sink.addEvent(WebSocketLoopEvent(audioPlayer.loopMode)); - channel.sink.addEvent(WebSocketVolumeEvent(audioPlayer.volume)); - - subscriptions.addAll([ - audioPlayer.positionStream.listen( - (position) { - channel.sink.addEvent(WebSocketPositionEvent(position)); - }, - ), - audioPlayer.playingStream.listen( - (playing) { - channel.sink.addEvent(WebSocketPlayingEvent(playing)); - }, - ), - audioPlayer.durationStream.listen( - (duration) { - channel.sink.addEvent(WebSocketDurationEvent(duration)); - }, - ), - audioPlayer.shuffledStream.listen( - (shuffled) { - channel.sink.addEvent(WebSocketShuffleEvent(shuffled)); - }, - ), - audioPlayer.loopModeStream.listen( - (loopMode) { - channel.sink.addEvent(WebSocketLoopEvent(loopMode)); - }, - ), - audioPlayer.volumeStream.listen( - (volume) { - channel.sink.addEvent(WebSocketVolumeEvent(volume)); - }, - ), - channel.stream.listen( - (message) async { - try { - final event = WebSocketEvent.fromJson( - jsonDecode(message), - (data) => data, - ); - - event.onLoad((event) async { - await audioPlayerNotifier.load( - event.data.tracks.cast().toList(), - autoPlay: true, - initialIndex: event.data.initialIndex ?? 0, - ); - - if (event.data.collectionId == null) return; - audioPlayerNotifier.addCollection(event.data.collectionId!); - if (event.data.collection is SpotubeSimpleAlbumObject) { - historyNotifier.addAlbums( - [event.data.collection as SpotubeSimpleAlbumObject]); - } else { - historyNotifier.addPlaylists( - [event.data.collection as SpotubeSimplePlaylistObject]); - } - }); - - event.onPause((event) async { - await audioPlayer.pause(); - }); - - event.onResume((event) async { - await audioPlayer.resume(); - }); - - event.onStop((event) async { - await ref.read(audioPlayerProvider.notifier).stop(); - }); - - event.onNext((event) async { - await audioPlayer.skipToNext(); - }); - - event.onPrevious((event) async { - await audioPlayer.skipToPrevious(); - }); - - event.onJump((event) async { - await audioPlayer.jumpTo(event.data); - }); - - event.onSeek((event) async { - await audioPlayer.seek(event.data); - }); - - event.onShuffle((event) async { - await audioPlayer.setShuffle(event.data); - }); - - event.onLoop((event) async { - await audioPlayer.setLoopMode(event.data); - }); - - event.onAddTrack((event) async { - await audioPlayerNotifier.addTrack(event.data); - }); - - event.onRemoveTrack((event) async { - await audioPlayerNotifier.removeTrack(event.data); - }); - - event.onReorder((event) async { - await audioPlayerNotifier.moveTrack( - event.data.oldIndex, - event.data.newIndex, - ); - }); - - event.onVolume((event) async { - ref.read(volumeProvider.notifier).setVolume(event.data); - }); - } catch (e, stackTrace) { - AppLogger.reportError(e, stackTrace); - channel.sink.addEvent(WebSocketErrorEvent(e.toString())); - } - }, - onDone: () { - AppLogger.log.i('Connection closed'); - }, - ), - ]); - }, - )(req); - } -} - -final serverConnectRoutesProvider = Provider((ref) => ServerConnectRoutes(ref)); diff --git a/lib/provider/server/routes/playback.dart b/lib/provider/server/routes/playback.dart deleted file mode 100644 index db6bf8f5..00000000 --- a/lib/provider/server/routes/playback.dart +++ /dev/null @@ -1,358 +0,0 @@ -import 'dart:async'; -import 'dart:io'; -import 'dart:math'; - -import 'package:dio/dio.dart' hide Response; -import 'package:dio/dio.dart' as dio_lib; -import 'package:flutter/foundation.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:metadata_god/metadata_god.dart'; -import 'package:path/path.dart'; -import 'package:shelf/shelf.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/models/parser/range_headers.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/audio_player/state.dart'; - -import 'package:spotube/provider/server/active_track_sources.dart'; -import 'package:spotube/provider/server/sourced_track_provider.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/services/sourced_track/sourced_track.dart'; -import 'package:spotube/utils/service_utils.dart'; -import 'package:youtube_explode_dart/youtube_explode_dart.dart'; - -final _deviceClients = Set.unmodifiable({ - YoutubeApiClient.ios, - YoutubeApiClient.android, - YoutubeApiClient.mweb, - YoutubeApiClient.safari, -}); - -String? get _randomUserAgent => _deviceClients - .elementAt( - Random().nextInt(_deviceClients.length), - ) - .payload["context"]["client"]["userAgent"]; - -class ServerPlaybackRoutes { - final Ref ref; - UserPreferences get userPreferences => ref.read(userPreferencesProvider); - AudioPlayerState get playlist => ref.read(audioPlayerProvider); - final Dio dio; - - ServerPlaybackRoutes(this.ref) : dio = Dio(); - - Future _getTrackCacheFilePath(SourcedTrack track) async { - return join( - await UserPreferencesNotifier.getMusicCacheDir(), - ServiceUtils.sanitizeFilename( - '${track.query.name} - ${track.query.artists.map((d) => d.name).join(",")} (${track.info.id}).${track.qualityPreset!.getFileExtension()}', - ), - ); - } - - Future _getSourcedTrack( - Request request, - String trackId, - ) async { - final track = - playlist.tracks.firstWhere((element) => element.id == trackId); - - final activeSourcedTrack = - await ref.read(activeTrackSourcesProvider.future); - - final media = audioPlayer.playlist.medias - .firstWhere((e) => e.uri == request.requestedUri.toString()); - final spotubeMedia = - media is SpotubeMedia ? media : SpotubeMedia.media(media); - final sourcedTrack = activeSourcedTrack?.track.id == track.id - ? activeSourcedTrack?.source - : await ref.read( - sourcedTrackProvider(spotubeMedia.track as SpotubeFullTrackObject) - .future, - ); - - return sourcedTrack; - } - - Future streamTrackInformation( - Request request, - SourcedTrack track, - ) async { - AppLogger.log.i( - "HEAD request for track: ${track.query.name}\n" - "Headers: ${request.headers}", - ); - - final trackCacheFile = File(await _getTrackCacheFilePath(track)); - - if (await trackCacheFile.exists() && userPreferences.cacheMusic) { - final fileLength = await trackCacheFile.length(); - - return dio_lib.Response( - statusCode: 200, - headers: Headers.fromMap({ - "content-type": ["audio/${track.qualityPreset!.name}"], - "content-length": ["$fileLength"], - "accept-ranges": ["bytes"], - "content-range": ["bytes 0-$fileLength/$fileLength"], - }), - requestOptions: RequestOptions(path: request.requestedUri.toString()), - ); - } - - String url = track.url ?? - await ref - .read(sourcedTrackProvider(track.query).notifier) - .swapWithNextSibling() - .then((track) => track.url!); - - final options = Options( - headers: { - "user-agent": _randomUserAgent, - "Cache-Control": "max-age=3600", - "Connection": "keep-alive", - "host": Uri.parse(url).host, - }, - validateStatus: (status) => status! < 400, - ); - - final res = await dio.head(url, options: options); - - return res; - } - - Future streamTrack( - Request request, - SourcedTrack track, - Map headers, - ) async { - AppLogger.log.i( - "GET request for track: ${track.query.name}\n" - "Headers: ${request.headers}", - ); - - final trackCacheFile = File(await _getTrackCacheFilePath(track)); - - if (await trackCacheFile.exists() && userPreferences.cacheMusic) { - final bytes = await trackCacheFile.readAsBytes(); - final cachedFileLength = bytes.length; - - return dio_lib.Response( - statusCode: 200, - headers: Headers.fromMap({ - "content-type": ["audio/${track.qualityPreset!.name}"], - "content-length": ["${cachedFileLength - 1}"], - "accept-ranges": ["bytes"], - "content-range": [ - "bytes 0-${cachedFileLength - 1}/$cachedFileLength" - ], - "connection": ["close"], - }), - requestOptions: RequestOptions(path: request.requestedUri.toString()), - data: bytes, - ); - } - - String url = track.url ?? - await ref - .read(sourcedTrackProvider(track.query).notifier) - .swapWithNextSibling() - .then((track) => track.url!); - - final options = Options( - headers: { - ...headers, - "user-agent": _randomUserAgent, - "Cache-Control": "max-age=3600", - "Connection": "keep-alive", - "host": Uri.parse(url).host, - }, - responseType: ResponseType.stream, - validateStatus: (status) => status! < 400, - ); - - final contentLengthRes = await Future.value( - dio.head( - url, - options: options.copyWith(responseType: ResponseType.bytes), - ), - ).catchError((e, stack) async { - AppLogger.reportError(e, stack); - - final sourcedTrack = await ref - .read(sourcedTrackProvider(track.query).notifier) - .refreshStreamingUrl(); - - url = sourcedTrack.url!; - - return dio.head(url, options: options); - }); - - // Redirect to m3u8 link directly as it handles range requests internally - if (contentLengthRes?.headers.value("content-type") == - "application/vnd.apple.mpegurl") { - return dio_lib.Response( - statusCode: 301, - statusMessage: "M3U8 Redirect", - headers: Headers.fromMap({ - "location": [url], - "content-type": ["application/vnd.apple.mpegurl"], - }), - requestOptions: RequestOptions(path: request.requestedUri.toString()), - isRedirect: true, - ); - } - - final res = await dio.get(url, options: options); - - AppLogger.log.i( - "Response for track: ${track.query.name}\n" - "Status Code: ${res.statusCode}\n" - "Headers: ${res.headers.map}", - ); - - if (!userPreferences.cacheMusic) { - return res; - } - - final resStream = res.data!.stream.asBroadcastStream(); - - final trackPartialCacheFile = File("${trackCacheFile.path}.part"); - if (!await trackPartialCacheFile.exists()) { - await trackPartialCacheFile.create(recursive: true); - } - - // Write the stream to the file based on the range - final partialCacheFileSink = - trackPartialCacheFile.openWrite(mode: FileMode.writeOnlyAppend); - final contentRange = res.headers.value("content-range") != null - ? ContentRangeHeader.parse(res.headers.value("content-range") ?? "") - : ContentRangeHeader(0, 0, 0); - - resStream.listen( - (data) { - partialCacheFileSink.add(data); - }, - onError: (e, stack) { - partialCacheFileSink.close(); - }, - onDone: () async { - await partialCacheFileSink.close(); - - final fileLength = await trackPartialCacheFile.length(); - if (fileLength != contentRange.total) return; - - await trackPartialCacheFile.rename(trackCacheFile.path); - - if (track.qualityPreset!.getFileExtension() == "weba") return; - - final imageBytes = await ServiceUtils.downloadImage( - track.query.album.images.asUrlString( - placeholder: ImagePlaceholder.albumArt, - index: 1, - ), - ); - - await MetadataGod.writeMetadata( - file: trackCacheFile.path, - metadata: track.query.toMetadata( - imageBytes: imageBytes, - fileLength: fileLength, - ), - ).catchError((e, stackTrace) { - AppLogger.reportError(e, stackTrace); - }); - }, - cancelOnError: true, - ); - - res.data?.stream = - resStream; // To avoid Stream has been already listened to exception - return res; - } - - /// @head('/stream/') - Future headStreamTrackId(Request request, String trackId) async { - try { - final sourcedTrack = await _getSourcedTrack(request, trackId); - - if (sourcedTrack == null) { - return Response.notFound("Track not found in the current queue"); - } - - final res = await streamTrackInformation( - request, - sourcedTrack, - ); - - return Response( - res.statusCode!, - headers: res.headers.map, - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - return Response.internalServerError(); - } - } - - /// @get('/stream/') - Future getStreamTrackId(Request request, String trackId) async { - try { - final sourcedTrack = await _getSourcedTrack(request, trackId); - - if (sourcedTrack == null) { - return Response.notFound("Track not found in the current queue"); - } - - final res = await streamTrack( - request, - sourcedTrack, - request.headers, - ); - - if (res.data is ResponseBody) { - return Response( - res.statusCode!, - body: (res.data as ResponseBody).stream, - headers: res.headers.map, - ); - } - - return Response( - res.statusCode!, - body: res.data, - headers: res.headers.map, - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - return Response.internalServerError(); - } - } - - /// @get('/playback/toggle-playback') - Future togglePlayback(Request request) async { - audioPlayer.isPlaying - ? await audioPlayer.pause() - : await audioPlayer.resume(); - - return Response.ok("Playback toggled"); - } - - /// @get('/playback/previous') - Future previousTrack(Request request) async { - await audioPlayer.skipToPrevious(); - return Response.ok("Previous track"); - } - - /// @get('/playback/next') - Future nextTrack(Request request) async { - await audioPlayer.skipToNext(); - return Response.ok("Next track"); - } -} - -final serverPlaybackRoutesProvider = - Provider((ref) => ServerPlaybackRoutes(ref)); diff --git a/lib/provider/server/server.dart b/lib/provider/server/server.dart deleted file mode 100644 index d10815bf..00000000 --- a/lib/provider/server/server.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'dart:io'; -import 'dart:math'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shelf/shelf_io.dart'; -import 'package:spotube/provider/server/pipeline.dart'; -import 'package:spotube/provider/server/router.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; - -final serverProvider = FutureProvider( - (ref) async { - final enabledRemoteConnect = ref.watch( - userPreferencesProvider.select((value) => value.enableConnect), - ); - final connectPort = ref.watch( - userPreferencesProvider.select((value) => value.connectPort), - ); - final pipeline = ref.watch(pipelineProvider); - final router = ref.watch(serverRouterProvider); - - // When connect port is -1, we need to generate a random port - // but we shouldn't reset it if it's already been set (caused by a state change) - if (connectPort == -1) { - if (SpotubeMedia.serverPort == 0) { - final port = Random().nextInt(17500) + 5000; - SpotubeMedia.serverPort = port; - } - } else { - SpotubeMedia.serverPort = connectPort; - } - - final server = await serve( - pipeline.addHandler(router.call), - enabledRemoteConnect - ? InternetAddress.anyIPv4 - : InternetAddress.loopbackIPv4, - SpotubeMedia.serverPort, - ); - - AppLogger.log.t( - 'Playback server at http://${server.address.host}:${server.port}', - ); - - ref.onDispose(() { - server.close(); - }); - - return ( - server: server, - port: SpotubeMedia.serverPort, - ); - }, -); diff --git a/lib/provider/server/sourced_track_provider.dart b/lib/provider/server/sourced_track_provider.dart deleted file mode 100644 index 7934ecc7..00000000 --- a/lib/provider/server/sourced_track_provider.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'dart:async'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/metadata_plugin/audio_source/quality_presets.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/sourced_track/sourced_track.dart'; - -class SourcedTrackNotifier - extends FamilyAsyncNotifier { - @override - FutureOr build(query) { - ref.watch(audioSourcePluginProvider); - ref.watch(audioSourcePresetsProvider); - - return SourcedTrack.fetchFromTrack(query: query, ref: ref); - } - - Future refreshStreamingUrl() async { - return await update((prev) async { - return await prev.refreshStream(); - }); - } - - Future copyWithSibling() async { - return await update((prev) async { - return prev.copyWithSibling(); - }); - } - - Future swapWithSibling( - SpotubeAudioSourceMatchObject sibling, - ) async { - return await update((prev) async { - return await prev.swapWithSibling(sibling) ?? prev; - }); - } - - Future swapWithNextSibling() async { - return await update((prev) async { - return await prev.swapWithSibling(prev.siblings.first) as SourcedTrack; - }); - } -} - -final sourcedTrackProvider = AsyncNotifierProviderFamily( - () => SourcedTrackNotifier(), -); diff --git a/lib/provider/skip_segments/skip_segments.dart b/lib/provider/skip_segments/skip_segments.dart deleted file mode 100644 index dc06f326..00000000 --- a/lib/provider/skip_segments/skip_segments.dart +++ /dev/null @@ -1,105 +0,0 @@ -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:dio/dio.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/provider/server/active_track_sources.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; - -import 'package:spotube/services/dio/dio.dart'; - -class SourcedSegments { - final String source; - final List segments; - - SourcedSegments({required this.source, required this.segments}); -} - -Future> getAndCacheSkipSegments( - String id, Ref ref) async { - final database = ref.read(databaseProvider); - try { - final cached = await (database.select(database.skipSegmentTable) - ..where((s) => s.trackId.equals(id))) - .get(); - - if (cached.isNotEmpty) { - return cached; - } - - final res = await globalDio.getUri( - Uri( - scheme: "https", - host: "sponsor.ajay.app", - path: "/api/skipSegments", - queryParameters: { - "videoID": id, - "category": [ - 'sponsor', - 'selfpromo', - 'interaction', - 'intro', - 'outro', - 'music_offtopic' - ], - "actionType": 'skip' - }, - ), - options: Options( - responseType: ResponseType.json, - validateStatus: (status) => (status ?? 0) < 500, - ), - ); - - if (res.data == "Not Found") { - return List.castFrom([]); - } - - final data = res.data as List; - final segments = data.map((obj) { - final start = obj["segment"].first.toInt(); - final end = obj["segment"].last.toInt(); - return SkipSegmentTableCompanion.insert( - trackId: id, - start: start, - end: end, - ); - }).toList(); - - await database.batch((b) { - b.insertAll(database.skipSegmentTable, segments); - }); - - return await (database.select(database.skipSegmentTable) - ..where((s) => s.trackId.equals(id))) - .get(); - } catch (e, stack) { - AppLogger.reportError(e, stack); - return List.castFrom([]); - } -} - -final segmentProvider = FutureProvider( - (ref) async { - final snapshot = await ref.watch(activeTrackSourcesProvider.future); - if (snapshot == null) return null; - final (:track, :source, :notifier) = snapshot; - if (track is SpotubeLocalTrackObject) return null; - if (!source!.source.toLowerCase().contains("youtube")) return null; - - final skipNonMusic = - ref.watch(userPreferencesProvider.select((s) => s.skipNonMusic)); - - if (!skipNonMusic) { - return SourcedSegments(segments: [], source: source.info.id); - } - - final segments = await getAndCacheSkipSegments(source.info.id, ref); - - return SourcedSegments( - source: source.info.id, - segments: segments, - ); - }, -); diff --git a/lib/provider/sleep_timer_provider.dart b/lib/provider/sleep_timer_provider.dart deleted file mode 100644 index 53386e49..00000000 --- a/lib/provider/sleep_timer_provider.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; - -class SleepTimerNotifier extends StateNotifier { - SleepTimerNotifier() : super(null); - - Timer? _timer; - - void setSleepTimer(Duration duration) { - state = duration; - - _timer = Timer(duration, () { - //! This can be a reason for app termination in iOS AppStore - exit(0); - }); - } - - void cancelSleepTimer() { - state = null; - _timer?.cancel(); - } -} - -final sleepTimerProvider = StateNotifierProvider( - (ref) => SleepTimerNotifier(), -); diff --git a/lib/provider/track_options/track_options_provider.dart b/lib/provider/track_options/track_options_provider.dart deleted file mode 100644 index 5aebf39c..00000000 --- a/lib/provider/track_options/track_options_provider.dart +++ /dev/null @@ -1,306 +0,0 @@ -import 'dart:io'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/services.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/dialogs/playlist_add_track_dialog.dart'; -import 'package:spotube/components/dialogs/prompt_dialog.dart'; -import 'package:spotube/components/dialogs/track_details_dialog.dart'; -import 'package:spotube/extensions/context.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/blacklist_provider.dart'; -import 'package:spotube/provider/download_manager_provider.dart'; -import 'package:spotube/provider/local_tracks/local_tracks_provider.dart'; -import 'package:spotube/provider/metadata_plugin/core/auth.dart'; -import 'package:spotube/provider/metadata_plugin/library/playlists.dart'; -import 'package:spotube/provider/metadata_plugin/library/tracks.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -enum TrackOptionValue { - album, - share, - addToPlaylist, - addToQueue, - removeFromPlaylist, - removeFromQueue, - blacklist, - delete, - playNext, - favorite, - details, - download, - startRadio, -} - -class TrackOptionsActions { - final Ref ref; - final SpotubeTrackObject track; - - TrackOptionsActions(this.ref, this.track); - - AudioPlayerNotifier get playback => ref.read(audioPlayerProvider.notifier); - MetadataPluginSavedTracksNotifier get favoriteTracks => - ref.read(metadataPluginSavedTracksProvider.notifier); - MetadataPluginSavedPlaylistsNotifier get favoritePlaylistsNotifier => - ref.read(metadataPluginSavedPlaylistsProvider.notifier); - DownloadManagerNotifier get downloadManager => - ref.read(downloadManagerProvider.notifier); - BlackListNotifier get blacklist => ref.read(blacklistProvider.notifier); - - void actionShare(BuildContext context) { - Clipboard.setData(ClipboardData(text: track.externalUri)).then((_) { - if (context.mounted) { - showToast( - context: rootNavigatorKey.currentContext!, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n.copied_to_clipboard(track.externalUri), - textAlign: TextAlign.center, - ), - ); - }, - ); - } - }); - } - - Future actionAddToPlaylist( - BuildContext context, - String? playlistId, - ) async { - /// showDialog doesn't work for some reason. So we have to - /// manually push a Dialog Route in the Navigator to get it working - await showDialog( - context: context, - builder: (context) { - return PlaylistAddTrackDialog( - tracks: [track], - openFromPlaylist: playlistId, - ); - }, - ); - } - - Future actionStartRadio(BuildContext context) async { - final playback = ref.read(audioPlayerProvider.notifier); - final playlist = ref.read(audioPlayerProvider); - final metadataPlugin = await ref.read(metadataPluginProvider.future); - - if (metadataPlugin == null) { - throw MetadataPluginException.noDefaultMetadataPlugin(); - } - - final tracks = await metadataPlugin.track.radio(track.id); - - bool replaceQueue = false; - - if (context.mounted && playlist.tracks.isNotEmpty) { - replaceQueue = await showPromptDialog( - context: context, - title: context.l10n.how_to_start_radio, - message: context.l10n.replace_queue_question, - okText: context.l10n.replace, - cancelText: context.l10n.add_to_queue, - ); - } - - if (replaceQueue || playlist.tracks.isEmpty) { - await playback.stop(); - await playback.load([track], autoPlay: true); - - // we don't have to add those tracks as useEndlessPlayback will do it for us - return; - } else { - await playback.addTrack(track); - } - - await playback.addTracks( - tracks.toList() - ..removeWhere((e) { - final isDuplicate = playlist.tracks.any((t) => t.id == e.id); - return e.id == track.id || isDuplicate; - }), - ); - } - - Future action( - BuildContext context, - TrackOptionValue value, - String? playlistId, - ) async { - switch (value) { - case TrackOptionValue.album: - await context.navigateTo( - AlbumRoute(id: track.album.id, album: track.album), - ); - break; - case TrackOptionValue.delete: - await File((track as SpotubeLocalTrackObject).path).delete(); - ref.invalidate(localTracksProvider); - break; - case TrackOptionValue.addToQueue: - await playback.addTrack(track); - if (context.mounted) { - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n.added_track_to_queue(track.name), - textAlign: TextAlign.center, - ), - ); - }, - ); - } - break; - case TrackOptionValue.playNext: - await playback.addTracksAtFirst([track]); - - if (context.mounted) { - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n.track_will_play_next(track.name), - textAlign: TextAlign.center, - ), - ); - }, - ); - } - break; - case TrackOptionValue.removeFromQueue: - playback.removeTrack(track.id); - - if (context.mounted) { - showToast( - context: context, - location: ToastLocation.topRight, - builder: (context, overlay) { - return SurfaceCard( - child: Text( - context.l10n.removed_track_from_queue( - track.name, - ), - textAlign: TextAlign.center, - ), - ); - }, - ); - } - break; - case TrackOptionValue.favorite: - final isLikedTrack = await ref.read( - metadataPluginIsSavedTrackProvider(track.id).future, - ); - - if (isLikedTrack) { - await favoriteTracks.removeFavorite([track]); - } else { - await favoriteTracks.addFavorite([track]); - } - break; - case TrackOptionValue.addToPlaylist: - actionAddToPlaylist(context, playlistId); - break; - case TrackOptionValue.removeFromPlaylist: - favoritePlaylistsNotifier.removeTracks(playlistId ?? "", [track.id]); - break; - case TrackOptionValue.blacklist: - final isBlacklisted = blacklist.contains(track); - if (isBlacklisted == true) { - await ref.read(blacklistProvider.notifier).remove(track.id); - } else { - await ref.read(blacklistProvider.notifier).add( - BlacklistTableCompanion.insert( - name: track.name, - elementId: track.id, - elementType: BlacklistedType.track, - ), - ); - } - break; - case TrackOptionValue.share: - actionShare(context); - break; - case TrackOptionValue.details: - if (track is! SpotubeFullTrackObject) break; - showDialog( - context: context, - builder: (context) => ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 400), - child: TrackDetailsDialog(track: track as SpotubeFullTrackObject), - ), - ); - break; - case TrackOptionValue.download: - if (track is SpotubeLocalTrackObject) break; - downloadManager.addToQueue(track as SpotubeFullTrackObject); - break; - case TrackOptionValue.startRadio: - actionStartRadio(context); - break; - } - } -} - -typedef TrackOptionFlags = ({ - bool isInQueue, - bool isBlacklisted, - bool isInDownloadQueue, - bool isActiveTrack, - bool isAuthenticated, - bool isLiked, - DownloadTask? downloadTask, -}); - -final trackOptionActionsProvider = - Provider.family( - (ref, track) => TrackOptionsActions(ref, track), -); - -final trackOptionsStateProvider = - Provider.family((ref, track) { - ref.watch(downloadManagerProvider); - ref.watch(blacklistProvider); - - final playlist = ref.watch(audioPlayerProvider); - final authenticated = ref.watch(metadataPluginAuthenticatedProvider); - final downloadManager = ref.watch(downloadManagerProvider.notifier); - final blacklist = ref.watch(blacklistProvider.notifier); - final isBlacklisted = blacklist.contains(track); - final isSavedTrack = ref.watch(metadataPluginIsSavedTrackProvider(track.id)); - - final downloadTask = playlist.activeTrack?.id == null - ? null - : downloadManager.getTaskByTrackId(playlist.activeTrack!.id); - final isInDownloadQueue = playlist.activeTrack == null || - playlist.activeTrack! is SpotubeLocalTrackObject - ? false - : const [ - DownloadStatus.queued, - DownloadStatus.downloading, - ].contains(downloadTask?.status); - - return ( - isInQueue: playlist.containsTrack(track), - isBlacklisted: isBlacklisted, - isInDownloadQueue: isInDownloadQueue, - isActiveTrack: playlist.activeTrack?.id == track.id, - isAuthenticated: authenticated.asData?.value ?? false, - isLiked: isSavedTrack.asData?.value ?? false, - downloadTask: downloadTask, - ); -}); diff --git a/lib/provider/tray_manager/tray_manager.dart b/lib/provider/tray_manager/tray_manager.dart deleted file mode 100644 index a976b09b..00000000 --- a/lib/provider/tray_manager/tray_manager.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/provider/tray_manager/tray_menu.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:tray_manager/tray_manager.dart'; -import 'package:window_manager/window_manager.dart'; - -class SystemTrayManager with TrayListener { - final Ref ref; - final bool enabled; - - SystemTrayManager( - this.ref, { - required this.enabled, - }) { - initialize(); - } - - Future initialize() async { - if (!kIsDesktop) return; - - if (enabled) { - await trayManager.setIcon( - kIsWindows - ? 'assets/branding/spotube-logo.ico' - : kIsFlatpak - ? 'com.github.KRTirtho.Spotube' - : 'assets/branding/spotube-logo.png', - ); - trayManager.addListener(this); - } else { - await trayManager.destroy(); - } - } - - void dispose() { - trayManager.removeListener(this); - } - - @override - onTrayIconMouseDown() { - if (kIsWindows) { - windowManager.show(); - } else { - trayManager.popUpContextMenu(); - } - } - - @override - onTrayIconRightMouseDown() { - if (!kIsWindows) { - windowManager.show(); - } else { - trayManager.popUpContextMenu(); - } - } -} - -final trayManagerProvider = Provider( - (ref) { - final enabled = ref.watch( - userPreferencesProvider.select((s) => s.showSystemTrayIcon), - ); - - ref.listen(trayMenuProvider, (_, menu) { - if (!enabled || !kIsDesktop) return; - trayManager.setContextMenu(menu); - }); - - final manager = SystemTrayManager( - ref, - enabled: enabled, - ); - - ref.onDispose(manager.dispose); - - return manager; - }, -); diff --git a/lib/provider/tray_manager/tray_menu.dart b/lib/provider/tray_manager/tray_menu.dart deleted file mode 100644 index 42a3f948..00000000 --- a/lib/provider/tray_manager/tray_menu.dart +++ /dev/null @@ -1,108 +0,0 @@ -import 'dart:io'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:tray_manager/tray_manager.dart'; -import 'package:window_manager/window_manager.dart'; - -final audioPlayerLoopMode = StreamProvider((ref) { - return audioPlayer.loopModeStream; -}); - -final audioPlayerShuffleMode = StreamProvider((ref) { - return audioPlayer.shuffledStream; -}); -final audioPlayerPlaying = StreamProvider((ref) { - return audioPlayer.playingStream; -}); - -final trayMenuProvider = Provider((ref) { - final playlistNotifier = ref.watch(audioPlayerProvider.notifier); - final isPlaybackPlaying = - ref.watch(audioPlayerProvider.select((s) => s.activeTrack != null)); - final isLoopOne = - ref.watch(audioPlayerLoopMode).asData?.value == PlaylistMode.single; - final isShuffled = ref.watch(audioPlayerShuffleMode).asData?.value ?? false; - final isPlaying = ref.watch(audioPlayerPlaying).asData?.value ?? false; - - return Menu( - items: [ - MenuItem( - label: "Show/Hide Window", - onClick: (menuItem) async { - if (await windowManager.isVisible()) { - await windowManager.hide(); - } else { - await windowManager.focus(); - await windowManager.show(); - } - }, - ), - MenuItem.separator(), - MenuItem( - label: isPlaying ? "Pause" : "Play", - disabled: !isPlaybackPlaying, - onClick: (menuItem) async { - if (audioPlayer.isPlaying) { - await audioPlayer.pause(); - } else { - await audioPlayer.resume(); - } - }, - ), - MenuItem( - label: "Next", - disabled: !isPlaybackPlaying, - onClick: (menuItem) { - audioPlayer.skipToNext(); - }, - ), - MenuItem( - label: "Previous", - disabled: !isPlaybackPlaying, - onClick: (menuItem) { - audioPlayer.skipToPrevious(); - }, - ), - MenuItem.submenu( - label: "Playback", - submenu: Menu( - items: [ - MenuItem( - label: "Repeat", - checked: isLoopOne, - onClick: (menuItem) { - audioPlayer.setLoopMode( - isLoopOne ? PlaylistMode.none : PlaylistMode.single, - ); - }, - ), - MenuItem( - label: "Shuffle", - checked: isShuffled, - onClick: (menuItem) { - audioPlayer.setShuffle(!isShuffled); - }, - ), - MenuItem.separator(), - MenuItem( - label: "Stop", - onClick: (menuItem) { - playlistNotifier.stop(); - }, - ), - ], - ), - ), - MenuItem.separator(), - MenuItem( - label: "Quit", - onClick: (menuItem) { - exit(0); - }, - ), - ], - ); -}); diff --git a/lib/provider/user_preferences/user_preferences_provider.dart b/lib/provider/user_preferences/user_preferences_provider.dart deleted file mode 100644 index 0b43d043..00000000 --- a/lib/provider/user_preferences/user_preferences_provider.dart +++ /dev/null @@ -1,234 +0,0 @@ -import 'package:drift/drift.dart'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart' as paths; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide join; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/market.dart'; -import 'package:spotube/modules/settings/color_scheme_picker_dialog.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; -import 'package:open_file/open_file.dart'; - -typedef UserPreferences = PreferencesTableData; - -class UserPreferencesNotifier extends Notifier { - @override - build() { - final db = ref.watch(databaseProvider); - - (db.select(db.preferencesTable)..where((tbl) => tbl.id.equals(0))) - .getSingleOrNull() - .then((result) async { - if (result == null) { - await db.into(db.preferencesTable).insert( - PreferencesTableCompanion.insert( - id: const Value(0), - downloadLocation: Value(await _getDefaultDownloadDirectory()), - ), - ); - } - - state = await (db.select(db.preferencesTable) - ..where((tbl) => tbl.id.equals(0))) - .getSingle(); - - final subscription = (db.select(db.preferencesTable) - ..where((tbl) => tbl.id.equals(0))) - .watchSingle() - .listen((event) async { - try { - state = event; - - if (kIsDesktop) { - await windowManager.setTitleBarStyle( - state.systemTitleBar - ? TitleBarStyle.normal - : TitleBarStyle.hidden, - ); - } - - await audioPlayer.setAudioNormalization(state.normalizeAudio); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - - ref.onDispose(() { - subscription.cancel(); - }); - }); - - return PreferencesTable.defaults(); - } - - Future _getDefaultDownloadDirectory() async { - if (kIsAndroid) return "/storage/emulated/0/Download/Spotube"; - - if (kIsMacOS) { - return join((await paths.getLibraryDirectory()).path, "Caches"); - } - - return paths.getDownloadsDirectory().then((dir) { - return join(dir!.path, "Spotube"); - }); - } - - Future setData(PreferencesTableCompanion data) async { - final db = ref.read(databaseProvider); - - final query = db.update(db.preferencesTable)..where((t) => t.id.equals(0)); - - await query.write(data); - } - - Future reset() async { - final db = ref.read(databaseProvider); - - final query = db.update(db.preferencesTable); - - await query.replace(PreferencesTableCompanion.insert(id: const Value(0))); - } - - static Future getMusicCacheDir() async { - if (kIsAndroid) { - final dir = - await paths.getExternalCacheDirectories().then((dirs) => dirs!.first); - if (!await dir.exists()) { - await dir.create(recursive: true); - } - return join(dir.path, 'Cached Tracks'); - } - - final dir = await paths.getApplicationCacheDirectory(); - return join(dir.path, 'cached_tracks'); - } - - Future openCacheFolder() async { - try { - final filePath = await getMusicCacheDir(); - - await OpenFile.open(filePath); - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - } - - void setThemeMode(ThemeMode mode) { - setData(PreferencesTableCompanion(themeMode: Value(mode))); - } - - void setRecommendationMarket(Market country) { - setData(PreferencesTableCompanion(market: Value(country))); - } - - void setAccentColorScheme(SpotubeColor color) { - setData(PreferencesTableCompanion(accentColorScheme: Value(color))); - } - - void setAlbumColorSync(bool sync) { - setData(PreferencesTableCompanion(albumColorSync: Value(sync))); - - // if (!sync) { - // ref.read(paletteProvider.notifier).state = null; - // } else { - // ref.read(audioPlayerStreamListenersProvider).updatePalette(); - // } - } - - void setCheckUpdate(bool check) { - setData(PreferencesTableCompanion(checkUpdate: Value(check))); - } - - void setDownloadLocation(String downloadDir) { - if (downloadDir.isEmpty) return; - setData(PreferencesTableCompanion(downloadLocation: Value(downloadDir))); - } - - void setLocalLibraryLocation(List localLibraryDirs) { - //if (localLibraryDir.isEmpty) return; - setData( - PreferencesTableCompanion( - localLibraryLocation: Value(localLibraryDirs), - ), - ); - } - - void setLayoutMode(LayoutMode mode) { - setData(PreferencesTableCompanion(layoutMode: Value(mode))); - } - - void setCloseBehavior(CloseBehavior behavior) { - setData(PreferencesTableCompanion(closeBehavior: Value(behavior))); - } - - void setShowSystemTrayIcon(bool show) { - setData(PreferencesTableCompanion(showSystemTrayIcon: Value(show))); - } - - void setLocale(Locale locale) { - setData(PreferencesTableCompanion(locale: Value(locale))); - } - - void setSearchMode(SearchMode mode) { - setData(PreferencesTableCompanion(searchMode: Value(mode))); - } - - void setSkipNonMusic(bool skip) { - setData(PreferencesTableCompanion(skipNonMusic: Value(skip))); - } - - void setYoutubeClientEngine(YoutubeClientEngine engine) { - setData(PreferencesTableCompanion(youtubeClientEngine: Value(engine))); - } - - void setSystemTitleBar(bool isSystemTitleBar) { - setData( - PreferencesTableCompanion( - systemTitleBar: Value(isSystemTitleBar), - ), - ); - } - - void setDiscordPresence(bool discordPresence) { - setData(PreferencesTableCompanion(discordPresence: Value(discordPresence))); - } - - void setAmoledDarkTheme(bool isAmoled) { - setData(PreferencesTableCompanion(amoledDarkTheme: Value(isAmoled))); - } - - void setNormalizeAudio(bool normalize) { - setData(PreferencesTableCompanion(normalizeAudio: Value(normalize))); - audioPlayer.setAudioNormalization(normalize); - } - - void setEndlessPlayback(bool endless) { - setData(PreferencesTableCompanion(endlessPlayback: Value(endless))); - } - - void setEnableConnect(bool enable) { - setData(PreferencesTableCompanion(enableConnect: Value(enable))); - } - - void setConnectPort(int port) { - assert( - port >= -1 && port <= 65535, - "Port must be between -1 and 65535, got $port", - ); - setData(PreferencesTableCompanion(connectPort: Value(port))); - } - - void setCacheMusic(bool cache) { - setData(PreferencesTableCompanion(cacheMusic: Value(cache))); - } -} - -final userPreferencesProvider = - NotifierProvider( - () => UserPreferencesNotifier(), -); diff --git a/lib/provider/volume_provider.dart b/lib/provider/volume_provider.dart deleted file mode 100644 index 64bcfe1a..00000000 --- a/lib/provider/volume_provider.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'dart:async'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; - -class VolumeProvider extends Notifier { - VolumeProvider(); - - @override - build() { - audioPlayer.setVolume(KVStoreService.volume); - return KVStoreService.volume; - } - - Future setVolume(double volume) async { - state = volume; - await audioPlayer.setVolume(volume); - KVStoreService.setVolume(volume); - } -} - -final volumeProvider = - NotifierProvider(() => VolumeProvider()); diff --git a/lib/provider/youtube_engine/youtube_engine.dart b/lib/provider/youtube_engine/youtube_engine.dart deleted file mode 100644 index 0aa37db5..00000000 --- a/lib/provider/youtube_engine/youtube_engine.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; -import 'package:spotube/services/youtube_engine/newpipe_engine.dart'; -import 'package:spotube/services/youtube_engine/youtube_explode_engine.dart'; -import 'package:spotube/services/youtube_engine/yt_dlp_engine.dart'; - -final youtubeEngineProvider = Provider((ref) { - final engineMode = ref.watch( - userPreferencesProvider.select((value) => value.youtubeClientEngine), - ); - - if (engineMode == YoutubeClientEngine.newPipe && - NewPipeEngine.isAvailableForPlatform) { - return NewPipeEngine(); - } else if (engineMode == YoutubeClientEngine.ytDlp && - YtDlpEngine.isAvailableForPlatform) { - return YtDlpEngine(); - } else { - return YouTubeExplodeEngine(); - } -}); diff --git a/lib/services/audio_player/audio_player.dart b/lib/services/audio_player/audio_player.dart deleted file mode 100644 index 2693f13a..00000000 --- a/lib/services/audio_player/audio_player.dart +++ /dev/null @@ -1,126 +0,0 @@ -import 'dart:io'; - -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:flutter/foundation.dart'; -import 'package:spotube/services/audio_player/custom_player.dart'; -import 'dart:async'; - -import 'package:media_kit/media_kit.dart' as mk; - -import 'package:spotube/services/audio_player/playback_state.dart'; -import 'package:spotube/utils/platform.dart'; - -part 'audio_players_streams_mixin.dart'; -part 'audio_player_impl.dart'; - -class SpotubeMedia extends mk.Media { - static int serverPort = 0; - - static String get _host => - kIsWindows ? "localhost" : InternetAddress.anyIPv4.address; - - final SpotubeTrackObject track; - SpotubeMedia(this.track) - : assert( - track is SpotubeLocalTrackObject || track is SpotubeFullTrackObject, - "Track must be a either a local track or a full track object with ISRC", - ), - // If the track is a local track, use its path, otherwise use the server URL - super( - track is SpotubeLocalTrackObject - ? track.path - : "http://$_host:$serverPort/stream/${track.id}", - extras: track.toJson(), - ); - - factory SpotubeMedia.media(Media media) { - assert(media.extras != null, "[Media] must have extra metadata set"); - return SpotubeMedia(SpotubeTrackObject.fromJson(media.extras!)); - } -} - -abstract class AudioPlayerInterface { - final CustomPlayer _mkPlayer; - - AudioPlayerInterface() - : _mkPlayer = CustomPlayer( - configuration: const mk.PlayerConfiguration( - title: "Spotube", - logLevel: kDebugMode ? mk.MPVLogLevel.info : mk.MPVLogLevel.error, - async: true, - ), - ) { - _mkPlayer.stream.error.listen((event) { - AppLogger.reportError(event, StackTrace.current); - }); - } - - /// Whether the current platform supports the audioplayers plugin - static const bool _mkSupportedPlatform = true; - - bool get mkSupportedPlatform => _mkSupportedPlatform; - - Duration get duration { - return _mkPlayer.state.duration; - } - - Playlist get playlist { - return _mkPlayer.state.playlist; - } - - Duration get position { - return _mkPlayer.state.position; - } - - Duration get bufferedPosition { - return _mkPlayer.state.buffer; - } - - Future get selectedDevice async { - return _mkPlayer.state.audioDevice; - } - - Future> get devices async { - return _mkPlayer.state.audioDevices; - } - - bool get hasSource { - return _mkPlayer.state.playlist.medias.isNotEmpty; - } - - // states - bool get isPlaying { - return _mkPlayer.state.playing; - } - - bool get isPaused { - return !_mkPlayer.state.playing; - } - - bool get isStopped { - return !hasSource; - } - - Future get isCompleted async { - return _mkPlayer.state.completed; - } - - bool get isShuffled { - return _mkPlayer.shuffled; - } - - PlaylistMode get loopMode { - return _mkPlayer.state.playlistMode; - } - - /// Returns the current volume of the player, between 0 and 1 - double get volume { - return _mkPlayer.state.volume / 100; - } - - bool get isBuffering { - return _mkPlayer.state.buffering; - } -} diff --git a/lib/services/audio_player/audio_player_impl.dart b/lib/services/audio_player/audio_player_impl.dart deleted file mode 100644 index afd209a3..00000000 --- a/lib/services/audio_player/audio_player_impl.dart +++ /dev/null @@ -1,138 +0,0 @@ -part of 'audio_player.dart'; - -final audioPlayer = SpotubeAudioPlayer(); - -class SpotubeAudioPlayer extends AudioPlayerInterface - with SpotubeAudioPlayersStreams { - Future pause() async { - await _mkPlayer.pause(); - } - - Future resume() async { - await _mkPlayer.play(); - } - - Future stop() async { - await _mkPlayer.stop(); - } - - Future seek(Duration position) async { - await _mkPlayer.seek(position); - } - - /// Volume is between 0 and 1 - Future setVolume(double volume) async { - assert(volume >= 0 && volume <= 1); - await _mkPlayer.setVolume(volume * 100); - } - - Future setSpeed(double speed) async { - await _mkPlayer.setRate(speed); - } - - Future setAudioDevice(mk.AudioDevice device) async { - await _mkPlayer.setAudioDevice(device); - } - - Future dispose() async { - await _mkPlayer.dispose(); - } - - // Playlist related - - Future openPlaylist( - List tracks, { - bool autoPlay = true, - int initialIndex = 0, - }) async { - assert(tracks.isNotEmpty); - assert(initialIndex <= tracks.length - 1); - await _mkPlayer.open( - mk.Playlist(tracks, index: initialIndex), - play: autoPlay, - ); - } - - List get sources { - return _mkPlayer.state.playlist.medias.map((e) => e.uri).toList(); - } - - String? get currentSource { - if (_mkPlayer.state.playlist.index == -1) return null; - return _mkPlayer.state.playlist.medias - .elementAtOrNull(_mkPlayer.state.playlist.index) - ?.uri; - } - - String? get nextSource { - if (loopMode == PlaylistMode.loop && - _mkPlayer.state.playlist.index == - _mkPlayer.state.playlist.medias.length - 1) { - return sources.first; - } - - return _mkPlayer.state.playlist.medias - .elementAtOrNull(_mkPlayer.state.playlist.index + 1) - ?.uri; - } - - String? get previousSource { - if (loopMode == PlaylistMode.loop && _mkPlayer.state.playlist.index == 0) { - return sources.last; - } - - return _mkPlayer.state.playlist.medias - .elementAtOrNull(_mkPlayer.state.playlist.index - 1) - ?.uri; - } - - int get currentIndex => _mkPlayer.state.playlist.index; - - Future skipToNext() async { - await _mkPlayer.next(); - } - - Future skipToPrevious() async { - await _mkPlayer.previous(); - } - - Future jumpTo(int index) async { - await _mkPlayer.jump(index); - } - - Future addTrack(mk.Media media) async { - await _mkPlayer.add(media); - } - - Future addTrackAt(mk.Media media, int index) async { - await _mkPlayer.insert(index, media); - } - - Future removeTrack(int index) async { - await _mkPlayer.remove(index); - } - - Future moveTrack(int from, int to) async { - await _mkPlayer.move(from, to); - } - - Future clearPlaylist() async { - _mkPlayer.stop(); - } - - Future setShuffle(bool shuffle) async { - await _mkPlayer.setShuffle(shuffle); - } - - Future setLoopMode(PlaylistMode loop) async { - await _mkPlayer.setPlaylistMode(loop); - } - - Future setAudioNormalization(bool normalize) async { - await _mkPlayer.setAudioNormalization(normalize); - } - - Future setDemuxerBufferSize(int sizeInBytes) async { - await _mkPlayer.setDemuxerBufferSize(sizeInBytes); - } -} diff --git a/lib/services/audio_player/audio_players_streams_mixin.dart b/lib/services/audio_player/audio_players_streams_mixin.dart deleted file mode 100644 index aeb8f1e3..00000000 --- a/lib/services/audio_player/audio_players_streams_mixin.dart +++ /dev/null @@ -1,150 +0,0 @@ -part of 'audio_player.dart'; - -mixin SpotubeAudioPlayersStreams on AudioPlayerInterface { - // stream getters - Stream get durationStream { - // if (mkSupportedPlatform) { - return _mkPlayer.stream.duration; - // } else { - // return _justAudio!.durationStream - // .where((event) => event != null) - // .map((event) => event!) - // ; - // } - } - - Stream get positionStream { - // if (mkSupportedPlatform) { - return _mkPlayer.stream.position; - // } else { - // return _justAudio!.positionStream; - // } - } - - Stream get bufferedPositionStream { - // if (mkSupportedPlatform) { - // audioplayers doesn't have the capability to get buffered position - return _mkPlayer.stream.buffer; - // } else { - // return _justAudio!.bufferedPositionStream; - // } - } - - Stream get completedStream { - // if (mkSupportedPlatform) { - return _mkPlayer.stream.completed; - // } else { - // return _justAudio!.playerStateStream - // .where( - // (event) => event.processingState == ja.ProcessingState.completed) - // ; - // } - } - - /// Stream that emits when the player is almost (%) complete - Stream percentCompletedStream(double percent) { - return positionStream - .asyncMap( - (position) async => duration == Duration.zero - ? 0 - : (position.inSeconds / duration.inSeconds * 100).toInt(), - ) - .where((event) => event >= percent); - } - - Stream get playingStream { - // if (mkSupportedPlatform) { - return _mkPlayer.stream.playing; - // } else { - // return _justAudio!.playingStream; - // } - } - - Stream get shuffledStream { - // if (mkSupportedPlatform) { - return _mkPlayer.shuffleStream; - // } else { - // return _justAudio!.shuffleModeEnabledStream; - // } - } - - Stream get loopModeStream { - // if (mkSupportedPlatform) { - return _mkPlayer.stream.playlistMode; - // } else { - // return _justAudio!.loopModeStream - // .map(PlaylistMode.fromLoopMode) - // ; - // } - } - - Stream get volumeStream { - // if (mkSupportedPlatform) { - return _mkPlayer.stream.volume.map((event) => event / 100); - // } else { - // return _justAudio!.volumeStream; - // } - } - - Stream get bufferingStream { - // if (mkSupportedPlatform) { - return Stream.value(false); - // } else { - // return _justAudio!.playerStateStream - // .map( - // (event) => - // event.processingState == ja.ProcessingState.buffering || - // event.processingState == ja.ProcessingState.loading, - // ) - // ; - // } - } - - Stream get playerStateStream { - // if (mkSupportedPlatform) { - return _mkPlayer.playerStateStream; - // } else { - // return _justAudio!.playerStateStream - // .map(AudioPlaybackState.fromJaPlayerState) - // ; - // } - } - - Stream get currentIndexChangedStream { - // if (mkSupportedPlatform) { - return _mkPlayer.indexChangeStream; - // } else { - // return _justAudio!.sequenceStateStream - // .map((event) => event?.currentIndex ?? -1) - // ; - // } - } - - Stream get activeSourceChangedStream { - // if (mkSupportedPlatform) { - return _mkPlayer.indexChangeStream - .map((event) { - return _mkPlayer.state.playlist.medias.elementAtOrNull(event)?.uri; - }) - .where((event) => event != null) - .cast(); - // } else { - // return _justAudio!.sequenceStateStream - // .map((event) { - // return (event?.currentSource as ja.UriAudioSource?)?.uri.toString(); - // }) - // .where((event) => event != null) - // .cast(); - // } - } - - Stream> get devicesStream => - _mkPlayer.stream.audioDevices.asBroadcastStream(); - - Stream get selectedDeviceStream => - _mkPlayer.stream.audioDevice.asBroadcastStream(); - - Stream get errorStream => _mkPlayer.stream.error; - - Stream get playlistStream => _mkPlayer.stream.playlist; -} diff --git a/lib/services/audio_player/custom_player.dart b/lib/services/audio_player/custom_player.dart deleted file mode 100644 index 7cbd51a5..00000000 --- a/lib/services/audio_player/custom_player.dart +++ /dev/null @@ -1,158 +0,0 @@ -import 'dart:async'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:media_kit/media_kit.dart'; -import 'package:flutter_broadcasts/flutter_broadcasts.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:audio_session/audio_session.dart'; -// ignore: implementation_imports -import 'package:spotube/services/audio_player/playback_state.dart'; -import 'package:spotube/utils/platform.dart'; - -/// MediaKit [Player] by default doesn't have a state stream. -/// This class adds a state stream to the [Player] class. -class CustomPlayer extends Player { - final StreamController _playerStateStream; - - late final List _subscriptions; - - int _androidAudioSessionId = 0; - String _packageName = ""; - AndroidAudioManager? _androidAudioManager; - - CustomPlayer({super.configuration}) - : _playerStateStream = StreamController.broadcast() { - nativePlayer.setProperty("network-timeout", "120"); - - _subscriptions = [ - stream.buffering.listen((event) { - _playerStateStream.add(AudioPlaybackState.buffering); - }), - stream.playing.listen((playing) { - if (playing) { - _playerStateStream.add(AudioPlaybackState.playing); - } else { - _playerStateStream.add(AudioPlaybackState.paused); - } - }), - stream.completed.listen((isCompleted) async { - if (!isCompleted) return; - _playerStateStream.add(AudioPlaybackState.completed); - }), - stream.playlist.listen((event) { - if (event.medias.isEmpty) { - _playerStateStream.add(AudioPlaybackState.stopped); - } - }), - stream.error.listen((event) { - AppLogger.reportError('[MediaKitError] \n$event', StackTrace.current); - }), - ]; - PackageInfo.fromPlatform().then((packageInfo) { - _packageName = packageInfo.packageName; - }); - if (kIsAndroid) { - _androidAudioManager = AndroidAudioManager(); - AudioSession.instance.then((s) async { - _androidAudioSessionId = - await _androidAudioManager!.generateAudioSessionId(); - notifyAudioSessionUpdate(true); - - await nativePlayer.setProperty( - "audiotrack-session-id", - _androidAudioSessionId.toString(), - ); - await nativePlayer.setProperty("ao", "audiotrack,opensles,"); - }); - } - } - - Future notifyAudioSessionUpdate(bool active) async { - if (kIsAndroid) { - sendBroadcast( - BroadcastMessage( - name: active - ? "android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION" - : "android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION", - data: { - "android.media.extra.AUDIO_SESSION": _androidAudioSessionId, - "android.media.extra.PACKAGE_NAME": _packageName - }, - ), - ); - } - } - - bool get shuffled => state.shuffle; - - Stream get playerStateStream => _playerStateStream.stream; - Stream get shuffleStream => stream.shuffle; - Stream get indexChangeStream { - int oldIndex = state.playlist.index; - return stream.playlist.map((event) => event.index).where((newIndex) { - if (newIndex != oldIndex) { - oldIndex = newIndex; - return true; - } - return false; - }); - } - - @override - Future setShuffle(bool shuffle) async { - await super.setShuffle(shuffle); - } - - @override - Future stop() async { - await super.stop(); - - _playerStateStream.add(AudioPlaybackState.stopped); - } - - @override - Future dispose() async { - for (var element in _subscriptions) { - element.cancel(); - } - await notifyAudioSessionUpdate(false); - return super.dispose(); - } - - NativePlayer get nativePlayer => platform as NativePlayer; - - Future insert(int index, Media media) async { - final addedMediaCompleter = Completer(); - final playlistStream = stream.playlist.listen( - (event) { - final mediaAddedIndex = - event.medias.indexWhere((m) => m.uri == media.uri); - if (mediaAddedIndex != -1 && !addedMediaCompleter.isCompleted) { - addedMediaCompleter.complete(mediaAddedIndex); - } - }, - ); - try { - await add(media); - final mediaAddedIndex = await addedMediaCompleter.future; - await move(mediaAddedIndex, index); - } finally { - playlistStream.cancel(); - } - } - - Future setAudioNormalization(bool normalize) async { - if (normalize) { - await nativePlayer.setProperty('af', 'dynaudnorm=g=5:f=250:r=0.9:p=0.5'); - } else { - await nativePlayer.setProperty('af', ''); - } - } - - Future setDemuxerBufferSize(int sizeInBytes) async { - await nativePlayer.setProperty('demuxer-max-bytes', sizeInBytes.toString()); - await nativePlayer.setProperty( - 'demuxer-max-back-bytes', - sizeInBytes.toString(), - ); - } -} diff --git a/lib/services/audio_player/playback_state.dart b/lib/services/audio_player/playback_state.dart deleted file mode 100644 index a4743a48..00000000 --- a/lib/services/audio_player/playback_state.dart +++ /dev/null @@ -1,28 +0,0 @@ -// import 'package:just_audio/just_audio.dart'; - -/// An unified playback state enum -enum AudioPlaybackState { - playing, - paused, - completed, - buffering, - stopped; - - // static AudioPlaybackState fromJaPlayerState(PlayerState state) { - // if (state.playing) { - // return AudioPlaybackState.playing; - // } - - // switch (state.processingState) { - // case ProcessingState.idle: - // return AudioPlaybackState.stopped; - // case ProcessingState.ready: - // return AudioPlaybackState.paused; - // case ProcessingState.completed: - // return AudioPlaybackState.completed; - // case ProcessingState.loading: - // case ProcessingState.buffering: - // return AudioPlaybackState.buffering; - // } - // } -} diff --git a/lib/services/audio_services/audio_services.dart b/lib/services/audio_services/audio_services.dart deleted file mode 100644 index c511da61..00000000 --- a/lib/services/audio_services/audio_services.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'package:audio_service/audio_service.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/collections/env.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/audio_services/mobile_audio_service.dart'; -import 'package:spotube/services/audio_services/windows_audio_service.dart'; -import 'package:spotube/utils/platform.dart'; - -class AudioServices with WidgetsBindingObserver { - final MobileAudioService? mobile; - final WindowsAudioService? smtc; - - AudioServices(this.mobile, this.smtc) { - WidgetsBinding.instance.addObserver(this); - } - - static Future create( - Ref ref, - AudioPlayerNotifier playback, - ) async { - final mobile = kIsMobile || kIsMacOS || kIsLinux - ? await AudioService.init( - builder: () => MobileAudioService(playback), - config: AudioServiceConfig( - androidNotificationChannelId: switch (( - kIsLinux, - Env.releaseChannel - )) { - (true, _) => "spotube", - (_, ReleaseChannel.stable) => "oss.krtirtho.spotube", - (_, ReleaseChannel.nightly) => "oss.krtirtho.spotube.nightly", - }, - androidNotificationChannelName: 'Spotube', - androidNotificationOngoing: false, - androidStopForegroundOnPause: false, - androidNotificationChannelDescription: "Spotube Media Controls", - ), - ) - : null; - final smtc = kIsWindows ? WindowsAudioService(ref, playback) : null; - - return AudioServices(mobile, smtc); - } - - Future addTrack(SpotubeTrackObject track) async { - await smtc?.addTrack(track); - mobile?.addItem(MediaItem( - id: track.id, - album: track.album.name, - title: track.name, - artist: track.artists.asString(), - duration: Duration(milliseconds: track.durationMs), - artUri: (track.album.images).asUri( - placeholder: ImagePlaceholder.albumArt, - ), - playable: true, - )); - } - - void activateSession() { - mobile?.session?.setActive(true); - } - - void deactivateSession() { - mobile?.session?.setActive(false); - } - - @override - void didChangeAppLifecycleState(AppLifecycleState state) { - switch (state) { - case AppLifecycleState.detached: - deactivateSession(); - audioPlayer.pause(); - break; - default: - break; - } - } - - void dispose() { - smtc?.dispose(); - WidgetsBinding.instance.removeObserver(this); - } -} diff --git a/lib/services/audio_services/mobile_audio_service.dart b/lib/services/audio_services/mobile_audio_service.dart deleted file mode 100644 index 16a3618e..00000000 --- a/lib/services/audio_services/mobile_audio_service.dart +++ /dev/null @@ -1,166 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:audio_service/audio_service.dart'; -import 'package:audio_session/audio_session.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/provider/audio_player/state.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:media_kit/media_kit.dart' hide Track; -import 'package:spotube/services/audio_player/playback_state.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/utils/platform.dart'; - -class MobileAudioService extends BaseAudioHandler { - AudioSession? session; - final AudioPlayerNotifier audioPlayerNotifier; - - // ignore: invalid_use_of_protected_member, invalid_use_of_visible_for_testing_member - AudioPlayerState get playlist => audioPlayerNotifier.state; - - MobileAudioService(this.audioPlayerNotifier) { - AudioSession.instance.then((s) { - session = s; - session?.configure(const AudioSessionConfiguration.music()); - - bool wasPausedByBeginEvent = false; - - s.interruptionEventStream.listen((event) async { - if (event.begin) { - switch (event.type) { - case AudioInterruptionType.duck: - await audioPlayer.setVolume(0.5); - break; - case AudioInterruptionType.pause: - case AudioInterruptionType.unknown: - { - wasPausedByBeginEvent = audioPlayer.isPlaying; - await audioPlayer.pause(); - break; - } - } - } else { - switch (event.type) { - case AudioInterruptionType.duck: - await audioPlayer.setVolume(1.0); - break; - case AudioInterruptionType.pause when wasPausedByBeginEvent: - case AudioInterruptionType.unknown when wasPausedByBeginEvent: - await audioPlayer.resume(); - wasPausedByBeginEvent = false; - break; - default: - break; - } - } - }); - - s.becomingNoisyEventStream.listen((_) { - audioPlayer.pause(); - }); - }); - audioPlayer.playerStateStream.listen((state) async { - if (state == AudioPlaybackState.playing) { - await session?.setActive(true); - } - playbackState.add(await _transformEvent()); - }); - - audioPlayer.positionStream.listen((pos) async { - playbackState.add(await _transformEvent()); - }); - audioPlayer.bufferedPositionStream.listen((pos) async { - playbackState.add(await _transformEvent()); - }); - } - - void addItem(MediaItem item) { - session?.setActive(true); - mediaItem.add(item); - } - - @override - Future play() => audioPlayer.resume(); - - @override - Future pause() => audioPlayer.pause(); - - @override - Future seek(Duration position) => audioPlayer.seek(position); - - @override - Future setShuffleMode(AudioServiceShuffleMode shuffleMode) async { - await super.setShuffleMode(shuffleMode); - - audioPlayer.setShuffle(shuffleMode == AudioServiceShuffleMode.all); - } - - @override - Future setRepeatMode(AudioServiceRepeatMode repeatMode) async { - super.setRepeatMode(repeatMode); - audioPlayer.setLoopMode(switch (repeatMode) { - AudioServiceRepeatMode.all || - AudioServiceRepeatMode.group => - PlaylistMode.loop, - AudioServiceRepeatMode.one => PlaylistMode.single, - _ => PlaylistMode.none, - }); - } - - @override - Future stop() async { - await audioPlayerNotifier.stop(); - } - - @override - Future skipToNext() async { - await audioPlayer.skipToNext(); - await super.skipToNext(); - } - - @override - Future skipToPrevious() async { - await audioPlayer.skipToPrevious(); - await super.skipToPrevious(); - } - - @override - Future onTaskRemoved() async { - await audioPlayer.pause(); - if (kIsAndroid) exit(0); - } - - Future _transformEvent() async { - try { - return PlaybackState( - controls: [ - MediaControl.skipToPrevious, - audioPlayer.isPlaying ? MediaControl.pause : MediaControl.play, - MediaControl.skipToNext, - MediaControl.stop, - ], - systemActions: { - MediaAction.seek, - }, - androidCompactActionIndices: const [0, 1, 2], - playing: audioPlayer.isPlaying, - updatePosition: audioPlayer.position, - bufferedPosition: audioPlayer.bufferedPosition, - shuffleMode: audioPlayer.isShuffled == true - ? AudioServiceShuffleMode.all - : AudioServiceShuffleMode.none, - repeatMode: switch (audioPlayer.loopMode) { - PlaylistMode.loop => AudioServiceRepeatMode.all, - PlaylistMode.single => AudioServiceRepeatMode.one, - _ => AudioServiceRepeatMode.none, - }, - processingState: audioPlayer.isBuffering - ? AudioProcessingState.loading - : AudioProcessingState.ready, - ); - } catch (e, stack) { - AppLogger.reportError(e, stack); - rethrow; - } - } -} diff --git a/lib/services/audio_services/windows_audio_service.dart b/lib/services/audio_services/windows_audio_service.dart deleted file mode 100644 index 6cf101ab..00000000 --- a/lib/services/audio_services/windows_audio_service.dart +++ /dev/null @@ -1,102 +0,0 @@ -import 'dart:async'; - -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:smtc_windows/smtc_windows.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/provider/audio_player/audio_player.dart'; -import 'package:spotube/services/audio_player/audio_player.dart'; -import 'package:spotube/services/audio_player/playback_state.dart'; - -class WindowsAudioService { - final SMTCWindows smtc; - final Ref ref; - final AudioPlayerNotifier audioPlayerNotifier; - - final subscriptions = []; - - WindowsAudioService(this.ref, this.audioPlayerNotifier) - : smtc = SMTCWindows(enabled: false) { - smtc.setPlaybackStatus(PlaybackStatus.stopped); - final buttonStream = smtc.buttonPressStream.listen((event) { - switch (event) { - case PressedButton.play: - audioPlayer.resume(); - break; - case PressedButton.pause: - audioPlayer.pause(); - break; - case PressedButton.next: - audioPlayer.skipToNext(); - break; - case PressedButton.previous: - audioPlayer.skipToPrevious(); - break; - case PressedButton.stop: - audioPlayerNotifier.stop(); - break; - default: - break; - } - }); - - final playerStateStream = - audioPlayer.playerStateStream.listen((state) async { - switch (state) { - case AudioPlaybackState.playing: - await smtc.setPlaybackStatus(PlaybackStatus.playing); - break; - case AudioPlaybackState.paused: - await smtc.setPlaybackStatus(PlaybackStatus.paused); - break; - case AudioPlaybackState.stopped: - await smtc.setPlaybackStatus(PlaybackStatus.stopped); - break; - case AudioPlaybackState.completed: - await smtc.setPlaybackStatus(PlaybackStatus.changing); - break; - default: - break; - } - }); - - final positionStream = audioPlayer.positionStream.listen((pos) async { - await smtc.setPosition(pos); - }); - - final durationStream = audioPlayer.durationStream.listen((duration) async { - await smtc.setEndTime(duration); - }); - - subscriptions.addAll([ - buttonStream, - playerStateStream, - positionStream, - durationStream, - ]); - } - - Future addTrack(SpotubeTrackObject track) async { - if (!smtc.enabled) { - await smtc.enableSmtc(); - } - await smtc.updateMetadata( - MusicMetadata( - title: track.name, - albumArtist: track.artists.firstOrNull?.name ?? "Unknown", - artist: track.artists.asString(), - album: track.album?.name ?? "Unknown", - thumbnail: (track.album?.images).asUrlString( - placeholder: ImagePlaceholder.albumArt, - ), - ), - ); - } - - void dispose() { - smtc.disableSmtc(); - smtc.dispose(); - for (var element in subscriptions) { - element.cancel(); - } - } -} diff --git a/lib/services/cli/cli.dart b/lib/services/cli/cli.dart deleted file mode 100644 index 985c0e72..00000000 --- a/lib/services/cli/cli.dart +++ /dev/null @@ -1,40 +0,0 @@ -// ignore_for_file: avoid_print - -import 'dart:io'; - -import 'package:args/args.dart'; -import 'package:flutter/foundation.dart'; -import 'package:package_info_plus/package_info_plus.dart'; - -Future startCLI(List args) async { - final parser = ArgParser(); - - parser.addFlag( - 'verbose', - abbr: 'v', - help: 'Verbose mode', - defaultsTo: !kReleaseMode, - ); - parser.addFlag( - "version", - help: "Print version and exit", - negatable: false, - ); - - parser.addFlag("help", abbr: "h", negatable: false); - - final arguments = parser.parse(args); - - if (arguments["help"] == true) { - print(parser.usage); - exit(0); - } - - if (arguments["version"] == true) { - final package = await PackageInfo.fromPlatform(); - print("Spotube v${package.version}"); - exit(0); - } - - return arguments; -} diff --git a/lib/services/connectivity_adapter.dart b/lib/services/connectivity_adapter.dart deleted file mode 100644 index f6b760c8..00000000 --- a/lib/services/connectivity_adapter.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:dio/dio.dart'; -import 'package:flutter/widgets.dart'; -import 'package:spotube/services/logger/logger.dart'; - -class ConnectionCheckerService with WidgetsBindingObserver { - final _connectionStreamController = StreamController.broadcast(); - final Dio dio; - - static final _instance = ConnectionCheckerService._(); - - static ConnectionCheckerService get instance => _instance; - - ConnectionCheckerService._() : dio = Dio() { - Timer? timer; - - onConnectivityChanged.listen((connected) { - try { - if (!connected && timer == null) { - // check every 30 seconds if we are connected when we are not connected - timer = Timer.periodic(const Duration(seconds: 30), (timer) async { - if (WidgetsBinding.instance.lifecycleState == - AppLifecycleState.paused) { - return; - } - await isConnected; - }); - } else { - timer?.cancel(); - timer = null; - } - } catch (e, stack) { - AppLogger.reportError(e, stack); - } - }); - - Connectivity().onConnectivityChanged.listen((event) async { - await isConnected; - }); - } - - @override - didChangeAppLifecycleState(AppLifecycleState state) async { - if (state == AppLifecycleState.resumed) { - await isConnected; - } - } - - final vpnNames = [ - 'tun', - 'tap', - 'ppp', - 'pptp', - 'l2tp', - 'ipsec', - 'vpn', - 'wireguard', - 'openvpn', - 'softether', - 'proton', - 'strongswan', - 'cisco', - 'forticlient', - 'fortinet', - 'hideme', - 'hidemy', - 'hideman', - 'hidester', - 'lightway', - ]; - - Future isVpnActive() async { - final interfaces = await NetworkInterface.list( - includeLoopback: false, - type: InternetAddressType.any, - ); - - if (interfaces.isEmpty) { - return false; - } - - return interfaces.any( - (interface) => vpnNames.any( - (name) => interface.name.toLowerCase().contains(name), - ), - ); - } - - Future doesConnectTo(String address) async { - try { - final result = await InternetAddress.lookup(address); - if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) { - return true; - } - return false; - } on SocketException catch (_) { - try { - final response = await dio.head('https://$address'); - return (response.statusCode ?? 500) <= 400; - } on DioException catch (_) { - return false; - } - } - } - - Future _isConnected() async { - return await doesConnectTo('google.com') || - await doesConnectTo('www.baidu.com') || // for China - await isVpnActive(); // when VPN is active that means we are connected - } - - bool isConnectedSync = true; - - Future get isConnected async { - final connected = await _isConnected(); - if (connected != isConnectedSync /*previous value*/) { - _connectionStreamController.add(connected); - } - isConnectedSync = connected; - return connected; - } - - Stream get onConnectivityChanged => _connectionStreamController.stream; -} diff --git a/lib/services/device_info/device_info.dart b/lib/services/device_info/device_info.dart deleted file mode 100644 index 87ddd6eb..00000000 --- a/lib/services/device_info/device_info.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:device_info_plus/device_info_plus.dart'; - -class DeviceInfoService { - final DeviceInfoPlugin deviceInfo; - DeviceInfoService._() : deviceInfo = DeviceInfoPlugin(); - - static final instance = DeviceInfoService._(); - - Future deviceId() async { - final info = await deviceInfo.deviceInfo; - - return switch (info) { - AndroidDeviceInfo() => info.id, - IosDeviceInfo() => info.identifierForVendor ?? info.model, - MacOsDeviceInfo() => info.systemGUID ?? info.model, - WindowsDeviceInfo() => info.deviceId, - LinuxDeviceInfo() => info.machineId ?? info.id, - _ => 'Unknown', - }; - } - - Future computerName() async { - final info = await deviceInfo.deviceInfo; - - return switch (info) { - AndroidDeviceInfo() => info.model, - IosDeviceInfo() => info.localizedModel, - MacOsDeviceInfo() => info.computerName, - WindowsDeviceInfo() => info.computerName, - LinuxDeviceInfo() => info.name, - _ => 'Unknown', - }; - } -} diff --git a/lib/services/dio/dio.dart b/lib/services/dio/dio.dart deleted file mode 100644 index cddf1979..00000000 --- a/lib/services/dio/dio.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:dio/dio.dart'; - -final globalDio = Dio(); diff --git a/lib/services/kv_store/encrypted_kv_store.dart b/lib/services/kv_store/encrypted_kv_store.dart deleted file mode 100644 index 4eca0007..00000000 --- a/lib/services/kv_store/encrypted_kv_store.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:uuid/uuid.dart'; -import 'package:spotube/utils/platform.dart'; - -abstract class EncryptedKvStoreService { - static const _storage = FlutterSecureStorage( - aOptions: AndroidOptions( - encryptedSharedPreferences: true, - ), - ); - - static FlutterSecureStorage get storage => _storage; - - static String? _encryptionKeySync; - - static Future initialize() async { - _encryptionKeySync = await encryptionKey; - } - - static String get encryptionKeySync => _encryptionKeySync!; - - static bool get isUnsupportedPlatform => - kIsMacOS || kIsIOS || (kIsLinux && !kIsFlatpak); - - static Future get encryptionKey async { - if (isUnsupportedPlatform) { - return KVStoreService.encryptionKey; - } - try { - final value = await _storage.read(key: 'encryption'); - final key = const Uuid().v4(); - - if (value == null) { - await setEncryptionKey(key); - return key; - } - - return value; - } catch (e) { - return KVStoreService.encryptionKey; - } - } - - static Future setEncryptionKey(String key) async { - if (isUnsupportedPlatform) { - await KVStoreService.setEncryptionKey(key); - return; - } - - try { - await _storage.write(key: 'encryption', value: key); - } catch (e) { - await KVStoreService.setEncryptionKey(key); - } finally { - _encryptionKeySync = key; - } - } -} diff --git a/lib/services/kv_store/kv_store.dart b/lib/services/kv_store/kv_store.dart deleted file mode 100644 index e334322e..00000000 --- a/lib/services/kv_store/kv_store.dart +++ /dev/null @@ -1,118 +0,0 @@ -import 'dart:convert'; - -import 'package:encrypt/encrypt.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/services/wm_tools/wm_tools.dart'; -import 'package:uuid/uuid.dart'; - -abstract class KVStoreService { - static SharedPreferences? _sharedPreferences; - static SharedPreferences get sharedPreferences => _sharedPreferences!; - - static Future initialize() async { - _sharedPreferences = await SharedPreferences.getInstance(); - } - - static bool get doneGettingStarted => - sharedPreferences.getBool('doneGettingStarted') ?? false; - static Future setDoneGettingStarted(bool value) async => - await sharedPreferences.setBool('doneGettingStarted', value); - - static bool get askedForBatteryOptimization => - sharedPreferences.getBool('askedForBatteryOptimization') ?? false; - static Future setAskedForBatteryOptimization(bool value) async => - await sharedPreferences.setBool('askedForBatteryOptimization', value); - - static List get recentSearches => - sharedPreferences.getStringList('recentSearches') ?? []; - - static Future setRecentSearches(List value) async => - await sharedPreferences.setStringList('recentSearches', value); - - static WindowSize? get windowSize { - final raw = sharedPreferences.getString('windowSize'); - - if (raw == null) { - return null; - } - return WindowSize.fromJson(jsonDecode(raw)); - } - - static Future setWindowSize(WindowSize value) async => - await sharedPreferences.setString( - 'windowSize', - jsonEncode( - value.toJson(), - ), - ); - - static String get encryptionKey { - final value = sharedPreferences.getString('encryption'); - - final key = const Uuid().v4(); - if (value == null) { - setEncryptionKey(key); - return key; - } - - return value; - } - - static Future setEncryptionKey(String key) async { - await sharedPreferences.setString('encryption', key); - } - - static IV get ivKey { - final iv = sharedPreferences.getString('iv'); - final value = IV.fromSecureRandom(8); - - if (iv == null) { - setIVKey(value); - - return value; - } - - return IV.fromBase64(iv); - } - - static Future setIVKey(IV iv) async { - await sharedPreferences.setString('iv', iv.base64); - } - - static double get volume => sharedPreferences.getDouble('volume') ?? 1.0; - static Future setVolume(double value) async => - await sharedPreferences.setDouble('volume', value); - - static bool get hasMigratedToDrift => - sharedPreferences.getBool('hasMigratedToDrift') ?? false; - static Future setHasMigratedToDrift(bool value) async => - await sharedPreferences.setBool('hasMigratedToDrift', value); - - static Map? get _youtubeEnginePaths { - final jsonRaw = sharedPreferences.getString('ytDlpPath'); - - if (jsonRaw == null) { - return null; - } - - return jsonDecode(jsonRaw); - } - - static String? getYoutubeEnginePath(YoutubeClientEngine engine) { - return _youtubeEnginePaths?[engine.name]; - } - - static Future setYoutubeEnginePath( - YoutubeClientEngine engine, - String path, - ) async { - await sharedPreferences.setString( - 'ytDlpPath', - jsonEncode({ - ...?_youtubeEnginePaths, - engine.name: path, - }), - ); - } -} diff --git a/lib/services/logger/logger.dart b/lib/services/logger/logger.dart deleted file mode 100644 index 1f15bf92..00000000 --- a/lib/services/logger/logger.dart +++ /dev/null @@ -1,158 +0,0 @@ -import 'dart:async'; -import 'dart:io'; -import 'dart:isolate'; - -import 'package:flutter/foundation.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart' hide join; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:logger/logger.dart'; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:logging/logging.dart' as logging; - -final _loggingToLoggerLevel = { - logging.Level.ALL: Level.all, - logging.Level.FINEST: Level.trace, - logging.Level.FINER: Level.debug, - logging.Level.FINE: Level.info, - logging.Level.CONFIG: Level.info, - logging.Level.INFO: Level.info, - logging.Level.WARNING: Level.warning, - logging.Level.SEVERE: Level.error, - logging.Level.SHOUT: Level.fatal, - logging.Level.OFF: Level.off, -}; - -class AppLogger { - static late final Logger log; - static late final File logFile; - - static initialize(bool verbose) { - log = Logger( - level: kDebugMode || (verbose && kReleaseMode) ? Level.all : Level.info, - ); - } - - static void _initInternalPackageLoggers() { - if (!kDebugMode) return; - logging.hierarchicalLoggingEnabled = true; - logging.Logger('YoutubeExplode.StreamsClient') - ..level = logging.Level.SEVERE - ..onRecord.listen( - (record) { - log.log( - _loggingToLoggerLevel[record.level] ?? Level.info, - record.message, - error: record.error, - stackTrace: record.stackTrace, - time: record.time, - ); - }, - ); - } - - static R? runZoned(R Function() body) { - return runZonedGuarded( - () { - WidgetsFlutterBinding.ensureInitialized(); - - FlutterError.onError = (details) { - reportError(details.exception, details.stack ?? StackTrace.current); - }; - - PlatformDispatcher.instance.onError = (error, stackTrace) { - reportError(error, stackTrace); - return true; - }; - - if (!kIsWeb) { - Isolate.current.addErrorListener( - RawReceivePort((pair) async { - final isolateError = pair as List; - reportError( - isolateError.first.toString(), - isolateError.last, - ); - }).sendPort, - ); - } - - _initInternalPackageLoggers(); - - getLogsPath().then((value) => logFile = value); - - return body(); - }, - (error, stackTrace) { - reportError(error, stackTrace); - }, - ); - } - - static Future getLogsPath() async { - String dir = (await getApplicationDocumentsDirectory()).path; - if (kIsAndroid) { - dir = (await getExternalStorageDirectory())?.path ?? ""; - } - - if (kIsMacOS) { - dir = join((await getLibraryDirectory()).path, "Logs"); - } - - if (kIsLinux) { - dir = join(_getXdgStateHome(), "spotube"); - } - - final file = File(join(dir, ".spotube_logs")); - if (!await file.exists()) { - await file.create(recursive: true); - } - return file; - } - - static Future reportError( - dynamic error, [ - StackTrace? stackTrace, - message = "", - ]) async { - log.e(message, error: error, stackTrace: stackTrace); - - if (kReleaseMode) { - await logFile.writeAsString( - "[${DateTime.now()}]---------------------\n" - "$error\n$stackTrace\n" - "----------------------------------------\n", - mode: FileMode.writeOnlyAppend, - ); - } - } - - static String _getXdgStateHome() { - // path_provider seems does not support XDG_STATE_HOME, - // which is the specification to store application logs on Linux. - // See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html - // TODO: Use path_provider once it supports XDG_STATE_HOME - if (const bool.hasEnvironment("XDG_STATE_HOME")) { - String xdgStateHomeRaw = Platform.environment["XDG_STATE_HOME"] ?? ""; - if (xdgStateHomeRaw.isNotEmpty) { - return xdgStateHomeRaw; - } - } - return join(Platform.environment["HOME"] ?? "", ".local", "state"); - } -} - -class AppLoggerProviderObserver extends ProviderObserver { - const AppLoggerProviderObserver(); - - @override - void providerDidFail( - ProviderBase provider, - Object error, - StackTrace stackTrace, - ProviderContainer container, - ) { - AppLogger.reportError(error, stackTrace); - } -} diff --git a/lib/services/metadata/apis/localstorage.dart b/lib/services/metadata/apis/localstorage.dart deleted file mode 100644 index 4c511e77..00000000 --- a/lib/services/metadata/apis/localstorage.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:hetu_spotube_plugin/hetu_spotube_plugin.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class SharedPreferencesLocalStorage implements Localstorage { - final SharedPreferences _prefs; - final String pluginSlug; - - SharedPreferencesLocalStorage(this._prefs, this.pluginSlug); - - String prefix(String key) { - return 'spotube_plugin.$pluginSlug.$key'; - } - - @override - Future clear() { - return _prefs.clear(); - } - - @override - Future containsKey(String key) async { - return _prefs.containsKey(prefix(key)); - } - - @override - Future getBool(String key) async { - return _prefs.getBool(prefix(key)); - } - - @override - Future getDouble(String key) async { - return _prefs.getDouble(prefix(key)); - } - - @override - Future getInt(String key) async { - return _prefs.getInt(prefix(key)); - } - - @override - Future getString(String key) async { - return _prefs.getString(prefix(key)); - } - - @override - Future?> getStringList(String key) async { - return _prefs.getStringList(prefix(key)); - } - - @override - Future remove(String key) async { - await _prefs.remove(prefix(key)); - } - - @override - Future setBool(String key, bool value) async { - await _prefs.setBool(prefix(key), value); - } - - @override - Future setDouble(String key, double value) async { - await _prefs.setDouble(prefix(key), value); - } - - @override - Future setInt(String key, int value) async { - await _prefs.setInt(prefix(key), value); - } - - @override - Future setString(String key, String value) async { - await _prefs.setString(prefix(key), value); - } - - @override - Future setStringList(String key, List value) async { - await _prefs.setStringList(prefix(key), value); - } -} diff --git a/lib/services/metadata/endpoints/album.dart b/lib/services/metadata/endpoints/album.dart deleted file mode 100644 index 8a858343..00000000 --- a/lib/services/metadata/endpoints/album.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginAlbumEndpoint { - final Hetu hetu; - MetadataPluginAlbumEndpoint(this.hetu); - - HTInstance get hetuMetadataAlbum => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("album") - as HTInstance; - - Future getAlbum(String id) async { - final raw = - await hetuMetadataAlbum.invoke("getAlbum", positionalArgs: [id]) as Map; - - return SpotubeFullAlbumObject.fromJson( - raw.cast(), - ); - } - - Future> tracks( - String id, { - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataAlbum.invoke( - "tracks", - positionalArgs: [id], - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => - SpotubeFullTrackObject.fromJson(json.cast()), - ); - } - - Future> releases({ - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataAlbum.invoke( - "releases", - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => - SpotubeSimpleAlbumObject.fromJson(json.cast()), - ); - } - - Future save(List ids) async { - await hetuMetadataAlbum.invoke( - "save", - positionalArgs: [ids], - ); - } - - Future unsave(List ids) async { - await hetuMetadataAlbum.invoke( - "unsave", - positionalArgs: [ids], - ); - } -} diff --git a/lib/services/metadata/endpoints/artist.dart b/lib/services/metadata/endpoints/artist.dart deleted file mode 100644 index d008ce61..00000000 --- a/lib/services/metadata/endpoints/artist.dart +++ /dev/null @@ -1,101 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginArtistEndpoint { - final Hetu hetu; - MetadataPluginArtistEndpoint(this.hetu); - - HTInstance get hetuMetadataArtist => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("artist") - as HTInstance; - - Future getArtist(String id) async { - final raw = await hetuMetadataArtist - .invoke("getArtist", positionalArgs: [id]) as Map; - - return SpotubeFullArtistObject.fromJson( - raw.cast(), - ); - } - - Future> topTracks( - String id, { - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataArtist.invoke( - "topTracks", - positionalArgs: [id], - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => SpotubeFullTrackObject.fromJson( - json.cast(), - ), - ); - } - - Future> albums( - String id, { - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataArtist.invoke( - "albums", - positionalArgs: [id], - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => SpotubeSimpleAlbumObject.fromJson( - json.cast(), - ), - ); - } - - Future save(List ids) async { - await hetuMetadataArtist.invoke( - "save", - positionalArgs: [ids], - ); - } - - Future unsave(List ids) async { - await hetuMetadataArtist.invoke( - "unsave", - positionalArgs: [ids], - ); - } - - Future> related( - String id, { - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataArtist.invoke( - "related", - positionalArgs: [id], - namedArgs: { - "offset": offset, - "limit": limit ?? 20, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => SpotubeFullArtistObject.fromJson( - json.cast(), - ), - ); - } -} diff --git a/lib/services/metadata/endpoints/audio_source.dart b/lib/services/metadata/endpoints/audio_source.dart deleted file mode 100644 index d22449c6..00000000 --- a/lib/services/metadata/endpoints/audio_source.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginAudioSourceEndpoint { - final Hetu hetu; - MetadataPluginAudioSourceEndpoint(this.hetu); - - HTInstance get hetuMetadataAudioSource => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("audioSource") - as HTInstance; - - List get supportedPresets { - final raw = hetuMetadataAudioSource.memberGet("supportedPresets") as List; - - return raw - .map((e) => SpotubeAudioSourceContainerPreset.fromJson(e)) - .toList(); - } - - Future> matches( - SpotubeFullTrackObject track, - ) async { - final raw = await hetuMetadataAudioSource - .invoke("matches", positionalArgs: [track.toJson()]) as List; - - return raw.map((e) => SpotubeAudioSourceMatchObject.fromJson(e)).toList(); - } - - Future> streams( - SpotubeAudioSourceMatchObject match, - ) async { - final raw = await hetuMetadataAudioSource - .invoke("streams", positionalArgs: [match.toJson()]) as List; - - return raw.map((e) => SpotubeAudioSourceStreamObject.fromJson(e)).toList(); - } -} diff --git a/lib/services/metadata/endpoints/auth.dart b/lib/services/metadata/endpoints/auth.dart deleted file mode 100644 index 7c2077be..00000000 --- a/lib/services/metadata/endpoints/auth.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:desktop_webview_window/desktop_webview_window.dart'; -import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_std/hetu_std.dart'; -import 'package:spotube/utils/platform.dart'; - -class MetadataAuthEndpoint { - final Hetu hetu; - - MetadataAuthEndpoint(this.hetu); - - Stream get authStateStream => - hetu.eval("metadataPlugin.auth.authStateStream"); - - Future authenticate() async { - await hetu.eval("metadataPlugin.auth.authenticate()"); - } - - bool isAuthenticated() { - return hetu.eval("metadataPlugin.auth.isAuthenticated()") as bool; - } - - Future logout() async { - await hetu.eval("metadataPlugin.auth.logout()"); - if (kIsMobile) { - WebStorageManager.instance().deleteAllData(); - CookieManager.instance().deleteAllCookies(); - } - if (kIsDesktop) { - await WebviewWindow.clearAll(); - } - } -} diff --git a/lib/services/metadata/endpoints/browse.dart b/lib/services/metadata/endpoints/browse.dart deleted file mode 100644 index c8105ad1..00000000 --- a/lib/services/metadata/endpoints/browse.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginBrowseEndpoint { - final Hetu hetu; - MetadataPluginBrowseEndpoint(this.hetu); - - HTInstance get hetuMetadataBrowse => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("browse") - as HTInstance; - - Future>> - sections({ - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataBrowse.invoke( - "sections", - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject< - SpotubeBrowseSectionObject>.fromJson( - raw.cast(), - (Map json) => SpotubeBrowseSectionObject.fromJson( - json.cast(), - (json) { - final isPlaylist = json["owner"] != null; - final isAlbum = json["artists"] != null; - if (isPlaylist) { - return SpotubeSimplePlaylistObject.fromJson( - json.cast(), - ); - } else if (isAlbum) { - return SpotubeSimpleAlbumObject.fromJson( - json.cast(), - ); - } else { - return SpotubeFullArtistObject.fromJson( - json.cast(), - ); - } - }, - ), - ); - } - - Future> sectionItems( - String id, { - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataBrowse.invoke( - "sectionItems", - positionalArgs: [id], - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (json) { - final isPlaylist = json["owner"] != null; - final isAlbum = json["artists"] != null; - if (isPlaylist) { - return SpotubeSimplePlaylistObject.fromJson( - json.cast(), - ); - } else if (isAlbum) { - return SpotubeSimpleAlbumObject.fromJson( - json.cast(), - ); - } else { - return SpotubeFullArtistObject.fromJson( - json.cast(), - ); - } - }, - ); - } -} diff --git a/lib/services/metadata/endpoints/core.dart b/lib/services/metadata/endpoints/core.dart deleted file mode 100644 index a8f86128..00000000 --- a/lib/services/metadata/endpoints/core.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginCore { - final Hetu hetu; - - MetadataPluginCore(this.hetu); - - HTInstance get hetuMetadataPluginUpdater => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("core") - as HTInstance; - - Future checkUpdate( - PluginConfiguration pluginConfig, - ) async { - final result = await hetuMetadataPluginUpdater.invoke( - "checkUpdate", - positionalArgs: [pluginConfig.toJson()], - ); - - return result == null - ? null - : PluginUpdateAvailable.fromJson( - (result as Map).cast(), - ); - } - - Future get support async { - final result = await hetuMetadataPluginUpdater.memberGet("support"); - - return result as String; - } - - /// [details] is a map containing the scrobble information, such as: - /// - [id] -> The unique identifier of the track. - /// - [title] -> The title of the track. - /// - [artists] -> List of artists - /// - [id] -> The unique identifier of the artist. - /// - [name] -> The name of the artist. - /// - [album] -> The album of the track - /// - [id] -> The unique identifier of the album. - /// - [name] -> The name of the album. - /// - [timestamp] -> The timestamp of the scrobble (optional). - /// - [duration_ms] -> The duration of the track in milliseconds (optional). - /// - [isrc] -> The ISRC code of the track (optional). - Future scrobble(Map details) { - return hetuMetadataPluginUpdater.invoke( - "scrobble", - positionalArgs: [details], - ); - } -} diff --git a/lib/services/metadata/endpoints/playlist.dart b/lib/services/metadata/endpoints/playlist.dart deleted file mode 100644 index c7f20487..00000000 --- a/lib/services/metadata/endpoints/playlist.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginPlaylistEndpoint { - final Hetu hetu; - MetadataPluginPlaylistEndpoint(this.hetu); - - HTInstance get hetuMetadataPlaylist => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("playlist") - as HTInstance; - - Future getPlaylist(String id) async { - final raw = await hetuMetadataPlaylist - .invoke("getPlaylist", positionalArgs: [id]) as Map; - - return SpotubeFullPlaylistObject.fromJson( - raw.cast(), - ); - } - - Future> tracks( - String id, { - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataPlaylist.invoke( - "tracks", - positionalArgs: [id], - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => - SpotubeFullTrackObject.fromJson(json.cast()), - ); - } - - Future create( - String userId, { - required String name, - String? description, - bool? public, - bool? collaborative, - }) async { - final raw = await hetuMetadataPlaylist.invoke( - "create", - positionalArgs: [userId], - namedArgs: { - "name": name, - "description": description, - "public": public, - "collaborative": collaborative, - }..removeWhere((key, value) => value == null), - ) as Map?; - - if (raw == null) return null; - - return SpotubeFullPlaylistObject.fromJson( - raw.cast(), - ); - } - - Future update( - String playlistId, { - String? name, - String? description, - bool? public, - bool? collaborative, - }) async { - await hetuMetadataPlaylist.invoke( - "update", - positionalArgs: [playlistId], - namedArgs: { - "name": name, - "description": description, - "public": public, - "collaborative": collaborative, - }..removeWhere((key, value) => value == null), - ); - } - - Future addTracks( - String playlistId, { - required List trackIds, - int? position, - }) async { - await hetuMetadataPlaylist.invoke( - "addTracks", - positionalArgs: [playlistId], - namedArgs: { - "trackIds": trackIds, - "position": position, - }..removeWhere((key, value) => value == null), - ); - } - - Future removeTracks( - String playlistId, { - required List trackIds, - }) async { - await hetuMetadataPlaylist.invoke( - "removeTracks", - positionalArgs: [playlistId], - namedArgs: { - "trackIds": trackIds, - }..removeWhere((key, value) => value == null), - ); - } - - Future save(String playlistId) async { - await hetuMetadataPlaylist.invoke( - "save", - positionalArgs: [playlistId], - ); - } - - Future unsave(String playlistId) async { - await hetuMetadataPlaylist.invoke( - "unsave", - positionalArgs: [playlistId], - ); - } - - Future deletePlaylist(String playlistId) async { - return await hetuMetadataPlaylist.invoke( - "deletePlaylist", - positionalArgs: [playlistId], - ); - } -} diff --git a/lib/services/metadata/endpoints/search.dart b/lib/services/metadata/endpoints/search.dart deleted file mode 100644 index c2e14765..00000000 --- a/lib/services/metadata/endpoints/search.dart +++ /dev/null @@ -1,160 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginSearchEndpoint { - final Hetu hetu; - MetadataPluginSearchEndpoint(this.hetu); - - HTInstance get hetuMetadataSearch => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("search") - as HTInstance; - - List get chips { - return (hetuMetadataSearch.memberGet("chips") as List).cast(); - } - - Future all(String query) async { - if (query.isEmpty) { - return SpotubeSearchResponseObject( - albums: [], - artists: [], - playlists: [], - tracks: [], - ); - } - - final raw = await hetuMetadataSearch.invoke( - "all", - positionalArgs: [query], - ) as Map; - - return SpotubeSearchResponseObject.fromJson(raw.cast()); - } - - Future> albums( - String query, { - int? limit, - int? offset, - }) async { - if (query.isEmpty) { - return SpotubePaginationResponseObject( - items: [], - total: 0, - limit: limit ?? 20, - hasMore: false, - nextOffset: null, - ); - } - - final raw = await hetuMetadataSearch.invoke( - "albums", - positionalArgs: [query], - namedArgs: { - "limit": limit, - "offset": offset, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (json) => SpotubeSimpleAlbumObject.fromJson(json.cast()), - ); - } - - Future> artists( - String query, { - int? limit, - int? offset, - }) async { - if (query.isEmpty) { - return SpotubePaginationResponseObject( - items: [], - total: 0, - limit: limit ?? 20, - hasMore: false, - nextOffset: null, - ); - } - - final raw = await hetuMetadataSearch.invoke( - "artists", - positionalArgs: [query], - namedArgs: { - "limit": limit, - "offset": offset, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (json) => SpotubeFullArtistObject.fromJson( - json.cast(), - ), - ); - } - - Future> - playlists( - String query, { - int? limit, - int? offset, - }) async { - if (query.isEmpty) { - return SpotubePaginationResponseObject( - items: [], - total: 0, - limit: limit ?? 20, - hasMore: false, - nextOffset: null, - ); - } - - final raw = await hetuMetadataSearch.invoke( - "playlists", - positionalArgs: [query], - namedArgs: { - "limit": limit, - "offset": offset, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject< - SpotubeSimplePlaylistObject>.fromJson( - raw.cast(), - (json) => SpotubeSimplePlaylistObject.fromJson( - json.cast(), - ), - ); - } - - Future> tracks( - String query, { - int? limit, - int? offset, - }) async { - if (query.isEmpty) { - return SpotubePaginationResponseObject( - items: [], - total: 0, - limit: limit ?? 20, - hasMore: false, - nextOffset: null, - ); - } - - final raw = await hetuMetadataSearch.invoke( - "tracks", - positionalArgs: [query], - namedArgs: { - "limit": limit, - "offset": offset, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (json) => SpotubeFullTrackObject.fromJson(json.cast()), - ); - } -} diff --git a/lib/services/metadata/endpoints/track.dart b/lib/services/metadata/endpoints/track.dart deleted file mode 100644 index 31535970..00000000 --- a/lib/services/metadata/endpoints/track.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginTrackEndpoint { - final Hetu hetu; - MetadataPluginTrackEndpoint(this.hetu); - - HTInstance get hetuMetadataTrack => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("track") - as HTInstance; - - Future getTrack(String id) async { - final raw = - await hetuMetadataTrack.invoke("getTrack", positionalArgs: [id]) as Map; - - return SpotubeFullTrackObject.fromJson( - raw.cast(), - ); - } - - Future save(List ids) async { - await hetuMetadataTrack.invoke("save", positionalArgs: [ids]); - } - - Future unsave(List ids) async { - await hetuMetadataTrack.invoke("unsave", positionalArgs: [ids]); - } - - Future> radio(String id) async { - final result = await hetuMetadataTrack.invoke( - "radio", - positionalArgs: [id], - ); - - return (result as List) - .map( - (e) => SpotubeFullTrackObject.fromJson( - (e as Map).cast(), - ), - ) - .toList(); - } -} diff --git a/lib/services/metadata/endpoints/user.dart b/lib/services/metadata/endpoints/user.dart deleted file mode 100644 index 3c8f0e42..00000000 --- a/lib/services/metadata/endpoints/user.dart +++ /dev/null @@ -1,132 +0,0 @@ -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_script/values.dart'; -import 'package:spotube/models/metadata/metadata.dart'; - -class MetadataPluginUserEndpoint { - final Hetu hetu; - MetadataPluginUserEndpoint(this.hetu); - - HTInstance get hetuMetadataUser => - (hetu.fetch("metadataPlugin") as HTInstance).memberGet("user") - as HTInstance; - - Future me() async { - final raw = await hetuMetadataUser.invoke("me") as Map; - - return SpotubeUserObject.fromJson( - raw.cast(), - ); - } - - Future> savedTracks({ - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataUser.invoke( - "savedTracks", - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => - SpotubeFullTrackObject.fromJson(json.cast()), - ); - } - - Future> - savedPlaylists({ - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataUser.invoke( - "savedPlaylists", - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject< - SpotubeSimplePlaylistObject>.fromJson( - raw.cast(), - (Map json) => - SpotubeSimplePlaylistObject.fromJson(json.cast()), - ); - } - - Future> - savedAlbums({ - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataUser.invoke( - "savedAlbums", - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => - SpotubeSimpleAlbumObject.fromJson(json.cast()), - ); - } - - Future> - savedArtists({ - int? offset, - int? limit, - }) async { - final raw = await hetuMetadataUser.invoke( - "savedArtists", - namedArgs: { - "offset": offset, - "limit": limit, - }..removeWhere((key, value) => value == null), - ) as Map; - - return SpotubePaginationResponseObject.fromJson( - raw.cast(), - (Map json) => - SpotubeFullArtistObject.fromJson(json.cast()), - ); - } - - Future isSavedPlaylist(String playlistId) async { - return await hetuMetadataUser.invoke( - "isSavedPlaylist", - positionalArgs: [playlistId], - ) as bool; - } - - Future> isSavedTracks(List ids) async { - final values = await hetuMetadataUser.invoke( - "isSavedTracks", - positionalArgs: [ids], - ); - return (values as List).cast(); - } - - Future> isSavedAlbums(List ids) async { - final values = await hetuMetadataUser.invoke( - "isSavedAlbums", - positionalArgs: [ids], - ) as List; - return values.cast(); - } - - Future> isSavedArtists(List ids) async { - final values = await hetuMetadataUser.invoke( - "isSavedArtists", - positionalArgs: [ids], - ) as List; - - return values.cast(); - } -} diff --git a/lib/services/metadata/errors/exceptions.dart b/lib/services/metadata/errors/exceptions.dart deleted file mode 100644 index 5bb5ac57..00000000 --- a/lib/services/metadata/errors/exceptions.dart +++ /dev/null @@ -1,85 +0,0 @@ -enum MetadataPluginErrorCode { - pluginApiVersionMismatch, - invalidPluginConfiguration, - failedToGetReleaseInfo, - noReleasesFound, - assetUrlNotFound, - pluginConfigJsonNotFound, - unsupportedPluginDownloadWebsite, - pluginDownloadFailed, - duplicatePlugin, - pluginByteCodeFileNotFound, - noDefaultMetadataPlugin, - noDefaultAudiSourcePlugin, -} - -class MetadataPluginException implements Exception { - final String message; - final MetadataPluginErrorCode errorCode; - - MetadataPluginException._(this.message, {required this.errorCode}); - MetadataPluginException.pluginApiVersionMismatch() - : this._( - 'Plugin API version mismatch', - errorCode: MetadataPluginErrorCode.pluginApiVersionMismatch, - ); - MetadataPluginException.invalidPluginConfiguration() - : this._( - 'Invalid plugin configuration', - errorCode: MetadataPluginErrorCode.invalidPluginConfiguration, - ); - MetadataPluginException.failedToGetRelease() - : this._( - 'Failed to get release information', - errorCode: MetadataPluginErrorCode.failedToGetReleaseInfo, - ); - MetadataPluginException.noReleasesFound() - : this._( - 'No releases found for the plugin', - errorCode: MetadataPluginErrorCode.noReleasesFound, - ); - - MetadataPluginException.assetUrlNotFound() - : this._( - 'No asset URL found for the plugin release', - errorCode: MetadataPluginErrorCode.assetUrlNotFound, - ); - MetadataPluginException.pluginConfigJsonNotFound() - : this._( - 'Plugin configuration JSON, plugin.json file not found', - errorCode: MetadataPluginErrorCode.pluginConfigJsonNotFound, - ); - MetadataPluginException.unsupportedPluginDownloadWebsite() - : this._( - 'Unsupported plugin download website. Please use GitHub or Codeberg.', - errorCode: MetadataPluginErrorCode.unsupportedPluginDownloadWebsite, - ); - MetadataPluginException.pluginDownloadFailed() - : this._( - 'Failed to download the plugin. Please check your internet connection or try again later.', - errorCode: MetadataPluginErrorCode.pluginDownloadFailed, - ); - MetadataPluginException.duplicatePlugin() - : this._( - 'Same plugin already exists with the same name and version.', - errorCode: MetadataPluginErrorCode.duplicatePlugin, - ); - MetadataPluginException.pluginByteCodeFileNotFound() - : this._( - 'Plugin byte code file, plugin.out not found. Please ensure the plugin is correctly packaged.', - errorCode: MetadataPluginErrorCode.pluginByteCodeFileNotFound, - ); - MetadataPluginException.noDefaultMetadataPlugin() - : this._( - 'No default metadata plugin is set. Please set a default plugin in the settings.', - errorCode: MetadataPluginErrorCode.noDefaultMetadataPlugin, - ); - MetadataPluginException.noDefaultAudioSourcePlugin() - : this._( - 'No default audio source plugin is set. Please set a default plugin in the settings.', - errorCode: MetadataPluginErrorCode.noDefaultAudiSourcePlugin, - ); - - @override - String toString() => 'MetadataPluginException: $message'; -} diff --git a/lib/services/metadata/metadata.dart b/lib/services/metadata/metadata.dart deleted file mode 100644 index 5860e0d6..00000000 --- a/lib/services/metadata/metadata.dart +++ /dev/null @@ -1,181 +0,0 @@ -import 'dart:typed_data'; - -import 'package:auto_route/auto_route.dart'; -import 'package:hetu_otp_util/hetu_otp_util.dart'; -import 'package:hetu_script/hetu_script.dart'; -import 'package:hetu_spotube_plugin/hetu_spotube_plugin.dart' as spotube_plugin; -import 'package:hetu_spotube_plugin/hetu_spotube_plugin.dart' - hide YouTubeEngine; -import 'package:hetu_std/hetu_std.dart'; -import 'package:pub_semver/pub_semver.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:spotube/collections/routes.dart'; -import 'package:spotube/collections/routes.gr.dart'; -import 'package:spotube/components/titlebar/titlebar.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/services/metadata/apis/localstorage.dart'; -import 'package:spotube/services/metadata/endpoints/album.dart'; -import 'package:spotube/services/metadata/endpoints/artist.dart'; -import 'package:spotube/services/metadata/endpoints/audio_source.dart'; -import 'package:spotube/services/metadata/endpoints/auth.dart'; -import 'package:spotube/services/metadata/endpoints/browse.dart'; -import 'package:spotube/services/metadata/endpoints/playlist.dart'; -import 'package:spotube/services/metadata/endpoints/search.dart'; -import 'package:spotube/services/metadata/endpoints/track.dart'; -import 'package:spotube/services/metadata/endpoints/core.dart'; -import 'package:spotube/services/metadata/endpoints/user.dart'; -import 'package:spotube/services/youtube_engine/youtube_engine.dart'; - -const defaultMetadataLimit = "20"; - -class MetadataPlugin { - static final pluginApiVersion = Version.parse("2.0.0"); - - static Future create( - YouTubeEngine youtubeEngine, - PluginConfiguration config, - Uint8List byteCode, - ) async { - final sharedPreferences = await SharedPreferences.getInstance(); - BuildContext? pageContext; - - final hetu = Hetu(); - hetu.init(); - - HetuStdLoader.loadBindings(hetu); - HetuSpotubePluginLoader.loadBindings( - hetu, - localStorageImpl: SharedPreferencesLocalStorage( - sharedPreferences, - config.slug, - ), - onNavigatorPush: (route) { - return rootNavigatorKey.currentContext?.router - .pushWidget(Builder(builder: (context) { - pageContext = context; - return Scaffold( - headers: const [ - TitleBar( - automaticallyImplyLeading: true, - ) - ], - child: route, - ); - })); - }, - onNavigatorPop: () { - pageContext?.maybePop(); - }, - onShowForm: (title, fields) async { - if (rootNavigatorKey.currentContext == null) { - return []; - } - - return await rootNavigatorKey.currentContext!.router - .push>?>( - SettingsMetadataProviderFormRoute( - title: title, - fields: - fields.map((e) => MetadataFormFieldObject.fromJson(e)).toList(), - ), - ); - }, - createYoutubeEngine: () { - return spotube_plugin.YouTubeEngine( - search: (query) async { - final result = await youtubeEngine.searchVideos(query); - return result - .map((video) => { - 'id': video.id.value, - 'title': video.title, - 'author': video.author, - 'duration': video.duration?.inSeconds, - 'description': video.description, - 'uploadDate': video.uploadDate?.toIso8601String(), - 'viewCount': video.engagement.viewCount, - 'likeCount': video.engagement.likeCount, - 'isLive': video.isLive, - }) - .toList(); - }, - getVideo: (videoId) async { - final video = await youtubeEngine.getVideo(videoId); - return { - 'id': video.id.value, - 'title': video.title, - 'author': video.author, - 'duration': video.duration?.inSeconds, - 'description': video.description, - 'uploadDate': video.uploadDate?.toIso8601String(), - 'viewCount': video.engagement.viewCount, - 'likeCount': video.engagement.likeCount, - 'isLive': video.isLive, - }; - }, - streamManifest: (videoId) { - return youtubeEngine.getStreamManifest(videoId).then( - (manifest) { - final streams = manifest.audioOnly - .map( - (stream) => { - 'url': stream.url.toString(), - 'quality': stream.qualityLabel, - 'bitrate': stream.bitrate.bitsPerSecond, - 'container': stream.container.name, - 'videoId': stream.videoId, - }, - ) - .toList(); - return streams; - }, - ); - }, - ); - }, - ); - - await HetuStdLoader.loadBytecodeFlutter(hetu); - await HetuOtpUtilLoader.loadBytecodeFlutter(hetu); - await HetuSpotubePluginLoader.loadBytecodeFlutter(hetu); - - hetu.loadBytecode(bytes: byteCode, moduleName: "plugin"); - hetu.eval(""" - import "module:plugin" as plugin - - var Plugin = plugin.${config.entryPoint} - - var metadataPlugin = Plugin() - """); - - return MetadataPlugin._(hetu); - } - - final Hetu hetu; - - late final MetadataAuthEndpoint auth; - - late final MetadataPluginAudioSourceEndpoint audioSource; - late final MetadataPluginAlbumEndpoint album; - late final MetadataPluginArtistEndpoint artist; - late final MetadataPluginBrowseEndpoint browse; - late final MetadataPluginSearchEndpoint search; - late final MetadataPluginPlaylistEndpoint playlist; - late final MetadataPluginTrackEndpoint track; - late final MetadataPluginUserEndpoint user; - late final MetadataPluginCore core; - - MetadataPlugin._(this.hetu) { - auth = MetadataAuthEndpoint(hetu); - - audioSource = MetadataPluginAudioSourceEndpoint(hetu); - artist = MetadataPluginArtistEndpoint(hetu); - album = MetadataPluginAlbumEndpoint(hetu); - browse = MetadataPluginBrowseEndpoint(hetu); - search = MetadataPluginSearchEndpoint(hetu); - playlist = MetadataPluginPlaylistEndpoint(hetu); - track = MetadataPluginTrackEndpoint(hetu); - user = MetadataPluginUserEndpoint(hetu); - core = MetadataPluginCore(hetu); - } -} diff --git a/lib/services/sourced_track/exceptions.dart b/lib/services/sourced_track/exceptions.dart deleted file mode 100644 index 4817c9fb..00000000 --- a/lib/services/sourced_track/exceptions.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:spotube/models/metadata/metadata.dart'; - -class TrackNotFoundError extends Error { - final SpotubeTrackObject track; - - TrackNotFoundError(this.track); - - @override - String toString() { - return '[TrackNotFoundError] ${track.name} - ${track.artists.join(", ")}'; - } -} diff --git a/lib/services/sourced_track/sourced_track.dart b/lib/services/sourced_track/sourced_track.dart deleted file mode 100644 index 385e5be6..00000000 --- a/lib/services/sourced_track/sourced_track.dart +++ /dev/null @@ -1,374 +0,0 @@ -import 'dart:convert'; - -import 'package:collection/collection.dart'; -import 'package:dio/dio.dart'; -import 'package:drift/drift.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:spotube/models/database/database.dart'; -import 'package:spotube/models/metadata/metadata.dart'; -import 'package:spotube/models/playback/track_sources.dart'; -import 'package:spotube/provider/database/database.dart'; -import 'package:spotube/provider/metadata_plugin/audio_source/quality_presets.dart'; -import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart'; -import 'package:spotube/services/dio/dio.dart'; -import 'package:spotube/services/logger/logger.dart'; -import 'package:spotube/services/metadata/errors/exceptions.dart'; - -import 'package:spotube/services/sourced_track/exceptions.dart'; -import 'package:spotube/utils/service_utils.dart'; - -final officialMusicRegex = RegExp( - r"official\s(video|audio|music\svideo|lyric\svideo|visualizer)", - caseSensitive: false, -); - -class SourcedTrack extends BasicSourcedTrack { - final Ref ref; - - SourcedTrack({ - required this.ref, - required super.info, - required super.query, - required super.source, - required super.siblings, - required super.sources, - }); - - static Future fetchFromTrack({ - required SpotubeFullTrackObject query, - required Ref ref, - }) async { - final audioSource = await ref.read(audioSourcePluginProvider.future); - final audioSourceConfig = await ref.read(metadataPluginsProvider - .selectAsync((data) => data.defaultAudioSourcePluginConfig)); - if (audioSource == null || audioSourceConfig == null) { - throw MetadataPluginException.noDefaultAudioSourcePlugin(); - } - - final database = ref.read(databaseProvider); - final cachedSource = await (database.select(database.sourceMatchTable) - ..where((s) => - s.trackId.equals(query.id) & - s.sourceType.equals(audioSourceConfig.slug)) - ..limit(1) - ..orderBy([ - (s) => - OrderingTerm(expression: s.createdAt, mode: OrderingMode.desc), - ])) - .get() - .then((s) => s.firstOrNull); - - if (cachedSource == null) { - final siblings = await fetchSiblings(ref: ref, query: query); - if (siblings.isEmpty) { - throw TrackNotFoundError(query); - } - - await database.into(database.sourceMatchTable).insert( - SourceMatchTableCompanion.insert( - trackId: query.id, - sourceInfo: Value(jsonEncode(siblings.first)), - sourceType: audioSourceConfig.slug, - ), - ); - - final manifest = await audioSource.audioSource.streams(siblings.first); - - return SourcedTrack( - ref: ref, - siblings: siblings.skip(1).toList(), - info: siblings.first, - source: audioSourceConfig.slug, - sources: manifest, - query: query, - ); - } - final item = SpotubeAudioSourceMatchObject.fromJson( - jsonDecode(cachedSource.sourceInfo), - ); - final manifest = await audioSource.audioSource.streams(item); - - final sourcedTrack = SourcedTrack( - ref: ref, - siblings: [], - sources: manifest, - info: item, - query: query, - source: audioSourceConfig.slug, - ); - - AppLogger.log.i("${query.name}: ${sourcedTrack.url}"); - - return sourcedTrack; - } - - static List rankResults( - List results, - SpotubeFullTrackObject track, - ) { - return results - .map((sibling) { - int score = 0; - - for (final artist in track.artists) { - final isSameChannelArtist = - sibling.artists.any((a) => a.toLowerCase() == artist.name); - - if (isSameChannelArtist) { - score += 1; - } - - final titleContainsArtist = - sibling.title.toLowerCase().contains(artist.name.toLowerCase()); - - if (titleContainsArtist) { - score += 1; - } - } - - final titleContainsTrackName = - sibling.title.toLowerCase().contains(track.name.toLowerCase()); - - final hasOfficialFlag = - officialMusicRegex.hasMatch(sibling.title.toLowerCase()); - - if (titleContainsTrackName) { - score += 3; - } - - if (hasOfficialFlag) { - score += 1; - } - - if (hasOfficialFlag && titleContainsTrackName) { - score += 2; - } - - return (sibling: sibling, score: score); - }) - .sorted((a, b) => b.score.compareTo(a.score)) - .map((e) => e.sibling) - .toList(); - } - - static Future> fetchSiblings({ - required SpotubeFullTrackObject query, - required Ref ref, - }) async { - final audioSource = await ref.read(audioSourcePluginProvider.future); - - if (audioSource == null) { - throw MetadataPluginException.noDefaultAudioSourcePlugin(); - } - - final videoResults = []; - - final searchResults = await audioSource.audioSource.matches(query); - - if (ServiceUtils.onlyContainsEnglish(query.name)) { - videoResults.addAll(searchResults); - } else { - videoResults.addAll(rankResults(searchResults, query)); - } - - return videoResults.toSet().toList(); - } - - Future copyWithSibling() async { - if (siblings.isNotEmpty) { - return this; - } - final fetchedSiblings = await fetchSiblings(ref: ref, query: query); - - return SourcedTrack( - ref: ref, - siblings: fetchedSiblings.where((s) => s.id != info.id).toList(), - source: source, - sources: sources, - info: info, - query: query, - ); - } - - Future swapWithSibling( - SpotubeAudioSourceMatchObject sibling, - ) async { - if (sibling.id == info.id) { - return null; - } - - final audioSource = await ref.read(audioSourcePluginProvider.future); - final audioSourceConfig = await ref.read(metadataPluginsProvider - .selectAsync((data) => data.defaultAudioSourcePluginConfig)); - if (audioSource == null || audioSourceConfig == null) { - throw MetadataPluginException.noDefaultAudioSourcePlugin(); - } - - // a sibling source that was fetched from the search results - final isStepSibling = siblings.none((s) => s.id == sibling.id); - - final newSourceInfo = isStepSibling - ? sibling - : siblings.firstWhere((s) => s.id == sibling.id); - - final newSiblings = siblings.where((s) => s.id != sibling.id).toList() - ..insert(0, info); - - final manifest = await audioSource.audioSource.streams(newSourceInfo); - - final database = ref.read(databaseProvider); - - // Delete the old Entry - await (database.sourceMatchTable.delete() - ..where( - (table) => - table.trackId.equals(query.id) & - table.sourceType.equals(audioSourceConfig.slug), - )) - .go(); - - await database.into(database.sourceMatchTable).insert( - SourceMatchTableCompanion.insert( - trackId: query.id, - sourceInfo: Value(jsonEncode(sibling)), - sourceType: audioSourceConfig.slug, - createdAt: Value(DateTime.now()), - ), - mode: InsertMode.replace, - ); - - return SourcedTrack( - ref: ref, - source: source, - siblings: newSiblings, - sources: manifest, - info: newSourceInfo, - query: query, - ); - } - - Future swapWithSiblingOfIndex(int index) { - return swapWithSibling(siblings[index]); - } - - Future refreshStream() async { - final audioSource = await ref.read(audioSourcePluginProvider.future); - final audioSourceConfig = await ref.read(metadataPluginsProvider - .selectAsync((data) => data.defaultAudioSourcePluginConfig)); - if (audioSource == null || audioSourceConfig == null) { - throw MetadataPluginException.noDefaultAudioSourcePlugin(); - } - - List validStreams = []; - - final stringBuffer = StringBuffer(); - for (final source in sources) { - final res = await globalDio.head( - source.url, - options: - Options(validateStatus: (status) => status != null && status < 500), - ); - - stringBuffer.writeln( - "[${query.id}] ${res.statusCode} ${source.container} ${source.codec} ${source.bitrate}", - ); - - if (res.statusCode! < 400) { - validStreams.add(source); - } - } - - AppLogger.log.d(stringBuffer.toString()); - - if (validStreams.isEmpty) { - validStreams = await audioSource.audioSource.streams(info); - } - - final sourcedTrack = SourcedTrack( - ref: ref, - siblings: siblings, - source: source, - sources: validStreams, - info: info, - query: query, - ); - - AppLogger.log.i("Refreshing ${query.name}: ${sourcedTrack.url}"); - - return sourcedTrack; - } - - String? get url { - final preferences = ref.read(audioSourcePresetsProvider); - - return getUrlOfQuality( - preferences.presets[preferences.selectedStreamingContainerIndex], - preferences.selectedStreamingQualityIndex, - ); - } - - /// Returns the URL of the track based on the codec and quality preferences. - /// If an exact match is not found, it will return the closest match based on - /// the user's audio quality preference. - /// - /// If no sources match the codec, it will return the first or last source - /// based on the user's audio quality preference. - SpotubeAudioSourceStreamObject? getStreamOfQuality( - SpotubeAudioSourceContainerPreset preset, - int qualityIndex, - ) { - if (sources.isEmpty) return null; - - final quality = preset.qualities[qualityIndex]; - - final exactMatch = sources.firstWhereOrNull( - (source) { - if (source.container != preset.name) return false; - - if (quality case SpotubeAudioLosslessContainerQuality()) { - return source.sampleRate == quality.sampleRate && - source.bitDepth == quality.bitDepth; - } else { - return source.bitrate == - (quality as SpotubeAudioLossyContainerQuality).bitrate; - } - }, - ); - - if (exactMatch != null) { - return exactMatch; - } - - // Find the preset with closest quality to the supplied quality - return sources.where((source) { - return source.container == preset.name; - }).reduce((prev, curr) { - if (quality is SpotubeAudioLosslessContainerQuality) { - final prevDiff = ((prev.sampleRate ?? 0) - quality.sampleRate).abs() + - ((prev.bitDepth ?? 0) - quality.bitDepth).abs(); - final currDiff = ((curr.sampleRate ?? 0) - quality.sampleRate).abs() + - ((curr.bitDepth ?? 0) - quality.bitDepth).abs(); - return currDiff < prevDiff ? curr : prev; - } else { - final prevDiff = ((prev.bitrate ?? 0) - - (quality as SpotubeAudioLossyContainerQuality).bitrate) - .abs(); - final currDiff = ((curr.bitrate ?? 0) - quality.bitrate).abs(); - return currDiff < prevDiff ? curr : prev; - } - }); - } - - String? getUrlOfQuality( - SpotubeAudioSourceContainerPreset preset, - int qualityIndex, - ) { - return getStreamOfQuality(preset, qualityIndex)?.url; - } - - SpotubeAudioSourceContainerPreset? get qualityPreset { - final presetState = ref.read(audioSourcePresetsProvider); - return presetState.presets - .elementAtOrNull(presetState.selectedStreamingContainerIndex); - } -} diff --git a/lib/services/wikipedia/wikipedia.dart b/lib/services/wikipedia/wikipedia.dart deleted file mode 100644 index b571f30f..00000000 --- a/lib/services/wikipedia/wikipedia.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:wikipedia_api/wikipedia_api.dart'; - -final wikipedia = WikipediaApi(); diff --git a/lib/services/wm_tools/wm_tools.dart b/lib/services/wm_tools/wm_tools.dart deleted file mode 100644 index f60b4ac9..00000000 --- a/lib/services/wm_tools/wm_tools.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:shadcn_flutter/shadcn_flutter.dart'; -import 'package:spotube/services/kv_store/kv_store.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:window_manager/window_manager.dart'; - -class WindowSize { - final double height; - final double width; - final bool maximized; - - WindowSize({ - required this.height, - required this.width, - required this.maximized, - }); - - factory WindowSize.fromJson(Map json) => WindowSize( - height: json["height"], - width: json["width"], - maximized: json["maximized"], - ); - - Map toJson() => { - "height": height, - "width": width, - "maximized": maximized, - }; -} - -class WindowManagerTools with WidgetsBindingObserver { - static WindowManagerTools? _instance; - static WindowManagerTools get instance => _instance!; - - WindowManagerTools._(); - - static Future initialize() async { - await windowManager.ensureInitialized(); - _instance = WindowManagerTools._(); - WidgetsBinding.instance.addObserver(instance); - - await windowManager.waitUntilReadyToShow( - const WindowOptions( - title: "Spotube", - backgroundColor: Colors.transparent, - minimumSize: Size(300, 700), - titleBarStyle: TitleBarStyle.hidden, - center: true, - ), - () async { - final savedSize = KVStoreService.windowSize; - await windowManager.setResizable(true); - if (savedSize?.maximized == true && - !(await windowManager.isMaximized())) { - await windowManager.maximize(); - } else if (savedSize != null) { - await windowManager.setSize(Size(savedSize.width, savedSize.height)); - } - - await windowManager.focus(); - await windowManager.show(); - }, - ); - } - - Size? _prevSize; - - @override - void didChangeMetrics() async { - super.didChangeMetrics(); - if (kIsMobile) return; - final size = await windowManager.getSize(); - final windowSameDimension = - _prevSize?.width == size.width && _prevSize?.height == size.height; - - if (windowSameDimension || _prevSize == null) { - _prevSize = size; - return; - } - final isMaximized = await windowManager.isMaximized(); - await KVStoreService.setWindowSize( - WindowSize( - height: size.height, - width: size.width, - maximized: isMaximized, - ), - ); - _prevSize = size; - } -} diff --git a/lib/services/youtube_engine/newpipe_engine.dart b/lib/services/youtube_engine/newpipe_engine.dart deleted file mode 100644 index c865b66c..00000000 --- a/lib/services/youtube_engine/newpipe_engine.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'package:flutter_new_pipe_extractor/flutter_new_pipe_extractor.dart' - hide Engagement; -import 'package:spotube/services/youtube_engine/youtube_engine.dart'; -import 'package:spotube/utils/platform.dart'; -import 'package:youtube_explode_dart/youtube_explode_dart.dart'; -import 'package:http_parser/http_parser.dart'; - -class NewPipeEngine implements YouTubeEngine { - static bool get isAvailableForPlatform => kIsAndroid || kIsDesktop; - - AudioOnlyStreamInfo _parseAudioStream(AudioStream stream, String videoId) { - return AudioOnlyStreamInfo( - VideoId(videoId), - stream.itag, - Uri.parse(stream.content), - StreamContainer.parse(stream.mediaFormat!.mimeType.split("/").last), - FileSize.unknown, - Bitrate(stream.bitrate), - stream.codec, - switch (stream.bitrate) { - > 130 * 1024 => "high", - > 64 * 1024 => "medium", - _ => "low", - }, - [], - MediaType.parse(stream.mediaFormat!.mimeType), - null, - ); - } - - AudioOnlyStreamInfo _parseVideoStream(VideoStream stream, String videoId) { - return AudioOnlyStreamInfo( - VideoId(videoId), - stream.itag, - Uri.parse(stream.content), - StreamContainer.parse(stream.mediaFormat!.mimeType.split("/").last), - FileSize.unknown, - Bitrate(stream.bitrate), - stream.codec, - switch (stream.bitrate) { - > 130 * 1024 => "high", - > 64 * 1024 => "medium", - _ => "low", - }, - [], - MediaType.parse(stream.mediaFormat!.mimeType), - null, - ); - } - - Video _parseVideo(VideoInfo info) { - return Video( - VideoId(info.id), - info.name, - info.uploaderName, - ChannelId(info.uploaderUrl), - info.uploadDate.offsetDateTime, - info.uploadDate.offsetDateTime.toString(), - info.uploadDate.offsetDateTime, - info.description.content ?? "", - Duration(seconds: info.duration), - ThumbnailSet(info.id), - info.tags, - Engagement( - info.viewCount, - info.likeCount, - info.dislikeCount, - ), - !info.streamType.name.toLowerCase().contains("live"), - ); - } - - Video _parseVideoResult(VideoSearchResultItem info) { - final id = Uri.parse(info.url).queryParameters["v"]!; - return Video( - VideoId(id), - info.name, - info.uploaderName, - ChannelId(info.uploaderUrl), - info.uploadDate?.offsetDateTime, - info.uploadDate?.offsetDateTime.toString(), - info.uploadDate?.offsetDateTime, - info.shortDescription ?? "", - Duration(seconds: info.duration), - ThumbnailSet(id), - [], - Engagement(info.viewCount, null, null), - !info.streamType.name.toLowerCase().contains("live"), - ); - } - - @override - Future getStreamManifest(String videoId) async { - final video = await NewPipeExtractor.getVideoInfo(videoId); - - final streams = - video.audioStreams.map((stream) => _parseAudioStream(stream, videoId)); - - if (streams.isEmpty) { - final videoStreams = video.videoStreams - .map((stream) => _parseVideoStream(stream, videoId)); - if (videoStreams.isNotEmpty) { - return StreamManifest(videoStreams); - } - } - - return StreamManifest(streams); - } - - @override - Future