My Anime plugin (2 Viewers)

Rhym

Portal Member
March 14, 2009
35
0
Home Country
Norway Norway
My thoughts exactly. Tanhgarth has made a copy of the tvseries plugin which can run simultaniously with the normal tv series plugin, but I can't get it to work unfortunately. Check that thread out. And regarding to thetvdb.com not being complete, it's out duty to fill it up :p
All my animes are listed and if I have added fanart for series which didn't have it yet.

Yes it's true, I've tried that plugin too. It's very much in a rough state, and doesn't really seem to be supported. Couldn't get it work either, same as many people including yourself :) I can see Tanhgarths plugin working though, as long as someone put effort into developing it. Even if the TV Series dev says the plugin can't support multiple instances, it obviously did work.

But like I mentioned, currently, TV series and thetvdb.com aren't really made for anime. Ex. Seasons aren't used by fansubbers but thedtvdb.com requires them and current import expressions are terrible for anime. The last one is is fixable though with some effort. And hopefully a workaround for the season dilemma can be found :)

*edit* Tanhgarth's plugin thread https://forum.team-mediaportal.com/my-tvseries-162/ability-run-multiple-instances-plugin-43271/ for those interested.
 

bert_r

Portal Pro
April 7, 2009
110
16
Home Country
Belgium Belgium
Hello lwerndly,

This is a great plugin! It is the main reason why I installed MediaPortal (instead of using Windows Media Center), because I have a huge anime collection.


