mirror of
https://github.com/rumanzo/bt2qbt.git
synced 2024-11-22 02:12:39 +01:00
fix torrent structures for unusual torrents coding
update go version better error printing yet another user notification
This commit is contained in:
parent
ee7cb09a2e
commit
e41bda56fe
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
gotag=1.21.4-bullseye
|
||||
gotag=1.21.5-bullseye
|
||||
|
||||
commit=$(shell git rev-parse HEAD)
|
||||
|
||||
|
@ -54,7 +54,8 @@ func main() {
|
||||
color.Green("It will be performed processing from directory %v to directory %v\n", opts.BitDir, opts.QBitDir)
|
||||
color.HiRed("Check that the qBittorrent is turned off and the directory %v and %v is backed up.\n",
|
||||
opts.QBitDir, opts.Categories)
|
||||
color.HiRed("Check that you previously disable option \"Append .!ut/.!bt to incomplete files\" in preferences of uTorrent/Bittorrent \n\n")
|
||||
color.HiRed("Check that you previously disable option \"Append .!ut/.!bt to incomplete files\" in preferences of uTorrent/Bittorrent \n")
|
||||
color.HiRed("Close uTorrent/Bittorrent and qBittorrent previously\n\n")
|
||||
fmt.Println("Press Enter to start")
|
||||
fmt.Scanln()
|
||||
log.Println("Started")
|
||||
|
@ -44,7 +44,7 @@ func HandleResumeItem(key string, transferStruct *TransferStructure, chans *Chan
|
||||
// struct for work with
|
||||
err = helpers.DecodeTorrentFile(transferStruct.TorrentFilePath, transferStruct.TorrentFile)
|
||||
if err != nil {
|
||||
chans.ErrChannel <- fmt.Sprintf("Can't decode torrent file %v for %v", transferStruct.TorrentFilePath, key)
|
||||
chans.ErrChannel <- fmt.Sprintf("Can't decode torrent file %v for torrent %v with error %v", transferStruct.TorrentFilePath, key, err)
|
||||
return err
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ func HandleResumeItem(key string, transferStruct *TransferStructure, chans *Chan
|
||||
if !strings.HasPrefix(key, "magnet:?") {
|
||||
err = helpers.DecodeTorrentFile(transferStruct.TorrentFilePath, &transferStruct.TorrentFileRaw)
|
||||
if err != nil {
|
||||
chans.ErrChannel <- fmt.Sprintf("Can't decode torrent file %v for %v", transferStruct.TorrentFilePath, key)
|
||||
chans.ErrChannel <- fmt.Sprintf("Can't decode torrent file %v for torrent %v with error %v", transferStruct.TorrentFilePath, key, err)
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
|
@ -4,7 +4,7 @@ type Torrent struct {
|
||||
Announce string `bencode:"announce"`
|
||||
Comment string `bencode:"comment"`
|
||||
CreatedBy string `bencode:"created by"`
|
||||
CreationDate int64 `bencode:"creation date"`
|
||||
CreationDate interface{} `bencode:"creation date"` // can't be string or int64
|
||||
Info *TorrentInfo `bencode:"info"`
|
||||
Publisher string `bencode:"publisher,omitempty"`
|
||||
PublisherUrl string `bencode:"publisher-url,omitempty"`
|
||||
|
Loading…
Reference in New Issue
Block a user