Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into classifier_multiple…
Browse files Browse the repository at this point in the history
…_config_files
  • Loading branch information
rraymondgh committed Mar 5, 2025
2 parents 6836c51 + 4d4042a commit e6d8585
Show file tree
Hide file tree
Showing 125 changed files with 2,242 additions and 1,064 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: "^1.23.2"
go-version: "^1.23.6"

# - run: |
# echo "Run, Build Application using script"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.2"
go-version: "1.23.6"
cache: true

- name: Run GoReleaser build
Expand Down
132 changes: 132 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23.2-alpine3.20 AS build
FROM golang:1.23.6-alpine3.20 AS build

RUN apk --update add \
gcc \
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ tasks:
serve-webui:
dir: ./webui
cmds:
- ng serve --host {{.HOST}} --port {{.PORT}}
- npm start -- --host {{.HOST}} --port {{.PORT}}
vars:
HOST: localhost
PORT: 3334
Expand Down
25 changes: 12 additions & 13 deletions bitmagnet.io/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ GEM
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.28.2-arm64-darwin)
google-protobuf (4.29.0-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86_64-linux)
google-protobuf (4.29.0-x86_64-linux)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
Expand Down Expand Up @@ -56,8 +56,8 @@ GEM
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.4.0)
rexml
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
Expand All @@ -77,18 +77,17 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.8)
rouge (4.4.0)
rexml (3.3.9)
rouge (4.5.1)
safe_yaml (1.0.5)
sass-embedded (1.79.5)
google-protobuf (~> 4.27)
rake (>= 13)
sass-embedded (1.79.5-arm64-darwin)
google-protobuf (~> 4.27)
sass-embedded (1.81.0-arm64-darwin)
google-protobuf (~> 4.28)
sass-embedded (1.81.0-x86_64-linux-gnu)
google-protobuf (~> 4.28)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
webrick (1.8.2)
webrick (1.9.0)

PLATFORMS
arm64-darwin-22
Expand All @@ -106,4 +105,4 @@ DEPENDENCIES
webrick (~> 1.8)

BUNDLED WITH
2.5.9
2.5.22
11 changes: 11 additions & 0 deletions bitmagnet.io/_includes/head_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,16 @@

gtag("config", "G-J0XY0QVC39");
</script>

<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css"
integrity="sha512-5Hs3dF2AEPkpNAR7UiOHba+lRSJNeM2ECkwxUIxC1Q/FLycGTbNapWXB4tP889k5T5Ju8fs4b1P5z/iB4nMfSQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>

<script src="{{ site.baseurl }}{% link assets/js/site.js %}"></script>

<title>{{ page.title }} | {{ site.title }} | {{ site.tagline }}</title>
{% seo title=false %}
7 changes: 7 additions & 0 deletions bitmagnet.io/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.nav-list-site-settings {
margin-top: 10px;
}

