2011-04-20, 16:04
Does anyone have any objections with me changing the naming scheme?
When the files were in a directory it made sense for there to be a standard naming scheme (though it wasn't properly thought out in any case) of seriesname-thetvdbid.png, seriesname-thetvdbid-2.png, seriesname-thetvdbid-3.png etc, however, this has caused some issues.
Specifically I believe when deleting items such as -2.png and -3.png needing to be renamed to -2.png, there have been cases where it has caused wrong files to be renamed and some lost, something that is easily preventable with my suggestion below.
As we have an API needing to have a consistant naming scheme is irrelevant, especially as the logo is going to be renamed after it is downloaded anyway.
Currently when a logo is uploaded pending approval it is named uniqueid.png (something like 4d03f90e88937.png) then when it is approved it is renamed.
What I would like to do is on the initial upload name it seriesname-uniquid.png so bones-4d03f90e88937.png, then keep this name when it is approved, this would mean that we wouldn't need to rename files when others are deleted etc. and would make the whole system more robust.
*edit*
This wouldn't affect current images, they would keep their current names, it would just be new images.
When the files were in a directory it made sense for there to be a standard naming scheme (though it wasn't properly thought out in any case) of seriesname-thetvdbid.png, seriesname-thetvdbid-2.png, seriesname-thetvdbid-3.png etc, however, this has caused some issues.
Specifically I believe when deleting items such as -2.png and -3.png needing to be renamed to -2.png, there have been cases where it has caused wrong files to be renamed and some lost, something that is easily preventable with my suggestion below.
As we have an API needing to have a consistant naming scheme is irrelevant, especially as the logo is going to be renamed after it is downloaded anyway.
Currently when a logo is uploaded pending approval it is named uniqueid.png (something like 4d03f90e88937.png) then when it is approved it is renamed.
What I would like to do is on the initial upload name it seriesname-uniquid.png so bones-4d03f90e88937.png, then keep this name when it is approved, this would mean that we wouldn't need to rename files when others are deleted etc. and would make the whole system more robust.
*edit*
This wouldn't affect current images, they would keep their current names, it would just be new images.