2017-05-31 04:21:57 +02:00
# Default Configuration file for NyaaPantsu
# PLEASE, do NOT change default_config.yml, create your own config.yml
# Host of server
host : localhost
2017-05-31 12:20:06 +02:00
# Version of the app
2017-09-03 06:55:48 +02:00
version : "1.1.0"
2017-05-31 04:21:57 +02:00
# port of server
port : 9999
# database type
db_type : sqlite3
# DBParams will be directly passed to Gorm, and its internal structure depends on the dialect for each db type
db_params : ./nyaa.db?cache_size=50
# logmode for database
db_logmode : default
# Environment should be one of: DEVELOPMENT, TEST, PRODUCTION
environment : DEVELOPMENT
# AuthTokenExpirationDay : Number of Days for token expiration when logged in
auth_token_expiration : 1000
# EnableSecureCSRF : Enable CSRF https mode : True if website support https, false otherwise (eg. testing locally: false)
enable_secure_csrf : true
2017-06-22 02:21:51 +02:00
description_length : 10000
comment_length : 2000
2017-06-03 03:45:24 +02:00
# the default config for web addresses
web_address :
# Nyaa : Origin of the website
nyaa : https://nyaa.pantsu.cat
# Sukebei : Origin of the sukebei website
sukebei : https://sukebei.pantsu.cat
# Status : Origin of the status website
status : https://status.pantsu.cat
2017-06-01 15:10:00 +02:00
# the default config for session cookies
cookies :
# DomainName : The host domain so the cookies can be shared across subdomains
domain_name : pantsu.cat
# MaxAge : The expiration time of sessions cookies in seconds (default: 7 days)
max_age : 604800
# HashKey : 64 byte key used to authenticate cookies using HMAC. Leave blank for a random key after each restart.
hash_key :
# EncryptionKey : 32 byte key used to encrypt values. Leave blank for a random key after each restart.
encryption_key :
2017-05-31 04:21:57 +02:00
# the default config for bittorrent scraping
scraper :
addr : : 9999
workers : 4
interval : 3600
trackers :
- {url : "udp://tracker.coppersurfer.tk:6969/" , name : coppersurfer.tk}
2017-10-28 18:28:59 +02:00
# StatScrapingFrequency : On-demand stat scraping JS will only be loaded if the stats have been scraped X hours ago or higher
stat_scraping_frequency : 48
# StatScrapingFrequencyUnknown : On-demand stat scraping for unknown torrents JS will only be loaded if the stats have been scraped X hours ago or higher
stat_scraping_frequency_unknown : 1
# MaxStatScrapingFrequency : On-demand stat scraping can only be called every X minutes, to prevent abuse of the /stats/:id route
max_stat_scraping_frequency : 5
# MaxStatScrapingFrequencyUnknown : On-demand stat scraping for unknown torrents can only be called every X minutes
max_stat_scraping_frequency_unknown : 2
Upload to nyaa.si, anidex & TokyoTosho [done] (#1633)
* Update upload.go
* Update helpers.go
* Update template_test.go
* Update upload_multiple.jet.html
* change variable names
* wrong copypaste
* change variable name
* ditto
* Fix travis
* Update main.css
* Update upload.go
* Update upload.jet.html
* Update main.css
* Update upload.go
* More compact form
* CSS changes to go along
* Update main.css
* Update upload.jet.html
* Slightly lower bottom margin
* Update upload_multiple.jet.html
* tomorrow color adjustements
* small css adjustements
* Update upload.go
* Update default_config.yml
* Update default_config.yml
* Update structs.go
* Update user.go
* Update structs.go
* Update upload.go
* Update default_config.yml
* Update upload_multiple.jet.html
* Update upload.go
* Update upload.jet.html
* Update template_test.go
* this one is optional for anidex
* Update default_config.yml
* Possible improvement
As mentionned in my comment, it seems that having a checkbox already checked and disabled for logged in user + having the input text for apikey is a bit tedious.
Moreover, asking to check and fill the input text to upload in anidex when you are not logged is doing things twice. If you don't want to upload to anidex, don't fill the input.
So this commit push a new behaviour:
* If you are logged in and you have filled your anidex/nyaasi api key : the form should only show the checkbox asking if you want to upload to nyaasi.
* If you're not logged in or you don't have filled your api key in your profile settings: you only show the input text for the api key and not the checkbox. If someone wants to upload to nyaasi/anidex, he will just need to fill the input.
* This adds back the support of anonymous upload when logged in or not.
This works simply by checking if the user wants to upload as anon (when he checks the checkbox "upload as anonymous") or by checking the emptyness of apikey.
+ reverts the condition statements since it was needed to have apikey empty
* Forgot to save this file
* This commit adds the go routines for each upload service (anidex, nyaasi, tosho).
New controller and url to check the upload status (/upload/status/:id).
If you add ?json at the end, it outputs a json format of the multi upload status.
To prevent memory overload, we only keep in memory the multiupload status for 5 minutes.
Moved multipleform struct from templates to upload utils.
* fix form display on classic theme
* This commit adds:
* Javascript refreshing of the upload status
* Localization of the pages
* Fixed some bugs
This works, only need to get torrent file now.
* Added a new function to get the Path to the torrent file.
* Added a function to check that a torrent file exists and if not generate it on multiupload
* Enabled file upload through http post request to anidex
* Fixed bugs
* Modified the behaviour to generate torrent preivously. It is a synchrone function now. So we need to make it asynchronous in download.go
Now torrents file are always generated at upload time in a background processus with the correct trackers (needed ones + the ones provided by the user).
I made the anidex tracker as a needed one to allow multiupload even if the user hasn't included in his torrent file/magnet url.
* Moving deadtrackers list to default config
Support torrent file creation when upload without scraping
* Fix possible bug where no one is seeding a torrent yet (first time upload)
Add primary tracker in torrent file
* Fixing issue with boolean pointer for private torrent
* fixing index out of range for announcelist filtering
Fixing anidex tracker not found
* Fixing lang id error
* Anidex upload works
* Fix for multiupload with magnet
* This adds TokyoTosho support. Since TokyoTosho API only support upload by URL (and not torrent file upload). We need to make the download url available without ddos protection.
Also TokyoTosho doesn't need a category select. Since it does have limited option, we can automatically convert our categories to the tokyotosho one.
* Removing the folder tosho and put categories.go directly in upload package.
Added category conversion for nyaasi too.
Added tests on category conversion.
* This should add nyaasi support.
Is not tested though.
* Updated defaut config with new nyaa.si behaviour?
* Forgot to commit this file
2018-01-03 09:21:07 +01:00
# Default config for upload
upload :
# The following token/accounts are used when an user wants to upload to another website
# but doesn't have his own API token.
anidex_api_token :
# TokyoTosho : Be aware that file upload doesn't work with the host (only url upload)
# so you need to enable users to download without ddos protection
tokyot_api_token :
# Nyaa.Si : we need a username and a password for the account upload, please use a difficult one!
nyaasi_username :
nyaasi_password :
# UploadsDisabled : Disable uploads for everyone except below
uploads_disabled : false
# AdminsAreStillAllowedTo : Enable admin torrent upload even if UploadsDisabled is true
admins_are_still_allowed_to : true
# TrustedUsersAreStillAllowedTo : Enable trusted users torrent upload even if UploadsDisabled is true
trusted_users_are_still_allowed_to : true
2017-05-31 04:21:57 +02:00
# Config by default for the cache
cache :
dialect : nop
# Size by default for the cache
size : 1024
search :
2017-07-28 05:46:40 +02:00
enable_es : true
2017-06-01 00:38:29 +02:00
# default search analyzer for ES
es_analyze : nyaapantsu_search_analyzer
2017-05-31 04:21:57 +02:00
# default search index for ES
es_index : nyaapantsu
# Name of the type in the es mapping
es_type : torrents
# Default configuration for i2p
#i2p:
# name:
# addr:
# keyfile:
# Default configuration for metainfofetcher
metainfo_fetcher :
queue_size : 10
timeout : 120
max_days : 90
base_fail_cooldown : 1800
max_fail_cooldown : 172800
wake_up_interval : 300
2017-06-02 12:03:23 +02:00
# limits are in KiB, zero means no limit
upload_rate_limit : 1024
download_rate_limit : 1024
2017-05-31 04:21:57 +02:00
fetch_new_torrents_only : true
i18n :
# Default configuration for translation directory
directory : translations
# Default configuration for language
default_language : en-us
torrents :
# TorrentStatus : Config of different status id for torrents
status : [ true , true , true , true , true , true ]
# TorrentSukebeiCategories : Config for Sukebei categories
sukebei_categories : {"1_": "art", "1_1": "art_anime", "1_2": "art_doujinshi", "1_3": "art_games", "1_4": "art_manga", "1_5": "art_pictures", "2_": "real_life", "2_1": "real_life_photobooks_and_pictures", "2_2": "real_life_videos" }
# TorrentCleanCategories : Config for Site categories
clean_categories : {"3_": "anime", "3_12": "anime_amv", "3_5": "anime_english_translated", "3_13": "anime_non_english_translated", "3_6": "anime_raw", "2_": "audio", "2_3": "audio_lossless", "2_4": "audio_lossy", "4_": "literature", "4_7": "literature_english_translated", "4_8": "literature_raw", "4_14": "literature_non_english_translated", "5_": "live_action", "5_9": "live_action_english_translated", "5_10": "live_action_idol_pv", "5_18": "live_action_non_english_translated", "5_11": "live_action_raw", "6_": "pictures", "6_15": "pictures_graphics", "6_16": "pictures_photos", "1_": "software", "1_1": "software_applications", "1_2": "software_games" }
2017-06-12 01:14:26 +02:00
# EnglishOnlyCategories : Which categories will only accept English torrents
english_only_categories : [ "3_5" , "4_7" , "5_9" ]
# NonEnglishOnlyCategories : Which categories will only accept non-English torrents
non_english_only_categories : [ "3_13" , "4_14" , "5_18" ]
# AdditionalLanguages : Which languages are available for selection when uploading a torrent, aside from
# the ones we have translations.
additional_languages : [ "es-mx" ]
2017-05-31 04:21:57 +02:00
# TorrentFileStorage : Path to default torrent storage location (eg /var/www/wherever/you/want)
Torrent Generation on not found error (#1600)
* [WIP] Torrent Generation on not found error
As asked in #1517, it allows on-the-fly torrent generation. Since it uses magnet links, it needs some time to connect to peers. So it can't be instant generation, we need the user to wait and try after a minute at least.
* Replace Fatal by simple error
* attempt at fixing travis
* del
* Add Anacrolyx dependency
* Add back difflib
* Remove .torrent suffix in the url example
* Add some explanations when file missing page shown
* Ignore downloads directory
* Either use cache (third-party site) or own download directory
* Wrong import
* If there is an error then it means we aren't generating a torrent file
May it be "torrent not found" or "We do not store torrent files" which are the two only existing errors for this page
* hash is never empty
* TorrentLink may be empty at times
So we add a /download/:hash link if it is
* Update README.md
* Made a mistake here, need to check if false
* Update en-us.all.json
* Update CHANGELOG.md
* Torrent file generation can be triggered by click on button if JS enabled
* Update download.go
* Update download.go
* Use c.JSON instead of text/template
* Return to default behavior if we don't generate the file
* Don't do the query if returned to default behavior
* Add "Could not generate torrent file" error
* Fix JS condition & lower delay until button updates
* Start download automatically once torrent file is generated
* Fix torrentFileExists() constantly returning false if external torrent download URL
* torrent-view-data is two tables instead of one
This allows the removal of useless things without any problem (e.g Website link), but also a better responsibe design since the previous one separated stats after a certain res looking very wonky
* CSS changes to go along
* Remove useless <b></b>
* Update main.css
* In torrentFileExists, check if filestorage path exists instead of looking at the domain in torrent link
When checking if the file is stored on another server i used to simply check if the domain name was inside the torrent link, but we can straight up check for filestorage length
* Fix JS of on-demand stat fetching
* ScrapeAge variable accessible through view.jet.html
Contains last scraped time in hours, is at -1 is torrent has never been scraped
Stats will get updated if it's either at -1 or above 1460 (2 months old)
* Refresh stats if older than two months OR unknown and older than 24h
Show last scraped date even if stats are unknown
* Add StatsObsolete variable to torrent
Indicating if:
- They can be shown
- They need to be updated
* Update scraped data even if Unknown, prevent users from trying to fetch stats every seconds
* Torrent file stored locally by default
* no need to do all of that if no filestorage
* fix filestorage path
* Fix torrent download button stuck on "Generating torrent file" at rare times
* fix some css rules that didn't work on IE
* Fix panic error
Seems like this error is a known bug from anacrolyx torrent https://github.com/anacrolix/torrent/issues/83
To prevent it, I'm creating a single client and modifying the socket.go to make it not raise a panic but a simple error log.
2017-10-21 09:40:43 +02:00
torrents :
2017-11-08 09:32:06 +01:00
# GenerationClientPort : Port used by the torrent client created during torrent generation
generation_client_port : 50006
# FileStorage : Location of folder that will contain generated torrent files
Torrent Generation on not found error (#1600)
* [WIP] Torrent Generation on not found error
As asked in #1517, it allows on-the-fly torrent generation. Since it uses magnet links, it needs some time to connect to peers. So it can't be instant generation, we need the user to wait and try after a minute at least.
* Replace Fatal by simple error
* attempt at fixing travis
* del
* Add Anacrolyx dependency
* Add back difflib
* Remove .torrent suffix in the url example
* Add some explanations when file missing page shown
* Ignore downloads directory
* Either use cache (third-party site) or own download directory
* Wrong import
* If there is an error then it means we aren't generating a torrent file
May it be "torrent not found" or "We do not store torrent files" which are the two only existing errors for this page
* hash is never empty
* TorrentLink may be empty at times
So we add a /download/:hash link if it is
* Update README.md
* Made a mistake here, need to check if false
* Update en-us.all.json
* Update CHANGELOG.md
* Torrent file generation can be triggered by click on button if JS enabled
* Update download.go
* Update download.go
* Use c.JSON instead of text/template
* Return to default behavior if we don't generate the file
* Don't do the query if returned to default behavior
* Add "Could not generate torrent file" error
* Fix JS condition & lower delay until button updates
* Start download automatically once torrent file is generated
* Fix torrentFileExists() constantly returning false if external torrent download URL
* torrent-view-data is two tables instead of one
This allows the removal of useless things without any problem (e.g Website link), but also a better responsibe design since the previous one separated stats after a certain res looking very wonky
* CSS changes to go along
* Remove useless <b></b>
* Update main.css
* In torrentFileExists, check if filestorage path exists instead of looking at the domain in torrent link
When checking if the file is stored on another server i used to simply check if the domain name was inside the torrent link, but we can straight up check for filestorage length
* Fix JS of on-demand stat fetching
* ScrapeAge variable accessible through view.jet.html
Contains last scraped time in hours, is at -1 is torrent has never been scraped
Stats will get updated if it's either at -1 or above 1460 (2 months old)
* Refresh stats if older than two months OR unknown and older than 24h
Show last scraped date even if stats are unknown
* Add StatsObsolete variable to torrent
Indicating if:
- They can be shown
- They need to be updated
* Update scraped data even if Unknown, prevent users from trying to fetch stats every seconds
* Torrent file stored locally by default
* no need to do all of that if no filestorage
* fix filestorage path
* Fix torrent download button stuck on "Generating torrent file" at rare times
* fix some css rules that didn't work on IE
* Fix panic error
Seems like this error is a known bug from anacrolyx torrent https://github.com/anacrolix/torrent/issues/83
To prevent it, I'm creating a single client and modifying the socket.go to make it not raise a panic but a simple error log.
2017-10-21 09:40:43 +02:00
filestorage : ./downloads/
# TorrentStorageLink : Url of torrent file download location (eg https://your.site/somewhere/%s)
storage_link : /download/%s
2017-05-31 04:21:57 +02:00
# TorrentCacheLink : Url of torrent site cache
Torrent Generation on not found error (#1600)
* [WIP] Torrent Generation on not found error
As asked in #1517, it allows on-the-fly torrent generation. Since it uses magnet links, it needs some time to connect to peers. So it can't be instant generation, we need the user to wait and try after a minute at least.
* Replace Fatal by simple error
* attempt at fixing travis
* del
* Add Anacrolyx dependency
* Add back difflib
* Remove .torrent suffix in the url example
* Add some explanations when file missing page shown
* Ignore downloads directory
* Either use cache (third-party site) or own download directory
* Wrong import
* If there is an error then it means we aren't generating a torrent file
May it be "torrent not found" or "We do not store torrent files" which are the two only existing errors for this page
* hash is never empty
* TorrentLink may be empty at times
So we add a /download/:hash link if it is
* Update README.md
* Made a mistake here, need to check if false
* Update en-us.all.json
* Update CHANGELOG.md
* Torrent file generation can be triggered by click on button if JS enabled
* Update download.go
* Update download.go
* Use c.JSON instead of text/template
* Return to default behavior if we don't generate the file
* Don't do the query if returned to default behavior
* Add "Could not generate torrent file" error
* Fix JS condition & lower delay until button updates
* Start download automatically once torrent file is generated
* Fix torrentFileExists() constantly returning false if external torrent download URL
* torrent-view-data is two tables instead of one
This allows the removal of useless things without any problem (e.g Website link), but also a better responsibe design since the previous one separated stats after a certain res looking very wonky
* CSS changes to go along
* Remove useless <b></b>
* Update main.css
* In torrentFileExists, check if filestorage path exists instead of looking at the domain in torrent link
When checking if the file is stored on another server i used to simply check if the domain name was inside the torrent link, but we can straight up check for filestorage length
* Fix JS of on-demand stat fetching
* ScrapeAge variable accessible through view.jet.html
Contains last scraped time in hours, is at -1 is torrent has never been scraped
Stats will get updated if it's either at -1 or above 1460 (2 months old)
* Refresh stats if older than two months OR unknown and older than 24h
Show last scraped date even if stats are unknown
* Add StatsObsolete variable to torrent
Indicating if:
- They can be shown
- They need to be updated
* Update scraped data even if Unknown, prevent users from trying to fetch stats every seconds
* Torrent file stored locally by default
* no need to do all of that if no filestorage
* fix filestorage path
* Fix torrent download button stuck on "Generating torrent file" at rare times
* fix some css rules that didn't work on IE
* Fix panic error
Seems like this error is a known bug from anacrolyx torrent https://github.com/anacrolix/torrent/issues/83
To prevent it, I'm creating a single client and modifying the socket.go to make it not raise a panic but a simple error log.
2017-10-21 09:40:43 +02:00
cache_link : #http://anicache.com/torrent/%s.torrent
2017-05-31 04:21:57 +02:00
trackers :
# Trackers : Default trackers supported
default :
2017-08-28 03:14:53 +02:00
- udp://tracker.uw0.xyz:6969/announce
2017-05-31 04:21:57 +02:00
- udp://tracker.coppersurfer.tk:6969
- udp://tracker.zer0day.to:1337/announce
- udp://tracker.leechers-paradise.org:6969
- udp://explodie.org:6969
- udp://tracker.opentrackr.org:1337
- udp://tracker.internetwarriors.net:1337/announce
- http://mgtracker.org:6969/announce
- udp://ipv6.leechers-paradise.org:6969/announce
2017-08-03 15:07:48 +02:00
- http://nyaa.tracker.wf:7777/announce
- http://sukebei.tracker.wf:7777/announce
- http://tracker.anirena.com:80/announce
- http://anidex.moe:6969/announce
2017-05-31 04:21:57 +02:00
# NeededTrackers : Array indexes of Trackers for needed tracker in a torrent file
needed :
- 0
Upload to nyaa.si, anidex & TokyoTosho [done] (#1633)
* Update upload.go
* Update helpers.go
* Update template_test.go
* Update upload_multiple.jet.html
* change variable names
* wrong copypaste
* change variable name
* ditto
* Fix travis
* Update main.css
* Update upload.go
* Update upload.jet.html
* Update main.css
* Update upload.go
* More compact form
* CSS changes to go along
* Update main.css
* Update upload.jet.html
* Slightly lower bottom margin
* Update upload_multiple.jet.html
* tomorrow color adjustements
* small css adjustements
* Update upload.go
* Update default_config.yml
* Update default_config.yml
* Update structs.go
* Update user.go
* Update structs.go
* Update upload.go
* Update default_config.yml
* Update upload_multiple.jet.html
* Update upload.go
* Update upload.jet.html
* Update template_test.go
* this one is optional for anidex
* Update default_config.yml
* Possible improvement
As mentionned in my comment, it seems that having a checkbox already checked and disabled for logged in user + having the input text for apikey is a bit tedious.
Moreover, asking to check and fill the input text to upload in anidex when you are not logged is doing things twice. If you don't want to upload to anidex, don't fill the input.
So this commit push a new behaviour:
* If you are logged in and you have filled your anidex/nyaasi api key : the form should only show the checkbox asking if you want to upload to nyaasi.
* If you're not logged in or you don't have filled your api key in your profile settings: you only show the input text for the api key and not the checkbox. If someone wants to upload to nyaasi/anidex, he will just need to fill the input.
* This adds back the support of anonymous upload when logged in or not.
This works simply by checking if the user wants to upload as anon (when he checks the checkbox "upload as anonymous") or by checking the emptyness of apikey.
+ reverts the condition statements since it was needed to have apikey empty
* Forgot to save this file
* This commit adds the go routines for each upload service (anidex, nyaasi, tosho).
New controller and url to check the upload status (/upload/status/:id).
If you add ?json at the end, it outputs a json format of the multi upload status.
To prevent memory overload, we only keep in memory the multiupload status for 5 minutes.
Moved multipleform struct from templates to upload utils.
* fix form display on classic theme
* This commit adds:
* Javascript refreshing of the upload status
* Localization of the pages
* Fixed some bugs
This works, only need to get torrent file now.
* Added a new function to get the Path to the torrent file.
* Added a function to check that a torrent file exists and if not generate it on multiupload
* Enabled file upload through http post request to anidex
* Fixed bugs
* Modified the behaviour to generate torrent preivously. It is a synchrone function now. So we need to make it asynchronous in download.go
Now torrents file are always generated at upload time in a background processus with the correct trackers (needed ones + the ones provided by the user).
I made the anidex tracker as a needed one to allow multiupload even if the user hasn't included in his torrent file/magnet url.
* Moving deadtrackers list to default config
Support torrent file creation when upload without scraping
* Fix possible bug where no one is seeding a torrent yet (first time upload)
Add primary tracker in torrent file
* Fixing issue with boolean pointer for private torrent
* fixing index out of range for announcelist filtering
Fixing anidex tracker not found
* Fixing lang id error
* Anidex upload works
* Fix for multiupload with magnet
* This adds TokyoTosho support. Since TokyoTosho API only support upload by URL (and not torrent file upload). We need to make the download url available without ddos protection.
Also TokyoTosho doesn't need a category select. Since it does have limited option, we can automatically convert our categories to the tokyotosho one.
* Removing the folder tosho and put categories.go directly in upload package.
Added category conversion for nyaasi too.
Added tests on category conversion.
* This should add nyaasi support.
Is not tested though.
* Updated defaut config with new nyaa.si behaviour?
* Forgot to commit this file
2018-01-03 09:21:07 +01:00
- 12
dead :
- : //open.nyaatorrents.info:6544
- : //tracker.openbittorrent.com:80
- : //tracker.publicbt.com:80
- : //stats.anisource.net:2710
- : //exodus.desync.com
- : //open.demonii.com:1337
- : //tracker.istole.it:80
- : //tracker.ccc.de:80
- : //bt2.careland.com.cn:6969
- : //announce.torrentsmd.com:8080
- : //open.demonii.com:1337
- : //tracker.btcake.com
- : //tracker.prq.to
- : //bt.rghost.net
2017-05-31 04:21:57 +02:00
# TorrentOrder : Default sorting field for torrents
Tag Search + Tests + Search slight refactor [DONE] (#1342)
* Tag Search + Tests + Search slight refactor
First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.
Added new behaviour as discussed in #1334
* fix fallback to ES
* Added some comments to explain PG fallback + log err moved
* Refactored search
Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods
* 1rst Refactor of Tags (WTF already?!)
Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.
Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.
This behaviour depends on the callbackOnType function in tag/helpers.go
* fix for modtools :')
* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.
New Helper + New Changelog for translation string.
* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the link to the modal on torrent view.
More comments in the functions for tags
* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors
* Fix compile error + Tests Errors
* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings
TODO: test/fix adding tag on upload/edit
* Mini fix to display video quality
+ tags works/tested on modo edit
* Fix editing tags on modpanel
* Edit tags works
* Add translation string
* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd
* Fix Ajax tag Removal&Add
* Added form for descriptive tags
* Forgot to add the link between database and form for descriptive tags.
* Adding the increase/decrease pantsu for descriptive tags
* Fix #1370
* When you actually forgot to commit files after having forgotten commits
2017-08-22 03:48:10 +02:00
order : date
2017-05-31 04:21:57 +02:00
# TorrentSort : Default sorting order for torrents
sort : DESC
2017-07-28 20:43:22 +02:00
tags :
# Torrent Tag Max weight for automatic system approval
max_weight : 100.00
Tag Search + Tests + Search slight refactor [DONE] (#1342)
* Tag Search + Tests + Search slight refactor
First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.
Added new behaviour as discussed in #1334
* fix fallback to ES
* Added some comments to explain PG fallback + log err moved
* Refactored search
Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods
* 1rst Refactor of Tags (WTF already?!)
Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.
Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.
This behaviour depends on the callbackOnType function in tag/helpers.go
* fix for modtools :')
* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.
New Helper + New Changelog for translation string.
* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the link to the modal on torrent view.
More comments in the functions for tags
* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors
* Fix compile error + Tests Errors
* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings
TODO: test/fix adding tag on upload/edit
* Mini fix to display video quality
+ tags works/tested on modo edit
* Fix editing tags on modpanel
* Edit tags works
* Add translation string
* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd
* Fix Ajax tag Removal&Add
* Added form for descriptive tags
* Forgot to add the link between database and form for descriptive tags.
* Adding the increase/decrease pantsu for descriptive tags
* Fix #1370
* When you actually forgot to commit files after having forgotten commits
2017-08-22 03:48:10 +02:00
# Default tags that have no type, will be saved in AcceptedTags field
default : tags
2017-07-28 23:02:37 +02:00
# Array of tag types allowed for now
types :
Tag Search + Tests + Search slight refactor [DONE] (#1342)
* Tag Search + Tests + Search slight refactor
First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.
Added new behaviour as discussed in #1334
* fix fallback to ES
* Added some comments to explain PG fallback + log err moved
* Refactored search
Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods
* 1rst Refactor of Tags (WTF already?!)
Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.
Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.
This behaviour depends on the callbackOnType function in tag/helpers.go
* fix for modtools :')
* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.
New Helper + New Changelog for translation string.
* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the link to the modal on torrent view.
More comments in the functions for tags
* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors
* Fix compile error + Tests Errors
* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings
TODO: test/fix adding tag on upload/edit
* Mini fix to display video quality
+ tags works/tested on modo edit
* Fix editing tags on modpanel
* Edit tags works
* Add translation string
* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd
* Fix Ajax tag Removal&Add
* Added form for descriptive tags
* Forgot to add the link between database and form for descriptive tags.
* Adding the increase/decrease pantsu for descriptive tags
* Fix #1370
* When you actually forgot to commit files after having forgotten commits
2017-08-22 03:48:10 +02:00
- name : anidbid
field : AnidbID
defaults :
- db
- name : vndbid
field : VndbID
- name : dlsite
field : Dlsite
- name : vgmdbid
field : VgmdbID
- name : videoquality
field : VideoQuality
defaults :
- bluray
- full_hd
- hd
- sd
2017-05-31 04:21:57 +02:00
users :
default_notifications_settings : {"new_torrent": true, "new_torrent_email": false, "new_comment": true, "new_comment_email": false, "new_responses": false, "new_responses_email": false, "new_follower": false, "new_follower_email": false, "followed": false, "followed_email": false }
navigation :
torrents_per_page : 50
2017-11-09 02:53:38 +01:00
max_torrents_per_page : 500
2017-05-31 04:21:57 +02:00
log :
# AccessLogFilePath : Path to logs access
access_log_filepath : log/access
# AccessLogFileExtension : Extension for log file
access_log_fileextension : .txt
# AccessLogMaxSize : Size max for a log file in megabytes
access_log_max_size : 5
# AccessLogMaxBackups : Number of file for logs
access_log_max_backups : 7
# AccessLogMaxAge : Number of days that we keep logs
access_log_max_age : 30
# ErrorLogFilePath : Path to log errors
error_log_filepath : log/error
# ErrorLogFileExtension : Extension for log file
error_log_fileextension : .json
# ErrorLogMaxSize : Size max for a log file in megabytes
error_log_max_size : 10
# ErrorLogMaxBackups : Number of file for logs
error_log_max_backups : 7
# ErrorLogMaxAge : Number of days that we keep logs
error_log_max_age : 30
email :
# SendEmail : Enable Email
send_email : true
# EmailFrom : email address by default
from : donotrespond@nyaa.pantsu.cat
# EmailTestTo : when testing to who send email
test_to :
# EmailHost : Host of mail server
host : localhost
# EmailUsername : Username needed for the connection
username :
# EmailPassword : Password needed for the connection
password :
# EmailPort : Mail Server port
port : 465
# EmailTimeout : Timeout for waiting server response
timeout : 10000000000
models :
# LastOldTorrentID is the highest torrent ID that was copied from the original Nyaa
last_old_torrent_id : 923000
# TorrentsTableName : Name of torrent table in DB
torrents_table_name : torrents
# ReportsTableName : Name of torrent report table in DB
reports_table_name : torrent_reports
# CommentsTableName : Name of comments table in DB
comments_table_name : comments
# UploadsOldTableName : Name of uploads table in DB
uploads_old_table_name : user_uploads_old
# FilesTableName : Name of files table in DB
files_table_name : files
# NotificationTableName : Name of notifications table in DB
notifications_table_name : notifications
2017-06-16 01:13:09 +02:00
# ActivitiesTableName : Name of activities log table in DB
2017-06-15 04:44:46 +02:00
activities_table_name : activities
2017-06-16 01:13:09 +02:00
# NotificationTableName : Name of scrape table in DB
scrape_table_name : scrape
2017-09-22 06:54:19 +02:00
#Default themes
default_theme :
theme : g
dark : tomorrow
2017-10-07 01:39:38 +02:00
forced :
#Put a theme name in forced to force it for everyone