index.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php require_once "../utilities/index.php" ?>
  2. <?php require_once "../elements/header.php" ?>
  3. <h1><?= $config["title"] ?></h1>
  4. <p>
  5. <?= $config["title"] ?> is a simple alternative front-end for <a href="https://bandcamp.com/">Bandcamp</a>.
  6. <br>
  7. It is free and open source software, with its code available on <a href="https://forgejo.sny.sh/sun/Tent">Forgejo</a>.
  8. <br>
  9. It was inspired by <a href="https://invidious.io/">Invidious</a>, <a href="https://nitter.net/">Nitter</a> and the like.
  10. </p>
  11. <h2>How do I get started?</h2>
  12. <p>Use the search bar at the top to find what you're looking for.</p>
  13. <h2>Why would I use this?</h2>
  14. <p>You might prefer it over the official Bandcamp website if you want to</p>
  15. <ul>
  16. <li>browse Bandcamp without enabling JavaScript,</li>
  17. <li>escape Bandcamp's analytics or</li>
  18. <li>use a more lightweight website.</li>
  19. </ul>
  20. <h2>Why would I not use this?</h2>
  21. <p>The official website may be preferable if you want to</p>
  22. <ul>
  23. <li>support the artists you listen to,</li>
  24. <li>purchase releases or merchandise or</li>
  25. <li>manage your account or collection.</li>
  26. </ul>
  27. <h2>How do I set up redirection?</h2>
  28. <p>
  29. The easiest way to automatically redirect Bandcamp to <?= $config["title"] ?> is to use <a href="https://libredirect.github.io/">LibRedirect</a>.
  30. <br>
  31. You can also use a generic redirection extension, in which case you need to create the following rules:
  32. </p>
  33. <ul>
  34. <?php
  35. $rules = [
  36. "https://$1.bandcamp.com/",
  37. "https://$1.bandcamp.com/$2/$3",
  38. "https://bandcamp.com/search?q=$1",
  39. "https://bandcamp.com/discover",
  40. "https://bandcamp.com/discover/$1",
  41. "https://f4.bcbits.com/img/$1",
  42. "https://t4.bcbits.com/stream/$1/$2/$3?token=$4",
  43. "https://bandcamp.23video.com/$1/$2/$3/video_hd/$4",
  44. "https://bandcamp.23video.com/$1/$2/$3/standard/thumbnail.png"
  45. ];
  46. foreach ($rules as $rule) {
  47. echo "<li>";
  48. echo "<code>" . $rule . "</code>";
  49. echo " → ";
  50. echo "<code>" . urldecode(convert_bandcamp_link($rule)) . "</code>";
  51. echo "</li>";
  52. };
  53. ?>
  54. </ul>
  55. <p>Finally, you can also prefix supported URLs with <code><?= get_base_url() ?>redirect.php?url=</code>.</p>
  56. <?php require_once "../elements/footer.php" ?>