[BUG] Can't download on specific channel #37

Closed
opened 2020-09-16 01:29:11 +02:00 by afterdelight · 9 comments
afterdelight commented 2020-09-16 01:29:11 +02:00 (Migrated from github.com)

It can download on all channels I added except this one last channel. The channel probably has about 300 pics but the program keep looping and scanning until 100000++ and downloaded 0 file. Help?

It can download on all channels I added except this one last channel. The channel probably has about 300 pics but the program keep looping and scanning until 100000++ and downloaded 0 file. Help?
Serraniel commented 2020-09-16 20:16:33 +02:00 (Migrated from github.com)

Are there any special characters in the server- or channelname? Have you checked you have access to the content inside the channel?

Discord also lately did an update to hide URLs of message which only are an URL to an image for example. I actually don´t remember if "external" files also are downloaded. If not, this might be the reason for the observed behaviour.

I will do some testings with this the next days.

Are there any special characters in the server- or channelname? Have you checked you have access to the content inside the channel? Discord also lately did an update to hide URLs of message which only are an URL to an image for example. I actually don´t remember if "external" files also are downloaded. If not, this might be the reason for the observed behaviour. I will do some testings with this the next days.
afterdelight commented 2020-09-16 23:06:48 +02:00 (Migrated from github.com)

well the channel name is july-december-2020 and it was part of multiple channels, the other channels on the server are fine. They only post pictures links like https://abload.de/img/xxxxxxxxxxx.jpg.

well the channel name is july-december-2020 and it was part of multiple channels, the other channels on the server are fine. They only post pictures links like https://abload.de/img/xxxxxxxxxxx.jpg.
Serraniel commented 2020-09-17 08:59:41 +02:00 (Migrated from github.com)

I haven´t checked the code yet (may do this on the weekend) but I think the external media is the reason then, as I wrote in #14, that the tool only downloads real attachments and not embeds. This had been planned for the new major version which had been postponed.

If this is the case and it´s a quick change I may add this in a smaller minor update.

I haven´t checked the code yet (may do this on the weekend) but I think the external media is the reason then, as I wrote in #14, that the tool only downloads real attachments and not embeds. This had been planned for the new major version which had been postponed. If this is the case and it´s a quick change I may add this in a smaller minor update.
afterdelight commented 2020-09-18 02:47:08 +02:00 (Migrated from github.com)

Well, there are multiple channels on the same server exactly like the one I reported but the program worked fine and downloaded all the embedded images even the host is the same.

Well, there are multiple channels on the same server exactly like the one I reported but the program worked fine and downloaded all the embedded images even the host is the same.
Serraniel commented 2020-09-20 16:08:08 +02:00 (Migrated from github.com)

I now looked into the issue and can confirm the behaviour you observed. The reason for this is that Discord does not deliver those images as attachment but as embed. The tool currently ignores them as embeds are not only wanted to be downloaded.

However, there is issue #14, which will change this. As I have to release an update soon(tm) because of the new API URLs I may add a quick option for this, too, during the next week.
However, this probably only will refer to new messages and not past messages of a channel, which already had been scanned. A quickfix would be to delete the channel from the joblist and add it again then.

I now looked into the issue and can confirm the behaviour you observed. The reason for this is that Discord does not deliver those images as attachment but as embed. The tool currently ignores them as embeds are not only wanted to be downloaded. However, there is issue #14, which will change this. As I have to release an update soon(tm) because of the new API URLs I may add a quick option for this, too, during the next week. However, this probably only will refer to new messages and not past messages of a channel, which already had been scanned. A quickfix would be to delete the channel from the joblist and add it again then.
Serraniel commented 2020-09-20 16:08:23 +02:00 (Migrated from github.com)

Issue closed as duplicate of #14 .

Issue closed as duplicate of #14 .
afterdelight commented 2020-09-23 14:30:57 +02:00 (Migrated from github.com)

Yeah, but the tool download embed files just fine, only on this one specific channel has a weird behaviour, so i think its a bug not an incomplete feature.

Yeah, but the tool download embed files just fine, only on this one specific channel has a weird behaviour, so i think its a bug not an incomplete feature.
Serraniel commented 2020-09-24 20:05:30 +02:00 (Migrated from github.com)

There is a technical difference between an uploaded image to discord and a link to an image being posted. If you upload an image it is attached as an attachment to the message. If discord generates a preview image or showing the original image content as a preview, this becomes an embedded image. Just from looking at them, you cannot tell the difference, because discord started hiding the URL in those messages lately.

I tried this with imgur, abload and even images directly from discord cnd; as soon as they are posted as not an actual and real message attachment, they are not detected.

Looking at the code this makes sense as the tool, in current version simply just does not support them:

                // Job.cs starting at line 126
                foreach (var m in messages)
                {
                    // some validity checks and log output

                    if (m.Attachments.Count > 0)
                    {
                        result.Add(m);
                    }
                }

There is no code which checks if a message has an embed to add into the queue.

The documentation of the used discord API also mentions the difference between an attachment
image

and the rich embed and represents the way Discord handles them.
image

There is a technical difference between an uploaded image to discord and a link to an image being posted. If you upload an image it is attached as an attachment to the message. If discord generates a preview image or showing the original image content as a preview, this becomes an embedded image. Just from looking at them, you cannot tell the difference, because discord started hiding the URL in those messages lately. I tried this with imgur, abload and even images directly from discord cnd; as soon as they are posted as not an actual and real message attachment, they are not detected. Looking at the code this makes sense as the tool, in current version simply just does not support them: ```csharp // Job.cs starting at line 126 foreach (var m in messages) { // some validity checks and log output if (m.Attachments.Count > 0) { result.Add(m); } } ``` There is no code which checks if a message has an embed to add into the queue. The documentation of the used discord API also mentions the difference between an attachment ![image](https://user-images.githubusercontent.com/8461282/94182382-32947000-fea1-11ea-8341-8678dd2bcd70.png) and the rich embed and represents the way Discord handles them. ![image](https://user-images.githubusercontent.com/8461282/94182313-198bbf00-fea1-11ea-8118-6cff12e02f47.png)
afterdelight commented 2020-09-27 11:08:30 +02:00 (Migrated from github.com)

Ah okay then, waiting for the fix!

Ah okay then, waiting for the fix!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Serraniel/DiscordMediaLoader#37
No description provided.