return;
}
+ {
+ bool ok;
+ m_lid = fileReply->value(FileFlag::Lid).toInt(&ok);
+
+ if (!ok)
+ m_lid = 0;
+ }
+
+ if (m_lid && actionsQueue.removeAll(Adding))
+ {
+ updateStatus(Adding, Success);
+ AniDBUdpClient::Client::instance()->cancel(addReply);
+ }
+
QString name = fileReply->value(FileAnimeFlag::RomajiName).toString();
if (name.isEmpty())
name = fileReply->value(FileAnimeFlag::EnglishName).toString();
updateStatus(Adding, Failure);
return;
}
+
+ m_lid = addReply->lid();
+
updateStatus(Adding, Success);
+
+ if ((addReply->replyCode() == MYLIST_ENTRY_ADDED
+ || addReply->replyCode() == MYLIST_ENTRY_EDITED)
+ && actionsQueue.removeAll(SettingState))
+ updateStatus(SettingState, Success);
}
void File::finishMarking(bool success)
if (m_renameDelegate)
{
fileCommand.setAmask(m_renameDelegate->requiredAMask());
- fileCommand.setFmask(m_renameDelegate->requiredFMask());
+ fileCommand.setFmask(m_renameDelegate->requiredFMask() | FileFlag::Lid);
}
fileReply = clientInstance()->send(fileCommand);
return;
}
+ if (m_lid)
+ {
+ updateStatus(Adding, Success);
+ return;
+ }
+
if (addReply)
delete addReply;
}
MyListAddCommand markCommand;
- if (addReply->lid())
- markCommand = MyListAddCommand(addReply->lid());
+ if (m_lid)
+ markCommand = MyListAddCommand(m_lid);
else
markCommand = MyListAddCommand(m_ed2k, size(), true);
markCommand.setViewed(true);
}
MyListAddCommand setStateCommand;
- if (addReply && addReply->lid())
- setStateCommand = MyListAddCommand(addReply->lid());
+ if (m_lid)
+ setStateCommand = MyListAddCommand(m_lid);
else
setStateCommand = MyListAddCommand(m_ed2k, size(), true);
{
staticInit();
+ m_lid = 0;
+
m_size = 0;
hashResult = 0;