Kodi Community Forum

Full Version: Unnamed/Sports Center - Sports for Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
(2015-04-17, 19:11)mjccox Wrote: [ -> ]Glad to hear this is still under construction. Really looking forward to it!

One thing I would recommend for people watching their library through the add-on is being able to avoid spoilers somehow.

Another thing I was hoping for in the library is being able to use file names that are commonly used on download sites, or can be automatically renamed. For example "2015 NRL Round 06 Eels vs. Titans.ts". A program I use named DropIt can also add dates to filenames as it moves them for example 2015 NRL Round 06 Eels vs. Titans 13-04-15.ts

Maybe it's not possible but it's nice to set something to download or record then it's automatically in the library without having to manually add theSportsDb id. If that's not possible maybe another thing to think about is a renamer utility that works with the site to do it for you.

Might be getting ahead of myself just something to think about.

Cheers

Does it create a folder with the same name as well or just the file gets the name and is dropped on a common folder? If you can post the names of a lot of files of your collection it would help a lot. Having those not into different folders is not good at all as you can have different video files for different parts of a match/race.
Got back on track and 'finished' some boring stuff that needed to come first - the context menu:

Image

This is usefull for everything, since we can then ignore matches from livescores, calendar, etc
(2015-04-17, 19:16)enen92 Wrote: [ -> ]
(2015-04-17, 19:11)mjccox Wrote: [ -> ]Glad to hear this is still under construction. Really looking forward to it!

One thing I would recommend for people watching their library through the add-on is being able to avoid spoilers somehow.

Another thing I was hoping for in the library is being able to use file names that are commonly used on download sites, or can be automatically renamed. For example "2015 NRL Round 06 Eels vs. Titans.ts". A program I use named DropIt can also add dates to filenames as it moves them for example 2015 NRL Round 06 Eels vs. Titans 13-04-15.ts

Maybe it's not possible but it's nice to set something to download or record then it's automatically in the library without having to manually add theSportsDb id. If that's not possible maybe another thing to think about is a renamer utility that works with the site to do it for you.

Might be getting ahead of myself just something to think about.

Cheers

Does it create a folder with the same name as well or just the file gets the name and is dropped on a common folder? If you can post the names of a lot of files of your collection it would help a lot. Having those not into different folders is not good at all as you can have different video files for different parts of a match/race.

I tend to watch and delete a lot so not too many files in my library.

But DropIt monitors folders and renames files and moves them based upon conditions. It's easy to set it up with the GUI too... So if I record a game NPVR will record it to a folder I designate (in my case it's called /RECORDED/) and it places them in their own folder within /RECORDED/ based on the name of the show so an NRL game would be recorded as /RECORDED/NRL Rugby/NRL Rugby Eels vs. Bulldogs.ts

I have DropIt monitoring that /NRL Rugby/ folder for file starting with the word "NRL" and containing the word "vs"... So if those conditions are met it takes the file and removes the word "Rugby" adds the "year created" to the beginning (it can add the date created as well (which I thought could be useful for the addon) and renames it to the folder where my Kodi "Video Node" main menu option is pointed to.

So the new file would be renamed to /Footy/2015 NRL Eels vs. Bulldogs.ts All of the files in my library are named exactly like this but with different teams. I used to add the date to the end but didn't really need it so I stopped. Do you think having the Round ## would help the addon? Or maybe the Round ## would need to be part of the folder structure?

I also have my downloading of NRL automated so in uTorrent i have anything downloaded with the label "Footy" placed in the Footy folder and anything with the label "Footy/TV" in the Footy/TV folder which I use for panel or chat shows about Footy. Of course the downloading is done manually and I have to give each torrent it's label as well (super easy in uTorrent once it's set up. Since the newer versions of uTorrent labels have to be set up in the WebUI). Downloaded files go by the same template "2015 NRL Round 05 Eels vs. Tigers.mp4"

I'm more than fine with having a folder structure as well which would be especially good for people with big libraries. Is it possible to make the addon see the folder structure and use that to figure out what's what? Let me know what you think could work... I'm very willing to put in some work to get the set up right to get the file naming working. and automated would be just be awesome!

