File prio code added, API rewrite completed, some core features rewritten for clarity
This commit is contained in:
@@ -63,7 +63,7 @@ const inlineStyle = {
|
||||
showRSSFiles = (key) => {
|
||||
let RSSTorrentsRequest = {
|
||||
MessageType: "rssTorrentsRequest",
|
||||
Payload: [this.props.RSSList[key].RSSURL]
|
||||
Payload: {"RSSURL": this.props.RSSList[key].RSSURL}
|
||||
}
|
||||
ws.send(JSON.stringify(RSSTorrentsRequest))
|
||||
|
||||
|
@@ -108,7 +108,7 @@ const inlineStyle = {
|
||||
handleAddRSSFeed = () => {
|
||||
let RSSURLSubmit = {
|
||||
MessageType: "addRSSFeed",
|
||||
Payload: [this.state.textValue]
|
||||
Payload: {"RSSURL": this.state.textValue}
|
||||
}
|
||||
ws.send(JSON.stringify(RSSURLSubmit));
|
||||
let RSSRequest = {
|
||||
|
@@ -65,12 +65,12 @@ class RSSTorrentList extends React.Component {
|
||||
console.log("element", element)
|
||||
sendMagnetLinks.push(element.TorrentLink)
|
||||
})
|
||||
let magnetLinkSubmit = {
|
||||
let magnetLinkMessage = {
|
||||
MessageType: "magnetLinkSubmit",
|
||||
Payload: sendMagnetLinks,
|
||||
}
|
||||
console.log(JSON.stringify(magnetLinkSubmit))
|
||||
ws.send(JSON.stringify(magnetLinkSubmit))
|
||||
Payload: {"MagnetLinks": [sendMagnetLinks], "Label": "RSS"}
|
||||
}
|
||||
console.log(JSON.stringify(magnetLinkMessage))
|
||||
ws.send(JSON.stringify(magnetLinkMessage))
|
||||
}
|
||||
|
||||
componentWillReceiveProps () {
|
||||
|
@@ -66,13 +66,10 @@ export default class addTorrentFilePopup extends React.Component {
|
||||
reader.onloadend = () => {
|
||||
let base64data = reader.result;
|
||||
console.log("Base64", base64data)
|
||||
|
||||
|
||||
let torrentFileMessage = {
|
||||
MessageType: "torrentFileSubmit",
|
||||
MessageDetail: this.state.torrentFileName, //filename
|
||||
MessageDetailTwo: this.state.storageValue, //storage path
|
||||
MessageDetailThree: this.state.torrentLabel, //torrent label
|
||||
Payload: [base64data],
|
||||
Payload: {"FileData": base64data, "FileName": this.state.torrentFileName, "StorageValue": this.state.storageValue, "Label": this.state.torrentLabel}
|
||||
}
|
||||
console.log("Sending Torrent File: ", torrentFileMessage);
|
||||
ws.send(JSON.stringify(torrentFileMessage));
|
||||
|
@@ -54,9 +54,7 @@ export default class addTorrentPopup extends React.Component {
|
||||
console.log("MagnetLink", this.state.magnetLinkValue)
|
||||
let magnetLinkMessage = {
|
||||
MessageType: "magnetLinkSubmit",
|
||||
MessageDetail: this.state.storageValue, //storage location
|
||||
MessageDetailTwo: this.state.torrentLabel, //label
|
||||
Payload: [this.state.magnetLinkValue]
|
||||
Payload: {"MagnetLinks": [this.state.magnetLinkValue], "StorageValue": this.state.storageValue, "Label": this.state.torrentLabel}
|
||||
}
|
||||
console.log("Sending magnet link: ", magnetLinkMessage);
|
||||
ws.send(JSON.stringify(magnetLinkMessage));
|
||||
|
@@ -48,12 +48,11 @@ class ChangeStorageModal extends React.Component {
|
||||
|
||||
handleSubmit = () => {
|
||||
this.setState({ open: false });
|
||||
//let magnetLinkSubmit = this.state.textValue;
|
||||
let changeStorageMessage = {
|
||||
MessageType: "changeStorageValue",
|
||||
MessageDetail: this.state.storageValue, //new storage value
|
||||
Payload: this.props.selectionHashes, //the selection hashes
|
||||
Payload: {"ChangeStorageHashes": this.props.selectionHashes, "StorageValue": this.state.storageValue} //the selection hashes and new store value
|
||||
}
|
||||
|
||||
console.log("Sending new Storage Location: ", changeStorageMessage);
|
||||
ws.send(JSON.stringify(changeStorageMessage));
|
||||
this.setState({storageValue: ``})
|
||||
|
@@ -41,8 +41,7 @@ class DeleteTorrentModal extends React.Component {
|
||||
let selection = []
|
||||
let deleteTorrentHashes = {
|
||||
MessageType: "deleteTorrents",
|
||||
MessageDetail: "false", //delete with data
|
||||
Payload: this.props.selectionHashes
|
||||
Payload: {"TorrentHashes": this.props.selectionHashes, "WithData": false}
|
||||
}
|
||||
console.log("Deleting Torrents", deleteTorrentHashes)
|
||||
ws.send(JSON.stringify(deleteTorrentHashes))
|
||||
@@ -56,8 +55,7 @@ class DeleteTorrentModal extends React.Component {
|
||||
|
||||
let deleteTorrentHashes = {
|
||||
MessageType: "deleteTorrents",
|
||||
MessageDetail: "true", //delete with data
|
||||
Payload: this.props.selectionHashes,
|
||||
Payload: {"TorrentHashes": this.props.selectionHashes, "WithData": true}
|
||||
}
|
||||
console.log("Deleting Torrents and Data", deleteTorrentHashes)
|
||||
ws.send(JSON.stringify(deleteTorrentHashes))
|
||||
|
@@ -82,7 +82,7 @@ class IconButtons extends React.Component {
|
||||
console.log("Force starting Torrents", this.props.selectionHashes)
|
||||
let forceUploadTorrents = {
|
||||
MessageType: "forceUploadTorrents",
|
||||
Payload: this.props.selectionHashes,
|
||||
Payload: {"TorrentHashes": this.props.selectionHashes}
|
||||
}
|
||||
ws.send(JSON.stringify(forceUploadTorrents))
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class IconButtons extends React.Component {
|
||||
console.log("Starting Torrents", this.props.selectionHashes)
|
||||
let startTorrentHashes = {
|
||||
MessageType: "startTorrents",
|
||||
Payload: this.props.selectionHashes,
|
||||
Payload: {"TorrentHashes": this.props.selectionHashes}
|
||||
}
|
||||
//console.log("Peers tab information requested", peerListHashes)
|
||||
ws.send(JSON.stringify(startTorrentHashes))
|
||||
@@ -101,7 +101,7 @@ class IconButtons extends React.Component {
|
||||
stopTorrent = () => {
|
||||
let stopTorrentHashes = {
|
||||
MessageType: "stopTorrents",
|
||||
Payload: this.props.selectionHashes,
|
||||
Payload: {"TorrentHashes": this.props.selectionHashes}
|
||||
}
|
||||
console.log("Stopping Torrents", stopTorrentHashes)
|
||||
ws.send(JSON.stringify(stopTorrentHashes))
|
||||
|
Reference in New Issue
Block a user