Commit Graph

9 Commits

Author SHA1 Message Date
aditya-K2
9b60cbc98e Moving utils.go to utils package 2021-12-13 01:35:40 +05:30
aditya-K2
75d5d13fbe Checking for the / at the back 2021-12-13 00:15:16 +05:30
aditya-K2
4d55f233d0 Better Way of Caching
Instead of Caching by maintaining a cache file as mentioned here https://github.com/aditya-K2/goMP/issues/14#issuecomment-989141798
We can directly check if the file exists if it exists then we can just
pass the path to it else we can copy the default image to the path of
the imagePath
2021-12-09 02:25:46 +05:30
aditya-K2
3195223e82 Added Functionality to Point path to default Img
Sometimes the image is not found and for those artist/albums there is no
way for pointing the image path to default image path so some helper
functions have been added so that we can point them to default Image.
2021-11-26 21:59:50 +05:30
aditya-K2
7da86291dc Replacing / with _ which lead to errors when creating image. 2021-11-25 20:08:51 +05:30
aditya-K2
1014981dcb Added Simple Helper Functions
Following Functions have been added :

    1. SetCacheDir : Sets the Cache Directory
    2. CHANGE AddToCache the image path is now the Cache Directory +
       image Path
2021-11-20 21:38:38 +05:30
aditya-K2
42832491d0 New Functions For the Caching Module
The Following New Functions have been added
    1. AddToCache Adds to the CACHE_LIST map
    2. GetFromCache Retrieves path from CACHE_LIST map
    3. Rename WriteToCache -> WriteCache()
    4. GenerateName now replaces spaces with underscores.
2021-11-20 20:27:05 +05:30
aditya-K2
dafb4b7199 RENAME functions for module 2021-11-13 14:47:26 +05:30
aditya-K2
459b6b2f02 Added Caching Module
The Caching Module Caches the images that have been extracted and for
persistence writes the images to a cache file.

In the cache file the data is stored by tab separated values

        `%s\t%s\t%s`

the cache is first loaded in the memory ( CACHE_LIST ) during the start of application
and then extracted images are added to the map CACHE_LIST which is
writtern to the cache file before exiting the program.
2021-11-13 14:37:07 +05:30