sim0n00ps / OF-DL

C# console app to download all of the media from Onlyfans accounts with DRM video downloading support
562 stars 54 forks source link

feat: Add the ability to define filename formats per creator #369

Closed ddirty830 closed 1 month ago

ddirty830 commented 1 month ago

I found I kept swapping filename formats depending on who the creator was. So I made these changes.

{
"PaidPostFileNameFormat": "{postedAt}.{filename}",
"PostFileNameFormat": "{postedAt}.{filename}",
"PaidMessageFileNameFormat": "{createdAt}.{filename}",
"MessageFileNameFormat": "{createdAt}.{filename}",
"CreatorConfigs": {
  "creatorUserName1": {
    "PaidPostFileNameFormat": "{postedAt}.{rawText}",
    "PostFileNameFormat": "{postedAt}.{rawText}",
    "PaidMessageFileNameFormat": "{postedAt}.{rawText}",
    "MessageFileNameFormat": "{postedAt}.{rawText}"
  },
  "creatorUserName2": {
    "PaidPostFileNameFormat": "{postedAt}.{rawText}",
    "PostFileNameFormat": "{postedAt}.{rawText}",
    "PaidMessageFileNameFormat": "{postedAt}.{rawText}",
    "MessageFileNameFormat": "{postedAt}.{rawText}"
  }
}

If a creator isn't in the CreatorConfigs, or that creator doesn't have a format defined, it'll fall back to the root format.

ddirty830 commented 1 month ago

Did a quick rebase to capture the latest changes from master.

ddirty830 commented 1 month ago

Some other changes I made:

melithine commented 1 month ago

I like this; I think it makes https://github.com/sim0n00ps/OF-DL/issues/341 moot, as I can just use this functionality to achieve the same goal.