Closed tissole closed 1 year ago
It can be interesting although it solves a very specific problem. Perhaps it can be done in a more useful way for other cases.
Yeah, is not the most elegant solution :). I only mention it because I thought that Telegram can't be used with folders, but then I found these bots @FilesToCloudBot, @cloudy_files_bot, @foldersbot, @tenvsten_bot, @FilesToCloudBot. The implementation is rather crude but it can be done.
If folder structure can be replicated it could be very useful, for example for book collections, courses, and music collections. Now if all songs are organized in folders by artist and album name on PC, when uploaded to Telegram that order is lost, a user can't search by artist name doesn't know from which album the song is. Very cumbersome.
+1 to that!
Now if all songs are organized in folders by artist and album name on PC, when uploaded to Telegram that order is lost, a user can't search by artist name doesn't know from which album the song is.
At that time that batch of songs was untagged. Testing with a better source has given better results because of hachoir, but I also encounter problems with propper tagging.
I found an implementation that has resolved the issue with preserving folder structure while uploading. It works backward too, when users choose to download files from TG, uploaded with that specific program, the folder structure is remade, all files are put in their folder/subfolder structure. This is the project:
https://github.com/khrj/teledrive https://teledrive.khushrajrathod.com
Unfortunately, the program seems broken on Windows and the development has ended. The idea that makes it possible to maintain the folder hierarchy is to caption the files with path, like this
folder1/subfolder1/file1 folder1/subfolder1/file2 folder1/subfolder1/file...
folder1/subfolder2/file1 folder1/subfolder2/file2 ...
folder2/subfolder1/file1 folder2/subfolder1/file2 ... This structure, along with the file hashes is retained in a JSON file that is uploaded in Saved Messages. This file is updated when files are uploaded and based on hashes prevents duplicate files to be uploaded. It is also used when downloading to remake the folder structure.
Hope it helps!
The following caption variables are supported: https://github.com/Nekmo/telegram-upload/blob/issue-115/docs/caption_format.rst
Fixed in version v0.7.0. Thanks!
How do I imagine this enhancement? Let's say we have a folder called Photos 2020 and inside are subfolders named 1. January, 2. February, 3. March ...12. December. The app detects the name of the root folder (Photos 2020) and creates a text message with that name in the destination channel before starting uploading files.
Then go recursively and takes the name of the first subfolder and creates again a text message, then start uploading files from that folder (1. January), then creates a message with the name of the second subfolder (2. February) before uploading files from that folder, and so on till the last folder.
Now all the uploaded files have a logical structure that mimics the folder hierarchy. Photos 2020
Can this be done?