forked from Foxyz/sync_replay_project
Side-app use: copy/open links and titles everywhere, version on the Settings tab, known links preview instantly, Ctrl+V adds to Up next
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9572e8457d
commit
1ec4fc8b13
22 files changed
+1190
-236
No files matched your search
@@ -64,6 +64,15 @@ String? normalizeItemId(String id) {
|
||||
return id.replaceAll('-', '').toLowerCase();
|
||||
}
|
||||
|
||||
/// [itemId]'s page in the web UI of the server at [baseUrl] (the form
|
||||
/// [parseJellyfinLink] reads back). No credentials: whoever opens it signs
|
||||
/// in on that server.
|
||||
String jellyfinWebUrl(String baseUrl, String itemId, {String? serverId}) {
|
||||
final base = baseUrl.replaceAll(RegExp(r'/+$'), '');
|
||||
final server = serverId == null || serverId.isEmpty ? '' : '&serverId=${Uri.encodeQueryComponent(serverId)}';
|
||||
return '$base/web/#/details?id=${Uri.encodeQueryComponent(itemId)}$server';
|
||||
}
|
||||
|
||||
/// Recognises a Jellyfin item link and reduces it to (baseUrl, itemId):
|
||||
/// - web UI: `/web/#/details?id=X&serverId=S`, `/web/index.html#!/details?id=X`,
|
||||
/// any `#/...?id=X` route;
|
||||
|
||||
Reference in new issue
Block a user