I'd be able to work with whatever you come up with.

Cheers!
I will keep a separated library for each sport so differenciating sports is not an issue - all sports must be in a different folder. I think that is fine because people usually only collect 1 or 2 sport, not all of them. I'll try to explain how I think we can do this, comments appreciated.

Then I was thinking in doing something like having 2 options, one for "all events on the same folder" (a) another for "each subfolder is an event"(b). This for each sport.
Then define a sort of priority:

1) if the folder (or file in (a)) has a tag like [thesportsdb:1234] then assume 1234 is the event ID and we are done. [NEGATIVE SQUARED LATIN CAPITAL LETTER B]finished![/B]
2) The next step is getting the season. Try to match 4digits/4digits or 2digits/2digits. If there's a match we know the season and move to 3) if not move to 10)
3) If we are here we know the season. The next step is finding the league. Try to find the league of the event checking against all available leagues for the sport we are looking for. If a league is found -> move to 4) if not move to 5)
4) If we are here we already know the league and the season so try to find the round by matching "roundX" or "round_x" or "round x " or "round-x" in which the world round can be any other translation like jornada (in PT) or similar in another language. If we found a round we move to 6) if not move to 7)
5) If we are here we don't know which league we are talking about. In this case we will try to grab the home and the away team by matching something like "(.+?) vs. (.+?)","(.+?) vs (.+?)", "(.+?) x (.+?)". If we can't get a result than the event won't be scrapped and the user is notified. If we can match the teams we'll try to search thesportsdb for both teams and grab the league each team belong. If they are the same we can than assume the event belongs to this league. In this case, we found the league and can then move to 3).
6) If we get here we know the season, league and round. Try to find a date string in the file/folder to complement the available information. Then search thesportsdb filtering the results for round and date or only round. If a match is found -> [NEGATIVE SQUARED LATIN CAPITAL LETTER B]finished![/B], if not move to 7)
7) If we are here we know the league and season but we don't know the round. We try first do to the same as 6 and try to find a date string. Then we do the same as 5) to try to match home and away teams. Then we search thesportsdb for events in the league we know, which features the home and away team and, if a date string is available, use this parameter to also filter the results. We are likely to find a match ([NEGATIVE SQUARED LATIN CAPITAL LETTER B]finished![/B]), or multiple matches (ask the user for the different results, let him decide and [NEGATIVE SQUARED LATIN CAPITAL LETTER B]finished![/B]) or we don't have matches and we report we couldn't grab the event.

10) if we are here we don't know the season but we know the league. So we go back to the procedure above and do some logic. Firsrt round. Then date. If round we know league and round -> match home and away teams. If home and away teams search thesportsdb for league,home/away teams, round, date. If not round match by round, league and away/home teams. If match -> [NEGATIVE SQUARED LATIN CAPITAL LETTER B]finished![/B], if multiple matches -> let the user decide and [NEGATIVE SQUARED LATIN CAPITAL LETTER B]finished![/B], if no match -> informe the user we couldn't do it.

@zag please have a look at my requests at thesportsdb forum
Still reading this ... but right away I'm impressed.

Having the SportsDb ID within the sport's folder is a great idea. Add it once to the folder and done. My personal preference would be to switch the order to have the Season/Year contained within the League folder. E:/Sports/Sport/League/Season/filewithdate.mp4

Does each league in the SportsDb have ID's as well? if so could the same thing be done for the league? For example E:/Sports/Rugby LeagueConfusedportsdbid/NRLConfusedportsdbid/2015/2015 NRL Eels vs. Bulldogs 04-04-15.mp4
(2015-04-18, 18:33)mjccox Wrote: [ -> ]Still reading this ... but right away I'm impressed.

Having the SportsDb ID within the sport's folder is a great idea. Add it once to the folder and done. My personal preference would be to switch the order to have the Season/Year contained within the League folder. E:/Sports/Sport/League/Season/filewithdate.mp4

