lakafior / audioteka-abs

Audiobookshelf Custom Metadata Provider for Audioteka.com
GNU General Public License v3.0
3 stars 1 forks source link

Proposal of adding Czech Audioteka metadata support #3

Open rosejoystick opened 23 hours ago

rosejoystick commented 23 hours ago

Hi, first of all, thank you for your fantastic work on this tool for fetching metadata from Audioteka. It works great, and I truly appreciate your effort in supporting audiobook enthusiasts!

I was wondering if it would be possible to add support for the Czech version of Audioteka (https://audioteka.com/cz/). The structure and layout of the Czech site seem almost identical to the Polish one, differing primarily in language.

Adding this support would be incredibly beneficial for ABS users in the Czech Republic. I’d be happy to help in any way I can, whether by testing or providing examples of metadata from the Czech site.

Thank you for considering this request. Please let me know if you need any additional information or assistance!

Best regards, Jiří

lakafior commented 10 hours ago

Hi, thanks for yours idea, from what I see is doable, as you've mentioned structure of the site is the same. It's just different url and matching words (Długość/Délka, Głosy/Interpret etc.)

I'm thinking about pointing to Czech version in Audiobookshelf url to addon, so intead of locahlost:3001 it would be for example localhost:3001/cz, and main file would contain logic for Polish as well as Czech version. Other approach will be to create separate file with separate port to point Czech, like localhost:3002 It would be easier to deploy but I'm gonna try first option first, as I think it's more elegant, will keep minimal resources to run (single server insetad 2 separate ones), changing of the logic would apply to both languages and maybe will allow to add more languages in the future more easly.

I'll keep this ticket open and let you know after some test how it's going.

lakafior commented 6 hours ago

Hey @rosejoystick I've added support of Czech language. To run it you need to run docker-compose file with language variable set to cz:

So just stop and remove current container and re-run it with this compose.yml file:

---
services:
  audioteka-abs:
    image: lakafior/audioteka-abs
    container_name: audioteka-abs
    environment:
      - LANGUAGE=cz
    restart: unless-stopped
    ports:
      - "3001:3001"

It should get data from https://audioteka.com/cz/vyhledavani If you leave it without this line, default is polish.

I think it's best to keep backward compatibility (so Polish users don't need to update theirs compose file), and both languages are supported by one main file so it will be easier to maintain.

Can you check this and let me know if I get all the inputs right? :)