Thank you for your code and explanation! I ordered that same i2c module (3 pieces), now waiting for it and the display to arrive.
My code is a mess for a few reasons: I'm new to Python and new to all this (coding for GPIO on Pi) and when I'm working on something new, I'm not careful with code tidiness. I use try-and-see-what-happens method
After I finish with everything, I'll work on making the code more tidy.
So yes, I have a reused part of code; the same thing is for artist and title. direction, counter and framebuffer are arrays with 2 elements: 0 is for first line and 1 is for second line. counter is a position, yes, and direction is 0 for normal and 1 for back as you said. The code is absoluetly the same for both lines so I will explain on first one. First I check if artist name is longer than 16, if it is, then I check if currently a file is playing, or if the radio is playing, I check if radio scroll is enabled. Then I take a 16 charachters long part of the name, starting from position[0] till position[0] + 16 into framebuffer[0]. If direction[0] is 0, then we scroll forwards and first I check if I reached the end (artist_length - 16) and if I did, I change the direction. Otherwise I increase counter[0]. So, depending on the counter, in first pass it will take a part of the artist from 0-15, in the next pass 1-16, then 2-17 and so on.
If artist name length is exactly 16, then I took the whole name into framebuffer. And last, if it's smaller than 16, then I took the whole name and fit empty places with spaces. At the end, I print both framebuffers into first and second line repsectively, and let it sleep for a while (scrolling period).