The plugin works like a charm, although I noticed a few glitches:
- When no anime is selected on the main page (after returning from an anime page), 'Test' appears at the top (where normally the highlighted anime title comes)
- In the anime descriptions, some html code remains (mainly <br>'s)
- The number of new episodes per anime is only shown after you highlight it.
- When an episode is watched to the end, it isn't set as 'watched'.
- When closing an episode, the selection is lost. So if you where watching episode 73 you'll have to scroll down again from episode 1. (this may be caused by MP itself)

Apart from that, I have few small suggestions:
- Is it possible to read (and set) the 'watched' state from AniDB? Currently, nearly all my anime episodes are set as 'not watched' (and they all appear in the list with new episodes), even though they are marked as 'watched' in AniDB. And after watching an episode, it remains 'not watched' in AniDB.
- Is it possible to make the episode list 'loop'? So when you use the 'up' key on the first episode, you end up on the last one? This would help greatly when browsing animes with a large amount of episodes.
- Could you add something to show which animes are completed (no missing episodes)?


Like you see, most of these issues are little things, and none of them are essential. You did a very good job so far, for which I have to say :D!

One thing I'd like to know: are you planning to release the source code of this great piece of software? I am a programmer myself, and I could most likely fix most of these issues on my own. I would like to help out, so you wouldn't have to maintain this all alone.
 

lwerndly

Portal Pro
January 14, 2008
702
278
Home Country
Australia Australia
- The number of new episodes per anime is only shown after you highlight it.

This was done intentionally for performance reasons. Although it could be made optional for those who have better spec'ed PC's.

- When closing an episode, the selection is lost. So if you where watching episode 73 you'll have to scroll down again from episode 1. (this may be caused by MP itself)

Haven't noticed this one myself. Will need to take another look.

- Is it possible to read (and set) the 'watched' state from AniDB? Currently, nearly all my anime episodes are set as 'not watched' (and they all appear in the list with new episodes), even though they are marked as 'watched' in AniDB. And after watching an episode, it remains 'not watched' in AniDB.

I'm pretty sure this is NOT possible. While the AniDB UDP API allows me to set the watched state when I add an episode, it doesn't allow me to read back information (ie not downloading)

Is it possible to make the episode list 'loop'? So when you use the 'up' key on the first episode, you end up on the last one? This would help greatly when browsing animes with a large amount of episodes.

This is thing I hate most about the plugin, and I haven't been able to solve it.

Could you add something to show which animes are completed (no missing episodes)?

Will add this to the wish list. Should be fairly simple.

One thing I'd like to know: are you planning to release the source code of this great piece of software? I am a programmer myself, and I could most likely fix most of these issues on my own. I would like to help out, so you wouldn't have to maintain this all alone.

I have attached the source code for the current version.

However I am currently doing a version 2 of the plugin.
This is a complete re-write from the ground up (for the UI parts at least)
The current code base is a real mess, and it is very hard to do some of the things I want to do now.

The major changes I am concentrating on are
1. Interface to look something like TV Series
2. Use a meta data based interface rather than a folder/share based interface
3. Focus on allowing the user to edit/sort the data themselves
4. Use TvDB as an additional data source as well as fan art etc
5. Allow grouping of series
- e.g. Allow you to place everything Naruto under one major group, and then view by movies. specials, regular seasons etc

It is still early days on this, so feel free to fix any of the bugs in the existsing plugin.
Once I am ready to release I will also put the source code on google so it can be maintained properly by anyone.
 

bert_r

Portal Pro
April 7, 2009
110
16
Home Country
Belgium Belgium
Thank you for posting your source! I will see if I can fix/implement some of these issues.
Should I just release a version myself, or should I send the modifications to you, and let you handle it?

Some remarks regarding your answers:
- The number of new episodes per anime is only shown after you highlight it.

This was done intentionally for performance reasons. Although it could be made optional for those who have better spec'ed PC's.
Does this have such a large impact? Judging from what I can see in the sources you posted (thank you for that!), you are already caching the file statuses. So normally the performance hit would be very small (certainly after you have focused an item once, then the data should be definitely cached).


- Is it possible to read (and set) the 'watched' state from AniDB? Currently, nearly all my anime episodes are set as 'not watched' (and they all appear in the list with new episodes), even though they are marked as 'watched' in AniDB. And after watching an episode, it remains 'not watched' in AniDB.

I'm pretty sure this is NOT possible. While the AniDB UDP API allows me to set the watched state when I add an episode, it doesn't allow me to read back information (ie not downloading)
From reading the AniDB UPD API definition, I would think it's possible:
Code:
MYLIST: Retrieve Mylist Data 
Reply:  221 MYLIST {int4 lid}...{int4 viewdate}...
-> I believe that the viewdate will be 0 (or something else invalid) when you didn't view it.

Code:
MYLISTADD: Add file to mylist
...
Each command listed can have, in addition, a number of optional components to provide further MyList details. Append these as desired.
    ...
    * &viewed={boolean viewed}
    * &viewdate={int4 viewdate} 
    ...
edit=1 can be included to edit a mylist entry instead of creating a new one.
When editing, optional values that are not supplied retain their original value.
That is, they are not replaced with default or empty values. Only values supplied are updated.
-> So you would have to 'add' the file again, and only specify the {viewed} and {viewdate} parameters


One other thing: the 'Test' strings I can see sometimes is caused by the skinfiles: some default labels are '<label>Test</label>', so if you don't set a value in code you'll see 'Test'.
 

bert_r

Portal Pro
April 7, 2009
110
16
Home Country
Belgium Belgium
Sorry for the double-post ... but this post is a few hours after my last one, so I figure it'll be ok.

I have digged into the source code provided by lwerndly, and fixed a few of the issues I had:
  • CHANGED: (x New) is now displayed always if 'show unwatched episodes in series title' is enabled (not only after focusing) ... lwerndly fears it could cause performance problems, but I decided to try to change it for now and see how it goes with other users.
  • CHANGED: When opening an episode list, the first episode after the latest watched episode will be selected.
  • CHANGED: In a folder/episode list, when going up on the first item / down on the last, the focus will go to the last / first item respectively.
  • FIXED: When viewing an episode completely, it will now be marked as watched.

I won't upload the source code yet, I'll see how lwerndly wants to handle this. For now I'll only post the modified DLL.
Just extract the zip and copy the dll to the plugins folder. On my vista machine this is "C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows".
 

Attachments

  • AnimePlugin_dll_030.zip
    30.7 KB

lwerndly

Portal Pro
January 14, 2008
702
278
Home Country
Australia Australia
  • CHANGED: (x New) is now displayed always if 'show unwatched episodes in series title' is enabled (not only after focusing) ... lwerndly fears it could cause performance problems, but I decided to try to change it for now and see how it goes with other users.
  • CHANGED: When opening an episode list, the first episode after the latest watched episode will be selected.
  • CHANGED: In a folder/episode list, when going up on the first item / down on the last, the focus will go to the last / first item respectively.
  • FIXED: When viewing an episode completely, it will now be marked as watched.

I won't upload the source code yet, I'll see how lwerndly wants to handle this. For now I'll only post the modified DLL.
Just extract the zip and copy the dll to the plugins folder. On my vista machine this is "C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows".

Awesome work.

Regarding the AniDB API stuff, you're right. It should be possible now.
They have also added a few other things like getting the series description as well (I get this by scraping the web page at the moment)

Yeah the caching I do now is a bit inconsistent. Version 2 will be much easier to maintain.

Could you please send me the modified source and I'll merge it in.
I forgot that the source I sent you contained an alternate episode view which I was using to just test a view similar to the default TV Series. Probably better if I remove that for now.

Not sure what to do with source yet. As I said I am working on version 2. If people want to keep using version 1, I'll post that source on google as well.
Will be cool if other people can do bug fixes and add features as well.
 

bert_r

Portal Pro
April 7, 2009
110
16
Home Country
Belgium Belgium
Here is my modified source for 0.3.0. I wanted to send it with a private message, but apparently you can't attach a file to a private message. Note that I replaced the post-build events.

Could you post the merged sources? Then I can try to implement a few other things:
- show completed status (possibly a checkmark next to the series, or change the text color like a watched episode)
- set/get 'watched' status from AniDB (if it isn't too much work)
- possibly add 'completed series' and 'incomplete series' in main view
 

Attachments

  • AnimePlugin_source_030.zip
    30.7 KB

Skalp

Portal Member
April 9, 2009
13
0
Home Country
Canada Canada
Hi,

I've tested My Anime plugin (0.29 + 0.30) but it don't work... I don't know why:

Tested on 1.0.0 and 1.0.1
Tested with API on anidb.net for rename all series (it's ok)

In Plugin config :

AniDB Server : api.anidb.info
Server Port : 9000
Client Port: 45222 (open in Firewall/router - tested with other ports)
Username: my username

My List:

Add Files to My List : yes
Storage : HDD
Watcher: No

Forders: Anime - D:\Vidéos\Anime
Perform full scan on start : Yes

Network:
Submit/retrieve data from plugin web service : Yes


Display:

Use Filename and use folder name (tested with AniDB options)

Utilities : nothing

Open DB Manager: nothing
If i click on Series name: AnimDB, IE will open with a message : ERROR no aid given


Thank you for your help, because i dont understand anything... It is my last problem for my HTPC

Thank you for all,
 

bert_r

Portal Pro
April 7, 2009
110
16
Home Country
Belgium Belgium
Hello Skalp,

I'm not sure what problem you have ... Is it only this error in the DB Manager or is there more?
- Does this error in the DB Manager occur when you click on all animes? Or only certain animes?
- You said "Tested with API on anidb.net for rename all series (it's ok)". Do you mean that, in MediaPortal, the episodes are renamed (on screen) as expected? Are the other functions working (watched state, anime info, ...)?
- Have you checked if your files are added to your AniDB MyList?

lwerndly
On my own system, I never got the logging to work. I'm debugging by writing manually to a logfile.
Is there a special action required to enable logging? I set the logging in the MediaPortal options to 'Debug', but that doesn't have any effect.
 

lwerndly

Portal Pro
January 14, 2008
702
278
Home Country
Australia Australia
lwerndly
On my own system, I never got the logging to work. I'm debugging by writing manually to a logfile.
Is there a special action required to enable logging? I set the logging in the MediaPortal options to 'Debug', but that doesn't have any effect.

Nope, I didn't need to do anything.
The log file goes to the following location by default
..\Team MediaPortal\MediaPortal\log\MediaPortal.log

Also please check your PM's bert_r :)


Skalp...
Check that the files have been copied to the right location (Vista and XP are different)

ALL OS
C:\Program Files\Team MediaPortal\MediaPortal
\plugins\Windows\AnimePlugin.dll
\skin\Blue3wide\*.xml --> copy all these files to the wide screen version of your choice
\skin\Blue3\*.xml --> copy all these files to the normal screen version of your choice


Windows XP
C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\database\AnimeDatabaseV10.db3


Windows Vista
C:\Program Data\Team MediaPortal\MediaPortal\database\AnimeDatabaseV10.db3
 

Users who are viewing this thread

Top Bottom