iHelp101 / XInsta

137 stars 32 forks source link

Not a compatibility bug: Download filename settings are very buggy (userID missing, itemID?) #92

Open S-U-M-1 opened 5 years ago

S-U-M-1 commented 5 years ago

In the "File" section of the XInsta settings, I encountered a lot of bugs on v2.0.6 which were also present in v2.1.0.

My XInsta had for 3 years been saving files under the following filename format:

Note: this was not shown in the settings. I did not check this. I only know this from the filenames of downloads.

Today, I decided to explore these settings. When I entered the "Change File Format" window, for some reason it showed the following:

This was incorrect.

I also quickly found out that the X's next to each item did nothing. I couldn't remove nor add any formats, only reorder them.

I then tested downloading an Instagram file, and now, very strangely, the filenames were

I tried fixing this bug by going into "Change Date Format" and pressing "Day Month Year" (even though it was already selected, with a filled radio button). Initially, the files began saving as

but after I switched the settings to Month Day Year and back to Day Month Year, they saved with the correct Day Month Year instead.

I then went back into the "Change File Format" settings and suddenly the setting "ItemID" was replaced with the setting "Date".

The issue I have now is that I do not want a date if I cannot have the userID. I ideally wanted both the date and userID, but now I have no way of getting back the userID in the filename.

I tried multiple things after this to reset all settings to default:

Nothing worked, the settings remained the same throughout. I even went into my root folders looking for the prefs file and couldn't find it.

I really appreciate this app and have relied on it for nearly 4 years now. Thank you.

Phone: Samsung Galaxy S7 edge Android version: 6.0.1 XInsta versions: 2.0.6 (14 Jun 2018) and tested on 2.1.0 (11 Nov 2018) with same effects Instagram versions: 49.0.0.15.89 (21 Jun 2018) and tested on 69.0.0.30.95 (8 Nov 2018) with same effects

S-U-M-1 commented 5 years ago

@iHelp101 How do I get the userID back in the filenames of downloaded media?

iHelp101 commented 5 years ago

The preferences file for XInsta is under /storage/emulated/0/.Instagram/. The file in question is FileFormat.txt. You can edit the format manually or delete the file to be reverted to default. The specific file format I believe you want is Username_MediaID_UserID.

S-U-M-1 commented 5 years ago

The preferences file for XInsta is under /storage/emulated/0/.Instagram/. The file in question is FileFormat.txt. You can edit the format manually or delete the file to be reverted to default. The specific file format I believe you want is Username_MediaID_UserID.

Thank you so very much.

However, I noticed that there are parts of the code that tell XInsta to not fetch the userID if File.txt exists (the file where filename date formats are set). I can still only have either the userID with no date, or the date with no userID. I also still don't know what "ItemID" is.

Are you able to fix this so users can have any combination of formats in the filename, including profile picture filenames?

S-U-M-1 commented 5 years ago

I also noticed just now that having a FileFormat.txt file at all (i.e. going into the File Format settings for the first time and changing them, which creates the file) breaks multiple-photo downloads. It stops XInsta fetching the individual mediaIDs for each file (it seems to only fetch the mediaID of the first file), which results in only 1 file being able to be downloaded (since XInsta intelligently skips downloading a file if one with the same filename already exists).

iHelp101 commented 5 years ago

I am working on rewriting a lot of the code for multi downloads and file formats. I will provide you a test APK to evaluate when complete tonight.

iHelp101 commented 5 years ago

I got file formats setup to be more modular. I am having issues with the logic behind understanding the new modularity when saving files. I also am working on fetching all possible parameters for each type of post.

S-U-M-1 commented 5 years ago

Okay, appreciate it. I'll be ready to receive a test APK.

iHelp101 commented 5 years ago

Here is a test APK. In this version I made the file format options more modular. Item ID was deprecated by Instagram, so I removed this option. The file format now consist of username, media ID, user ID, and date. You can use all four if you would like or use the standard three (Username, media ID, and date). I did add a protection when saving if XInsta does not detect media ID or date in the file format for a multi-post that it will add the media ID to ensure all download.

Let me know if you have any issue with this APK.

https://drive.google.com/open?id=1GphjyH7nOKbHxsiBZDvGy5U49_sVPClx

S-U-M-1 commented 5 years ago

I tested the APK, and the following problems were found:

Other remarks:

iHelp101 commented 5 years ago

Thank you for the feedback. I just got home from a trip and working on your request.