ShokoAnime / ShokoServer

Repository for Shoko Server.
http://shokoanime.com/shoko-server/
MIT License
390 stars 75 forks source link

Use Resource Links from AniDB #613

Closed da3dsoul closed 8 months ago

da3dsoul commented 7 years ago

The http definition example xml data

    <resources>
        <resource type="1">
            <externalentity>
                <identifier>19484</identifier>
            </externalentity>
        </resource>
        <resource type="2">
            <externalentity>
                <identifier>35320</identifier>
            </externalentity>
        </resource>
        <resource type="4">
            <externalentity>
                <url>http://ccsakura-official.com/</url>
            </externalentity>
        </resource>
        <resource type="9">
            <externalentity>
                <identifier>360276</identifier>
            </externalentity>
        </resource>
        <resource type="26">
            <externalentity>
                <identifier>watch?v=VySDRbfnev4</identifier>
            </externalentity>
        </resource>
    </resources>

Example of multiple links of the same kind (NSFW links)

    <resource type="4">
        <externalentity>
            <url>http://a1c.jp/~collabo/product/nukirev01.html</url>
        </externalentity>
        <externalentity>
            <url>http://a1c.jp/~collabo/product/nukirev02.html</url>
        </externalentity>
    </resource>
    <resource type="14">
        <externalentity>
            <identifier>11226</identifier>
            <identifier>v</identifier>
        </externalentity>
    </resource>

Types (incomplete)

Replace {id} with the info from the xml 1 -> ANN (http://www.animenewsnetwork.com/encyclopedia/anime.php?id={id}) 2 -> MAL (https://myanimelist.net/anime/{id}) 4 -> Official website ({id}) 6 -> wikipedia (https://en.wikipedia.org/wiki/{id}) 7 -> wikipedia.jp (https://ja.wikipedia.org/wiki/{urlencoded id}( 8 -> schedule (http://cal.syoboi.jp/tid/{id}/time) 9 -> Allcinema (http://www.allcinema.net/prog/show_c.php?num_c={id}) 10 -> anison (http://anison.info/data/program/{id}.html) 14 -> vndb (https://vndb.org/{id alpha}{id num}) 23 -> twitter (https://twitter.com/{id}) 26 -> trailer (https://www.youtube.com/{id}) 28 -> crunchyroll (http://www.crunchyroll.com/{id})

We already have all of this info saved, we need only parse it and use it.

ElementalCrisis commented 7 years ago

Can pull the favicon using both Google and DuckDuckGo.

https://www.google.com/s2/favicons?domain={site-name}.{extension} http://icons.duckduckgo.com/ip2/{site-name}.{extension}.ico

Google only returns a 16x16 version of the favicon while DuckDuckGo will return the highest resolution available.

https://www.google.com/s2/favicons?domain=shokoanime.com http://icons.duckduckgo.com/ip2/shokoanime.com.ico

ElementalCrisis commented 8 months ago

This is already planned and somewhat implemented in the Web UI