Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add one JSON File per id #42

Closed
wants to merge 3 commits into from
Closed

Add one JSON File per id #42

wants to merge 3 commits into from

Conversation

FansubDB
Copy link
Owner

  • 1 id from hummingbird_id
    • hummingbird because open API and this

@FansubDB
Copy link
Owner Author

New data struct:

  • winter.json
{
    "name": "name",
    "group": "group",
    "message": "",
    "lbl_tv": "TV",
    "lbl_ova": "OVA",
    "lbl_movie": "Movies",
    "tv": [{
        "name": "Active Raid: Kidou Kyoushuushitsu Dai-Hakkei",
        "hummingbird_id": "11456",
        "json": "11456.json",
        "leftover": "true"
    }]
}
  • a new file; in our case 11456.json locate in /:lang/:type (type is tv/movie/ova)
{
    "name": "Active Raid: Kidou Kyoushuushitsu Dai-Hakkei",
    "image": "http://cdn.myanimelist.net/images/anime/9/76669.jpg",
  "hummingbird_id": "11456",
    "group": [{
        "status": "simulcast",
        "detail": [{
            "name": "Crunchyroll"
        }]
    }]
}

@FansubDB
Copy link
Owner Author

@KasaiDot can you test it?

  1. Just download the zip of the PR and extract it on a PHP folder
  2. Change for example fr/2015/hiver.json by the first point above
  3. Create a file: fr/tv/11456.json and put the second point above
  4. load it on http://IP:PORT/fansubdb.github.io-leftovers/fr/2015/hiver.html and see it!
    Because "leftover": "true", color must be in purple.

@KasaiDot
Copy link
Contributor

okay, test it right now.

@KasaiDot
Copy link
Contributor

1° : "external/bootstrap.min.css" : add "https:" before "//" for compatibility with Linux "drag & drop"

@KasaiDot
Copy link
Contributor

Okay, don't work for me.
the file display nothing.
like the json's file was dead.

11456.json :

{
    "name": "Active Raid: Kidou Kyoushuushitsu Dai-Hakkei",
    "image": "http://cdn.myanimelist.net/images/anime/9/76669.jpg",
  "hummingbird_id": "11456",
    "group": [{
        "status": "simulcast",
        "detail": [{
            "name": "Crunchyroll"
        }]
    }]
}

hiver.json

{
    "name": "name",
    "group": "group",
    "message": "",
    "lbl_tv": "TV",
    "lbl_ova": "OVA",
    "lbl_movie": "Movies",
    "tv": [{
        "name": "Active Raid: Kidou Kyoushuushitsu Dai-Hakkei",
        "hummingbird_id": "11456",
        "json": "11456.json",
        "leftover": "true",
    }]
}

@FansubDB
Copy link
Owner Author

You can't drag'n'drop this project. You must to use a php server because:

  • Cross origin requests are only supported for protocol schemes, so the json file can't load
  • and because of bootstap, yes. But because the first point, I won't change "https:" before "//" for compatibility with Linux "drag & drop"

@FansubDB
Copy link
Owner Author

Here a zip version. But like I said, launch it with a php server.
fansubdb.github.io-leftover.zip

  • URL to test: http://youserverip/fansubdb.github.io-leftover/fr/2015/printemps.html
    and http://youserverip/fansubdb.github.io-leftover/fr/2015/hiver.html

Edit: I do a drag'n'drop version for this test purpose by using gist. Here the modified version.

@FansubDB FansubDB mentioned this pull request Jan 28, 2016
@KasaiDot
Copy link
Contributor

Will try with the new version, report it this night.

@KasaiDot
Copy link
Contributor

Okay, test finished.
but they are one "bug".

1° the color diplaying was ok (purple), i see it. (http://i.imgur.com/y5Xk2rj.png)
2° when you change "TV" by "Films" and re-change to "TV" the color won't diplay (http://i.imgur.com/8vl38te.png) [btw, the "groupe" won't diplay too]

@KasaiDot
Copy link
Contributor

Okay, i just found the bug

in the first load the json's files was loaded by the Gist from GitHub.
but for the second it's from the local.

Images : http://i.imgur.com/XN0Kk07.png & http://i.imgur.com/JkKcaGK.png

@KasaiDot
Copy link
Contributor

@FansubDB So your update works fine with me.
You can publish it.

@FansubDB
Copy link
Owner Author

FansubDB commented Feb 1, 2016

Not sure, but:

  • it can be a Chrome issue
  • it's because it's loaded from cache (so it's normal?)

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

dunno, did you want to check it?

@FansubDB
Copy link
Owner Author

FansubDB commented Feb 1, 2016

I can't reproduce this on my side with Firefox

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

so, i'll try with my side with FF 42.0 in Xubuntu 15.0
tell you the results right now.

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

For the moment FF seems support it (http://i.imgur.com/S81Vd9M.png)

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

but like Chrome too it bug when we change the "button" (http://i.imgur.com/lTGEDPb.png)

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

They are really a fck bug when we change (http://i.imgur.com/6mi9Uap.png)
Like Chrome too, the file load from gist in first and from local in second.

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

Okay, found where it bug from me (http://i.imgur.com/6NXXulZ.png) just correct the wrong path, and it's good.

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

testing the corrected version right now.

@FansubDB
Copy link
Owner Author

FansubDB commented Feb 1, 2016

Oh, it's when you click on one of the three buttons?

It's normal, they don't load the gist. I just change one URL, not all (you must to change here).
So it's only a bug for your special drag'n'drop version, not for the GitHub version ^^
Thanks

@KasaiDot
Copy link
Contributor

KasaiDot commented Feb 1, 2016

Okay, now it's works perfectly fine for me.
Just correct the things below:

1° (fansubdb.github.io-leftover/fr/2015/hiver.html)
Change

<script type='text/javascript'>
    readJsonFile('https://gist.githubusercontent.com/FansubDB/e529c7e9a8721e1c92d1/raw/b71ea2403ff80d02b34f3c8fca22a78ccf5a8e15/hiver.json', SEASON, 0);
</script>

by

<script type="text/javascript">
    readJsonFile("hiver.json",SEASON,0);
</script>

2° (fansubdb.github.io-leftover/fr/2015/hiver.json)
Change

"json": "11456.json",

by

"json": "../tv/11456.json",

with that changes, the coloring works perfectly.

@FansubDB FansubDB self-assigned this Feb 4, 2016
@FansubDB FansubDB added this to the v3.0 milestone Feb 23, 2016
@FansubDB
Copy link
Owner Author

2° (fansubdb.github.io-leftover/fr/2015/hiver.json)
Change "json": "11456.json", by "json": "../tv/11456.json"

why? The ../tv are automatically put with my script (readSerieFile('../' + url + '/' + array[i].json);)

@KasaiDot
Copy link
Contributor

The "../TV" was for the exemple witch i tested on my laptop.

@FansubDB
Copy link
Owner Author

ok :) thanks

@FansubDB FansubDB closed this Feb 23, 2016
@FansubDB FansubDB deleted the FansubDB-leftovers branch February 23, 2016 13:42
@FansubDB FansubDB mentioned this pull request Sep 28, 2017
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants