# Android Retrofit: @Url + @GET Annotation Conflict Fix

## Root Cause

Retrofit throws `@Url cannot be used with @GET url (parameter #1)` when `@GET("path")` and `@Url` are used together. Retrofit interprets `@GET("path")` as providing a relative path that gets appended to the base URL, but `@Url` provides the FULL URL — the two conflict.

## The Fix

When using `@Url`, the `@GET` annotation must have **NO path**:

```kotlin
// BROKEN — throws @Url/@GET conflict:
@GET("manifest.json")
suspend fun getManifest(@Url baseUrl: String): AddonManifest

// FIXED — @GET with no path:
@GET
suspend fun getManifest(@Url fullUrl: String): AddonManifest
```

## Client Implementation Pattern

Build the full URL in the client implementation, not in the Retrofit interface:

```kotlin
// In the Retrofit interface:
@GET
suspend fun getCatalog(@Url fullUrl: String): CatalogResponse

// In the client implementation:
val normalized = normalizeUrl(addon.manifestUrl)
val catalogUrl = "$normalized/catalog/$type/$id.json"
val response = api.getCatalog(catalogUrl)
```

## Affected Methods

This applies to ALL Retrofit methods that use `@Url`:
- `getManifest()` → `$baseUrl/manifest.json`
- `getCatalog()` → `$baseUrl/catalog/$type/$id.json`
- `getMeta()` → `$baseUrl/meta/$type/$id.json`
- `getStreams()` → `$baseUrl/stream/$type/$id.json`
- `getSubtitles()` → `$baseUrl/subtitles/$type/$id.json`

## Stremio Addon Protocol Note

For Stremio addons, always normalize the URL (strip trailing slashes), then append the protocol path. The base URL from the addon manifest may or may not end with `/manifest.json` — normalize first.

```kotlin
private fun normalizeUrl(url: String): String {
    return url.trimEnd('/')
        .removeSuffix("/manifest.json")
}
```