.nav-list-link .fas {
margin-right: 6px;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitmagnet.io/assets/images/webui-reprocess.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions bitmagnet.io/assets/js/site.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
document.addEventListener("DOMContentLoaded", function () {
const lightIcon = "fa-sun";
const darkIcon = "fa-moon";

let isDark =
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches;

const siteNav = document.querySelector("nav.site-nav");
const icon = document.createElement("i");
icon.classList.add("fas");
const span = document.createElement("span");
span.innerHTML = "Toggle dark mode";
const link = document.createElement("a");
link.classList.add("nav-list-link");
link.append(icon, span);
link.setAttribute("href", "#");
const li = document.createElement("li");
li.classList.add("nav-list-item");
li.append(link);
const ul = document.createElement("ul");
ul.classList.add("nav-list", "nav-list-site-settings");
ul.append(li);
siteNav.append(ul);

function update() {
if (isDark) {
jtd.setTheme("dark");
icon.classList.remove(darkIcon);
icon.classList.add(lightIcon);
} else {
jtd.setTheme("light");
icon.classList.remove(lightIcon);
icon.classList.add(darkIcon);
}
}

update();

function toggle() {
isDark = !isDark;
update();
}

jtd.addEvent(link, "click", function (event) {
event.preventDefault();
toggle();
});
});
2 changes: 2 additions & 0 deletions bitmagnet.io/external-resources.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: External Resources
description: Community-developed resources, tools and packages for bitmagnet
layout: default
nav_order: 7
---
Expand All @@ -9,6 +10,7 @@ nav_order: 7
Community members have developed the following resources, tools and packages; these are not maintained under the **bitmagnet** project:

- [@davispuh](https://github.com/davispuh) has published an Arch package, `bitmagnet-git`, [in the AUR repository](https://aur.archlinux.org/packages/bitmagnet-git).
- [@DrFrankensteinUK](https://github.com/DrFrankensteinUK) has written [a **bitmagnet** on Synology NAS guide](https://drfrankenstein.co.uk/bitmagnet-in-container-manager-on-a-synology-nas/).
- [@DyonR](https://github.com/DyonR) has developed [magnetico2bitmagnet](https://github.com/DyonR/magnetico2bitmagnet), a collection of scripts for importing into **bitmagnet** from Magnetico and other sources.
- [@DyonR](https://github.com/DyonR) has written [a **bitmagnet** on Unraid guide](https://github.com/DyonR/bitmagnet-unraid).
- Your link could be here!
21 changes: 17 additions & 4 deletions bitmagnet.io/faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: FAQ
description: Frequently Asked Questions about bitmagnet
layout: default
nav_order: 1
---
Expand All @@ -12,25 +13,37 @@ No. **bitmagnet** does not download, store or distribute any content _at all_. I

## Should I use a VPN with **bitmagnet**?

It is recommended to use a VPN: **bitmagnet** may download **metadata about** illegal and copyrighted content. It is possible that rudimentary law enforcement and anti-piracy tracking tools would incorrectly flag this activity, although we've never heard about anyone getting into trouble for using this or similar metadata crawlers. Setting up a VPN is simple and cheap, and it's better to be safe than sorry. We are not affiliated with any VPN providers, but if you're unsure which provider to choose, we can recommend [Mullvad](https://mullvad.net/).
It is recommended to use a VPN: **bitmagnet** may download **metadata about** illegal and copyrighted content. It is possible that rudimentary law enforcement and anti-piracy tracking tools would incorrectly flag this activity, although we've never heard about anyone getting into trouble for using this or similar metadata crawlers. Setting up a VPN is simple and cheap, and it's better to be safe than sorry. We are not affiliated with any VPN providers, but if you're unsure which provider to choose, we can recommend [Mullvad](https://mullvad.net/) and [ProtonVPN](https://protonvpn.com/).

## Is **bitmagnet** intended to be used as a public service?

No, it was designed to be self-hosted. The UI and API allow destructive actions, and no security or scalability review has taken place, so it's not advised. An API is exposed, that could in theory be used to build a public service, but it's not going to be the focus of this project to support that use case.

## What are the system requirements for **bitmagnet**?

As a rough guide, you should allow around 300MB RAM for BitMagnet, and at least 1GB RAM for the Postgres database. You should allow roughly 50GB of disk space per 10 million torrents, which should suffice for several months of crawling, however there is no upper limit to how many torrents might ultimately be crawled. The database will run fastest when it has plenty of RAM and a fast disk, preferably a SSD.
As a rough guide, you should allow around 300MB RAM for BitMagnet, and at least 1GB RAM for the Postgres database. You should allow roughly 80GB of disk space per 10 million torrents, which should suffice for several months of crawling, however there is no upper limit to how many torrents might ultimately be crawled. The database will run fastest when it has plenty of RAM and a fast disk, preferably a SSD.

## I've started **bitmagnet** for the first time and am not seeing torrents right away, is something wrong?

If everything is working, **bitmagnet** should begin showing torrents in the web UI within a maximum of 10 minutes (which is its cache TTL). The refresh button at the top of the torrent listing is a cache buster - use it to see new torrent content in real time. Bear in mind that when a torrent is inserted into the database, a background queue job must run before it will become available in the UI. If you're importing thousands or millions of torrents, it might therefore take a while for everything to show. Check the next question if you're still not seeing torrents.

## **bitmagnet** isn't finding any new torrents, what's wrong?

If **bitmagnet** isn't finding new torrents, it probably isn't due to a problem with the software - many people are using it successfully. You may have a networking or firewall issue, or a VPN misconfiguration preventing you from connecting to the DHT. Additionally, the TMDB API is blocked in certain countries; if you are in an affected country you may need to either disable the TMDB integration with the `tmdb.enabled` configuration key, or use a VPN. Configuring a personal TMDB API key (or disabling TMDB) will make the queue run a **lot** faster.
{: .warning-title }

**bitmagnet** now shows its health status in the main toolbar: It will show a tick for health, a cross for unhealthy or sometimes 3 dots for pending. Click on it to open the health dialog and check that all workers are running and healthy. The dashboard can be used to monitor queue throughput. On the queues dashboard, the following would indicate a problem:
> Important
>
> **bitmagnet** is known to work well on Linux and MacOS; if it isn't finding new torrents when running on these platforms, this is probably due to a misconfiguration, rather than a bug in the software.
>
> Note that some Windows users have reported issues: if you are having issues on Windows, then for now it's advisable to run the software on Linux or MacOS instead.
**bitmagnet** now shows its health status in the main toolbar: It will show a tick for health, a cross for unhealthy or sometimes 3 dots for pending. Click on it to open the health dialog and check that all workers are running and healthy.

![WebUI health check screenshot](/assets/images/webui-health-check.png)

The most common issues are networking, firewall or a VPN misconfigurations preventing **bitmagnet** from connecting to the DHT. Additionally, the TMDB API is blocked in certain countries; if you are in an affected country you may need to either disable the TMDB integration with the `tmdb.enabled` configuration key, or use a VPN. Configuring a personal TMDB API key (or disabling TMDB) will make the queue run a **lot** faster.

The dashboard can be used to monitor queue throughput. On the queues dashboard, the following would indicate a problem:

- A high number of pending jobs, and the number of processed jobs not increasing over time
- A high number of failed jobs
Expand Down
1 change: 1 addition & 0 deletions bitmagnet.io/guides.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Guides
description: Guides for setting up and using bitmagnet
layout: default
nav_order: 3
has_children: true
Expand Down
1 change: 1 addition & 0 deletions bitmagnet.io/guides/backup-restore-merge.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Backup, Restore & Merge
description: How to backup, restore, merge and share bitmagnet databases
parent: Guides
layout: default
nav_order: 7
Expand Down
Loading

0 comments on commit e6d8585

Please sign in to comment.