Does each league in the SportsDb have ID's as well? if so could the same thing be done for the league? For example E:/Sports/Rugby LeagueConfusedportsdbid/NRLConfusedportsdbid/2015/2015 NRL Eels vs. Bulldogs 04-04-15.mp4

Yeap, I need to code it like the post above in which each step can be independent from each other. For instance:

get_league(filename or foldername)
get_homeandawayteams(filename)
get_league(filename)

Then having the media organized as you specify above is just another option of scrapping but won't overcomplicate the code. It's basically just another algoritm but using the exact same functions. Just in a different order.

I'll start building the library after finishing some stuff in the calendar and livescores (waiting for zag here), fix some bugs in the next events listing (it's taking too long and making unecessary requests) and also work on time/timezones/time manipulation.

Probably if zag doesn't fix the issus for calendar and livescores soon and I'm able to fix the bugs above I'll tackle it earlier. First step is creating a database and being able to transform a dictionary to a database row and the opposite. So we can use script.module.thesportsdb as we do with the api json requests right now but using the database as a source.
You're a champ Enen! Great ideas getting this library thing working with this awesome addon!
(2015-04-07, 18:30)Ovokx Wrote: [ -> ]Hi enen92, any chance to change the languaje of the info displayed?

Sorry for the delay. It should be available by now (github only):

https://github.com/enen92/script.sportsc...52ed5d0313

Image
Image

The language on the menus/addon buttons I will only apply when things are close to finished. Then I'll do them all straightaway. For now they are hardcoded strings.
If es is not available fallback is done to en.

Saludos
great, thank you!
(2015-04-19, 03:04)mjccox Wrote: [ -> ]Great ideas getting this library thing working with this awesome addon!

I have already finished most of the stuff that was pending (still some not at 100% as it needs some changes no the database by zag):

https://github.com/enen92/script.sportsc...its/master

I am starting the library thing today

In the meanwhile pushed an update to the gcode repository (version 0.0.20 of sportscenter and 0.0.12 of script.module.thesportsdb):
-Better time and date presentation
-Hour of the event (missing manipulation based on timezone - waiting on the db side)
-League tables
-First attempt at fixtures (waiting on the db side)
-Calendar dialog nearly finished (timezones missing)
-Livescores also nearly finished (timeznes missing)
-Event details dialog for soccer with team lineups and event summary
-A lot of new settings

Enjoy as this update was a massive ammount of code.
(2015-04-21, 15:13)enen92 Wrote: [ -> ]
(2015-04-19, 03:04)mjccox Wrote: [ -> ]Great ideas getting this library thing working with this awesome addon!

I have already finished most of the stuff that was pending (still some not at 100% as it needs some changes no the database by zag):

https://github.com/enen92/script.sportsc...its/master

I am starting the library thing today

In the meanwhile pushed an update to the gcode repository (version 0.0.20 of sportscenter and 0.0.12 of script.module.thesportsdb):
-Better time and date presentation
-Hour of the event (missing manipulation based on timezone - waiting on the db side)
-League tables
-First attempt at fixtures (waiting on the db side)
-Calendar dialog nearly finished (timezones missing)
-Livescores also nearly finished (timeznes missing)
-Event details dialog for soccer with team lineups and event summary
-A lot of new settings

Enjoy as this update was a massive ammount of code.

THANKĀ“S ENEN !!


a simple question, I have registered on the website but do not know how to add my favorite teams Huh
I think you have already figured that out Smile
(2015-04-21, 16:46)enen92 Wrote: [ -> ]I think you have already figured that out Smile

Yes yes Laugh

Go more good return gave this plugin!

You know when confluence skin support?
When finished only. I don't want to be fixing bugs in different skins at the same time. Better fix one and when porting everything should be working.
(2015-04-21, 16:49)enen92 Wrote: [ -> ]When finished only. I don't want to be fixing bugs in different skins at the same time. Better fix one and when porting everything should be working.

if it is a good idea ...

ok just congratulate you and thank you for your work.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23