I've opened up the battery box of a string of fairy lights (like pictured at bottom) and found a resistor, plus what looks like a capacitor in series with the lights. Is this really a capacitor? If so, how does it work in a DC circuit like this?
simulate this circuit – Schematic created using CircuitLab
My aim is to convert these to run on 12v. Does this circuit look ok? How can I determine the right value for the current limiting resistor?