Bruce, I’m not sure of the legalities so you’ll have to wait for someone else to respond.
And I do support vacation rentals, but there needs to be improvements and accountability, such as a 24 hours contact number given to residents of the building should their be problems (we had a lot of problems in our building). Not every issue is a police issue, such as drunken tourists vomiting in the elevator or littering the common areas. If you want to run a businesses in a residential building you have to be responsible for damage from that business and certainly clean up after your guests.
As for the issue of calling the police, apparently in Barcelona, if the police are called 3 times for nuisances in your apartment and they find that the complaints are valid, apparently lose access to your own apartment for a long time, but are still required to pay the bills. I’m not sure how this works. When several of our neighbors called the police at 4am after 3 days of non-stop parties in an apartment in our building, they came and evicted all 70 party-goers from the unit, got the owner’s name and said something about the rule of 3 complaints, but I really didn’t understand all of it.
Anyway, if I were going to do an AirBnB in Barcelona, I’d stay away from Barceloneta as I think residents there are going to cause problems for tourist rentals.
Regardless, good luck to you wherever you rent.