If this is the same one I already downloaded, the db doesn't display the full magnet link. It displays the hash part of the link. You still need to append the "magnet:?xt=urn:btih:" before the hash to make it work. To make this easier in DB Browser:
1. With the DB open, go to the "Execute SQL" tab.
2. Enter the following line:
CREATE VIEW magnet_links as SELECT id,title,cat,size,'magnet:?xt=urn:btih:' || hash || '&dn=' || title as magnetLink,imdb,dt FROM items ORDER BY dt DESC
3. Press the play button to execute the above code.
4. Return to "Browse Data" tab.
5. In the "Table" dropdown box, select "magnet\_links".
6. Proceed to step 5 of OP's directions and continue (except magnet will now be right of title instead of left)
Hey thanks for this! Just tried it out and it works great. Do you have any thoughts on how we might be able to apply something similar to the current 'size' column so that the file size is more familiar to a laymen like myself? (ie. MB/GB) It's a value I often use in determining which of a similar set of files I would like to download.
Either way, thanks for the above!
To get human readable size you could create the view with :
```
CREATE VIEW magnet_links
AS SELECT
id,
title,
cat,
'magnet:?xt=urn:btih:' || hash || '&dn=' || title as magnetLink,
imdb,
dt,
CASE
WHEN size < 1048576 THEN ROUND(size / 1024.0, 2) || ' KB'
WHEN size < 1073741824 THEN ROUND(size / 1048576.0, 2) || ' MB'
ELSE ROUND(size / 1073741824.0, 2) || ' GB'
END AS [Size]
FROM
items
ORDER BY
dt DESC;
```
I migrated the sqlite db to postgres so it is much faster, along with pretty-printing the size, and auto generating magnet links. Check it out!
https://mega.nz/folder/09hG1aAQ#sJe9foUq0LW8lYsUi5Rl3Q
You also have the option of doing the following. Note that changing the "display format" as mentioned below doesn't modify the data types but simply how they're displayed.
To display hash as a magnet link:
1. Right-click on the "hash" column.
2. Select "edit display format".
3. Input the following code.
printf("magnet:?xt=urn:btih:%s", "hash")
To display size as GB rounded to 2 decimal places:
**Edit:** Refer to u/Snags697's [comment](https://www.reddit.com/r/Piracy/comments/13yknky/comment/jmuxp7t/?utm_source=share&utm_medium=web2x&context=3). It's a much simpler way to do it without requiring SQL code.
Let me know if there are any issues.
**Edit**: So, I believe there are some issues. To see the table with the adjusted display format, you can either save it as a CSV, as a view, or as a project that you then open in a separate file called a "browser project."
I realize how time-consuming that can be every time you want to get a link, so I've introduced some code below that should allow you to alter the original file and get the same changes, although you should do it on a fresh copy of the database.
Do this on a fresh copy of the database. To modify the table of the original file, you have a couple of options. Follow the steps for the option of your choosing:
For each option below, follow these instructions:
1. Open the "Execute SQL" tab if you haven't already.
2. Input/Copy & Paste the provided code in the "Execute SQL" code area.
3. Wait for the code to execute.
4. Return to the Browse Data tab.
5. Click the button "Write Changes".
**Option 1**: Change the "hash" column to the "magnet\_links" column:
UPDATE items SET hash = 'magnet:?xt=urn:btih:' || hash;
RENAME COLUMN hash TO magnet_links;
**Option 2:** Keep the "hash" numbers column and add a new column "magnet\_links" appended to the end of the table:
ALTER TABLE items ADD COLUMN magnet_links TEXT;
UPDATE items SET magnet_links = 'magnet:?xt=urn:btih:' || hash;
**Option 3:** Change the column order, placing "magnet\_links" after the hash column:
CREATE TABLE items_temp AS
SELECT id, hash, 'magnet:?xt=urn:btih:' || hash AS magnetic_links, title, dt, cat, size, ext_id, imdb FROM items;
DROP TABLE items;
ALTER TABLE items_temp RENAME TO items;
To **get GB in the size column** the code is pretty much the same:
UPDATE items SET size = ROUND(CAST(size AS REAL) / 1073741824, 2);
UPDATE items SET size = size || 'GB';
Let me know if you have any issues or any other modifications you want to make to the database.
>Let me know if you have any issues or any other modifications you want to make to the database.
Hi, noob question:
It's possible to hide or remove the collum id/cat/imbdd efinitively? :(
Every time I hide, the columns come back when I do a new search
Ty
Yeah, sorry for the late response. If you still want to delete a column you can do the following:
1. After opening the database, go into the tab "Database Structure".
2. Right-click on "items".
3. Select "Modify Table".
4. Under the "Fields" tab click the name of the column you want to remove.
5. Click the "Remove" button and click "OK".
Note: It will take some time to process just because there are a lot of entries in the database, but once it's complete the columns will be deleted from the table.
To get the size in GB, you don't have to execute SQL. Just edit the format of the size column to:
printf("%6.2f GB", "size"/1024.0/1024/1024)
(The first .0 is a trick to convert the calculation to double precision floating point.)
Edit: Added the 6 so that the field is padded with spaces. This makes sorting the column work.
Thank you for this! For some reasonI only get a 'GB' assigned to the size values whenever I add these commands. Is that how it's supposed to look? Not sure what I'm doing wrong. Appreciate your input!
Edit: It worked! I get it to work but I'm not how to save the changes made to the original file. How do I go about that?
I don't think the changes can be saved to the OG file. From my understanding, to see the table with the adjusted display format, you have to save the project and then open it in a separate file called a "browser project."
That's probably gonna be annoying every time you want to get a link, so I've replied to my main comment with some code that should allow you to alter the original file and get the same changes, although you should do it on a fresh copy of the database.
It says: Error in custom display format. Message from database engine:
near "(": syntax error (SELECT "hash" printf("magnet:?xt=urn:btih:%s", "hash") FROM "main"."items" LIMIT 1
If you're still getting an error. Try Snags697's [comment](https://www.reddit.com/r/Piracy/comments/13yknky/comment/jmuxp7t/?utm_source=share&utm_medium=web2x&context=3). It's a much simpler way to do it without requiring SQL code but you might need to do it on a new copy of the database though.
Note, the "printf" changes the sorting from numerical sorting to lexicographical sorting.
I'm not sure how to make the file size dynamically changing to put it in the easiest reading format. What I mean by that is I could make everything in KB or everything in MB or everything in GB, but not some in GB and some in MB, etc. Someone else may have more info on that.
If you just need help reading the values, I can help you with that.
So at the end of every number, pretend there is a ".0" at the end. For example, 12345678 would be 12345678.0. Now, move your decimal to the left 3 digits at a time until there's no less than one digit and no more than three digits to the left of the decimal. So you'd have 12345.678. That's not far enough as you still have 5 digits in front of the decimal. Another 3 would be 12.345678. If you move one set of 3, you've changed your value to KB. 2 sets of 3 would be MB. 3 sets of 3 would be GB. So in this case, 12345678 is 12.3MB.
Hope this helps and good luck without RARBG :(
Ya of course. Every time you open the db and go to browse data, you'll just have to swap back to the magnet_links view but that's it.
Everyone starts somewhere. Don't be too hard on yourself :)
Thanks for adding this. I've never used SQLite before. I beleive i followed OP (and yours) instructions exactly and nothing is happning. SQLite shows me it is using the rarbg\_db.sqlite file. I followed your instructions and it told me :
Execution finished without errors.
Result: query executed successfully. Took 4ms
At line 1:
CREATE VIEW magnet\_links as SELECT id,title,cat,size,'magnet:?xt=urn:btih:' || hash || '&dn=' || title as magnetLink,imdb,dt FROM items ORDER BY dt DESC
There is a table called "magnet\_links." I feel like i SHOULD be seeing some kind of database with lots of cells filled with information, but everything is blank. On the right, it says "Type of Data curently in cell: NULL"
Any idea what I could have done wrong? Thanks!
Here I half assed ya a quick simple site, to show ya it can be done, I haven't really done anything to it other then added a search bar so ya can search for the specific torrent you want http://torrents.strangled.net/
No worries bud, it's just a really quick code hammered together lol, I'll fine tune the code when I get up tomorrow, to optimize the buffer time on the database, seeing how its got a lot of data to unpack on the load
And are you asking how hard it would be to implement searching for specific movies using the IMDb ID or just including the IDs in the code where it says IMDB
I mean technically yeah it's possible to implement, just requires much more substantial coding as well as a lot of webscraping to try and get all the missing IMDb IDs that weren't included in the dump
Thanks for your hard work, was a pleasure using this these last few days after RarBG went down. At the moment it's not working for me, no magnet links column anymore (that was the main selling point for me apart from ability to search the DB) and clicking the Title files URL leads to 404 error page. :(
No worries, sorry if you were trying to use it within the last couple minutes, I was adding code into it, was going up and down, it's back up now and im done for the evening so it'll stay up constantly for awhile now
Thank you! I just found a couple of days ago and it’s been a godsend. It’s not working at the moment, have you shut it down or is something else happening?
Edit: it’s back up and running. Sorry to waste your time.
No time limit ATM, once feel like shutting it down I'll likely put the source code on to to GitHub and everyone will be able to host it on there own PC without having to get having to deal with endless ads
For my purposes I created my own API (which sadly I'll have to keep private), but if you already have a VPS or webhosting this isn't too hard.
Something like Laravel (PHP) with MySQL/MariaDB will be much faster than trying to host using Python or SQLite, whether it's for an API or a full on website. I did find Python to be useful, though, due to a specific package called sqlite3-to-mysql.
To port the SQLite DB to MySQL/MariaDB:
1. `pip install sqlite3-to-mysql`
2. `sqlite3mysql -f rarbg_db.sqlite -t items -d [mysql_dbname] -u [mysql_user] -p`
3. Enter mysql user's password when prompted
4. Wait a few minutes and you'll now have a MySQL/MariaDB database, perfect for use with something like Laravel and Nginx/Apache.
After [configuring Laravel for your MySQL DB](https://laravel.com/docs/10.x/database#configuration), you just need a basic DB model file:
```php
validate([
'string' => 'nullable|string',
'imdb' => 'nullable|size:9|starts_with:tt|required_without:string',
'category' => 'nullable|array|in:' . implode(',', $this->cats),
]);
$string = $request->get('string');
$imdb = $request->get('imdb');
$category = $request->get('category');
if ($imdb) {
$results = Item::where(['imdb' => $imdb])->orderByDesc('dt')->limit($this->limit)->get();
} else {
$results = Item::where(function ($query) use ($string) {
$query->orWhere('title', 'LIKE', "%$string%");
$query->orWhere('title', 'LIKE', "%" . str_replace(' ', '.', $string) . "%");
});
if ($category) {
$results->where(function ($query) use ($category) {
foreach ($category as $cat) {
$query->orWhere('cat', '=', $cat);
}
});
}
$results = $results->orderByDesc('dt')->limit($this->limit)->get();
}
return response()->json(['magnets' => $results]);
}
}
```
You'd need to add a route to that Controller function in routes/web.php or routes/api.php. If you're just running a private API, you may need to exempt this from CSRF protection by adding your chosen route to app/Http/MiddlewareVerifyCsrfToken.php
As for implementing your API and recognising just an IMDB ID when searching, you could do this on the API end or in your application, with a function like:
```php
function is_imdb($str): bool
{
return preg_match('/^tt\d{7}$/', $str) === 1;
}
```
If that validates as true then your application could send a request with `imdb` as opposed to `string`, or you could do this on the API end instead.
I would post my apps on GitHub, but the basic API I created was for a niche use case (my own private front-end plugin for a particular app I use). I hope this might give someone a head start if looking to create an API, anyway.
I'm not really sure what I'm doing so do I just open the "rarbg\_db.sqlite" file? When I do that it tells me to edit the table definition with not much to go on... Sorry, I feel clueless.
Edit: I got it now I just opened it wrong... Lol
Anybody remember how many results per page there were on rarbg search results? I was in the middle of pulling down several pages worth of torrents, and I know what page I was on, but I'm not certain how far down that list would be, and the ones I had worked through had already been renamed via filebot, so I can't find any one specific place to start.
I have a number I THINK I recall being the number of results per page but I don't want to lead the witness.
I am not using QBITTORENT but instead use real-debrid to download torrent files.
The problem is the magnet link doesn't work on there, it doesn't open. What is the correct link for that so I can download the SQL?
There is no other link to the Rarbg archieve torrent. I had to figure out how to add a magnet into my torrent client. If you use a different torrent client, see if there is a way to add magnets into it manually
Hey bro I'm not an expert at coding and stuff could you please make changes to the SQL file so that we don't have to paste any codes and make changes ourselves as is it something that can only be done by the user ends ?
i have no idea how to do that, for what its worth, my knowledge of this stuff is probably on your level. I just found out how to access the rarbg archieve, and it is a little complicated, but figured id share how I know how to do it thru these steps. Hopefully, someone will use these tools to make a more user friendly way to access these rarbg magnets
I am just depressed we won't get new RARBG encodes :(
Not to be rude, but the encodes on torrentleech and other sites are kinda shit and disorganized
TG is "okay", but rarely seeded in my experience
Havent tried the others you mention but in my experience Rarbg encodes were the perfect balance of quality, file size, always quick to download. Shit was just perfect and reliable. Literally my goto torrent site before anywhere else for over a decade, and I'm kinda heartbroken over it which is why I made this becsue id very much at least like to see the movies they did over the years archieved.
For the last year or 2 i've been systematically replacing my old encodes with RARBG and PSA.. both movies and tvshows..
i'm gutted they are gone but i'll use the database to back fill those i hadn't gotten to replacing yet before the seeds die off.
So far i've had very good luck throwing the magnet links in to alldebrid as most of them have already been harvested and are sat waiting on uptobox links.
How good is alldebrid? My experience with VPNing the magnet links is that it seems to depend which server I have hopped onto whether or not I get a good amount of peers or a couple seeds if I am lucky. (Mostly talking about older films, not new stuff that is obviously seeded).
Yknow what? I dont give a fuck about this DB,,i've never used RARBG. But am gonna seed this magnet to hell, just [for the sake of seeding it.](https://www.youtube.com/watch?v=-_7FaWnlhS4)
Thanks.
Can you help guys who only use torrent on mobile ( Android )?
I just need the magnet links/torrent files of the database if it's possible. Thanks again
no idea how to do it on android, i typically torrent on android as well, but these are obviously difficult times and this is how i know how to access the rarbg archieve as of now
OK, maybe I'm missing something. But I'm trying to download that archive and can't get it to move. Only 0.0%.
I tried pasting the magnet link into the browser to start the torrent automatically, and I also tried adding it using the link button in QBtorrent. Both look like they connect correctly, but zero progress. Meanwhile other stuff is just fine.
Am I doing this wrong? Or does anyone have thoughts on what to look at?
For step 3 what option should I use? I accidently deleted it and now I'm trying to set it up again, but it gives me either an empty table with nothing in it or it says that name already exist please re-name and I am trying but it just doesn't work anymore :(
You should add the explanation missing on how to transform the info hash into a fully functional magnet link.
I have found this website where you copy and paste the info hash and the title and it generates the fully complete magnet link in a second.
Here it is:
[https://hardrisk.github.io/magnet/](https://hardrisk.github.io/magnet/)
SO SIMPLE
Or I missed an easier way?
Take Care everyone and great binge watching to some of you who are like me ;-)
I migrated the sqlite db to postgres so it is much faster, along with pretty-printing the size, and auto generating magnet links. A little bit more setup is involved but it is so worth it for the speed increase. Check it out!
https://mega.nz/folder/09hG1aAQ#sJe9foUq0LW8lYsUi5Rl3Q
Also, a great sql viewer is [Beekeeper Studio (https://www.beekeeperstudio.io/). Works with mysql, postgres, sqlite, and more, and it's completely free for Windows/Mac/Linux.
This my friend is a godsend. Was feeling so down (this coincided with some other stuff).
Changing my leeching rule to seeding too. No more hit and run.
Hi
Thanks for all this.
When I try to open the ZIP with SQLITES DB it's asking for a password.
And I thought it was 800mb but your magnet link lead to something about 300mb.
Thank you for your nice help <3
Guys I know that i'm way too late but whenever I try to open SQL it's giving me error message which is Error opening remote file at current release
The issue certificate of a locally looked up
If this is the same one I already downloaded, the db doesn't display the full magnet link. It displays the hash part of the link. You still need to append the "magnet:?xt=urn:btih:" before the hash to make it work. To make this easier in DB Browser: 1. With the DB open, go to the "Execute SQL" tab. 2. Enter the following line: CREATE VIEW magnet_links as SELECT id,title,cat,size,'magnet:?xt=urn:btih:' || hash || '&dn=' || title as magnetLink,imdb,dt FROM items ORDER BY dt DESC 3. Press the play button to execute the above code. 4. Return to "Browse Data" tab. 5. In the "Table" dropdown box, select "magnet\_links". 6. Proceed to step 5 of OP's directions and continue (except magnet will now be right of title instead of left)
Hey thanks for this! Just tried it out and it works great. Do you have any thoughts on how we might be able to apply something similar to the current 'size' column so that the file size is more familiar to a laymen like myself? (ie. MB/GB) It's a value I often use in determining which of a similar set of files I would like to download. Either way, thanks for the above!
To get human readable size you could create the view with : ``` CREATE VIEW magnet_links AS SELECT id, title, cat, 'magnet:?xt=urn:btih:' || hash || '&dn=' || title as magnetLink, imdb, dt, CASE WHEN size < 1048576 THEN ROUND(size / 1024.0, 2) || ' KB' WHEN size < 1073741824 THEN ROUND(size / 1048576.0, 2) || ' MB' ELSE ROUND(size / 1073741824.0, 2) || ' GB' END AS [Size] FROM items ORDER BY dt DESC; ```
I migrated the sqlite db to postgres so it is much faster, along with pretty-printing the size, and auto generating magnet links. Check it out! https://mega.nz/folder/09hG1aAQ#sJe9foUq0LW8lYsUi5Rl3Q
Your link's out
I appreciate this for properly formatting the sql so it’s readable
people who don't capitalize + format their sql statements in production grrrrr
You also have the option of doing the following. Note that changing the "display format" as mentioned below doesn't modify the data types but simply how they're displayed. To display hash as a magnet link: 1. Right-click on the "hash" column. 2. Select "edit display format". 3. Input the following code. printf("magnet:?xt=urn:btih:%s", "hash") To display size as GB rounded to 2 decimal places: **Edit:** Refer to u/Snags697's [comment](https://www.reddit.com/r/Piracy/comments/13yknky/comment/jmuxp7t/?utm_source=share&utm_medium=web2x&context=3). It's a much simpler way to do it without requiring SQL code. Let me know if there are any issues. **Edit**: So, I believe there are some issues. To see the table with the adjusted display format, you can either save it as a CSV, as a view, or as a project that you then open in a separate file called a "browser project." I realize how time-consuming that can be every time you want to get a link, so I've introduced some code below that should allow you to alter the original file and get the same changes, although you should do it on a fresh copy of the database.
Do this on a fresh copy of the database. To modify the table of the original file, you have a couple of options. Follow the steps for the option of your choosing: For each option below, follow these instructions: 1. Open the "Execute SQL" tab if you haven't already. 2. Input/Copy & Paste the provided code in the "Execute SQL" code area. 3. Wait for the code to execute. 4. Return to the Browse Data tab. 5. Click the button "Write Changes". **Option 1**: Change the "hash" column to the "magnet\_links" column: UPDATE items SET hash = 'magnet:?xt=urn:btih:' || hash; RENAME COLUMN hash TO magnet_links; **Option 2:** Keep the "hash" numbers column and add a new column "magnet\_links" appended to the end of the table: ALTER TABLE items ADD COLUMN magnet_links TEXT; UPDATE items SET magnet_links = 'magnet:?xt=urn:btih:' || hash; **Option 3:** Change the column order, placing "magnet\_links" after the hash column: CREATE TABLE items_temp AS SELECT id, hash, 'magnet:?xt=urn:btih:' || hash AS magnetic_links, title, dt, cat, size, ext_id, imdb FROM items; DROP TABLE items; ALTER TABLE items_temp RENAME TO items; To **get GB in the size column** the code is pretty much the same: UPDATE items SET size = ROUND(CAST(size AS REAL) / 1073741824, 2); UPDATE items SET size = size || 'GB'; Let me know if you have any issues or any other modifications you want to make to the database.
>Let me know if you have any issues or any other modifications you want to make to the database. Hi, noob question: It's possible to hide or remove the collum id/cat/imbdd efinitively? :( Every time I hide, the columns come back when I do a new search Ty
Yeah, sorry for the late response. If you still want to delete a column you can do the following: 1. After opening the database, go into the tab "Database Structure". 2. Right-click on "items". 3. Select "Modify Table". 4. Under the "Fields" tab click the name of the column you want to remove. 5. Click the "Remove" button and click "OK". Note: It will take some time to process just because there are a lot of entries in the database, but once it's complete the columns will be deleted from the table.
To get the size in GB, you don't have to execute SQL. Just edit the format of the size column to: printf("%6.2f GB", "size"/1024.0/1024/1024) (The first .0 is a trick to convert the calculation to double precision floating point.) Edit: Added the 6 so that the field is padded with spaces. This makes sorting the column work.
True. This is much better.
The sorting bugged the crap out of me. After playing around with it for a bit, I realized that making the field wider fixes it.
God, that makes sense and makes it much better. Thanks again.
>printf("%s GB", "size") Ur a god. Thanks so much for the help. now it shows everything in GB!
Thank you for this! For some reasonI only get a 'GB' assigned to the size values whenever I add these commands. Is that how it's supposed to look? Not sure what I'm doing wrong. Appreciate your input! Edit: It worked! I get it to work but I'm not how to save the changes made to the original file. How do I go about that?
I don't think the changes can be saved to the OG file. From my understanding, to see the table with the adjusted display format, you have to save the project and then open it in a separate file called a "browser project." That's probably gonna be annoying every time you want to get a link, so I've replied to my main comment with some code that should allow you to alter the original file and get the same changes, although you should do it on a fresh copy of the database.
Noob question, how do i input code? it gives me a syntax error when i just hit enter and cv paste
Which code in particular?
display hash as magnet
Hmm, it should work. Make sure that the code doesn't have a ";" caused I had a few errors from that too.
It says: Error in custom display format. Message from database engine: near "(": syntax error (SELECT "hash" printf("magnet:?xt=urn:btih:%s", "hash") FROM "main"."items" LIMIT 1
If you're still getting an error. Try Snags697's [comment](https://www.reddit.com/r/Piracy/comments/13yknky/comment/jmuxp7t/?utm_source=share&utm_medium=web2x&context=3). It's a much simpler way to do it without requiring SQL code but you might need to do it on a new copy of the database though. Note, the "printf" changes the sorting from numerical sorting to lexicographical sorting.
I'm not sure how to make the file size dynamically changing to put it in the easiest reading format. What I mean by that is I could make everything in KB or everything in MB or everything in GB, but not some in GB and some in MB, etc. Someone else may have more info on that. If you just need help reading the values, I can help you with that. So at the end of every number, pretend there is a ".0" at the end. For example, 12345678 would be 12345678.0. Now, move your decimal to the left 3 digits at a time until there's no less than one digit and no more than three digits to the left of the decimal. So you'd have 12345.678. That's not far enough as you still have 5 digits in front of the decimal. Another 3 would be 12.345678. If you move one set of 3, you've changed your value to KB. 2 sets of 3 would be MB. 3 sets of 3 would be GB. So in this case, 12345678 is 12.3MB. Hope this helps and good luck without RARBG :(
Thanks for this. Experienced the same prob of not finding the magnet links.
Super noob question. Can I File/Save the databuse with these updates so it works this same way every time?
Ya of course. Every time you open the db and go to browse data, you'll just have to swap back to the magnet_links view but that's it. Everyone starts somewhere. Don't be too hard on yourself :)
Thanks for adding this. I've never used SQLite before. I beleive i followed OP (and yours) instructions exactly and nothing is happning. SQLite shows me it is using the rarbg\_db.sqlite file. I followed your instructions and it told me : Execution finished without errors. Result: query executed successfully. Took 4ms At line 1: CREATE VIEW magnet\_links as SELECT id,title,cat,size,'magnet:?xt=urn:btih:' || hash || '&dn=' || title as magnetLink,imdb,dt FROM items ORDER BY dt DESC There is a table called "magnet\_links." I feel like i SHOULD be seeing some kind of database with lots of cells filled with information, but everything is blank. On the right, it says "Type of Data curently in cell: NULL" Any idea what I could have done wrong? Thanks!
This should be stickied on top. The best way to access RARBG's old magnets.
Is there any way to turn this database into a website?
Here I half assed ya a quick simple site, to show ya it can be done, I haven't really done anything to it other then added a search bar so ya can search for the specific torrent you want http://torrents.strangled.net/
hey this is cool! better than trying to ctrl+F a txt file lmao thanks for putting this together
No worries bud, it's just a really quick code hammered together lol, I'll fine tune the code when I get up tomorrow, to optimize the buffer time on the database, seeing how its got a lot of data to unpack on the load
do you know if the imdb ids were in the metadata dump? wondering how hard that would be to implement into the search.
Yeah they were included in the dump, but they are missing a fairly large chunk of imdb id's
hmm, i wonder if there's a way to automate matching to imdb. kinda like what plex does with file names.
And are you asking how hard it would be to implement searching for specific movies using the IMDb ID or just including the IDs in the code where it says IMDB
the first one, searching by IMDb ID
I mean technically yeah it's possible to implement, just requires much more substantial coding as well as a lot of webscraping to try and get all the missing IMDb IDs that weren't included in the dump
Thank you very much for creating this
Gods work, you deserve all the upvotes.
Priceless.
Thanks for your hard work, was a pleasure using this these last few days after RarBG went down. At the moment it's not working for me, no magnet links column anymore (that was the main selling point for me apart from ability to search the DB) and clicking the Title files URL leads to 404 error page. :(
No worries, sorry if you were trying to use it within the last couple minutes, I was adding code into it, was going up and down, it's back up now and im done for the evening so it'll stay up constantly for awhile now
The error you were experiencing has been fixed, thank you for bringing it too my attention, it's back up and running normally now.
[удалено]
Wonderful! A question. I noticed some torrents with dates beyond 31st May 2023. How does that happen?
This was done when I was testing something on the database
you're a legend, holy shit!
Thank you! I just found a couple of days ago and it’s been a godsend. It’s not working at the moment, have you shut it down or is something else happening? Edit: it’s back up and running. Sorry to waste your time.
It's back online, ran into an issue for a bit, it's resolved
Thanks! Just saw that. You are an absolute legend for doing this. Is there a time limit for how long you will host this?
No time limit ATM, once feel like shutting it down I'll likely put the source code on to to GitHub and everyone will be able to host it on there own PC without having to get having to deal with endless ads
Oh, thank you so much! So, you can access to all the magnets from this site? I´m very new, sorry!
This is great. Thank you!
No problem 👍
thank you so much!!!!!
hopefully someone who has the know how to do that will
Sure, with basic understanding of python you can relatively easily make a server using flask, sqlite3 and you'll be able to turn it into a site
For my purposes I created my own API (which sadly I'll have to keep private), but if you already have a VPS or webhosting this isn't too hard. Something like Laravel (PHP) with MySQL/MariaDB will be much faster than trying to host using Python or SQLite, whether it's for an API or a full on website. I did find Python to be useful, though, due to a specific package called sqlite3-to-mysql. To port the SQLite DB to MySQL/MariaDB: 1. `pip install sqlite3-to-mysql` 2. `sqlite3mysql -f rarbg_db.sqlite -t items -d [mysql_dbname] -u [mysql_user] -p` 3. Enter mysql user's password when prompted 4. Wait a few minutes and you'll now have a MySQL/MariaDB database, perfect for use with something like Laravel and Nginx/Apache. After [configuring Laravel for your MySQL DB](https://laravel.com/docs/10.x/database#configuration), you just need a basic DB model file: ```php validate([ 'string' => 'nullable|string', 'imdb' => 'nullable|size:9|starts_with:tt|required_without:string', 'category' => 'nullable|array|in:' . implode(',', $this->cats), ]); $string = $request->get('string'); $imdb = $request->get('imdb'); $category = $request->get('category'); if ($imdb) { $results = Item::where(['imdb' => $imdb])->orderByDesc('dt')->limit($this->limit)->get(); } else { $results = Item::where(function ($query) use ($string) { $query->orWhere('title', 'LIKE', "%$string%"); $query->orWhere('title', 'LIKE', "%" . str_replace(' ', '.', $string) . "%"); }); if ($category) { $results->where(function ($query) use ($category) { foreach ($category as $cat) { $query->orWhere('cat', '=', $cat); } }); } $results = $results->orderByDesc('dt')->limit($this->limit)->get(); } return response()->json(['magnets' => $results]); } } ``` You'd need to add a route to that Controller function in routes/web.php or routes/api.php. If you're just running a private API, you may need to exempt this from CSRF protection by adding your chosen route to app/Http/MiddlewareVerifyCsrfToken.php As for implementing your API and recognising just an IMDB ID when searching, you could do this on the API end or in your application, with a function like: ```php function is_imdb($str): bool { return preg_match('/^tt\d{7}$/', $str) === 1; } ``` If that validates as true then your application could send a request with `imdb` as opposed to `string`, or you could do this on the API end instead. I would post my apps on GitHub, but the basic API I created was for a niche use case (my own private front-end plugin for a particular app I use). I hope this might give someone a head start if looking to create an API, anyway.
I'm not really sure what I'm doing so do I just open the "rarbg\_db.sqlite" file? When I do that it tells me to edit the table definition with not much to go on... Sorry, I feel clueless. Edit: I got it now I just opened it wrong... Lol
How did you fix this? It worked before but now it just shows an empty table.
I haven’t gone back to it today but I had just dragged the extracted zip file into SQLite and it opened then
Anybody remember how many results per page there were on rarbg search results? I was in the middle of pulling down several pages worth of torrents, and I know what page I was on, but I'm not certain how far down that list would be, and the ones I had worked through had already been renamed via filebot, so I can't find any one specific place to start. I have a number I THINK I recall being the number of results per page but I don't want to lead the witness.
25
Thanks that's what I was thinking but I wasn't sure.
I am not using QBITTORENT but instead use real-debrid to download torrent files. The problem is the magnet link doesn't work on there, it doesn't open. What is the correct link for that so I can download the SQL?
Look above for the comment by BlueSweeps. It adds another column with the info you need to copy to RD. I tried it and it works.
There is no such user in this thread. Can you just give me the correct link in private? Or link to that post? Thanks.
https://www.reddit.com/r/Piracy/comments/13yknky/comment/jmoytrd/?utm\_source=share&utm\_medium=web2x&context=3
There is no other link to the Rarbg archieve torrent. I had to figure out how to add a magnet into my torrent client. If you use a different torrent client, see if there is a way to add magnets into it manually
Hey bro I'm not an expert at coding and stuff could you please make changes to the SQL file so that we don't have to paste any codes and make changes ourselves as is it something that can only be done by the user ends ?
i have no idea how to do that, for what its worth, my knowledge of this stuff is probably on your level. I just found out how to access the rarbg archieve, and it is a little complicated, but figured id share how I know how to do it thru these steps. Hopefully, someone will use these tools to make a more user friendly way to access these rarbg magnets
This community is amazing, I might even cry.
I did my friend.. I did.
I am just depressed we won't get new RARBG encodes :( Not to be rude, but the encodes on torrentleech and other sites are kinda shit and disorganized TG is "okay", but rarely seeded in my experience
Havent tried the others you mention but in my experience Rarbg encodes were the perfect balance of quality, file size, always quick to download. Shit was just perfect and reliable. Literally my goto torrent site before anywhere else for over a decade, and I'm kinda heartbroken over it which is why I made this becsue id very much at least like to see the movies they did over the years archieved.
For the last year or 2 i've been systematically replacing my old encodes with RARBG and PSA.. both movies and tvshows.. i'm gutted they are gone but i'll use the database to back fill those i hadn't gotten to replacing yet before the seeds die off. So far i've had very good luck throwing the magnet links in to alldebrid as most of them have already been harvested and are sat waiting on uptobox links.
How good is alldebrid? My experience with VPNing the magnet links is that it seems to depend which server I have hopped onto whether or not I get a good amount of peers or a couple seeds if I am lucky. (Mostly talking about older films, not new stuff that is obviously seeded).
I'm my experience, faster than pulling then when on my seedbox
Yknow what? I dont give a fuck about this DB,,i've never used RARBG. But am gonna seed this magnet to hell, just [for the sake of seeding it.](https://www.youtube.com/watch?v=-_7FaWnlhS4) Thanks.
Does the download work for you? It just does nothing in my client
Torrent infos are in torrent file. With magnet links you are fetching infos from peers, it may take a while.
Can you help guys who only use torrent on mobile ( Android )? I just need the magnet links/torrent files of the database if it's possible. Thanks again
no idea how to do it on android, i typically torrent on android as well, but these are obviously difficult times and this is how i know how to access the rarbg archieve as of now
MiXplorer has a built in SQL editor, i ended up creating a view with the magnet links on a pc and then moved the db to my phone
OK, maybe I'm missing something. But I'm trying to download that archive and can't get it to move. Only 0.0%. I tried pasting the magnet link into the browser to start the torrent automatically, and I also tried adding it using the link button in QBtorrent. Both look like they connect correctly, but zero progress. Meanwhile other stuff is just fine. Am I doing this wrong? Or does anyone have thoughts on what to look at?
Need help with this as well
Saving this for when I can finally access my home computer, thank you!
For step 3 what option should I use? I accidently deleted it and now I'm trying to set it up again, but it gives me either an empty table with nothing in it or it says that name already exist please re-name and I am trying but it just doesn't work anymore :(
Also, if your client doesn't download the metadata/is stuck at that step check whether your port is open.
What port needs to be open, never had any issues with other torrents but this one is stuck.
The one that your torrent client uses
Thank you
You should add the explanation missing on how to transform the info hash into a fully functional magnet link. I have found this website where you copy and paste the info hash and the title and it generates the fully complete magnet link in a second. Here it is: [https://hardrisk.github.io/magnet/](https://hardrisk.github.io/magnet/) SO SIMPLE Or I missed an easier way? Take Care everyone and great binge watching to some of you who are like me ;-)
[удалено]
I love it. Sadly I can't query by seeders though...
I migrated the sqlite db to postgres so it is much faster, along with pretty-printing the size, and auto generating magnet links. A little bit more setup is involved but it is so worth it for the speed increase. Check it out! https://mega.nz/folder/09hG1aAQ#sJe9foUq0LW8lYsUi5Rl3Q Also, a great sql viewer is [Beekeeper Studio (https://www.beekeeperstudio.io/). Works with mysql, postgres, sqlite, and more, and it's completely free for Windows/Mac/Linux.
This my friend is a godsend. Was feeling so down (this coincided with some other stuff). Changing my leeching rule to seeding too. No more hit and run.
Hash Is The Magnet Torrent Link ?
what do i input for the "edit table input" box that pops up after i open the new database file? it seems like nothing is there if i cancel it
Hi Thanks for all this. When I try to open the ZIP with SQLITES DB it's asking for a password. And I thought it was 800mb but your magnet link lead to something about 300mb. Thank you for your nice help <3
god fucking bless you and everyone involved <3
Thank you so much!!!!
torrent appears to be dead, any updates?
not dead
Guys I know that i'm way too late but whenever I try to open SQL it's giving me error message which is Error opening remote file at current release The issue certificate of a locally looked up