Commit 9594188
committed
feat: Enhance M3U parser to normalize URLs based on server address
- Added a `normalizeUrl` function to replace protocol, hostname, and port in URLs with the current window location if they match the server address.
- Updated `parseM3U` function to accept an optional `serverAddress` parameter and normalize `tvgUrl`, `catchupSource`, and channel URLs accordingly.
- Modified `PlayerPage` to extract the server address from the `X-Server-Address` header and pass it to the `parseM3U` function.1 parent 32e97cf commit 9594188
File tree
6 files changed
+6634
-6553
lines changed- src
- web-ui/src
- lib
- pages
6 files changed
+6634
-6553
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
| 970 | + | |
| 971 | + | |
971 | 972 | | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
976 | 989 | | |
977 | 990 | | |
978 | 991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
0 commit comments